electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
tap tempo
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
soundcyst



Joined: Feb 17, 2008
Posts: 18
Location: santa cruz, ca

PostPosted: Sun Mar 30, 2008 12:02 am    Post subject: tap tempo Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Sun Mar 30, 2008 12:24 am    Post subject: Reply with quote  Mark this post and the followings unread

I'd help if I could, but I don't even know what tap tempo is! Embarassed
_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
soundcyst



Joined: Feb 17, 2008
Posts: 18
Location: santa cruz, ca

PostPosted: Sun Mar 30, 2008 12:31 am    Post subject: Reply with quote  Mark this post and the followings unread

"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
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Sun Mar 30, 2008 1:21 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail
soundcyst



Joined: Feb 17, 2008
Posts: 18
Location: santa cruz, ca

PostPosted: Sun Mar 30, 2008 1:25 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Sun Mar 30, 2008 5:07 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail
fearless_fool



Joined: Feb 24, 2009
Posts: 3
Location: San Francisco

PostPosted: Wed Feb 25, 2009 12:39 am    Post subject: has anyone written a tap tempo object yet? Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
kijjaz



Joined: Sep 20, 2004
Posts: 765
Location: bangkok, thailand
Audio files: 4

PostPosted: Wed Feb 25, 2009 1:23 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
essteb



Joined: Nov 03, 2014
Posts: 7
Location: Colombia

PostPosted: Mon Nov 03, 2014 9:47 pm    Post subject: Tempo Tap Reply with quote  Mark this post and the followings unread

I've made a Tempo Tap, as a patch that prints values in console:

https://github.com/essteban/TempoTap/blob/master/TempoTap.ck

or as function that returns an static value.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use