View Single Post
Old 09-08-2019, 12:36 PM   #97
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

CC curves are back in v5.983+dev0829!

I would like to make a few more suggestions:

64-bit PPQ for high resolution:
At present, REAPER appears to store ticks as a signed 32-bit integers. (Functions such as MIDI_Get/SetAllEvts store ticks as 32-bit integers, and the maximum PPQ that can be entered in Preferences is 2^31-1.) This means that PPQ is limited to a maximum of about 32000, if 4-hour long MIDI items with fast bpm have to be accommodated.

How about storing ticks as 64-bit integers instead, and using something like 2^50 bits as default PPQ? This would give MIDI a resolution that is almost as fine as REAPER's 64-bit floating time values, would remove all problems with snapping to grid, and would make MIDI sample-accurate. Users would not need to deal with ticks and PPQs any more, except when importing and exporting MIDI.

(A few other DAWs such as Digital Performer have already taken this step.)


Position instead of offset:
In the MIDI stream (as given in the item chunk or MIDI_Get/SetAllEvts), the positions of MIDI events are stored as tick offsets relative to the previous events:
Code:
E 0 b0 01 5e
E 960 b0 01 60
E 960 b0 01 5c
E 1080 b0 01 52
E 840 b0 7b 00
In contrast, the positions of envelope points are stored as absolute time positions:
Code:
PT 0 1 0
PT 0.5 1 0
PT 1 1 0
PT 1.5 1 0 0 1
Would it not be much easier for MIDI to work with tick positions relative to the start of item, rather than with offset from previous event?
juliansader is offline   Reply With Quote