Forum rss-feed

Forum

Developers: decimation implementation

Most Recent

written by: geert

It used to be all inside midi_from_belcanto, decimating based on the target MIDI message. However, the polypressure message broke that design since it actually needs to take the different key events into consideration for the decimation, otherwise the polypressure data of one note would decimate away other notes. That's why these were all moved to control_mapping with a finer-grained implementation that takes the upstream events into account.

written by: TheTechnobear

Fri, 21 Jun 2013 13:06:42 +0100 BST

hi,

Im spending a bit of time working thru the open source code, and looking at how various bits work.
Today I was looking at decimation.

Im generally clear how it works (i think!).
It seems to be implemented in lib_midi

But then I kind of loose the usage a bit.

I can quite clearly see in midi_from_belcanto.cpp, it being used...
basically its using last_time_status, which is indexed by channel/status, and this is being checked and populated by check_time_status(channel,status,time) - fine thats all clear.
And I can see its usage in set_pitchbend, as would be expected.

BUT thats the only reference I can find to decimation, control interval .. or that function.

I would expect this function to be called for all data, not just pitch bend (e.g. if im using yaw say on a mod wheel, or breath etc etc)

Im sure Im missing it, can you just give me a pointer in the right direction?


Also, Im surprised, that this is not a quantized time, with respect to tempo... e.g. would it not be better to compress data at 1/32 1/64 1/128 of tempo,
if its not done to tempo time, then you are going to get some weird interaction
e.g. 120 BPM, 1/32 ~15ms, so decimating at 40, is going to be sending off beat much of the time

Again, Id be interested in your thinking behind this

Cheers
Mark




written by: geert

Fri, 21 Jun 2013 16:56:55 +0100 BST

The per-mapping decimation is done in control_mapping.cpp. Pitchbend is alone in midi_from_belcanto.cpp since it's a fixed continuous message, the others are dynamic.


written by: TheTechnobear

Sat, 22 Jun 2013 14:19:18 +0100 BST

Thanks for that, now its all clear!

In hindsight i dont really know how i missed it, as it clearly had the decimation handler in it - oh well, will have to look more carefully next time :)
Cheers
Mark


written by: geert

Sat, 22 Jun 2013 15:24:17 +0100 BST

It used to be all inside midi_from_belcanto, decimating based on the target MIDI message. However, the polypressure message broke that design since it actually needs to take the different key events into consideration for the decimation, otherwise the polypressure data of one note would decimate away other notes. That's why these were all moved to control_mapping with a finer-grained implementation that takes the upstream events into account.



Please log in to join the discussions