thetwom / toc2

Metronome app
GNU General Public License v3.0
151 stars 23 forks source link

Doesn't loop seamlessly #37

Closed babloyi closed 3 years ago

babloyi commented 3 years ago

Testing on v4.0.0-beta2, I seem to remember this not being an issue before. I want a vibration on the 2nd beat, then the 4th beat, then the 7th beat (e.g. 2,2,3,2,2,3,2,2,3...), so I mute the other beats, and leave those. Unfortunately, the first beat starts immediately when I tap play, so it ends up being 2,3,2,2,3,2,2,3,.. (i.e., I have to wait one cycle before the beats loop seamlessly).

Sorry if my wording is confusing!

thetwom commented 3 years ago

Thanks for testing. Your described behavior a bit unexpected. However, I figured out a problem for vibration of pause notes .... Before I try deeper to understand, what is happening in your case, can you try the fix: v4.0.0-beta3 ?

babloyi commented 3 years ago

Tried the new build, but I am having the same problem. Also, just a note, this problem was occuring whether I used vibrations only or sound or sound and vibrations (in both builds).

thetwom commented 3 years ago

I feared, that the version does not fix it ...

Maybe you can give me support by giving more detailed situation:

Is it just skipping the first note always? Sound, visualization and vibration?

babloyi commented 3 years ago

image Here is an example setup (don't mind the colour, I have my blue-light filter on).

So in the example I provided, here is the timeline:

  1. 2 seconds (2 seconds after the start): vibration
  2. 6 seconds (4 seconds after the last vibration): vibration
  3. 12 seconds (6 seconds after the last vibration): vibration
  4. 16 seconds (4 seconds after the last vibration): vibration
  5. 20 seconds (4 seconds after the last vibration): vibration
  6. 26 seconds (6 seconds after the last vibration): vibration (and it continues like 4,5,6 forever in a loop)

My problem is that it doesn't loop seamlessly for the first vibration, because the very first note is played immediately after tapping play, rather than after 2 seconds.

thetwom commented 3 years ago

Hi, thanks for the detailed description. Please let me repeat in my words in order to see if I understand it correctly:

So the timelime you described is what you would expect:

And what you get is:

Is this correct? If yes ... is this also happening for other note settings (e.g. just two notes: first note mute, second note not mute). Would the behavior change if you have other speeds?

babloyi commented 3 years ago

What I would expect is something like:

  1. (0s) I tap play
  2. (4s) I get the 1st vibration (on the 2nd note)
  3. (8s) I get the 2nd vibration (on the 4th note)
  4. (14s) I get the 3rd vibration (on the 7th note)
  5. Repeats from step 2, but with +14s (i.e. at 18s I get the 2nd note repeated)

Instead I get:

  1. (0s) I tap play and the first note animates (but no vibration or note)
  2. (2s) I get the 1st vibration (on the 2nd note)
  3. (6s) I get the 2nd vibration (on the 4th note)
  4. (12s) I get the 3rd vibration (on the 7th note)
  5. (16s) step 2 is repeated, and now after this point it loops seamlessly

The problem I have is that the time between the start and the first vibration (2nd note) is 2s, but the time between the 3rd vibration (7th note) and the next vibration (1st note) is 4s, so I have to discard the first loop completely. If I add an extra silent note at the start (so that there are a total of 8 notes), the first loop works fine, but then the subsequent loops are wrong (time between the 8th note and the vibration of the 3rd note is 6 seconds instead of 4).

It's possible I'm using the system wrong, but I can't see how I can set it up to do what I wish- an infinite, seamless loop of beats on 4,4,6:

thetwom commented 3 years ago

Thanks for the explanation. Based on this, the metronome works as expected. It seems that you expect a first cycle which is different. To get close to what you expect, you can try something like note1: vibrate note 2: pause note 3: vibrate note 4: pause note 5: vibrate note 6: pause note 7: pause However, this will have one vibrate directly after starting play ...

thetwom commented 3 years ago

Closing this now since this is not a bug.