Author |
Message |
soundcyst
Joined: Feb 17, 2008 Posts: 18 Location: santa cruz, ca
|
Posted: Sun Mar 30, 2008 12:02 am Post subject:
tap tempo |
|
|
has anyone implemented tap tempo into any ChucK patches yet?
i'm making a live looping patch for the monome 40h using LiSa ugens and would be pleased if i didn't have to write the tap tempo functionality myself.
i suppose i'll have to if no one else has done it though.. |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sun Mar 30, 2008 12:24 am Post subject:
|
|
|
I'd help if I could, but I don't even know what tap tempo is! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
soundcyst
Joined: Feb 17, 2008 Posts: 18 Location: santa cruz, ca
|
Posted: Sun Mar 30, 2008 12:31 am Post subject:
|
|
|
"tap tempo" basically describes the functionality of a button within a musical system. every time you press the button (sometimes labeled simply "tap," as on the korg electribe), the system updates the tempo in attempts to match your tapping. usually the system takes 3 or more taps before it actually adjusts the tempo, determining the new tempo based on the time between the past 3 or more taps.
it's extremely useful for using electronic sequencers in a live environment with non-electronic instruments. |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sun Mar 30, 2008 1:21 am Post subject:
|
|
|
Hmm, well you could set up an HID object with an event waiting for any key press, then use "now => time keypress" to record the key time into a time variable, then do "keypress - prev_keypress => dur tempo" and "tempo => now" to set things up if you follow me. That would be one way to do it. It might be good to put an if statement setting limits on the size of tempo too. Just typing out loud to help rough out the algorithm... _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
soundcyst
Joined: Feb 17, 2008 Posts: 18 Location: santa cruz, ca
|
Posted: Sun Mar 30, 2008 1:25 am Post subject:
|
|
|
yeah, the means for setting this up are definitely there.
i'm wondering if i should do it in a class or a function or what though...
this is typical for me, getting hung up on a minor detail before i've even started to code.
this should be one of my last concerns, but for some reason, i feel that it's important right now.
thanks a bunch for your input. if you come up with anything else, please let me know =) |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sun Mar 30, 2008 5:07 am Post subject:
|
|
|
Hmmm, I think you want to launch the HID-responsive script as a shred. This is because otherwise you'll have to put it as your main time loop and then you can't use the main time loop again. It is also due to the fact that we have no "OR" operator in events. We can't say "HID_event | MAUI_event =>now;" for example. This forces us to launch a separate shred for each event unless we use the main time loop. So either way, whether you do it as a class or just a function, you're sporking a shred!
I tend to write things as functions and then later isolate them into a class if necessary, but others would be much more strict about it. Actually I'm still getting comfortable with classes - I "get" them, just not all that experienced with them. So don't ask me, lol! Best of luck with it. _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
fearless_fool
Joined: Feb 24, 2009 Posts: 3 Location: San Francisco
|
Posted: Wed Feb 25, 2009 12:39 am Post subject:
has anyone written a tap tempo object yet? |
|
|
so: has anyone written a tap tempo object yet? i need one for live performance work, and will bite the bullet if nobody has done so.
My working hypothesis is that it takes as input an event (e.g. from a MIDI key or appropriate HID input) and uses that as its "tap" input.
It should have a ugen output that ramps from 0.0 to 1.0 over the course of one beat. It should also have an output you can query to get the current tempo (in Hz, not BPM), and some indication if it has attained lock or not.
I plan to implement it as a form of a phase locked loop with two sawtooth UGens running in phase quadrature to one another. This way, whenever you get a tap event, you can look at the outputs of the two sawtooths (sawteeth?) and directly know how far the tap lags or leads the beat, and apply appropriate correction to the sawtooth frequency and phase.
I'm sure there's some optimal Kalman filter that knows when to change the frequency and when to simply tweak the phase, but I'll probably just use something closer to the NTP technique. If anyone has deep knowledge about how best to do this, PM me.
Thanks.
- ff |
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Wed Feb 25, 2009 1:23 am Post subject:
|
|
|
I'm still not sure if i can program this stuff. i'd like to practice though. but still working on many pieces of music right now -_-" .. so i'll update if i have some working prototype. |
|
Back to top
|
|
|
essteb
Joined: Nov 03, 2014 Posts: 7 Location: Colombia
|
|
Back to top
|
|
|
|