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
INSTALL_DIR = /usr/local/lib/lv2
INSTALL_DIR = /home/pi/zynthian/zynthian-plugins/mod-lv2
$(BUNDLE): manifest.ttl beep.ttl beep.so
rm -rf $(BUNDLE)
@ -8,7 +7,7 @@ $(BUNDLE): manifest.ttl beep.ttl beep.so
cp $^ $(BUNDLE)
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
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>
#include "beep.peg"
Copyright (C) 2004-2010 Lars Luthman
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:
BeepVoice(double rate)
: m_key(LV2::INVALID_KEY), m_rate(rate), m_period(10), m_counter(0) {
}
BeepVoice (double rate)
: m_key(lvtk::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;
void
on (unsigned char key, unsigned char velocity)
{
m_key = key;
m_period = m_rate * 4.0 / lvtk::key2hz(m_key);
}
void
off (unsigned char velocity)
{
m_key = lvtk::INVALID_KEY;
}
unsigned char
get_key() const
{
return m_key;
}
void
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:
unsigned char m_key;
double m_rate;
uint32_t m_period;
uint32_t m_counter;
unsigned char m_key;
double m_rate;
uint32_t m_period;
uint32_t m_counter;
};
class Beep : public LV2::Synth<BeepVoice, Beep> {
class Beep : public lvtk::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);
}
Beep (double rate) : lvtk::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);
}
};

@ -1,49 +1,67 @@
@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#> .
# Copyright (C) 2004-2010 Lars Luthman
# 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.
@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>
a lv2:Plugin, lv2:InstrumentPlugin;
lv2:binary <beep.so>;
doap:name "Beep";
doap:license <http://usefulinc.com/doap/licenses/gpl>;
ll:pegName "p";
a lv2:Plugin, lv2:InstrumentPlugin ;
doap:name "Beep" ;
lv2:project lvtkp: ;
doap:license <http://usefulinc.com/doap/licenses/gpl> ;
ui:ui <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/gui> ;
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 atom:AtomPort , lv2:InputPort ;
lv2:index 0;
lv2:symbol "midi";
lv2:name "MIDI";
atom:bufferType atom:Sequence ;
atom:supports <http://lv2plug.in/ns/ext/midi#MidiEvent> ;
[
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;
];
].
] , [
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 ;
] ;
] .

@ -1,49 +1,67 @@
@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#> .
# Copyright (C) 2004-2010 Lars Luthman
# 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.
@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>
a lv2:Plugin, lv2:InstrumentPlugin;
lv2:binary <beep.so>;
doap:name "Beep";
doap:license <http://usefulinc.com/doap/licenses/gpl>;
ll:pegName "p";
a lv2:Plugin, lv2:InstrumentPlugin ;
doap:name "Beep" ;
lv2:project lvtkp: ;
doap:license <http://usefulinc.com/doap/licenses/gpl> ;
ui:ui <http://ll-plugins.nongnu.org/lv2/lv2pftci/beep/gui> ;
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 atom:AtomPort , lv2:InputPort ;
lv2:index 0;
lv2:symbol "midi";
lv2:name "MIDI";
atom:bufferType atom:Sequence ;
atom:supports <http://lv2plug.in/ns/ext/midi#MidiEvent> ;
[
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;
];
].
] , [
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 ;
] ;
] .

@ -1,5 +1,44 @@
@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>.
# Copyright (C) 2013 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.
@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#>.
@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>.
# Copyright (C) 2013 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.
@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
INSTALL_DIR = /usr/local/lib/lv2
INSTALL_DIR = /home/pi/zynthian/zynthian-plugins/mod-lv2
$(BUNDLE): manifest.ttl beep2.ttl beep2.so

@ -1,6 +1,6 @@
BUNDLE = dexed.lv2
INSTALL_DIR = /usr/local/lib/lv2
CFLAGS := -fPIC -DPIC -DDEBUG=0 -std=c++11 -I/usr/include/lv2-c++-tools
INSTALL_DIR = /home/pi/zynthian/zynthian-plugins/mod-lv2
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
# SysexComm.o PluginFx.o
@ -18,7 +18,7 @@ install: $(BUNDLE)
cp -R $(BUNDLE) $(INSTALL_DIR)
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
$(CXX) $(CFLAGS) -Wall -c dexed.cpp

@ -1,6 +1,6 @@
// from: http://ll-plugins.nongnu.org/lv2pftci/#A_synth
#include <lv2synth.hpp>
#include <lvtk/synth.hpp>
#include "dexed.peg"
#include "dexed.h"
#include "EngineMkI.h"
@ -10,7 +10,7 @@
#include "msfa/freqlut.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;
feedback_bitdepth=fb;
@ -24,6 +24,7 @@ void DexedVoice::on(unsigned char key, unsigned char velocity)
void DexedVoice::off(unsigned char velocity)
{
voice.dx7_note->keyup();
m_key = lvtk::INVALID_KEY;
}
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)
{
if (m_key == LV2::INVALID_KEY)
if (m_key == lvtk::INVALID_KEY)
return;
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();
Tanh::init();
@ -86,5 +87,4 @@ uint32_t Dexed::get_engineType(void)
return(engineType);
}
static int _ = Dexed::register_class(p_uri);

@ -46,7 +46,7 @@ enum DexedEngineResolution {
//==============================================================================
class DexedVoice : public LV2::Voice
class DexedVoice : public lvtk::Voice
{
public:
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:
Dexed(double rate);

Loading…
Cancel
Save