Timing of auto- and relative- start cues

General topics regarding SCS
Post Reply
eliska.daniela
Posts: 4
Joined: Tue Aug 13, 2024 4:03 am

Timing of auto- and relative- start cues

Post by eliska.daniela » Thu Aug 15, 2024 1:38 am

Hi, sorry in advance for the long read. I have a song split into three parts and I need to transition between consecutive parts depending on the action happening on-scene. The parts are all the same BPM and I need the transitions to happen "in sync", so that the rhythm of the song isn't interrupted. Since SCS can't do tempo sync directly, I'm trying to do this using loops, SFR Release cues and relative sub-cue start, but I'm getting random delays which cause the next part to start out of sync. Since there is audio already being played continuously when transitioning between two parts of the song, this doesn't seem to be caused by the audio driver power saving settings like some other issues with audio delay I've seen reported here.

I'm going to showcase the issue with just the first two parts, because it's the same thing happening twice and there's a bit of extra stuff that needs to happen in this first transition: at an indeterminate point while Part 1 is playing, I need to first trigger playback of a video (not inside SCS - the video is played from a different software on a different PC - I just need to send it an OSC message using a Control Send cue), and then a set time after the video starts, Part 2 should start automatically. In essence, there needs to be a specific pre-set delay between triggering the transition into Part 2 and the transition actually happening. All of the actions and time delays need to be aligned to beats, ie. multiples of 1.00 second - that is, the video can start at $T.00 seconds into Part 1, and the actual transition into Part 2 would then happen $D.00 seconds into the video (or $(T+D).00 into Part 1), where T and D are both integers, and only D is known in advance.

Currently I have the following setup:

Code: Select all

Q1 consists of these two sub-cues:
- <1>: Part 1 - A 5s audio sub-cue which contains three staccato chords at
       offsets 0.00, 1.00, and 2.00 (beat 1, 2, and 3); this cue has a loop
       starting at offset 1.00 and ending at offset 2.00. The idea here is that
       looping the middle chord means it will include the reverb tail from the
       first chord, and when the loop is released, the last chord's reverb tail
       will naturally trail off into silence.
- <2>: 1s silent loop - This is an audio sub-cue containing a 10s empty / silent
       WAV file which has its End time set to 1.00 and a loop from 0.00 to 1.00.
       I tried first with a 1s WAV file, but then SCS doesn't allow me to
       specify a loop end higher than 0.999, so I thought this might be more
       precise.

Q2 is composed of the following sub-cues:
- <1>: Release 1s loop - A SFR sub-cue set to release Q1<2> (the silent 1s loop)
- <2>: Play Video - Currently an audio sub-cue playing a single high note as a
       placeholder for the Control Send sub-cue which would start the video.
       This sub-cue has its relative start set to 0.00 seconds after the end of
       the previous sub-cue.
- <3>: Release Part 1 - A SFR sub-cue set to release Q1<1>. This sub-cue has its
       relative start set to D seconds after the start of the previous sub-cue -
       this is where the delay between the start of the video and the transition
       into Part 2 happens.
- <4>: Part 2 - An audio sub-cue containing the audio for Part 2. This sub-cue
       has its relative start set to 2.00 seconds after the start of the
       previous sub-cue (in the first second, the loop in Q1<1> is releasing,
       and in the next second the last chord is playing).
It seems to me like this should work, but it doesn't - both Q2<2> (the placeholder for the Control Send cue to start the video) and Q2<4> (Part 2) start audibly later than they should. This is especially obvious with the placeholder note, because this should play simultaneously with a chord in Part 1, and instead it sounds like children in a kindergarten orchestra trying to play together.

I've tried playing around with the relative delay of Q2<4> in order to compensate for the delay, but it doesn't seem to be constant, so that doesn't solve my problem.

To round off the available information, I'm running the demo of SCS 11.10.2 (latest as of writing this) on Windows 10 booted from an external SSD on a MacBook, using the built-in sound card - I usually work with QLab, and I'm trying to recreate a show which works there into SCS for a colleague who works on a PC with SCS (that is to say, I'm not trying to dunk on Win/SCS or start a Mac/QLab vs Win/SCS flame war here, just pointing out that it shouldn't be a hardware / performance issue since the hardware is literally the same). My colleague has either the Pro Plus or the Platinum license, I'm not sure which, but it's probably Platinum. My latest config was WASAPI + BASS mixer, but I think I've tried every possible tweak in those settings (WASAPI / DirectSound, BASS mixer / no BASS mixer, various values for the Update Period of Playback Buffers...). The audio driver is set to a 48kHz sample rate, since all the files are also 48 kHz. During an actual rehearsal / performance we'll be using an X32 over ASIO directly, but I don't have that readily available when I'm not at the theatre, so I couldn't test that yet.

All the project files including example audio can be downloaded from here (for some reason I can't attach the files here, but it's not that large, maybe 15MB all told?).

If anyone has any idea how to solve this, I'd be much obliged!

EDIT: I also tried various alternative configurations where things where organised as cues with auto-start rather than sub-cues with relative start, so that the "start" could be directly tied to the actual event, and not a chain of "0.00 after start of previous", but the problem was there in all the variations I tried.

dee99
Posts: 119
Joined: Thu Nov 30, 2006 10:14 am
Location: Cambridge, UK
Contact:

Re: Timing of auto- and relative- start cues

Post by dee99 » Thu Aug 15, 2024 5:40 am

Hi my first thought on this would be to make the 3 files the exact same lengths (pad with silence?) and then set them up as linked cues.
https://showcuesystems.com/scs11help/in ... ontext=360

I would keep all 3 playing and fade them in and out with level change cues.
However that might be difficult to loop, you would have to loop the tracks identically and use the SFR to release and continue playing all 3 tracks.
Dee
http://www.tokkan-fx.co.uk
Acoustic Magic From Sound Thinking.
P.A. Hire, Sound effects, Lighting, Special effects
Ely, Uk

eliska.daniela
Posts: 4
Joined: Tue Aug 13, 2024 4:03 am

Re: Timing of auto- and relative- start cues

Post by eliska.daniela » Thu Aug 15, 2024 9:31 am

dee99 wrote:
Thu Aug 15, 2024 5:40 am
Hi my first thought on this would be to make the 3 files the exact same lengths (pad with silence?) and then set them up as linked cues.
https://showcuesystems.com/scs11help/in ... ontext=360

I would keep all 3 playing and fade them in and out with level change cues.
However that might be difficult to loop, you would have to loop the tracks identically and use the SFR to release and continue playing all 3 tracks.
Hi, thanks for the suggestion, it didn't even occur to me to try that, but unfortunately I don't think it's doable in this case - at least not directly. Only the first part of the song is actually an infinite loop of the same content, which can transition into the second at any time - the second part starts off with a couple of bars of a sort of fanfare, which is followed by a couple of minutes of "background music", which is essentially a 2-bar loop, but with variations in each loop (so it's not "looping" in the sense of SCS loops); and when transitioning into the third part I need to crossfade between whichever 2-bar phrase of the background music is currently playing and the first two bars of the third part; the third part is the finale, and it doesn't have any repeating parts - basically it's is a standalone song, and all the stuff before it is just a long intro.

Also, I'm not sure how linked cues behave when loops are involved - I've read about linked cues in the docs before, but since my cues aren't supposed to actually play together the entire time I didn't give it much thought - but the docs don't say anything about loops in this context.

I am wondering, though, if it could still be achieved by padding part 2 and 3 with some silence at the start, with some loops defined over that, and possibly one or two helper "silent" loops next to that.. I don't think I can do it with linked cues due to the fact that both part 2 and 3 have an actual beginning, I can't just crossfade into them whenever; and also due to the fact that loops in SCS have a minimum loop count of 2, so I can't define "dummy" loops (with a loop count of 1) within Part 2 so that I could target them with a SFR Release cue in order to align the crossfade into Part 3.

Anyway, even if they aren't proper linked cues like this, they would be triggered to start at exactly the same moment, so they might sync better this way. I'm gonna give it a try and report back.

dee99
Posts: 119
Joined: Thu Nov 30, 2006 10:14 am
Location: Cambridge, UK
Contact:

Re: Timing of auto- and relative- start cues

Post by dee99 » Thu Aug 15, 2024 9:53 am

Other things to try would be in the runtime settings go into non-linear and liner preload all tracks mode and maybe try triggering from MIDI timecode?
Dee
http://www.tokkan-fx.co.uk
Acoustic Magic From Sound Thinking.
P.A. Hire, Sound effects, Lighting, Special effects
Ely, Uk

eliska.daniela
Posts: 4
Joined: Tue Aug 13, 2024 4:03 am

Re: Timing of auto- and relative- start cues

Post by eliska.daniela » Thu Aug 15, 2024 12:21 pm

dee99 wrote:
Thu Aug 15, 2024 9:53 am
Other things to try would be in the runtime settings go into non-linear and liner preload all tracks mode and maybe try triggering from MIDI timecode?
I've tried non-linear, but it doesn't advance to the next cue automatically like linear does. I guess I could add "go to" sub-cues to all the cues in my show, but that seems like a lot of work.. plus I'm still not really sure it would solve the problem, I think I aborted that attempt after finding out it doesn't advance automatically.

Triggering from MTC implies the need of a source of said MTC, which I don't have :D

Buuut... your previous suggestion actually works! And without linked cues, no less! The final thing is kinda convoluted in terms of all the (surprisingly many!) places where timing for the fixed delays needs to be adjusted if it changes, but it seems to work flawlessly, and doesn't even need helper silent WAVs (although it needs padding the start of Part 2 and Part 3 with silence, but that's now done).

This is the final solution, in case somebody else needs to do something similar:

The Part 1 audio file now contains 3 consecutive chords instead of 2. The file for Part 2 has 5 minutes of silence at the beginning - this is known to be approx. 2x longer than the usual time at which Part 2 is supposed to start from the beginning of the video. And finally the file for Part 3 has 13 seconds of silence at the beginning, followed by a single 2-bar phrase of the same background music from Part 2 edited to transition naturally into the finale proper.

Let D be the delay, in seconds, between the start of the video and the start of Part 2. (This can change between any two performances, because the video can change.)

Q1 contains all three audio files as sub-cues; I'll call the sub-cues P1, P2, and P3. P1 has two 1-second loops, over the 2nd and 3rd chord (ie. time ranges [1.00, 2.00] and [2.00, 3.00]). P2 has a single 1-second loop which spans the time range [300 - D - 1, 300 - D], and the Start Time of the audio file is set to the start of the loop, ie. 300 - D - 1. And finally P3 has two 1-second loops at the beginning ([0.00, 1.00] and [1.00, 2.00]), then a 3-second gap, and then an 8-second loop (so [5.00, 13.00]).

Q2 has a SFR set to release the first loop in all three sub-cues of Q1, followed by a Control Send cue to start the video.

Q3 is an auto-start cue set to D - 0.5s after the end of Q2; it's a SFR set to release the second loop in P1 and P3 (P2 doesn't have a second loop).

And finally, Q4 is a SFR cue which releases the third loop in P3, followed by a SFR sub-cue set to fade out and stop P2 with a relative start time of 0s after the end of the previous sub-cue.

And this is how it works:

When Q1 is launched, all three audio files begin playing at the same time; P1 plays the first chord and then starts looping over the second, while P2 and P3 are both looping over silence. This can continue indefinitely.

When Q2 is launched, all three loops are released; this leads P1 to start looping over the third chord, P2 enters the D seconds of silence between the end of the loop and the actual start of audio, and P3 begins looping over its second silent second.

Q2 ending starts the D - 0.5s countdown on Q3, which is thus started automatically something around 0.5s before the end of the silent part of P2. Q3 releasing the 2nd loop on P1 (which loops over the 3rd chord in that file) means that P1 can play through to the end, giving the last chord from P1 a clean reverb tail to mesh well with P2 taking over (which happens at just the right time due to P2's loop being released in Q2); and releasing the second 1s loop on P3 means that P3 now plays through the 3-second gap and enters the 8s silent loop (the 3 seconds are padding because the fanfare at the start of P2 has 19 beats - so 3 + 2x8). So at this point, we have P1 done, P2 playing the fanfare and then the background music, and the 8s loop in P3 is aligned with the 2-bar phrases of the P2 background music.

Q4 then just waits for the nearest end of the 8s loop and then crossfades P2 into the beginning of P3 (well, the crossfade is courtesy of the fade & stop cue and a fade-in already baked into the beginning of the P3 audio file, but the fade in could just as easily happen in SCS).

Okay, I'm pretty sure nobody will ever need to do anything even remotely like this, and even though I tried my best, the description is probably incomprehensible gibberish to anyone but me, but I hate when people just go "yep! that did it, thanx" without actually explaining the final solution...

Thanks Dee for pointing me in the right direction!

Mike Daniell
Site Admin
Posts: 3629
Joined: Sun Jul 24, 2005 8:58 am
Location: Brisbane, Queensland, Australia. TZ:GMT+10
Contact:

Re: Timing of auto- and relative- start cues

Post by Mike Daniell » Thu Aug 15, 2024 2:58 pm

Thanks, Eliska and Dee. Eliska, I'd like to see your final cue file (the .scs11 file). I don't need the audio files, etc - just the cue file. Could you email that to us at support@showcuesystems.com? Dee has access to this email address as well.
Mike Daniell
Show Cue Systems Pty Ltd
mike@showcuesystems.com
Image

dee99
Posts: 119
Joined: Thu Nov 30, 2006 10:14 am
Location: Cambridge, UK
Contact:

Re: Timing of auto- and relative- start cues

Post by dee99 » Thu Aug 15, 2024 6:28 pm

I am glad it worked for you, we will have a think about this for the future.
Dee
http://www.tokkan-fx.co.uk
Acoustic Magic From Sound Thinking.
P.A. Hire, Sound effects, Lighting, Special effects
Ely, Uk

eliska.daniela
Posts: 4
Joined: Tue Aug 13, 2024 4:03 am

Re: Timing of auto- and relative- start cues

Post by eliska.daniela » Fri Aug 16, 2024 10:17 pm

Mike, I tried attaching the file here, but it's being rejected as a possible attack vector (haha) - thought I'd post it here along with a couple of further notes - because the solution I posted previously was way too convoluted, and unnecessarily so, at that. So here's at least an explainer, and I'm sending the actual final file to the email address you mentioned.

I had a couple of further ideas:
  • Part 1 had 3 repeats of the chord I need to loop over, but in fact, only two are needed - the first one (which doesn't have reverb tail from the previous chord at the beginning because there is no previous chord), and the last one (which includes reverb tail from the previous chord, while its own reverb tail trails off into silence) - looping over the single beat of the "last" chord essentially turns it into "any chord between the first and last", until the loop is released, at which point the current repetition becomes the "last".
  • When I need to "wait for the next beat", I just need to release a single 1-beat loop in one of the audio cues - if the next action for the other cues would again need to happen on a beat some time later, I can just leave them looping over the current 1-beat loop and release that when I want to begin playing them.
  • When I'm looping over a 1-beat loop and I need the music to start N beats after the loop is released, instead of including the N beats as silence in the audio file, I can just release the 1-beat loop N beats later. This goes for both the delay before Part 2 starts, and the extra 3 beats to align Part 3 after the fanfare in Part 2.
With that said, the end result now looks much simpler:

Q1 is ostensibly the cue to start Part 1, but in fact it includes audio sub-cues for all three parts:
- Q1<1> is Part 1, and as mentioned, its loop #1 starts at 1.00 and ends at 2.00
- Q1<2> is Part 2; there are two seconds of silence at the beginning, and there is a 1-second loop over each of those seconds
- Q1<3> is Part 3; there are 9 seconds of silence at the beginning, followed by a single repeat of the background music from Part 2 with a 4s fade-in baked in, followed by the actual finale; loop #1 is [0.00 - 1.00] and loop #2 is [1.00 - 9.00]

Q2 is the cue which commands the video to start playing, and also serves as the anchor to auto-start Q3:
- Q2<1> is a SFR which releases Part 2 / loop #1
- Q2<2> is the Control Send cue to start the video, with a relative start of 0s after the end of the previous sub-cue

Q3 is set to auto-start D - 0.5s after the end of Q2 (this is now the only place the delay D needs to be set)
- Q3<1> is a SFR which releases Part 1 / loop #1 and Part 2 / loop #2, which results in a natural transition between Part 1 and Part 2
- Q3<2> is a SFR with a relative start of 3s after the start of this cue; it releases Part 3 / loop #1, causing Part 3 / loop #2 to become aligned with the background music in Part 2 after the fanfare

Q4 then transitions from Part 2 into Part 3:
- Q4<1> is a SFR which releases Part 3 / loop #2
- Q4<2> is a SFR with a relative start of 0s after the end of the previous sub-cue; it fades and then stops Part 2 over 4 seconds, which coincides with the baked-in fade in at the start of the extra loop of background music in Part 3

This way, the only place I need to set the fixed delay D for the start of Part 2 is, in fact, the auto-start time of Q3; I'm setting that to 0.5s less than the required delay in order to make sure the SFR actually catches somewhere around the middle of the loop I need it to release, and does not accidentally get "carried over" to release the next loop by some random delay or rounding error.

It works flawlessly :-) thanks again, Dee!

Post Reply