[LV2] Killing the event extension

hermann meyer brummer- at web.de
Sat Feb 1 03:42:39 PST 2014


Am 01.02.2014 09:00, schrieb Filipe Coelho:
> On 02/01/2014 07:03 AM, hermann meyer wrote:
>> Okay.
>> Just as a side note,  the plug checks anyway if the event extension 
>> is supported, otherwise, it will simply disable the midi out.
>> But, . .
>>
>> With the event extension I could write midi events comparable to 
>> jack_midi_events.
>> What I do is the following
>> void Gxtuner::send_midi_data(int count, uint8_t controller,
>>                              uint8_t note, uint8_t velocity)
>> {
>>   midi_data[0] = controller; // note on/off
>>   midi_data[1] = note; // note
>>   midi_data[2] = velocity; // velocity
>>   if(! MidiOut) return;
>>     if(!lv2_event_write(&out_iter, count, 0, midi_event, 3, 
>> midi_data)) {
>>         printf("Error! midi event fail!\n");
>>     }
>> }
>>
>> Could I and How,  set up a atom message, to use it in a comparable 
>> manner?
>
> I use this when I want to output MIDI events:
>
> struct LV2_Atom_MidiEvent {
>     LV2_Atom_Event event;
>     uint8_t data[4];
> };
>
> Then  I guess you can use:
>
> LV2_Atom_MidiEvent midiEv;
> midiEv.event.time.frames = 0;
> midiEv.event.body.type  = uris.midiEvent;
> midiEv.event.body.size   = 3;
> midiEv.data[0] = controller;
> midiEv.data[1] = note;
> midiEv.data[2] = velocity;
>

Thanks Filipe

I've found the blog entry from spencer, which helps me to work it out.
http://mountainbikesandtrombones.blogspot.de/2014/01/lv2-forge-and-tempo-syncronization-or.html

greets
hermann



More information about the Devel mailing list