0

Need to know how to send the midi to an lv2 plugin in a mini host I made with lilv. Can not find any api for lv2_atom Anyone has examples of how to send simple message like note on etc? Thank you

Do not know how to make atom stream and send event

1 Answers1

0

In LV2, MIDI is sent as raw MIDI bytes inside an Event, and an Event is a part of a Sequence. Everything is flat buffers, so you can achieve this however you like. You can see an example of doing it more or less manually in Jalv:

https://gitlab.com/drobilla/jalv/-/blob/master/src/lv2_evbuf.c#L154

You can also use the forge.h utility header, which makes writing complex atom buffers simpler (although is arguably overkill for just MIDI), see an example here in stepseq.lv2:

https://github.com/x42/stepseq.lv2/blob/master/src/stepseq.c#L191

drobilla
  • 211
  • 3
  • 6