im working on a patch that tries to detect audio input tempo. my goal is having seqs, randomizers, lfo ect made in usine.. beat synced to incoming audio, that will trig events to remote resolume via OSC.(ie changing video each bar, randomizing fxs each 2 beats, ect..)
So i worked on first part: exctract a valid tempo from input.
basically it splits in 3 bands, each one having a beat follower, then script computes tempo from detected pulses and choose the one that seems the best from the 3 bands (the more stable over time and within the tempo range). so far so good works nice.
so i pick this detected tempo result that controls for now usine master sync.
The thing is is working great, if i put a beat led out of master sync i see it flashs coherent with audio-in, but a remaining problem is i am not necesserally in phase, as with this technique i only apply tempo, no Resync/restart . I think i can't trigg some restart from audio in as there is no way to get an 'intelligent'/accurate pulse that detect that here or here is a bar/cycle start, and it would certainly restart usine on each beat, wich is something unwanted here, as i dlike to trig videos say from one beat to 8 bars.
So i got the right estimated tempo, but then i need to 'align' the 2 clocks.( the 2 clocks consists of 'beat pulse' out of audio in best band,
and the pulses out of usine master sync). i need to re-align master sync so it match audio in pulses. here it's becoming complex
for my brain. What i do for now is i trigger a counter when pulse1(audio) is coming, and stops when pulse2(usine sync) is coming. it gives me a drift value, and then i add extra tempo to nudge up usine tempo until detected drift is lower a threshold.
it basically works, but if let's say my beat was just slightly after, it will nudge up for quasi 1 beat length and will take a certain amount of time to realign, whereas i could have slighly nudged down in fact.
Not sure im clear enough, the idea would be to detect if the drift if usine beat is in lower part of the beat duration it would nudge down, if up it would nudge up. for now I fail to see how to patch/script that... any ideas? one other solution would be to convert the computed drift to a PPQ offset and directly apply it to usine sync but not sure i can, maybe i got to try a local sync system...
any clues ideas, suggests? in other words to sum-up it simpler: let's say you got 2 local syncs of same tempo but trigged at different time, and you got only the beat pulses out of each sync as info, (no PPq or timing info out of one), what would be the best way to force one to align the other by nudging up/down automatically?
Aligning 2 clocks
never mind, i had done some math errors, now it work as i want cool
hi 23fx23
I'm very interested by your patch.
Tempo detection is a very hard exercice for me.
I didn't understant all the end of your explainations but it seems very clever.
Might you upload a little addons for us ?
Thanks.
Jof
I'm very interested by your patch.
Tempo detection is a very hard exercice for me.
I didn't understant all the end of your explainations but it seems very clever.
Might you upload a little addons for us ?
Thanks.
Jof
Hi joffo, yeah sure, i confirm tempo detection is a tricky exercice
.
im still in intensive various techniques testing and webby messy patchs draftings, i got to work a bit more on it, decide myself for the' technology' and clean, and make a more modular and more generalist version. cause it's actually very optimized for my psystrance case wich makes the job easier as tempo range is quite narrow (140-150 bpm), it's a music that got strong and regular 4/4 kicks and usually same frequency contents, not sure the patch will behave as good with non-4/4 electro stuff, but ill try to provide all the needed stuff to tweak and adapt more kinds of music, but it sadly won't work on live jazz stuff for exemple, will be basically for techno/house/trance stuff.
i ll let you know when i got an usable version that might interest you.
im still in intensive various techniques testing and webby messy patchs draftings, i got to work a bit more on it, decide myself for the' technology' and clean, and make a more modular and more generalist version. cause it's actually very optimized for my psystrance case wich makes the job easier as tempo range is quite narrow (140-150 bpm), it's a music that got strong and regular 4/4 kicks and usually same frequency contents, not sure the patch will behave as good with non-4/4 electro stuff, but ill try to provide all the needed stuff to tweak and adapt more kinds of music, but it sadly won't work on live jazz stuff for exemple, will be basically for techno/house/trance stuff.
i ll let you know when i got an usable version that might interest you.
Wishing you all success,
sounds like an interesting project.
I just make this post so I can post a new topic.
hmm, auto-accompaniment
sounds like an interesting project.
I just make this post so I can post a new topic.
hmm, auto-accompaniment
Who is online
Users browsing this forum: No registered users and 17 guests
