lv2 midi - Keeping track of time while processing a noteOn event

All your LV2 and LADSPA goodness and more.

Moderators: MattKingUSA, khz

Post Reply
User avatar
binascii
Established Member
Posts: 4
Joined: Tue Jan 30, 2018 11:21 pm

lv2 midi - Keeping track of time while processing a noteOn event

Post by binascii »

Hi all! I'm using Moony to prototype for a MIDI only lv2 plugin I'm building. I've been trying to work out how to get some sort of song position value from a noteOn event, meaning that I need to know the beat and bar that the note belongs to when it invokes the midiResponder. Even a total time or total frames will do to calculate. The way Moony works with a timeResponder and a midiResponder means I can know the time position or the note... but not both simultaneously. Looking at the lv2 midi spec it looks like only the event type, note number and velocity are properties of a noteOn event atom... so then I will face the same issue when integrating this code into my lv2 plugin. Is this right? Is there a work around? Perhaps I'm missing something, does anyone know about this?

*EDIT* : I moved this across to KVR Audio under "lv2 midi - Keeping track of time while processing a noteOn event"
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: lv2 midi - Keeping track of time while processing a noteOn event

Post by ssj71 »

no the atoms all come with a frame index so you know precisely which sample/time it's associated with. I think you're just hitting a limitation in moony's design. In a regular C/C++ implementation you won't have any problem.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
User avatar
binascii
Established Member
Posts: 4
Joined: Tue Jan 30, 2018 11:21 pm

Re: lv2 midi - Keeping track of time while processing a noteOn event

Post by binascii »

In a regular C/C++ implementation you won't have any problem.
This was my main concern, thanks
There is no right or wrong... but there is good and bad.
Post Reply