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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-announce@...>, LV2 <devel@...>, LAD <linux-audio-dev@...>, LAU <linux-audio-user@...>
Date: Wednesday, April 16, 2008 - 5:14 pm

--=-ZpIXiqDVjVBtuMoSywK0
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

This software package contains libraries and programs that should make=20
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

./configure
make
su -c 'make install'

You can pass some options to configure, e.g. --prefix=3D/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
#include "gain.peg"
=20
class Gain : public LV2::Plugin {
public:
Gain(double rate) : LV2::Plugin(p_n_ports) { }
void run(uint32_t nframes) {
for (uint32_t i =3D 0; i < nframes; ++i)
p(p_out)[i] =3D p(p_gain) * p(p_in);
}
};
=20
static int _ =3D 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
#include "mysynth.peg"
=20
class MySynthGUI : public LV2::GUI > {
public:
MySynthGUI(const std::string& URI) : m_button("Click me!") {
m_button.signal_pressed().connect(mem_fun(*this, &MySynthGUI::send_not=
e_on));
m_button.signal_released().connect(mem_fun(*this, &MySynthGUI::send_no=
te_off));
pack_start(m_button);
}
protected:
void send_note_on() {
uint8_t event[] =3D { 0x90, 0x40, 0x40 };
write_midi(p_midi, 3, event);
}
void send_note_off() {
uint8_t event[] =3D { 0x80, 0x40, 0x40 };
write_midi(p_midi, 3, event);
}
Gtk::Button m_button;
};
=20
static int _ =3D MySynthGUI::register_class("http://my.gui/");

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

--ll

--=-ZpIXiqDVjVBtuMoSywK0
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBIBh/VQ3FGUATHfi4RAh7OAJwO3K57exxmoGM2l8FC694ntWdkEACfULS3
gG/qG8vQ7qlDX3nVYe+f0Ps=
=9+CG
-----END PGP SIGNATURE-----

--=-ZpIXiqDVjVBtuMoSywK0--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAA] [ANN] lv2-c++-tools 1.0.0, Lars Luthman, (Wed Apr 16, 5:14 pm)