Change Quartz Clock settings on rhythm

I am integrating Quartz into a project (UE 4.26.1), and would like to know the proper way to change a Quartz Clock’s settings (Time Signature, BPM, etc), while remaining ‘on beat’.

For example:

  1. Clock begins with 4/4 time signature at 60 BPM.
  2. After 2 bars, change to 3/4 at 100 BPM.

Do I override the existing clock’s settings on the last desired bar & beat, triggered by a Quantization Event subscription, then trigger a Resume Clock?

Image I grabbed off google, to explain what this would look like in a score.

Hi [USER=“70000”]Abbie Doobie[/USER] , at the moment it is not possible to change time signature and/or pulse override after they’ve been set.
A Clock’s Settings input is only available on the Create New Clock node, and that’s what you’d need to do :-/
From what I understand though, the devoted Epic audio team plans on putting some improvements in with 4.27, which will make it possible.
You can however change Beats Per Minute or Ticks Per Second etc, on an existing Clock Handle. I believe it would jump to the new speed on the next bar (or is it next beat?).
In my use case I wanted to keep the BPM, with a click playing 1/4 notes, but change time settings to allow other sources play different accents and patterns.
So what worked for me was : OnBarEvent > PauseClock > UnsubscribeFromAll > CreateNewClock with new Settings > cache it > SetBPM to the same float > Subscribe to those 1/4 notes > from that Delegate Create the same Event already in use for the click > Resume the new Clock.
This way it stayed on the beat, with time count and subdivisions changing in the background.
Surely it’s far from ideal, so when you find a better way please let me know… best of luck!

Oh, and then you can go back and Resume the first Clock and its Settings, whenever you feel like it :slight_smile:

I ran into the same problem. If ebarkani is correct that Quartz can’t change the time signature once running, then one way to work around this limitation, is by pretty much ignoring Quartz’ concept of ‘bars’ altogether.

My implementation is that I’ve simply set Quartz to have a time signature of 10/16, regardless of the real time signature of the music. From there I’ve translated the real timings of the notes to that count in my own code. It’s a slight hassle, but it works just fine.

You still need to change the BPM if you do this. SetBeatsPerMinute exists and you can set a QuartzQuantizationBoundary for the exact moment when the switch to a new BPM should happen.

Won’t this have a small timing error every time you do this?

Hey guys!

Glad to know that i’m not the only one facing this problem and even more that that Epic’s team is already working on it!

Still for now, what I have done is :

  1. I’ve load a tempomap in UE as a datatable
  2. Create all the Quartz Clocks I need for my audio file (one per time signature)
  3. Create another Quartz clock with the smallest subdivision 1/32 (this will be in charge of playing the sound)
  4. On every 1/32, I check if my current time signature clock is at it’s last beat.
  5. If so, I unsubscribe, pause, and reset transport for this clock… start and subscribe the clock corresponding to the new time signature.

It seems to be working really well and easily manageable with the external tempomap!