[LAD] LV2::Synth from one note to another

Philipp Überbacher murks at tuxfamily.org
Wed Oct 8 09:03:14 UTC 2014


On Wed, 08 Oct 2014 05:38:56 +0100
Phil CM <philcm at gnu.org> wrote:

> Hello
> 
> I managed to make my example plugin 
> <https://bitbucket.org/xaccrocheur/ksi> (based on the only LV2 synth 
> tutorial <http://www.nongnu.org/ll-plugins/lv2pftci/#A_synth> that I 
> could find) monophonic :)
> Now the only think that is left is a portamento function, to go from
> one note to another (/exactly/ like so-404 
> <http://d00m.org/%7Esomeone/so404/> does).
> 
> I guess it has to do with the
> 
>    void on(unsigned char key, unsigned char velocity) {
>      m_key = key;
>      m_period = m_rate * 4.0 / LV2::key2hz(m_key);
>      m_envelope = velocity / 128.0;
>    }
> 
>    void off(unsigned char velocity) {
>      m_key = LV2::INVALID_KEY;
>    }
> 
> functions, I need to store the "note out" value to go from that, to a 
> "note in"...
> 
> Does anyone know the algorithm to implement that? That would really
> help me.
> 
> Thanks
> 
> PS - Excuse my poor English, I'm working on it

Hi Phil,

I have never done this but I suggest to look at the calf monosynth
code. AFAIR it has a couple of different ways to handle
successive/overlapping notes.

Another synth that comes to mind and has portamento is phasex.

Regards,
Philipp


More information about the Linux-audio-dev mailing list