sorry, i have a few questions today, i know it's bad from to ask them all in one thread, but i don't want to start too many threads.
question 1) how do you multiply a signal by a power of n ? can you do it with expr~?
question 2) is there a list of the functions that i can use with expr~ (and expr) ? i have seen many of these functions in other peoples patches, but can't find them in pd's documentation.
question 3) i want to insert a percentage of random noise into a signal. ie, for every oscillation of an [osc~] i want 25% of the samples to be converted into noise. the level and position of the noise should be random, but 25% of the samples in each oscillation must be be converted into noise. any idea how to do that?
thanks for any help.
hard off wrote:
sorry, i have a few questions today, i know it's bad from to ask them all in one thread, but i don't want to start too many threads.
question 1) how do you multiply a signal by a power of n ? can you do it with expr~?
do you mean take a signal to the nth power?
to square a signal (ie signal^2) do this:
[osc~]
|
|
[*~]
|
[dac~]
to cube the signal, take the output of the [*~] above and pass it through another [*~] which takes the original signal [osc~] as its other input.
question 2) is there a list of the functions that i can use with expr~ (and expr) ? i have seen many of these functions in other peoples patches, but can't find them in pd's documentation.
i'd be interested in this myself..
question 3) i want to insert a percentage of random noise into a signal. ie, for every oscillation of an [osc~] i want 25% of the samples to be converted into noise. the level and position of the noise should be random, but 25% of the samples in each oscillation must be be converted into noise. any idea how to do that?
i'm not sure i understand what you mean by 25%. do you mean you want to mix an osc~ signal and a noise signal with the noise being 25% of the amplitude of the osc~ signal? or do you want to have an osc~ signal interspersed with noise such that the noise occurs 25% of the time and the osc~ the other 75%?
about the nth power of a signal, i want n as a variable, so the chain of [*~] objects is not exactly perfect. i tried [pow~] but it doesn't seem to work the way i expected.
do you want to have an osc~ signal interspersed with noise such that the noise occurs 25% of the time and the osc~ the other 75%?
yes, exactly that.
On Tue, 2006-12-12 at 20:11 +0900, hard off wrote:
about the nth power of a signal, i want n as a variable, so the chain of [*~] objects is not exactly perfect. i tried [pow~] but it doesn't seem to work the way i expected.
iirc pow~ implements pow(y, x), with x being the first inlet and y being the second.
hth ... tim
-- tim@klingt.org ICQ: 96771783 http://www.mokabar.tk
Happiness is a byproduct of function, purpose, and conflict; those who seek happiness for itself seek victory without war. William S. Burroughs
Hallo, hard off hat gesagt: // hard off wrote:
sorry, i have a few questions today, i know it's bad from to ask them all in one thread, but i don't want to start too many threads.
question 1) how do you multiply a signal by a power of n ? can you do it with expr~?
Yes, you can use expr~ here. I used it for example in the vead~ abstraction attached. Here the "6" is hardcoded but it could be replaced with $fX just fine.
Frank Barknecht _ ______footils.org_ __goto10.org__
ah, THAT'S where i saw it last. yeah frank i do have your vead~ patch.
in case anybody else was wondering, the syntax is:
[expr~ pow($v1, $f2)]
...no idea where we can find a full syntax list for expr~ ???
On Tue, 12 Dec 2006, hard off wrote:
sorry, i have a few questions today, i know it's bad from to ask them all in one thread, but i don't want to start too many threads. question 1) how do you multiply a signal by a power of n ? can you do it with expr~?
you might mean "raise a signal to the nth power". the way you wrote it is somewhat confusing (but still guessable). [expr~ pow($v1,$f2)]
is there a list of the functions that i can use with expr~ (and expr) ? i have seen many of these functions in other peoples patches, but can't find them in pd's documentation.
[expr~] is considered an external, that is just bundled with pd. Beyond the help file, your best bet might be looking at vexp_fun.c. It might be C code, but at least you can find the names of all the allowed functions.
i want to insert a percentage of random noise into a signal. ie, for every oscillation of an [osc~] i want 25% of the samples to be converted into noise. the level and position of the noise should be random, but 25% of the samples in each oscillation must be be converted into noise. any idea how to do that?
25% of samples might sound a lot noisier than what you want. Perceptually you will not have something damaged by only 25% and you'll be lucky if you still hear something. It's not as if you replaced 25% of pixels by noise in an image.
If you still want to do it, you can do it like:
[inlet] [noise~] [noise~] | | | [expr~ if($v3<=-0.5,$v2,$v1)]
Where <= -0.5 selects the first quarter (25%) of the -1..+1 range used by [noise~]. If you remapped [noise~] to the 0..1 range, the threshold would become 0.25 = 25%.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
yeah. 25% was just a guess. thanks for the help with expr~