free-audio / clap

Audio Plugin API
https://cleveraudio.org/
MIT License
1.78k stars 100 forks source link

Note expressions badly documented. #380

Closed ohovers closed 8 months ago

ohovers commented 8 months ago

Note expressions badly documented.

I am trying to figure out how to do microtonal pitches with CLAP. The best way seems to be MIDI 2.0's note-on, but nobody supports that right now.

The CLAP dialect only supports note-on with the coarse 12EDO note values. At least, that is what I assume, because I can't find any documentation on what 'key' really refers to. It seems to be the MIDI note number, but it would be good to state that somewhere.

So doing microtonal pitches with CLAP would need to be done with a note expression.

But the only documentation on note expressions seems to be their names and ranges. It seems to be up to the plugin/host developer to figure out how the rest works.

For example, are repeated tuning expressions cumulative or not? So does a tuning expression of +10 cents and later one of +15 cents result in a pitch of +25 cents or +15 cents? I guess not. But if you don't document that, someone will implement it the wrong way.

And if I want a finer tuning than the coarse one that is provided with CLAP's note_on: When do I have to send this tuning expression? Before the note on, to make sure no note data is generated with the incorrect pitch? Or can the plugin developer ignore that? Or after the note on? And can the plugin developer then generate the first sample with the incorrect pitch? Or is there some kind of undocumented requirement on plugins to go through the whole event queue during process before generating anything?

baconpaul commented 8 months ago

Note expressions are not cumulative they are absolute Key is midi key in midi 1 and clap note If you want to tune at note on send a note expression at the same sample

here is a complete working et of claps which use note expressions to allow arbitrary microtuning of any note expression aware instrument in bitwig, including poly grid, which works with either even division or with MTS esp

https://github.com/surge-synthesizer/tuning-note-claps

baconpaul commented 8 months ago

https://surge-synthesizer.github.io/tuning-guide/#tuning-note-claps Doc for those devices

baconpaul commented 8 months ago

Oh finally multitrack studio implements clap midi 2 but indeed there are no production plugins using m2/ump today (though some of us are close). Similarly many plugins don’t support note expressing in either vst3 or clap which is why many microtonal devices generate midi1 MPE rather than other formats with the associated limitations on polyphony resolution and range coordnation

baconpaul commented 8 months ago

I attempted to answer your questions in #381 which I've submitted for review from the rest of the team, also.

ohovers commented 8 months ago

I think this solves the issue. Thanks!

baconpaul commented 8 months ago

Great!

If you want to talk about micro tuning and clap, there's a really active community working on it in the surge discord tuning channel. That's how we came up with the devices above for instance, and with our tuning library. But let me close this issue now it seems resolved!

Thanks for commenting. it improved the documentation for sure.