First time here? Check out the FAQ!
x

Extracting a BPM from an external clock/pulse

+1 vote
1,113 views
Hi there. I'm trying to use an external clock (from expert sleepers or modular) and derive a BPM from it. I've looked at the timingclock to bpm sound which calculates duration between miditimingclock and guess I want to do something similiar. Do I need to use something like an amp follower or sound to global controller to generate a control that I can substitute for the miditimingclock? I see that the NEL Stemprinter with External Clock has something similar which you can just put a pulse train into... I'm trying to play back samples in sync with Ableton/modular. Thanks Geoff
asked Mar 21, 2018 in Using Kyma by ghood (Master) (3,060 points)
What's the format of the Expert Sleeper or modular clock? Is it an audio signal? Is it a square wave (what duty cycle)? Or could you record a little bit of it in Kyma and attach it here as a file?
Can Ableton output MIDI TimeCode or a MIDITImingClock?
Thanks!
Hi, it's a square wave, 50% duty cycle. I'll record a bit when I'm next in front of Kyma.
Yes, Ableton genetates MIDITimingClock...although I'm interested to know how could use a external pulse to learn Kyma (and also sync to modular when Ableton not on).
Thanks!
Have you had a chance to record some of the signals you're able to get from ES and your modular? What are the options for the clock frequencies you can generate?
I've not recorded clock yet (sorry) I will do tomorrow. The ES sync plugin generates square pulse varying from 1ppqn to 96ppqn at the bpm of the DAW.
Ps. How do I post files on here.

1 Answer

+1 vote

If the square wave clock is at the BPM rate, you should be able to use that signal directly as a gate in your Kyma Sounds. For example, let's say you are receiving the clock on input channel 8 of your audio interface; then, in the Gate field of your Sound, you could paste:

AudioInput8

or, if you need voice stealing, you could use

AudioInput8 L withVoiceStealing

Depending on what your clock signal looks like and how/where you want to use it in your Sounds, you may need to do additional processing on the clock (possibly a Threshold, ScaleAndOffset, InputOutputCharacteristic, etc), but this would be a good first test.

You could also do some tests comparing it against using Ableton's MIDITimingClock to test whether passing the clock through the analog converter and back to the digital domain introduces a delay. 

Please let us know how it goes. Thanks!

 

answered Mar 22, 2018 by ssc (Savant) (129,200 points)
Hi, so I've got it partially working but it's not quite doing what I want.  I'm essentially trying to get a sample to start and play in time with a clock (expert sleepers square wave pulse coming in on Audio Input 3 at 48ppqn) with a Run signal (gate coming in on Audio Input 4).  
Currently I'm using:
(AudioInput3 L durationBetweenTriggers: 48) s bpm removeUnits
in a SoundtoGlobalController (generating !BPM).  This correctly calculates the BPM.
Within the frequency field of a sample i'm using:
default * (!BPM / ('011_Drums_120BPM_Devine.wav' closestBPMTo: !BPM forBeats: 16))
This tracks the BPM ok of Ableton/Expert Sleepers (albeit of course a slight lag as it calculates durations between triggers).  But this doesn't of course gate/start the sample at the right time, just set the bpm/frequency.
I'm stuck on getting the gate to work properly.  I want it so that it only plays when AudioInput4 gate is high (from ExpertSleepers/Ableton) and to retrigger every !Beats - this is because the first time the sample plays it's invariably out of time but then re-syncs every !Beats.  
I've tried lots of things but can't get it to work succesfully.  I'd really appreciate an expert to let me know how you'd do it...
Thanks so much
Geoff
What is the frequency of the Run signal on input 4?
Instead of using SoundToGlobalControllers, I would use the square wave clock directly in every parameter field where it is needed. For example, could you use
AudioInput4
directly in the Gate field of the Sample to start the sample playing?
The run signal isn't a clock/pulse its a continuous offset at 5/10v. I'm sending all signals via ADAT between Ableton and Kyma. I'm looking for a way to retrigger every !beats but only wgen the gate is high...so pasting run signal straight into gate correctly starts the sample playing but doesn't retrigger (and if the sample doesn't start in time it then never resyncs). Hopefully I'm making sense...
In the Gate field of the Sample, you could try using

(AudioInput3 L triggerEvery: 48 * 16 reset: AudioInput4) gateWhen: AudioInput4 L

This would trigger the sample on every 16 beats of the input clock when the Run signal was on.

You should to make sure that the ReleaseTime is large (like 1 day) to make sure that the Sample's amplitude envelope does not decay between gates when you are running.
Excellent, thanks. I have it working ok. I also havw had luck using a AudioInput 4 L bpm: BPM! / (!Beats rounded vmax 1) in gate (where the BPM! Is derived using the soundtoglobal controller.

I find that the sample has to wait until it's retriggered to sync correctly which means the first few bars are a mess but can't think of a way around that?!
Like Ableton, would you want it to wait until the next bar or sync pulse to start playing the first time?
Ideally yes (or put up with horrible sounding mess for first beats!).
...