RPA Maybe it's possible to use some parts of libpd outside pd ?
I am not suggesting that you use libpd, and there is no need to use some parts of libpd outside pd (which is doable, actually that's exactly what libpd does, but it's also overkill for your application). I was just pointing you to that source file to see an example implementation of how to handle MIDI realtime messages within Bela.
faust/midi/bela_midi.h you already have a
switch(message.getType()) statement. You can add the following code (obtained combining your code above and the one at the lines highlighted above in
libpd_default_render.cpp ) :
..... // insert here existing code and add the below
// currently Bela only handles sysrealtime, and it does
// so pretending it is a channel message with no data bytes,
// so we have to re-assemble the status byte
int channel = message.getChannel();
int status = message.getStatusByte();
int systemRealtimeByte = channel | status;
// the following is your code from above
case 248:// MIDI CLK
RPA With FAUST, it's possible to use MIDI messages with sample accuracy timing. In this case it need a timestamp with the MIDI message. It exist for some others plateforms. Do you plane to add them ?
Is that supported by Linux? If it is, then that would require a re-writing of the Bela Midi internals.