-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Medium-level API: Add PPQ functions #62
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good! Thanks!
c3e6798
to
f650604
Compare
Now should be OK |
f650604
to
b4b9f9e
Compare
I'm thinking on It also blocks deriving of |
The question is whether REAPER supports and/or returns decimal PPQ values or is planning to do so in a potential future. If yes, we should definitely stay with f64. In such cases, I usually ask Justin by dropping him an email. Could you do that? If not or if that takes too long, I would prefer to take the safe route ... just use f64. We can't derive |
Hmm, I never told to Justin)) If I try to ask some questions in cocos forum, it looks for me like an dead frost...
Reaper MIDI source is almost just a MIDI file of the standard midi specification. And PPQ is, generally, an summarized offset value. When MIDI take should be disconnected from the timeline, it happens not by multiplying values inside the pure midi data, but with modifying of the take tempo. So, I think, the probability of fail is very low. I've changed also `UsageScope` to `MainThreadOnly` |
midi_get_ppq_pos_start_of_measure midi_get_ppq_pos_end_of_measure midi_get_proj_qn_from_ppq_pos midi_get_ppq_pos_from_proj_qn midi_get_proj_time_from_ppq_pos midi_get_ppq_pos_from_proj_time every PPQ function is unsafe, because of take requirement Fixing naming convencions Co-authored-by: helgoboss <[email protected]> rebasing to master Replaced all mut to ptr
fb30ec4
to
41524ee
Compare
41524ee
to
8058a42
Compare
I asked him an he responded that internally it can be fractional but on the API surface it's essentially always an integer. So I guess we can go with an integer. |
midi_get_ppq_pos_start_of_measure
midi_get_ppq_pos_end_of_measure
midi_get_proj_qn_from_ppq_pos
midi_get_ppq_pos_from_proj_qn
midi_get_proj_time_from_ppq_pos
midi_get_ppq_pos_from_proj_time
every PPQ function is unsafe, because of take requirement