-
Notifications
You must be signed in to change notification settings - Fork 177
Working on True Tuplets support #1127
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
Conversation
…fractional mismatch, make some old formulas more understandable + doc comments
|
Hi @cme! I bumped into the keyboard cursor position in The problem with tuplets is that the tick distances between consecutive grid marks are not uniform. So keyboard entry isn't working. What do you think? Also I made some mods to lines for |
Sounds logical. I haven't looked at this change at all yet, but one thing I've been trying to do is commonise the calculations of mapping between screen x position, grid position, note position etc. Is there a common interface to the new mapping between time / x position / grid position that you've defined? If so, should be fine to just use that :)
I'll take a wee look at some of this then when I can find the time. Thanks for the heads up. |
|
Great!
Today I have finally understood some things about it (the meaning of I had also the impression that some members could be stored one time only (instead of having a resolution member in each note property editor for example) Thanks |
…tion instead of tick position
…ion or tuplet ratio
|
I did the change on keyboard cursor. |
…resent notes in that tick position
|
Hi @cme, when you want I am ready to discuss the pattern editor GUI section. |
|
@oddtime I wanted to chime in to let you know that I'm excited about the possibility of using those 3:3 tuplets for a proper 6/8 grid. Once this is merged, is there a spot in the documentation for me or you or someone to write down this tip? |
Yes! You will be welcome to do it |
…to delete or add a new one on mouse click
|
I managed to take a very quick look at this (catching up; sorry, i have been busy and some family matters have taken up a lot of time and energy the last weeks). This works in a very different way to how I thought it would work (I cant find the previous discussion right now, and i may have misread even that), i shall have to do some thinking. |
|
Ok! Don't worry. |
Okay, this might be a long answer, because it involved my wondering about things then going off and doing a bit of investigation and archaeology. The way that I thought this would work, and that I still think it should work, is by allowing the tick resolution of the song to be changed to fit whatever subdivisions the user wants to use (which can be done automatically with GCD). I wanted to figure out how much work in the core that would actually involve, and looking at that, I found that the core already supports arbitrary resolutions. It's not saved in songs, and there's no way to set it, but it works. There's a few bits that have broken because for years nobody's considered it. The only real issue is the GUI, because the assumption of This set me wondering where The oldest version in the git repo is 0.9.3, and the data structures are quite different, but the fundamental structure in a pattern was already a map of <pos,note>. But some of the code around it, looks suspiciously like at some point in the past, patterns were a simple fixed size array of size Because I wanted to check if this actually really does work, I've started work on flushing MAX_NOTES out of the core (PR coming up shortly) and it looks like this is the right way forward. There might be a little bit of core work needed as well to make sure that it'll work for extremely high resolutions (where rounding errors in tick size would be major issues). So, if we enable and support variable resolution in the core and GUI, you can change the resolution of the song to anything appropriate for the tuplet selection the user wants, and there's no need to add extra properties to notes or anything else in the core, or change anything in the majority of the pattern editor. And, MIDI export would just work :) |
Exact
But when you decide to add a tuplet at some point while programming a drums-part, all the note positions should be recalculated according with the new max-resolution. If I am starting a song I really can't say what type of tuplet I would add in the future. |
|
Also, do you think that increasing the maximum res is sufficient for arbitrary tuplets (of very high order, with sample rate frequency precision), without reducing the performance? |
|
I am closing this pull request as I opened #1251 |
If I am not wrong, while the current max resolution is finite (192), the start time of notes can be already adjusted in H2 with resolution of sample rate, this happens for humanized timing, swing and leadLag.
From this idea I have added a time compensation note property to play the tuplets notes at sample rate precision.
This compensation is expressed as fraction of ticks so it is independent of Max Resolution.
Notes are still positioned at the rounded ticks in the grid, but they are drawn according to the time compensation.
The implementation is currently in progress but it is already working to test the tuplets (you may give opinions, consider that many things are not finished and will change, there are also some issues). I have opened discussion #1142 to share ideas on it, mainly for the User Interface.
Some collateral cool effects!
The tuplet feature allows also to draw custom grids in the editors (darker mark every n marks) ie for meters like 6/8, set a (fake) tuplet "3:3".
With tuplets you can set any rational resolution, even > 192 (set resolution "off" and enter a tuplet), even if I am currently imposing some arbitrary limits on the tuplet numerator and denominator.
here's a picture:
