new user, probably a simple question

Sep 9, 2007 at 2:19am

new user, probably a simple question

this is my first time using max/msp. I’ve made a patch that takes in audio from my microphone and modulates a tone generated by “cycling~ 440″. it works fine but the tone is always constantly going, and I would like the tone to only start once i speak into the microphone. hopefully this question makes sense, i am very new at this and it is my first attempt.

#33596
Sep 9, 2007 at 2:22am

sorry i tried to edit my post but it said i cant.

To clarify, what Im trying to do is talk into the microphone and have the sound of my voice mixed with that 440hz tone. I have it working except the tone is always constantly going, and i only want the tone to sound when i talk into the mic. How can i acheive this?

hopefully i worded that better.

#112113
Sep 9, 2007 at 2:55am

look at peakamp~. Use that to generate the envelop controlling the
volume (via *~) of your sine wave.

David

On Sep 8, 2007, at 7:22 PM, drew wrote:

>
> sorry i tried to edit my post but it said i cant.
>
> To clarify, what Im trying to do is talk into the microphone and
> have the sound of my voice mixed with that 440hz tone. I have it
> working except the tone is always constantly going, and i only want
> the tone to sound when i talk into the mic. How can i acheive this?
>
> hopefully i worded that better.

#112114
Sep 9, 2007 at 6:14am

well i’ve looked at peakamp~ and I’m afraid I just dont know enough about max/msp. I’ve been fiddling around with it for quite some time now with no luck. i’ve attached a screenshot of my crude little patch. Ideally I’d like all of those cycling~ objects to trigger when i speak in the mic but if its only one thats fine as well. can you just explain to me by looking at the picture where i should put this peakamp~ object? thanks so much for your help.

#112115
Sep 9, 2007 at 9:35pm

You are multiplying your voice by the cycle in your example. That is called ring modulation….if you just want to mix, try something like the following. Mess with the [> .2] to change when the peakamp~ triggers the audio on.

Paste the following text in a new patcher window

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 473 430 34 196617 Cycle;
#P user gain~ 466 451 24 100 158 0 1.071519 7.94321 10.;
#P user gain~ 431 450 24 100 158 0 1.071519 7.94321 10.;
#P newex 388 251 31 196617 adc~;
#P newex 577 360 27 196617 > 0.2;
#P newex 589 324 69 196617 peakamp~ 25;
#P newex 444 584 31 196617 dac~;
#P newex 502 345 61 196617 cycle~ 440;
#B color 5;
#P newex 504 381 35 196617 *~ 1.;
#P comment 425 431 34 196617 Voice;
#P connect 5 0 1 1;
#P connect 4 0 5 0;
#P hidden connect 6 0 7 0;
#P connect 6 0 4 0;
#P connect 7 0 3 0;
#P connect 7 0 3 1;
#P connect 8 0 3 0;
#P connect 8 0 3 1;
#P hidden connect 1 0 8 0;
#P connect 2 0 1 0;
#P window clipboard copycount 10;

#112116
Sep 9, 2007 at 9:41pm

drew schrieb:
> I’ve made a patch that takes in audio from my microphone and
> modulates a tone generated by “cycling~ 440″.

I think cycling~ only works correct with a parameter of ’74
(sorry couldn’t resist… ;-)

> it works fine but the tone is always constantly going, and I would
> like the tone to only start once i speak into the microphone.
> hopefully this question makes sense, i am very new at this and it is
> my first attempt.

Now serious:
What you want is an envelope follower and then invers that level to
multiply it with your sine wave from cycle~…
After you did all the tutorials, its good to look into the examples.
Also have a look at rampsmooth~, just connect an abs~ with rampsmooth~
and experiment with different attack and release times…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#112117
Sep 10, 2007 at 5:40am

On Sep 9, 2007, at 2:41 PM, Stefan Tiedje wrote:

> What you want is an envelope follower and then invers that level to
> multiply it with your sine wave from cycle~…

It could be the lack of sleep, but the “inverse” isn’t right. If you
want the sine wave to play when there is sound coming in thru the
mic, then use the amplitude of the signal (not the inverse of the
amplitude…which I guess you mean 1 – amplitude?) to control the
volume of the sine wave. What you are suggesting would be a ducker (a
useful application in itself, but not what the original poster was
trying to do). And I still think peakamp~ is the best object to use
for driving this (vs. abs~). Jeff Kaiser’s patch from earlier is a
good example. His uses a threshold to trigger an either all on or
all off sine wave. Or you could simply remove the “>0.2″ and connect
peakamp~ directly to *~ to get a more variable volume control.

HTH,
David

#112118

You must be logged in to reply to this topic.