[LV2] Killing the event extension
Bent Bisballe Nyeng
deva at aasimon.org
Sat Feb 1 10:11:42 PST 2014
On 02/01/14 18:39, David Robillard wrote:
> On Sat, 2014-02-01 at 08:00 +0000, Filipe Coelho wrote:
>> On 02/01/2014 07:03 AM, hermann meyer wrote:
> [...]
>>> 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];
>> };
>
> I suppose a similar utility function to lv2_event_write should be added
> to util.h (and an lv2_atom_sequence_clear or something)
>
> The forge is the swiss army knife of writing, but if you just want to
> write MIDI it's a bit overkill.
>
> I will add these and an example plugin that uses them.
>
Would it make sense to write a utility function for reading midi notes
as well, or is this task simple enough as it is already?
(Disclaimer; I did not read the new spec yet, since I want to wait and
see where this discussion lands before I start porting my plugin...)
Kind Regards
Bent Bisballe Nyeng
More information about the Devel
mailing list