mpogue2 / SquareDesk

Fully-featured music player and sequence designer, designed for square dance callers
10 stars 4 forks source link

Feature: better default intro/outro for singers (was: default time for tag part in singing calls is too long) #897

Closed Gero5 closed 4 months ago

Gero5 commented 1 year ago

I do not know wether something has changed here. I just have the feeling that it was better before... Default time for the TAG part coloring of a singing call is at ca. 20 seconds before the end of the song. 10-12 seconds before the end would be better. I think that is was closer to that before but I am not quite sure.

here the singing call total time is 3:44. the yellow section starts at 3:24. In/Out was not set manually. image

examples: SIR 0368 dixieland delight, RBS 1250 Coca Cola Cowboy

danlyke commented 1 year ago

I probably set this initially, though I have no memory of it, and I think the right way to do this is assume 126BPM, give, say, two measures for intro (7.6 seconds), assume that 7 64 beat phrases comes out to 3:33.3, so start the tag at 3:41... (trying to figure out if my numbers are right, 'cause I've generally assumed 3:42 for singing calls, and that now seems short).Message ID: @.***>

mpogue2 commented 12 months ago

@danlyke I wrote this code about 6 years ago. It's located at L68 in MySlider.cpp, and here's the basic idea:

I tested this on a bunch of files, and it worked pretty well as an initial approximation.

Two comments:

  1. I would really like the music producers to set an ID3 tag with the intro and outro. Same for patter -- THEY should tell us where the loop points are, so we don't all have to figure out the sample-accurate loop/intro/outro points ourselves. Sheesh!
  2. In the mean time, see #806. I've tested this code manually (see the issue writeup), and it seems to work pretty darn well. This is the way that I'd really like to proceed, for both patter loop points and singer intro/outro points, until we can get the music producers to do that for us. Yeah, I know that setting it manually doesn't take more than a few seconds, but I think that with this new library we can do a far better job than we are doing now (especially for Patter, where I really really want the default to be as close to sample accurate as possible -- singers are far less critical, since it's just coloring of the playback timeline that is affected).
mpogue2 commented 11 months ago

Now that the code for #806 is in (and working), we might want to change the default Intro/Outro points for Singers to something like:

This is a guess, because the length of the Intro section is not a fixed length. But, this is probably closer than what we do today.

Any thoughts?

danlyke commented 11 months ago

I'm good with a reasonable and better guess than what we've got. Especially if you think you're detecting measure starts reliably.

mpogue2 commented 11 months ago

I forgot... This would add ~2 sec to load time. Maybe needs a button to initiate it...

Or, we could beatmap just the first 15 sec, which would be way faster. For singers, I think there default just needs to be close. For patter, we could do just the beginning and the end, maybe?

danlyke commented 11 months ago

Agree on the button..or at least limit it to only the first load of the song. 2 seconds is an eternity when the floor is waiting....

mpogue2 commented 4 months ago

Measure detection seems to be pretty solid. But, it's current asynchronously finished (to save user perceived time), so it's actually not available until a few seconds after load. This is normally OK, because a user doesn't press the [ or ] buttons for several seconds after load. If they DO happen to do this, then we wait for an extra second or two.

Now, it's probably not normal to be playing a singing call for the very first time at a dance. So, we might take those extra 2 seconds on the very first playback in SquareDesk, and that would set the intro/outro to their (better, beginning of a measure) default values, and would cache the result in the DB, then we wouldn't have to run it again for this song (until the song changed out from under us, the cache invalidation question). So, 2 second penalty on the very first load (or the first load after the files modification date was changed), and essentially zero second penalty on subsequent loads.

Right now, there's no cache, because caching is always harder than it seems. So, the beat/bar detection is always done at load time right now.

mpogue2 commented 4 months ago

It's one keypress ( SHIFT-[ ) to set intro and outro for a singing call, now that #1015 has been implemented. This uses the new beat/bar detection algorithm that appears to be quite robust so far.

1035 will track the upfront (in advance) calculation of beat/bar detection (using QtConcurrent for parallelism).

So, closing this one in favor of #1035.