Skip to content

pdast integration #2382

Description

@konsumer

Hi,

I made pdast. It's another method of generating code from pd source. The idea is that it's an intermediary format that doesn't try to actually do anything directly with parsing pd files, just makes it easier for other code to read and convert it.

I made a few code-generators:

  • faust - this specialized audio-language can compile to native plugins (VST, ladspa, etc) and standalone programs, and wasm (web only, because it uses emscripten)
  • MOZZI - this is native arduino library with very wide device support. You can make cheap (like < $1) standalone synth hardware!
  • CLAP - this is a cross-platform plugin system, that is very simple. From this I can also compile to standalone (web or native) wasm, which can work on any host, without recompile. Currently, I don't try to support UI, because I didn't need it, but I could add web UI or some other standard for GUI canvas.

I use rust to make mine, but output is regular JSON, and is pretty easy to write a code-generator in whatever language you like. Rust is simpler to build lots of cross-platform runtimes, but I also expose the AST-generator API as a C (and nodejs) library.

I use CLAP support to make cross-platform wasm plugins that work on native and web (there is other stuff in video, but you can see it in action, in my tracker, here, which works on native & web, if you grab example plugins from a release.) In my own tracker, I wanted a simple cross-platform plugin system that doesn't require users to re-compile and runs in a secure sandbox, and lets users write them in any language that can target wasm.

I think it'd be really cool if plugdata had direct support for it (generate ast, then optionally output other code.) Is there interest in a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions