Tap Tempo Revisited

Post your groups/layouts here

Moderators: davidv, seb@plogue

rob
Posts: 11
Joined: Sat Jul 23, 2011 3:36 am

Re: Tap Tempo Revisited

Postby rob » Mon Jul 25, 2011 1:26 pm

Hi,

TapTempo is great, thanks! I'm new to Bidule and this almost does what I'm after. In a nutshell I'm driving a DMX lighting system via an audio stream but want to do it much better than the usual cheesy audio-to-light systems. So far I'm using the KTDrum VST which works just fine however sometimes I want to override it when things go wrong.

My plan is to have both the KTDrum MIDI note-on-beat and (optional) override MIDI note-on-beat feeding into the TapTempo group.

Then to make sure things continue in a hard to follow audio section and/or smooth out the occasional hiccup, I've added a MIDI sequencer inside the taptempo group and sync'd it's BPM with the TapTempo Sync generator, thus outputting a smoothed MIDI note-on-beat BPM that continues when there is no audio feed and also makes it tolerant of some craziness - all works ok so far.

I now plan to somehow add a second MIDI in (manual override), assume I can make this override the first with a few gates but haven't thought this through yet.

Also would like to add some more thresholds like when overriding don't go back to auto-mode until the KTDrum thinks BPM is within +/- x of the override BPM or wait y seconds etc.

If someone has done something similar or can come up with a better way please let me know.

PS. Bidule rocks, thanks.

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Tap Tempo Revisited

Postby jersmi » Mon Jul 25, 2011 5:32 pm

Cool -- what software are you using for the DMX stuff?

Time-based "thresholds" are possible. I call these "wait for next" switches. The Accum is the catch-all counter, and it has a wrap around trigger. Clever use of Sample and Hold can serve you, too.

The "manual override" stuff suggests having a look at Sync Creators/Extractors.

For ex., using Midi Activity + Midi Delta + a few math bidules, you could set up a threshold to override with midi message B when it senses incoming activity, then go back to midi message A after n secs of non-activity.

I have a few tools that do similar, could dig them up if you like.

rob
Posts: 11
Joined: Sat Jul 23, 2011 3:36 am

Re: Tap Tempo Revisited

Postby rob » Wed Jul 27, 2011 2:04 pm

Hi Jersmi,

I'm using a combination of Light Factory (lifact.com) for one set of installations and Sunsuite2 (nicolaudie.com) for another set. Both very good systems though have their respective advantages and disadvantages.

If you have some examples that would be great, thanks!


PS. it's a testament to the interwebs that this thread started 6years ago and still get's the occasional post :-)

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Tap Tempo Revisited

Postby jersmi » Wed Jul 27, 2011 8:08 pm

Rereading, I think your original "gate + thresholds" question is good, maybe something like this for manual override when KTDrum is out of range.

Screen shot 2011-07-27 at 6.05.07 PM.jpg
Screen shot 2011-07-27 at 6.05.07 PM.jpg (21.22 KiB) Viewed 6964 times

rob
Posts: 11
Joined: Sat Jul 23, 2011 3:36 am

Re: Tap Tempo Revisited

Postby rob » Mon Aug 01, 2011 5:35 pm

Hi,

great, I came to a similar range limiter (though less elegant) solution before checking the forum. DOH! Always check here first :-)

I'm almost done though when the tempo goes out of range I want it to keep on using the last good BPM / SYNC value until either a) auto comes back in range, or b) a manual override is received.

I'm currently doing it _inside_ the TapTempo group by taking the final BPM value, checking it's within range then patching into a Step Sequencer as the BPM. This doesn't work right when out of range and the approach feels messy, inefficient and I guess I shouldn't convert back to MIDI until the very end output to DMX.

Thanks for your advice. I need to spend more time playing with some of the operators to work out how they are used.



Cheers,
Rob

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Tap Tempo Revisited

Postby jersmi » Mon Aug 01, 2011 10:53 pm

Seems like Sample and Hold (+ conditionals) might work -- i.e., if BPM is in range, send a 1 to the right side input of S&H (BPM to left input). This would continuously store the current BPM. Then if BPM goes out of range, send 0 to the right side input and use the last sampled BPM.

If post what you have it might be easier....

rob
Posts: 11
Joined: Sat Jul 23, 2011 3:36 am

Re: Tap Tempo Revisited

Postby rob » Sat Oct 15, 2011 5:50 am

Hi,

am having a small problem with the SH2. I have the BPM coming through to the lefthand input, and have the range checker correctly sending a 1 when in range and a 0 when out of range, however SH2 doesn't seem to do a continual sample when it has 1 on the trigger.


tt_range.JPG
TT range checker
tt_range.JPG (28.27 KiB) Viewed 6823 times



It _seems_ like it needs to go out of range, then when it comes back in it grabs the next sample only and outputs that. Which isn't usually right as the BPM takes a little bit to settle. Eg. start at 130 bpm, change around within range, keeps outputting 130 (I want it to re-sample). Then if I go out of range and come back it'll grab a random number between the out of range value and the value in range that it's heading for.

"BPM Display" is correct, "Ranged BPM" is the one I'm having problems with.


Thanks,
Rob

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Tap Tempo Revisited

Postby jersmi » Sat Oct 15, 2011 4:19 pm

adding this should work. connect SH to Change.

Screen shot 2011-10-15 at 2.15.40 PM.jpg
Screen shot 2011-10-15 at 2.15.40 PM.jpg (9.82 KiB) Viewed 6820 times

rob
Posts: 11
Joined: Sat Jul 23, 2011 3:36 am

Re: Tap Tempo Revisited

Postby rob » Sun Oct 16, 2011 7:16 am

Cool thanks - that works. I'd like to make another enhancement where it only changes the output if the value is stable. IE. the last 3 or 4 BPMs are the same value. As a test I tried the prevX(4) function comparing the current with the 4th one back however I must be missing something.

rangesmooth.JPG
rangesmooth.JPG (8.31 KiB) Viewed 6816 times


Here I've gone from 125BPM to 105 (out of range), I prefer it to stay at 125 until the value has stablised, then in this case it would remain at 125 because the new value is out of range. Am I mis-using prevX() ?


Thanks again

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Tap Tempo Revisited

Postby jersmi » Sun Oct 16, 2011 2:41 pm

rob wrote:Here I've gone from 125BPM to 105 (out of range), I prefer it to stay at 125 until the value has stablised, then in this case it would remain at 125 because the new value is out of range. Am I mis-using prevX() ?

What test do you want to use to say BPM is stable? Are you saying, if BPM is in range for a certain number of taps then it gets deemed stable? If so, maybe you could use the tap counter to create the test?

Here's version with your mod plus a couple more, maybe this?
Attachments
TapTempo.bgrp
(83.12 KiB) Downloaded 236 times

rob
Posts: 11
Joined: Sat Jul 23, 2011 3:36 am

Re: Tap Tempo Revisited

Postby rob » Mon Oct 17, 2011 3:05 pm

Wow, that's impressive! Thanks. Considerably better than my hackish attempt :-)

To test I'm using the MIDI sequencer bidule as the input, sending a note on each beat (4/4). If for example the sequencer is running at 120BPM and I change it to 150BPM, the current design climbs towards 150BPM, in a few tests stopping around 135BPM (though obviously varies) before realising it's out of range.

Perhaps adding an "IsStable" check inside the StayInRange group that checks if the last few BPMs are, well stable :-)


There may be a bug with the tap reset after 5seconds as TimeDelta > (SampleTime*5) won't be true.


Finally, at the end of all this I have a range checked, stable BPM, that I then want to send back out via MIDI to control the lighting system. I'm currently using the Sequencer bidule, sync'd to the TapSync creator and am sending out different notes on the beat, 1/2beat and 1/4 beat to control different elements of the lighting at different rates. Is this the best way? It works but feels hackish, would have thought that the MIDI message creator would be a neater way but it can't sync with the TapSync creator. Creative suggestions welcome.


Cheers

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Tap Tempo Revisited

Postby jersmi » Tue Oct 18, 2011 4:59 am

There are many variations on data you could send to your lights. What's wrong with the Step Seq? You can do velocity with the step seq.... You could insert a Sync Extractor and sync to Tap Sync then do math on the samples per ppq. you could also maybe set up delays with feedback. is the lighting setup a matrix? if so there are the matrix sequencers under Misc....

I see what you mean about the reset, think i got it fixed using another accum timer instead of time delta. still testing.

I think the test for outliers should come directly after time delta, since that's where the numbers fluctuate from input. perhaps could use low/high values to clip the time delta input. also could maybe send it triggers with the trigger clock when no taps are happening. this would always keep it centered to a set BPM. that would take some reworking though. just some thoughts.

rob
Posts: 11
Joined: Sat Jul 23, 2011 3:36 am

Re: Tap Tempo Revisited

Postby rob » Wed Oct 19, 2011 3:36 pm

jersmi wrote:There are many variations on data you could send to your lights. What's wrong with the Step Seq? You can do velocity with the step seq.... You could insert a Sync Extractor and sync to Tap Sync then do math on the samples per ppq.


StepSeq does the job very well, just wasn't sure if it was the most efficient in case I start getting into performance problems. (the lighting control runs on the same laptop and is eating a lot of CPU).

jersmi wrote:I see what you mean about the reset, think i got it fixed using another accum timer instead of time delta. still testing.


Cool, thanks, let me know how you go.

jersmi wrote:I think the test for outliers should come directly after time delta, since that's where the numbers fluctuate from input. perhaps could use low/high values to clip the time delta input. also could maybe send it triggers with the trigger clock when no taps are happening. this would always keep it centered to a set BPM. that would take some reworking though. just some thoughts.


Wouldn't a clip still result in the BPM moving off the last known 'good' value? What often happens is that I'll get a good lock at say 129BPM, then a section of the music will change, the beat is still at 129 however the detection jumps way up or way down as it struggles to find a beat. Most feeds I use are straight from the DJ mixer and they don't tend to change more than +/- 10BPM for the whole set (or night!) Hence, I want to keep the last known stable BPM until it's pretty confident something really has changed.


Cheers,
Rob

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Tap Tempo Revisited

Postby jersmi » Wed Oct 19, 2011 8:28 pm

rob wrote:Wouldn't a clip still result in the BPM moving off the last known 'good' value? What often happens is that I'll get a good lock at say 129BPM, then a section of the music will change, the beat is still at 129 however the detection jumps way up or way down as it struggles to find a beat. Most feeds I use are straight from the DJ mixer and they don't tend to change more than +/- 10BPM for the whole set (or night!) Hence, I want to keep the last known stable BPM until it's pretty confident something really has changed.


Yeah, any pause between taps throws off the next 'good' tap. Can't quite get testing for 'good' taps against how soon to decide the pause between taps is too long. Getting closer but it'll be a few days.

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Tap Tempo Revisited

Postby jersmi » Fri Oct 21, 2011 12:21 am

See if this version makes any sense. Major changes -- test!

This version uses two ways to create stability:
1. Set to require 4 taps to generate BPM. (4 taps seems to work better to create stable bpm. Can change this in tapCounter group).
2. If a pause is detected causing bpm to go out of range, holds last 'stable' bpm and waits for 2 taps to continue. "Padding" adds msecs to allow for taps close to desired bpm.

Also new: "taps2bpm" group averages current + up to last 4 taps.
There's also an "out of range" toggle setup in place to switch to "auto bpm", untested.
Attachments
TapTempo_v1.1.bgrp
(117.91 KiB) Downloaded 235 times


Return to “Bidule Layouts”

Who is online

Users browsing this forum: No registered users and 1 guest