ModPlug Central

Community => General Chatter => Topic started by: Saga Musix on June 13, 2015, 17:02:36

Title: Tempo Swing in MPTM
Post by: Saga Musix on June 13, 2015, 17:02:36
I've implemented tempo swing (http://bugs.openmpt.org/view.php?id=506) for modern tempo mode in the MPTM format. This means that you can now create swinging/shuffled patterns without having to resort to modifying the BPM, which is something that many plugins don't like.

Tempo Swing works by configuring how much each row contributes to a beat and can be configured in the Song Properties (global) or Pattern Properties (per pattern). It works by increasing or decreasing the length of each tick as required. The duration of all rows always adds up to the original duration of a beat, to keep the original promise that the tempo you specify in modern tempo mode always directly translates to real BPM - no exceptions.

Anyway, I still think that the usability of the tempo swing configuration dialog is sub-par, so I'd like to get some feedback from brave testers. How do you get along using the dialog? What could be improved?
Title: Re: Tempo Swing in MPTM
Post by: Diamond on June 14, 2015, 00:28:05
Excellent, I shall definitely test.  I had thought about requesting this feature, but I wasn't sure if you would be interested since it can be done with note delays.
Title: Re: Tempo Swing in MPTM
Post by: Diamond on June 14, 2015, 09:28:37
This feature seems to work well so far.  Although I do have a request for a minor addition which might simplify it's usage in certain cases.  Feel free to ignore the suggestion if it makes no sense.

Although being able to adjust the rows of the beat individually is useful for more complex requirements, I think it would be useful if there were two additional sliders which would allow you to adjust the percentage of all even or odd rows at the same time/synchronized.  At least for me, this would make adding a basic swing/shuffle much easier.  Also, would it be possible to have changes applied in real-time?  It would be nice if you could hear adjustments to the effect during playback as you move the sliders without having to close the dialog to apply the changes.
Title: Re: Tempo Swing in MPTM
Post by: .^o on June 14, 2015, 10:10:58
quick tests.
fun for grooving rhythmics.
i think it would be simpler with the swing configuration in the dialog box.
and a possibility of saving presets and/or standard time signatures and arpéggios.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on June 14, 2015, 13:12:51
Quote from: Diamond on June 14, 2015, 09:28:37
Although being able to adjust the rows of the beat individually is useful for more complex requirements, I think it would be useful if there were two additional sliders which would allow you to adjust the percentage of all even or odd rows at the same time/synchronized.  At least for me, this would make adding a basic swing/shuffle much easier.  Also, would it be possible to have changes applied in real-time?  It would be nice if you could hear adjustments to the effect during playback as you move the sliders without having to close the dialog to apply the changes.
I thought about adding something like that to cover the most-used special cases, even going as far as letting the user lock together pairs of sliders, but I think that would have been an UI nightmare. I could probably add some sort of checkbox to lock every other two rows together, but then again I also quite often use swing where the first two / last two rows are identical which would be "yet another special case". Hence I was looking for ideas how to do exactly these kind of things in a way that actually makes editing for the user easier.
Title: Re: Tempo Swing in MPTM
Post by: Diamond on June 14, 2015, 13:26:21
Quote from: Saga Musix on June 14, 2015, 13:12:51
I thought about adding something like that to cover the most-used special cases, even going as far as letting the user lock together pairs of sliders, but I think that would have been an UI nightmare. I could probably add some sort of checkbox to lock every other two rows together, but then again I also quite often use swing where the first two / last two rows are identical which would be "yet another special case". Hence I was looking for ideas how to do exactly these kind of things in a way that actually makes editing for the user easier.

I can see what you mean about that potentially becoming a UI nightmare.  The only possibility which occurs to me at the moment is basically what .^o GRAVOS suggested.  I.E. Allowing for the possibility of saving presets and maybe even including some default presets for standard time signatures.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on June 14, 2015, 16:32:13
Quote from: .^o on June 14, 2015, 10:10:58
i think it would be simpler with the swing configuration in the dialog box.
You mean if it was part of the Song Properties / Pattern Properties dialogs? I'm afraid that would be quite complicated to implement since the complete dialog needs to be able to provide any number of dialogs, and the Song Properties dialog is for example quite big - meaning that all the additional sliders would probably not fit on a small display anymore.
However, to make editing easier, I have now implemented live preview (r5137, buildbot will have it in about an hour or so).

Presets might be a good idea, and I will re-think the idea of (optional) "edit groups", i.e. you have two groups of sliders with a user-definable group size. For example, if you set the edit group size to 2, the first two and second two sliders will be moved together, and if you have more rows the next sliders will behave the same. At least it sounds feasible, but we'll see how that turns out.
Title: Re: Tempo Swing in MPTM
Post by: Diamond on June 14, 2015, 22:54:47
Thanks for the live preview.  This definitely helps.
Title: Re: Tempo Swing in MPTM
Post by: Diamond on June 16, 2015, 09:31:55
There seems to be a bug in the latest test build where the swing settings are not correctly applied to the song when reopening a previously saved module.  The configuration of the "Tempo Swing Settings" dialog is retained, but the values are not correctly applied to playback until I open the dialog and reapply them.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on June 16, 2015, 10:44:38
Actually they are applied, but due to a stupid typo the length of the swing data was accidentally extended to a whole measure instead of a beat. ::)
Will be fixed in a bit.
Title: Re: Tempo Swing in MPTM
Post by: Diamond on June 16, 2015, 11:07:31
Ah yes, that would also explain what I am experiencing.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on June 24, 2015, 23:28:42
r5351 (soon on buildbot) adds edit groups to the tempo swing dialog: You specify how many consecutive rows will belong to the same edit group, and then all sliders belonging to the same group will be moved simulatenously. I decided against moving the sliders from other groups at the same time, since it would complicate things. You just need to touch them once so that they all have the same value, anyway.
Currently, there are always two edit groups. Would it make sense to have a configurable amount of edit groups?
Title: Re: Tempo Swing in MPTM
Post by: Diamond on June 25, 2015, 00:37:36
This looks interesting and perhaps I am confused about how it works, but can you only select consecutive rows to be locked/synchronized?  So there is no way to lock only even or odd rows?
Title: Re: Tempo Swing in MPTM
Post by: Diamond on June 25, 2015, 00:49:49
Although it seems that if number of consecutive rows is set to 1, even and odd rows are synchronized.  Useful, but is this intentional?
Title: Re: Tempo Swing in MPTM
Post by: Diamond on June 25, 2015, 01:18:57
And what is this?  Do I see decimal tempo values?  Excellent!
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on June 25, 2015, 09:06:28
Quote from: Diamond on June 25, 2015, 00:49:49
Although it seems that if number of consecutive rows is set to 1, even and odd rows are synchronized.  Useful, but is this intentional?
Err, yes, as said, there two groups, so if you set the edit group size to 1, every other row belongs to the same group.

And yes, fractional tempos have been added a while ago as well.
Title: Re: Tempo Swing in MPTM
Post by: Diamond on June 28, 2015, 23:29:15
Found another possible minor bug.  When the "Edit group" checkbox is enabled, the "Reset" button will reset the sliders, but the changes are not reflected in live preview/realtime.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on June 28, 2015, 23:40:10
Not reflected in live preview? That code should actually crash when hitting the reset button! Working on it...
Title: Re: Tempo Swing in MPTM
Post by: Diamond on July 03, 2015, 08:29:45
Perhaps I'm missing something, but it seems as if swing is not being correctly applied when I have "Rows per beat" set to 8 and "Rows per measure " set to 32.  Or maybe I'm just having trouble rapping my brain around the row spacing/percentages involved.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on July 03, 2015, 08:36:23
What exactly is the problem? Rows per measure are not taken into consideration at all, so at RPB=8 it should behave exactly the same as with RPB=4, except that you have twice as many rows to fill out. Note that if you increase the RPB, the swing pattern is extended with rows of normal length, i.e. the second half of the rows will play without swing until you manually adjust it.
Title: Re: Tempo Swing in MPTM
Post by: Diamond on July 03, 2015, 08:48:54
I see.  In that case my guess is that it is simply not being correctly applied.  When I change "Rows per beat" to 8, not only does swing disappear from the first half of the rows, but if I enable "Edit group" and set consecutive rows to 1, adjusting the sliders does not apply swing.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on July 03, 2015, 08:58:35
Seems like it's indeed not updated properly right after changing the LPB. Will look into this later.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on July 07, 2015, 22:15:10
Song signature is now directly updated when previewing, so if you change from e.g. 4 to 8 RPB without closing the dialog first, it should now apply the correct tempo. This might be the problem you encountered, but if you still have problems with the new version, please let me know.
http://sagagames.de/stuff/mptrack.exe <-- updated build since buildbot is currently not running.
Title: Re: Tempo Swing in MPTM
Post by: Diamond on July 07, 2015, 22:51:49
Hmm, I can't tell if the previous issue is resolved because now I experience a different problem with this release.  Opening the swing configuration dialog causes playback speed to double.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on July 07, 2015, 23:42:46
...okay, it's still too hot here (or I can't type, or both). Redownload, should work now.
Title: Re: Tempo Swing in MPTM
Post by: Diamond on July 08, 2015, 04:51:35
The playback doubling speed issue is gone, but it seems that swing is still not being applied when "Rows per beat" is set to 8.  Although I should clarify that this is not only an issue with switching from 4 "Rows per beat" to 8, it seems to be a problem with "Rows per beat" being set to 8 in general.  In other words, even if you start out with it set to 8, swing is still not applied when you move the sliders.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on July 08, 2015, 09:10:57
There is definitely no such code that would magically disable tempo swing at RPB=8, so you will have to give me an exact step-by-step instruction how you configure tempo swing to cause this problem.
Title: Re: Tempo Swing in MPTM
Post by: Diamond on July 08, 2015, 09:32:37
Okay, this is probably the simplest way to demonstrate what I'm experiencing.

1. Take a module which has "Rows per beat" set to 8.

2. Open the "Tempo Swing Settings" dialog and enable "Edit group".

3. Adjust the odd numbered sliders and at least for me, swing always stays at 50%.  This behavior does not occur when "Rows per beat" is set to 4.
Note, this occurs even if "Edit group" is not enabled and you adjust the odd numbered sliders individually once you begin to adjust the second group.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on July 08, 2015, 11:24:47
Uhm, just to make sure, did you check that there is actually enough relevant pattern data on the odd rows for the effect to be audible? I mean, at 8 RPB the single rows are 32ths and not 16ths as with 4 RPB, so the effect will be inaudible, unless you have a lot of 32ths action going on. Setting the edit group to two rows will probably have a more obvious effect.
Title: Re: Tempo Swing in MPTM
Post by: Diamond on July 08, 2015, 11:41:59
Sigh.  You're right that was the problem.  Sorry, note lengths and time signatures are not my strong suit.
Title: Re: Tempo Swing in MPTM
Post by: Saga Musix on July 08, 2015, 11:53:50
Isn't it nice when the solution to a problem is so simple? ;)
Title: Re: Tempo Swing in MPTM
Post by: Diamond on July 08, 2015, 11:59:03
LOL uh huh.