[LAA] [ANN] lv2-c++-tools 1.0.0

Lars Luthman lars.luthman at gmail.com
Wed Apr 16 11:48:37 EDT 2008

This software package contains libraries and programs that should make 
it easier to write LV2 plugins and GUIs.

Download it: http://ll-plugins.nongnu.org/hacking.html
Read documentation: http://ll-plugins.nongnu.org/dox/lv2-c++-tools/
Or read a nice tutorial: http://ll-plugins.nongnu.org/lv2pftci/

To build and install, run

 su -c 'make install'

You can pass some options to configure, e.g. --prefix=/usr to install
everything in /usr (the default is /usr/local).

This is a development tool, but I'm sending it to the LAU list as well
in case there are any not-yet-hackers who would like to start writing
effects or synths. It's easy, I promise. Here's the code you would need
to write for a simple gain effect:

 #include <lv2plugin.hpp>
 #include "gain.peg"
 class Gain : public LV2::Plugin<Gain> {
   Gain(double rate) : LV2::Plugin<Gain>(p_n_ports) { }
   void run(uint32_t nframes) {
     for (uint32_t i = 0; i < nframes; ++i)
       p(p_out)[i] = p(p_gain) * p(p_in);
 static int _ = Gain::register_class("http://my.plugin/");

And here's the code you would need for a GUI for a synth plugin with a
button that sends a test tone:

 #include <lv2gui.hpp>
 #include "mysynth.peg"
 class MySynthGUI : public LV2::GUI<MySynthGUI, LV2::WriteMIDI<true> > {
   MySynthGUI(const std::string& URI) : m_button("Click me!") {
     m_button.signal_pressed().connect(mem_fun(*this, &MySynthGUI::send_note_on));
     m_button.signal_released().connect(mem_fun(*this, &MySynthGUI::send_note_off));
   void send_note_on() {
     uint8_t event[] = { 0x90, 0x40, 0x40 };
     write_midi(p_midi, 3, event);
   void send_note_off() {
     uint8_t event[] = { 0x80, 0x40, 0x40 };
     write_midi(p_midi, 3, event);
   Gtk::Button m_button;
 static int _ = MySynthGUI::register_class("http://my.gui/");

See? Trivial. Read more in the tutorial linked above.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.linuxaudio.org/pipermail/linux-audio-announce/attachments/20080416/048a988f/attachment.pgp 

More information about the Linux-audio-announce mailing list