So the lower the number, the faster the metro, right? How can I invert this so the higher the number, the faster it goes? This is the part where I wish I would have learned more in math classes. If only they would have told me I could someday use math for something practical like designing experimental sound patches. That's practical, right? LOL
-
Inverting metro time
-
The metro's input is the tick period in milliseconds, so, yes, lower number = faster. You can convert from BPM to milliseconds using [expr 60000 / $f1]. In general, you convert between frequency and period by taking the reciprocal, i.e. F = 1 / P, and P = 1 / F.
I feel the same on the math front, BTW. But fun stuff like this is a pretty good incentive to learn.
-
if you want to stick to vanilla PD and not use expr you can do:
[60000 $1(
|
[/ ]Which does the same thing as [expr 60000 / $f1]
-
My main goal was to have the speed of a metro go up according to the incoming volume level. So the louder the input, the faster the metro. If I take the numbers directly from the incoming audio it does the opposite (level goes up, number goes up, metro then goes slower.)
I will try some new things based on what everyone has suggested. Thanks.
-
Mathematically what you want is an inversion. Some constant divided by a variable. If you're using a signal that is bound between 0 and 1 RMS then do 1 / $1.
-
More accurately it's called an Inverse, this kind is specifically called a multiplicative inverse.
-
umm... ok, yeah... I must be a bit slower than you give me credit for. So I take the value coming out from 0 to 1 and then connect that to a box with 1 / $1 in it? I sort of just tried that and ended up with the same values coming out as going into it. I figure your explanation is a good one... just not for me in particular. Sorry.
-
what saturno means, is to divide a constant by the rms value to aim your needs to feed a metro.
i used 100 instead of 1 as constant, check out the attached patch, maybe this is what you are looking for...edit: the [env~] (envelope follower) is needed, because you only want to have positive values. this object outputs values in db, this is where [dbtorms] comes into the game, that converts them back into rms values.
-
sweet. I think that'll do it, or at least get me closer to what I am wanting to do. I modified it slightly and now I'm getting pretty good results. I was trying to send metro bangs to a tap tempo function on an effects processor. I wanted to imitate that peak function on those line6 tremolo pedals. Not sure if this effects unit will be able to do exactly that, but it does have a tremolo effect which is tied to the tap tempo.
Thanks to everybody, but the prize will always go to the one who essentially does most of the work for me... haha...... Anyway, thanks.
-
i don't know, if i got you right: do you want to use the peaks of, say, a drumbeat to tap the tempo of e.g. a delay? i guess, there should be better objects to suit that application. i never used it, but i could imagine, bonk could be a good starting point for that?
-
@adam.notebook said:
Thanks to everybody, but the prize will always go to the one who essentially does most of the work for me... haha...... Anyway, thanks.
btw, i'd take a beer or two!
-
Haha. I could use a couple myself right about now... So yeah, I don't really need it to follow a beat. I wanted it to output a value based on the level of incoming audio, and then be able to put that value into a metro. I think the point of the line6 tremolo effect is that if you hit a note on the guitar the speed of the effect will be based on the incoming signal. So if you play a chord or whatever, the effect will start out fast and as the held note dies out the speed slows down. So I want it to be dynamic and not a constant metro speed. Does that make sense?
-
if you take your incoming audio, you deal with a 0-100 numberange. then, the whole conversion is not really complicated.
for squeezing the values to a range, that is useful for the metro, why not just use [range].
not sure... range should be included in the pd-extended.in the attached patch, i simply inverted the numberstream, then added 100, so the louder it gets, the closer it gets to 0 (hence faster) and lastly scaled to 0-1000 to make it more effectful on the speed.
of course it's all just rough as an approach for you. - i hope i understand you right.
-
Interesting topic, but what bothers me most is how patch of tap tempo looks. I also would like to use a [adc~]-[fiddle~] object to get synchronization (bangs from second outlet which is sensitive to attacks) from live musician to all electronic stuff or manually to do the same for effects.
-
@keygap said:
Interesting topic, but what bothers me most is how patch of tap tempo looks.
you mean a patch to tap the tempo for e.g. a delay? that's pretty easy, [timer] is a good starting point... i built a little guitar fx patch including a tap delay, some weeks ago.
-
Oh, I'm too addicted to questioning at the time. This forum is full of patches so I'm just surfing, surfing... learning, learning, ... making, making. I want to leave commercial stuff behind and go to some audio or performance tasks then synchronization and control will be solved with Pd.
| |$| | | | | | |
| XXX || | | | | |_ | |
| || | | | | |-&||
| |$| | | | | | |