Skip to content

turns pure data patches into lv2 plugins

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE-isc
GPL-3.0
COPYING-gpl3
Notifications You must be signed in to change notification settings

x37v/pdlv2

 
 

Repository files navigation

pdlv2

Makes simple Pure Data (aka pd) patches usable as LV2 plugins utilizing libpd and lvtk

It supports audio, control and midi in and out.

Currently there is no GUI, just what your host can provide.

Linux only at the moment.

NOTE

Your lv2 host needs to provide processing blocks in multiples of pd's block size, which defaults to 64. Hopefully we can relax this requirement in the future.

Requirements

Only works on Linux as far as I know

Install these:

  • Pure Data can use package manager
  • ruby use package manager or rvm
  • bundler gem or package manager
    • run: bundle install from the top project directory

Install submodules:

  • list of submodules:
  • install process:
    • git submodule init
    • git submodule update
    • then do the same in the libpd directory

You'll also need a c++ compiler and make

  • install build-essential on debian based systems

Workflow

Short version:

  • Install all the stuff in the requirements above
  • Copy the entire plugins/template/ directory to a new directory in plugins/
    • For example plugins/myawesomeplugin
  • Use Pure Data to customize the plugin.pd file in that new directory
    • In the above example run: pd plugins/myawesomeplugin/plugin.pd
  • Run make install from the top level of the project
  • done

Long version:

  • create your pd patch, save it as plugins/<plugin_name>/plugin.pd
    • check out the template patch as a reference
    • specify the plugin details using messages:
    • specify control inputs and/or outputs you want
      • inputs use [receive] or [r]
      • outputs use [send] or [s]
      • format: [ receive $1-lv2-control_symbol_name label: Control-Label range: 0 0.5 1 ]
      • you can use the short form: [ r $1-lv2-control_symbol_name ]
      • the symbol must be $1-lv2- followed by a valid c-identifier which defines the symbol that is used to identify the port
        • for example, $1-lv2-balance defines a port named balance
      • label cannot contain whitespace at this time
      • range specified by floats in the order: minimum default maximum
    • specify any audio inputs and/or outputs you want
      • inputs use [inlet~]
      • outputs use [outlet~]
        • name them with a label or a group
          • label:Label-Name
          • group:GroupName:GroupType:MemberType
        • you only need a label or a group, not both
        • GroupType and MemberType are defined by lv2
        • for example [inlet~ label:Ducking-Input]
        • for example [outlet~ group:Main:StereoGroup:right]
    • include midi objects if you want a midi in or out ports, can be in a subpatch but not an abstraction
      • for input:
        • notein
        • ctlin
        • pgmin
        • bendin
        • touchin
        • polytouchin
      • for output:
        • noteout
        • ctlout
        • pgmout
        • bendout
        • touchout
        • polytouchout
    • include any abstractions in the same directory
  • make: to build all the plugins
    • this parses the pd file for all the info it needs to build the plugins
  • make install: to install into ~/.lv2/
    • you can modify this destination by editing INSTALL_DIR in the Makefile

References

Debugging, dev

  • carla --gdb for testing with multiple plugins at a time.. though my version doesn't seem to invoke gdb
  • jalv.. how do we run it in GDB and load our plugin's symbols?

TODO

  • check out GUI support in this fork: https://github.com/kmatheussen/libpd
  • support externals
  • ditch temp file plugin loading when libpd has real multi-instance support
  • consolidate libpd calls into a class and preload function pointers
  • validate
  • allow for block sizes less than 64
  • allow whitespace in control labels
  • plugin category
  • support a custom GUI

See also

  • Camomile 'A plugin that loads and controls Pure Data patches.' Takes a different approach but is more certainly full featured than pdlv2, and can run in lv2 as well as vst etc.

About

turns pure data patches into lv2 plugins

Resources

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE-isc
GPL-3.0
COPYING-gpl3

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 55.4%
  • C++ 41.2%
  • Makefile 3.4%