Changed lv2-c++-tools againts lvtk, becuase of needed atom support.

pull/1/head
Holger Wirtz 8 years ago
parent caccab0570
commit 655870dad8
  1. 22
      lv2-examples/beep.lv2tools/Makefile
  2. 61
      lv2-examples/beep.lv2tools/beep.cpp
  3. 35
      lv2-examples/beep.lv2tools/beep.peg
  4. 49
      lv2-examples/beep.lv2tools/beep.ttl
  5. 49
      lv2-examples/beep.lv2tools/lv2pftci-beep.lv2/beep.ttl
  6. 5
      lv2-examples/beep.lv2tools/lv2pftci-beep.lv2/manifest.ttl
  7. 5
      lv2-examples/beep.lv2tools/manifest.ttl
  8. 5
      lv2-examples/beep/Makefile
  9. 112
      lv2-examples/beep/beep.cpp
  10. 102
      lv2-examples/beep/beep.ttl
  11. 102
      lv2-examples/beep/lv2pftci-beep.lv2/beep.ttl
  12. 49
      lv2-examples/beep/lv2pftci-beep.lv2/manifest.ttl
  13. 49
      lv2-examples/beep/manifest.ttl
  14. 2
      lv2-examples/beep2.lv2tools/Makefile
  15. 0
      lv2-examples/beep2.lv2tools/beep.cpp
  16. 0
      lv2-examples/beep2.lv2tools/beep.peg
  17. 0
      lv2-examples/beep2.lv2tools/beep2.ttl
  18. 0
      lv2-examples/beep2.lv2tools/lv2pftci-beep2.lv2/beep2.ttl
  19. 0
      lv2-examples/beep2.lv2tools/lv2pftci-beep2.lv2/manifest.ttl
  20. 0
      lv2-examples/beep2.lv2tools/manifest.ttl
  21. 6
      src/Makefile
  22. 10
      src/dexed.cpp
  23. 4
      src/dexed.h

@ -0,0 +1,22 @@
BUNDLE = lv2pftci-beep.lv2
INSTALL_DIR = /home/pi/zynthian/zynthian-plugins/mod-lv2
$(BUNDLE): manifest.ttl beep.ttl beep.so
rm -rf $(BUNDLE)
mkdir $(BUNDLE)
cp $^ $(BUNDLE)
beep.so: beep.cpp beep.peg
g++ -shared -fPIC -DPIC beep.cpp `pkg-config --cflags --libs lv2-plugin` -o beep.so
beep.peg: beep.ttl
lv2peg beep.ttl beep.peg
install: $(BUNDLE)
mkdir -p $(INSTALL_DIR)
rm -rf $(INSTALL_DIR)/$(BUNDLE)
cp -R $(BUNDLE) $(INSTALL_DIR)
clean:
rm -rf $(BUNDLE) beep.so beep.peg

@ -0,0 +1,61 @@
// from: http://ll-plugins.nongnu.org/lv2pftci/#A_synth
#include <lv2synth.hpp>
#include "beep.peg"
class BeepVoice : public LV2::Voice {
public:
BeepVoice(double rate)
: m_key(LV2::INVALID_KEY), m_rate(rate), m_period(10), m_counter(0) {
}
void on(unsigned char key, unsigned char velocity) {
m_key = key;
m_period = m_rate * 4.0 / LV2::key2hz(m_key);
}
void off(unsigned char velocity) {
m_key = LV2::INVALID_KEY;
}
unsigned char get_key() const {
return m_key;
}
void render(uint32_t from, uint32_t to) {
if (m_key == LV2::INVALID_KEY)
return;
for (uint32_t i = from; i < to; ++i) {
float s = -0.25 + 0.5 * (m_counter > m_period / 2);
m_counter = (m_counter + 1) % m_period;
p(p_left)[i] += s;
p(p_right)[i] += s;
}
}
protected:
unsigned char m_key;
double m_rate;
uint32_t m_period;
uint32_t m_counter;
};
class Beep : public LV2::Synth<BeepVoice, Beep> {
public:
Beep(double rate)
: LV2::Synth<BeepVoice, Beep>(p_n_ports, p_midi) {
add_voices(new BeepVoice(rate), new BeepVoice(rate), new BeepVoice(rate));
add_audio_outputs(p_left, p_right);
}
};
static int _ = Beep::register_class(p_uri);

@ -0,0 +1,35 @@
#ifndef beep_peg
#define beep_peg
#ifndef PEG_STRUCT
#define PEG_STRUCT
typedef struct {
float min;
float max;
float default_value;
char toggled;
char integer;
char logarithmic;
} peg_data_t;
#endif
/* <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep> */
static const char p_uri[] = "http://ll-plugins.nongnu.org/lv2/lv2pftci/beep";
enum p_port_enum {
p_midi,
p_left,
p_right,
p_n_ports
};
static const peg_data_t p_ports[] = {
{ -3.40282e+38, 3.40282e+38, -3.40282e+38, 0, 0, 0 },
{ -3.40282e+38, 3.40282e+38, -3.40282e+38, 0, 0, 0 },
{ -3.40282e+38, 3.40282e+38, -3.40282e+38, 0, 0, 0 },
};
#endif /* beep_peg */

@ -0,0 +1,49 @@
@prefix lv2: <http://lv2plug.in/ns/lv2core#>.
@prefix doap: <http://usefulinc.com/ns/doap#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ll: <http://ll-plugins.nongnu.org/lv2/namespace#>.
@prefix pg: <http://ll-plugins.nongnu.org/lv2/ext/portgroups#>.
@prefix ev: <http://lv2plug.in/ns/ext/event#>.
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out> a pg:StereoGroup.
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep>
a lv2:Plugin, lv2:InstrumentPlugin;
lv2:binary <beep.so>;
doap:name "Beep";
doap:license <http://usefulinc.com/doap/licenses/gpl>;
ll:pegName "p";
lv2:port [
a lv2:InputPort, atom:AtomPort ;
atom:bufferType atom:Sequence ;
atom:supports <http://lv2plug.in/ns/ext/midi#MidiEvent> ;
lv2:index 0;
ev:supportsEvent <http://lv2plug.in/ns/ext/midi#MidiEvent>;
lv2:symbol "midi";
lv2:name "MIDI";
],
[
a lv2:AudioPort, lv2:OutputPort;
lv2:index 1;
lv2:symbol "left";
lv2:name "Left";
pg:membership [
pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out>;
pg:role pg:leftChannel;
];
],
[
a lv2:AudioPort, lv2:OutputPort;
lv2:index 2;
lv2:symbol "right";
lv2:name "Right";
pg:membership [
pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out>;
pg:role pg:rightChannel;
];
].

@ -0,0 +1,49 @@
@prefix lv2: <http://lv2plug.in/ns/lv2core#>.
@prefix doap: <http://usefulinc.com/ns/doap#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ll: <http://ll-plugins.nongnu.org/lv2/namespace#>.
@prefix pg: <http://ll-plugins.nongnu.org/lv2/ext/portgroups#>.
@prefix ev: <http://lv2plug.in/ns/ext/event#>.
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out> a pg:StereoGroup.
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep>
a lv2:Plugin, lv2:InstrumentPlugin;
lv2:binary <beep.so>;
doap:name "Beep";
doap:license <http://usefulinc.com/doap/licenses/gpl>;
ll:pegName "p";
lv2:port [
a lv2:InputPort, atom:AtomPort ;
atom:bufferType atom:Sequence ;
atom:supports <http://lv2plug.in/ns/ext/midi#MidiEvent> ;
lv2:index 0;
ev:supportsEvent <http://lv2plug.in/ns/ext/midi#MidiEvent>;
lv2:symbol "midi";
lv2:name "MIDI";
],
[
a lv2:AudioPort, lv2:OutputPort;
lv2:index 1;
lv2:symbol "left";
lv2:name "Left";
pg:membership [
pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out>;
pg:role pg:leftChannel;
];
],
[
a lv2:AudioPort, lv2:OutputPort;
lv2:index 2;
lv2:symbol "right";
lv2:name "Right";
pg:membership [
pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out>;
pg:role pg:rightChannel;
];
].

@ -0,0 +1,5 @@
@prefix lv2: <http://lv2plug.in/ns/lv2core#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep>
a lv2:Plugin;
rdfs:seeAlso <beep.ttl>.

@ -0,0 +1,5 @@
@prefix lv2: <http://lv2plug.in/ns/lv2core#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep>
a lv2:Plugin;
rdfs:seeAlso <beep.ttl>.

@ -1,6 +1,5 @@
BUNDLE = lv2pftci-beep.lv2 BUNDLE = lv2pftci-beep.lv2
INSTALL_DIR = /usr/local/lib/lv2 INSTALL_DIR = /home/pi/zynthian/zynthian-plugins/mod-lv2
$(BUNDLE): manifest.ttl beep.ttl beep.so $(BUNDLE): manifest.ttl beep.ttl beep.so
rm -rf $(BUNDLE) rm -rf $(BUNDLE)
@ -8,7 +7,7 @@ $(BUNDLE): manifest.ttl beep.ttl beep.so
cp $^ $(BUNDLE) cp $^ $(BUNDLE)
beep.so: beep.cpp beep.peg beep.so: beep.cpp beep.peg
g++ -shared -fPIC -DPIC beep.cpp `pkg-config --cflags --libs lv2-plugin` -o beep.so g++ -shared -fPIC -DPIC beep.cpp -I. -I/usr/local/include/lvtk-2 -L/usr/local/lib -llvtk_plugin2 -o beep.so
beep.peg: beep.ttl beep.peg: beep.ttl
lv2peg beep.ttl beep.peg lv2peg beep.ttl beep.peg

@ -1,60 +1,90 @@
// from: http://ll-plugins.nongnu.org/lv2pftci/#A_synth /*
beep.cpp - LV2 Toolkit API Demonstration Plugin
#include <lv2synth.hpp> Copyright (C) 2004-2010 Lars Luthman
#include "beep.peg" Updated for LVTK by Michael Fisher <mfisher31@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/** @file beep.cpp */
class BeepVoice : public LV2::Voice {
#include <lvtk/synth.hpp>
#include "beep.peg"
class BeepVoice : public lvtk::Voice
{
public: public:
BeepVoice(double rate) BeepVoice (double rate)
: m_key(LV2::INVALID_KEY), m_rate(rate), m_period(10), m_counter(0) { : m_key(lvtk::INVALID_KEY), m_rate(rate), m_period(10), m_counter(0)
{ }
}
void on(unsigned char key, unsigned char velocity) { void
m_key = key; on (unsigned char key, unsigned char velocity)
m_period = m_rate * 4.0 / LV2::key2hz(m_key); {
} m_key = key;
m_period = m_rate * 4.0 / lvtk::key2hz(m_key);
void off(unsigned char velocity) { }
m_key = LV2::INVALID_KEY;
} void
off (unsigned char velocity)
unsigned char get_key() const { {
return m_key; m_key = lvtk::INVALID_KEY;
} }
void render(uint32_t from, uint32_t to) { unsigned char
if (m_key == LV2::INVALID_KEY) get_key() const
return; {
for (uint32_t i = from; i < to; ++i) { return m_key;
float s = -0.25 + 0.5 * (m_counter > m_period / 2); }
m_counter = (m_counter + 1) % m_period;
p(p_left)[i] += s; void
p(p_right)[i] += s; render(uint32_t from, uint32_t to)
{
if (m_key == lvtk::INVALID_KEY) return;
for (uint32_t i = from; i < to; ++i)
{
float s = -0.25 + 0.5 * (m_counter > m_period / 2);
m_counter = (m_counter + 1) % m_period;
p(p_left)[i] += s;
p(p_right)[i] += s;
}
} }
}
protected: protected:
unsigned char m_key; unsigned char m_key;
double m_rate; double m_rate;
uint32_t m_period; uint32_t m_period;
uint32_t m_counter; uint32_t m_counter;
}; };
class Beep : public LV2::Synth<BeepVoice, Beep> { class Beep : public lvtk::Synth<BeepVoice, Beep>
{
public: public:
Beep(double rate) Beep (double rate) : lvtk::Synth<BeepVoice, Beep> (p_n_ports, p_midi)
: LV2::Synth<BeepVoice, Beep>(p_n_ports, p_midi) { {
add_voices(new BeepVoice(rate), new BeepVoice(rate), new BeepVoice(rate)); add_voices (new BeepVoice(rate), new BeepVoice(rate), new BeepVoice(rate));
add_audio_outputs(p_left, p_right); add_audio_outputs (p_left, p_right);
} }
}; };

@ -1,49 +1,67 @@
@prefix lv2: <http://lv2plug.in/ns/lv2core#>. # Copyright (C) 2004-2010 Lars Luthman
@prefix doap: <http://usefulinc.com/ns/doap#>. # Updated for LVTK by Michael Fisher <mfisher31@gmail.com>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. #
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. # This program is free software; you can redistribute it and/or
@prefix ll: <http://ll-plugins.nongnu.org/lv2/namespace#>. # modify it under the terms of the GNU General Public License as
@prefix pg: <http://ll-plugins.nongnu.org/lv2/ext/portgroups#>. # published by the Free Software Foundation; either version 2 of
@prefix ev: <http://lv2plug.in/ns/ext/event#>. # the License, or (at your option) any later version.
@prefix atom: <http://lv2plug.in/ns/ext/atom#> . #
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@prefix lv2: <http://lv2plug.in/ns/lv2core#>.
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix doap: <http://usefulinc.com/ns/doap#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ll: <http://ll-plugins.nongnu.org/lv2/namespace#>.
@prefix pg: <http://ll-plugins.nongnu.org/lv2/ext/portgroups#>.
@prefix ev: <http://lv2plug.in/ns/ext/event#>.
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> .
@prefix lvtkp: <http://lvtoolkit.org/plugins/> .
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out> a pg:StereoGroup. <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out> a pg:StereoGroup.
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep> <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep>
a lv2:Plugin, lv2:InstrumentPlugin; a lv2:Plugin, lv2:InstrumentPlugin ;
lv2:binary <beep.so>; doap:name "Beep" ;
doap:name "Beep"; lv2:project lvtkp: ;
doap:license <http://usefulinc.com/doap/licenses/gpl>; doap:license <http://usefulinc.com/doap/licenses/gpl> ;
ll:pegName "p"; ui:ui <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/gui> ;
ll:pegName "p" ;
lv2:port [ lv2:port [
a lv2:InputPort, atom:AtomPort ; a atom:AtomPort , lv2:InputPort ;
atom:bufferType atom:Sequence ; lv2:index 0;
atom:supports <http://lv2plug.in/ns/ext/midi#MidiEvent> ; lv2:symbol "midi";
lv2:index 0; lv2:name "MIDI";
ev:supportsEvent <http://lv2plug.in/ns/ext/midi#MidiEvent>; atom:bufferType atom:Sequence ;
lv2:symbol "midi"; atom:supports <http://lv2plug.in/ns/ext/midi#MidiEvent> ;
lv2:name "MIDI";
],
[ ] , [
a lv2:AudioPort, lv2:OutputPort; a lv2:AudioPort
lv2:index 1; , lv2:OutputPort ;
lv2:symbol "left"; lv2:index 1 ;
lv2:name "Left"; lv2:symbol "left" ;
pg:membership [ lv2:name "Left" ;
pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out>; pg:membership [
pg:role pg:leftChannel; pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out>;
]; pg:role pg:leftChannel;
], ];
] , [
[ a lv2:AudioPort ,
a lv2:AudioPort, lv2:OutputPort; lv2:OutputPort ;
lv2:index 2; lv2:index 2 ;
lv2:symbol "right"; lv2:symbol "right" ;
lv2:name "Right"; lv2:name "Right" ;
pg:membership [ pg:membership [
pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out>; pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out> ;
pg:role pg:rightChannel; pg:role pg:rightChannel ;
]; ] ;
]. ] .

@ -1,49 +1,67 @@
@prefix lv2: <http://lv2plug.in/ns/lv2core#>. # Copyright (C) 2004-2010 Lars Luthman
@prefix doap: <http://usefulinc.com/ns/doap#>. # Updated for LVTK by Michael Fisher <mfisher31@gmail.com>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. #
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. # This program is free software; you can redistribute it and/or
@prefix ll: <http://ll-plugins.nongnu.org/lv2/namespace#>. # modify it under the terms of the GNU General Public License as
@prefix pg: <http://ll-plugins.nongnu.org/lv2/ext/portgroups#>. # published by the Free Software Foundation; either version 2 of
@prefix ev: <http://lv2plug.in/ns/ext/event#>. # the License, or (at your option) any later version.
@prefix atom: <http://lv2plug.in/ns/ext/atom#> . #
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@prefix lv2: <http://lv2plug.in/ns/lv2core#>.
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix doap: <http://usefulinc.com/ns/doap#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ll: <http://ll-plugins.nongnu.org/lv2/namespace#>.
@prefix pg: <http://ll-plugins.nongnu.org/lv2/ext/portgroups#>.
@prefix ev: <http://lv2plug.in/ns/ext/event#>.
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> .
@prefix lvtkp: <http://lvtoolkit.org/plugins/> .
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out> a pg:StereoGroup. <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out> a pg:StereoGroup.
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep> <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep>
a lv2:Plugin, lv2:InstrumentPlugin; a lv2:Plugin, lv2:InstrumentPlugin ;
lv2:binary <beep.so>; doap:name "Beep" ;
doap:name "Beep"; lv2:project lvtkp: ;
doap:license <http://usefulinc.com/doap/licenses/gpl>; doap:license <http://usefulinc.com/doap/licenses/gpl> ;
ll:pegName "p"; ui:ui <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/gui> ;
ll:pegName "p" ;
lv2:port [ lv2:port [
a lv2:InputPort, atom:AtomPort ; a atom:AtomPort , lv2:InputPort ;
atom:bufferType atom:Sequence ; lv2:index 0;
atom:supports <http://lv2plug.in/ns/ext/midi#MidiEvent> ; lv2:symbol "midi";
lv2:index 0; lv2:name "MIDI";
ev:supportsEvent <http://lv2plug.in/ns/ext/midi#MidiEvent>; atom:bufferType atom:Sequence ;
lv2:symbol "midi"; atom:supports <http://lv2plug.in/ns/ext/midi#MidiEvent> ;
lv2:name "MIDI";
],
[ ] , [
a lv2:AudioPort, lv2:OutputPort; a lv2:AudioPort
lv2:index 1; , lv2:OutputPort ;
lv2:symbol "left"; lv2:index 1 ;
lv2:name "Left"; lv2:symbol "left" ;
pg:membership [ lv2:name "Left" ;
pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out>; pg:membership [
pg:role pg:leftChannel; pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out>;
]; pg:role pg:leftChannel;
], ];
] , [
[ a lv2:AudioPort ,
a lv2:AudioPort, lv2:OutputPort; lv2:OutputPort ;
lv2:index 2; lv2:index 2 ;
lv2:symbol "right"; lv2:symbol "right" ;
lv2:name "Right"; lv2:name "Right" ;
pg:membership [ pg:membership [
pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out>; pg:group <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/out> ;
pg:role pg:rightChannel; pg:role pg:rightChannel ;
]; ] ;
]. ] .

@ -1,5 +1,44 @@
@prefix lv2: <http://lv2plug.in/ns/lv2core#>. # Copyright (C) 2013 Michael Fisher <mfisher31@gmail.com>
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. #
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep> # This program is free software; you can redistribute it and/or
a lv2:Plugin; # modify it under the terms of the GNU General Public License as
rdfs:seeAlso <beep.ttl>. # published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix lvtkp: <http://lvtoolkit.org/plugins/> .
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> .
<http://lvtoolkit.org/people/mfisher>
a foaf:Person ;
foaf:name "Michael Fisher" ;
foaf:mbox <mailto:mfisher31@gmail.com> ;
rdfs:seeAlso <http://lvtoolkit.org> .
lvtkp:
a doap:Project ;
lv2:symbol "lvtk" ;
doap:name "LVTK Examples" ;
doap:shortdesc "Example plugins demonstrating the LVTK api." ;
doap:homepage <http://lvtoolkit.org> ;
doap:maintainer <http://lvtoolkit.org/people/mfisher> ;
doap:developer <http://lvtoolkit.org/people/mfisher> .
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep>
a lv2:Plugin ;
lv2:binary <beep.so> ;
rdfs:seeAlso <beep.ttl> .

@ -1,5 +1,44 @@
@prefix lv2: <http://lv2plug.in/ns/lv2core#>. # Copyright (C) 2013 Michael Fisher <mfisher31@gmail.com>
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. #
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep> # This program is free software; you can redistribute it and/or
a lv2:Plugin; # modify it under the terms of the GNU General Public License as
rdfs:seeAlso <beep.ttl>. # published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix lvtkp: <http://lvtoolkit.org/plugins/> .
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> .
<http://lvtoolkit.org/people/mfisher>
a foaf:Person ;
foaf:name "Michael Fisher" ;
foaf:mbox <mailto:mfisher31@gmail.com> ;
rdfs:seeAlso <http://lvtoolkit.org> .
lvtkp:
a doap:Project ;
lv2:symbol "lvtk" ;
doap:name "LVTK Examples" ;
doap:shortdesc "Example plugins demonstrating the LVTK api." ;
doap:homepage <http://lvtoolkit.org> ;
doap:maintainer <http://lvtoolkit.org/people/mfisher> ;
doap:developer <http://lvtoolkit.org/people/mfisher> .
<http://ll-plugins.nongnu.org/lv2/lv2pftci/beep>
a lv2:Plugin ;
lv2:binary <beep.so> ;
rdfs:seeAlso <beep.ttl> .

@ -1,5 +1,5 @@
BUNDLE = lv2pftci-beep2.lv2 BUNDLE = lv2pftci-beep2.lv2
INSTALL_DIR = /usr/local/lib/lv2 INSTALL_DIR = /home/pi/zynthian/zynthian-plugins/mod-lv2
$(BUNDLE): manifest.ttl beep2.ttl beep2.so $(BUNDLE): manifest.ttl beep2.ttl beep2.so

@ -1,6 +1,6 @@
BUNDLE = dexed.lv2 BUNDLE = dexed.lv2
INSTALL_DIR = /usr/local/lib/lv2 INSTALL_DIR = /home/pi/zynthian/zynthian-plugins/mod-lv2
CFLAGS := -fPIC -DPIC -DDEBUG=0 -std=c++11 -I/usr/include/lv2-c++-tools CFLAGS := -fPIC -DPIC -DDEBUG=0 -std=c++11 -I. -I/usr/local/include/lvtk-2 -L/usr/local/lib -llvtk_plugin2
OBJ = dexed.o fm_core.o env.o lfo.o dx7note.o sin.o pitchenv.o fm_op_kernel.o freqlut.o exp2.o EngineMkI.o EngineOpl.o OBJ = dexed.o fm_core.o env.o lfo.o dx7note.o sin.o pitchenv.o fm_op_kernel.o freqlut.o exp2.o EngineMkI.o EngineOpl.o
# SysexComm.o PluginFx.o # SysexComm.o PluginFx.o
@ -18,7 +18,7 @@ install: $(BUNDLE)
cp -R $(BUNDLE) $(INSTALL_DIR) cp -R $(BUNDLE) $(INSTALL_DIR)
dexed.so: $(OBJ) dexed.so: $(OBJ)
g++ -shared -fPIC -DPIC $(OBJ) `pkg-config --cflags --libs lv2-plugin` -o dexed.so g++ -shared -fPIC -DPIC $(OBJ) $(CFLAGS) -o dexed.so
dexed.o: dexed.cpp dexed.peg dexed.o: dexed.cpp dexed.peg
$(CXX) $(CFLAGS) -Wall -c dexed.cpp $(CXX) $(CFLAGS) -Wall -c dexed.cpp

@ -1,6 +1,6 @@
// from: http://ll-plugins.nongnu.org/lv2pftci/#A_synth // from: http://ll-plugins.nongnu.org/lv2pftci/#A_synth
#include <lv2synth.hpp> #include <lvtk/synth.hpp>
#include "dexed.peg" #include "dexed.peg"
#include "dexed.h" #include "dexed.h"
#include "EngineMkI.h" #include "EngineMkI.h"
@ -10,7 +10,7 @@
#include "msfa/freqlut.h" #include "msfa/freqlut.h"
#include "msfa/controllers.h" #include "msfa/controllers.h"
DexedVoice::DexedVoice(double rate, uint8_t fb) : m_key(LV2::INVALID_KEY), m_rate(rate) DexedVoice::DexedVoice(double rate, uint8_t fb) : m_key(lvtk::INVALID_KEY), m_rate(rate)
{ {
voice.dx7_note=new Dx7Note; voice.dx7_note=new Dx7Note;
feedback_bitdepth=fb; feedback_bitdepth=fb;
@ -24,6 +24,7 @@ void DexedVoice::on(unsigned char key, unsigned char velocity)
void DexedVoice::off(unsigned char velocity) void DexedVoice::off(unsigned char velocity)
{ {
voice.dx7_note->keyup(); voice.dx7_note->keyup();
m_key = lvtk::INVALID_KEY;
} }
unsigned char DexedVoice::get_key(void) const unsigned char DexedVoice::get_key(void) const
@ -33,7 +34,7 @@ unsigned char DexedVoice::get_key(void) const
void DexedVoice::render(uint32_t from, uint32_t to) void DexedVoice::render(uint32_t from, uint32_t to)
{ {
if (m_key == LV2::INVALID_KEY) if (m_key == lvtk::INVALID_KEY)
return; return;
for (uint32_t i = from; i < to; ++i) for (uint32_t i = from; i < to; ++i)
@ -50,7 +51,7 @@ void DexedVoice::render(uint32_t from, uint32_t to)
//============================================================================== //==============================================================================
Dexed::Dexed(double rate) : LV2::Synth<DexedVoice, Dexed>(p_n_ports, p_lv2_events_in) Dexed::Dexed(double rate) : lvtk::Synth<DexedVoice, Dexed>(p_n_ports, p_lv2_events_in)
{ {
Exp2::init(); Exp2::init();
Tanh::init(); Tanh::init();
@ -86,5 +87,4 @@ uint32_t Dexed::get_engineType(void)
return(engineType); return(engineType);
} }
static int _ = Dexed::register_class(p_uri); static int _ = Dexed::register_class(p_uri);

@ -46,7 +46,7 @@ enum DexedEngineResolution {
//============================================================================== //==============================================================================
class DexedVoice : public LV2::Voice class DexedVoice : public lvtk::Voice
{ {
public: public:
DexedVoice(double rate, uint8_t fb); DexedVoice(double rate, uint8_t fb);
@ -64,7 +64,7 @@ class DexedVoice : public LV2::Voice
//============================================================================== //==============================================================================
class Dexed : public LV2::Synth<DexedVoice, Dexed> class Dexed : public lvtk::Synth<DexedVoice, Dexed>
{ {
public: public:
Dexed(double rate); Dexed(double rate);

Loading…
Cancel
Save