Closed Natooz closed 3 months ago
I am recently preparing for the 3.24 gre exam. Sorry for not having time to read your requirements carefully. But you can try to modify the function if you are happy to do so.
@Natooz I understand this issue. This probably won't involve a lot of modifications. I'll make the changes as soon as I can.
Oh, there is still one thing about notes. For example, how do we deal with a note(start = 0, duration = 10) when clip with start = 5, end = 10? Do we need to create a new note starting at 5?
Thank you for looking into this!
I do not think creating new notes in this case would be desired, as they originally started previously. Creating new notes would not provide any information about their original onset position. This is not so problematic with tempos/time signatures as these are "long-term" attributes that affect the whole music.
If one wanted to keep in the clip the parts of notes after their onset (before start
), they might prefer use the pianoroll methods.
I agree with you
@Natooz I have modified the clip
function. Does this work as what you expected?
Absolutely! Thank you for these changes!
Hello,
I have a small feature request for the
clip
method: make it include the current tempo, time signature and key signature at the tickstart
. The current implementation keeps the events of these types occurring within the clip section (i.e. changes), but we might not know what are the values of these features at the beginning of the clip.Describe the solution you'd like
Make
clip
determine the latest tempo/time signature/key signature occurring before thestart
tick, and addTempo
/TimeSignature
/KeySignature
elements in the returned Score chunk with time values atstart_tick
. This could set as an option controlled by a method attribute.Describe alternatives you've considered
Here is how I implemented it in Python:
I finally got back doing some c++ and got a glimpse of nanobind. If you want, I can try to implement this.
Additional context
That's something I'm implementing for this MidiTok PR: https://github.com/Natooz/MidiTok/pull/148