Skip to content
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

Midi note measure #115

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

makingpippop
Copy link

I've added

  • Project.beats_to_measure() to get the measure of a beat.

In the Note object :

  • Note.beat to get the absolute beat of a note (not relative to its current measure)
  • Note.measure to get the measure in which the note resides

In the NoteList object :

  • NoteList.in_measure() to get a list of Notes in a specified measure
    It would be used like so : project.tracks[0].items[0].takes[0].notes.in_measure(1)

@Levitanus
Copy link
Contributor

In the Note object :
*Note.beat to get the absolute beat of a note (not relative to its current measure)
*Note.measure to get the measure in which the note resides
In the NoteList object :
*NoteList.in_measure() to get a list of Notes in a specified measure
* It would be used like so : project.tracks[0].items[0].takes[0].notes.in_measure(1)

And again, You've implemented the thing is being implemented almost a year ago in the #81.
https://github.com/RomeoDespres/reapy/pull/81/files#diff-2069e9993fe46c9f6647294fd6188ba21e60445905e971d92de0a61aad419939L37 (diff of midi_event.py)

I'm afraid of inconsistency with the complex changes of #81 on the integration of which @RomeoDespres now is working on now...

@makingpippop
Copy link
Author

makingpippop commented Feb 6, 2021

Is there something I could do that could help? Or should I be waiting for the next release?

@Levitanus
Copy link
Contributor

I feel, if You split this PR into the couple (one with import mesia, one with MIDI) — @RomeoDespres will be able to include something after #81 is merged.
Anyway, I think it's good point to look at the #81 API, for removing doubles.

I doubt in what the «measure» is — do you mean measure int number? I feel it is interesting new functionality could be added. Just is better to include it somewhere inside MidiEvent class, maybe, as not only notes are managed usually...

Also, If I implement something like this — I would get all midi events from the measure, then filter by the event-type. Just for keeping Take methods amount observable. But I'm not sure @RomeoDespres would think the same :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants