sfztools / sfizz

SFZ parser and synth c++ library, providing a JACK standalone client
https://sfz.tools/sfizz/
BSD 2-Clause "Simplified" License
401 stars 58 forks source link

Open sound control #503

Open jpcima opened 3 years ago

jpcima commented 3 years ago

The idea is to implement a control interface for sfizz, that permits access to engine information in read/write/both. The benefit is to avoid creating a large amount of API for various kinds of properties.

A suggestion is to keep OSC protocol details to be handled outside of the library.

  1. a message sending API
  2. a message broadcast API (a global callback)
  3. a message reply mechanism (a callback associated with a particular client)
/*1.*/ void sfizz_send_osc(
            const char* path, sfizz_osc_client_t* client, const char* arg_signature, const sfizz_osc_arg_t* args);
/*2.*/ void sfizz_set_osc_broadcast_callback(
            void* broadcast_data,
            void (*broadcast)(void* broadcast_data, const char* path, const char* arg_signature, const sfizz_osc_arg_t* args));
/*3.*/ struct sfizz_osc_client_t {
  void *client_data;
  void (*reply)(void* client_data, const char* path, const char* arg_signature, const sfizz_osc_arg_t* args);
};

Notes

paulfd commented 3 years ago

Only thing missing is the callback now?