| 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

Joined: Oct 13, 2007 Posts: 1588 Location: Florida, USA
Audio files: 60
|
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!  _________________ EChucK: The synthesizer that got smashed into smithereens! |
|
|
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

Joined: Oct 13, 2007 Posts: 1588 Location: Florida, USA
Audio files: 60
|
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... _________________ EChucK: The synthesizer that got smashed into smithereens! |
|
|
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

Joined: Oct 13, 2007 Posts: 1588 Location: Florida, USA
Audio files: 60
|
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. _________________ EChucK: The synthesizer that got smashed into smithereens! |
|
|
Back to top
|
|
 |
|