[LV2] Killing the event extension

hermann meyer brummer- at web.de
Fri Jan 31 23:03:49 PST 2014


Am 01.02.2014 05:50, schrieb David Robillard:
> On Thu, 2014-01-30 at 17:43 +0100, hermann meyer wrote:
>> Am 29.01.2014 16:49, schrieb David Robillard:
>>> Well... deliberately using the deprecated extension*after*  trying the
>>> new one was a bad decision.  Sorry.
>> Maybe it helps if you write the DEPRECATED note as well in the header
>> itself.
> The next LV2 release will have all event stuff tagged as deprecated, so
> GCC will generate warnings on their use.
>
>> To help me understand your intentions, would you explain me please, what
>> is the bad with the event extension.
> The short answer, of course, is that it has been replaced and
> deprecated, but the main reasons why that happened are:
>
> 1) A container for data that isn't always inside an event buffer was
> needed
>
> 2) Different contexts for mapped URIs proved to be a
> broken/complicated/error-prone idea.  At the same time, uri-map was
> dropped for urid, and atoms use a straight (32-bit) URID for a type.
>

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?


regards
hermann





More information about the Devel mailing list