How to Set duration for cycle~ object?

megan hung's icon

Hello, I am new to Maxmsp. Does anyone know how to set the duration of each frequency(e.g., 500 ms)? Because the sound will continue if I don't turn off the volume button.

Also, what's the meaning of 20 in the message box? I can't get it.

Thanks for helping!


Wil's icon

Here is a small tutorila

have a look at [line~] help file

Max Patch
Copy patch and select New From Clipboard in Max.





megan hung's icon

Thanks for the response, I really appreciate it. However, do i need to click the bang each time to trigger the sound? Or is there any way that the sound could be triggered with the fit duration as long as I change the frequencies?

Wil's icon

So... Yeah... you are new to max

Or is there any way that the sound could be triggered with the fit duration as long as I change the frequencies?

Yeeesh... that rabbit hole goes very deep. You begin to see swirling colors, break out in cold sweat, lose your breath, smash everything your house... :0

fun

//

Seriously. It depends on how you are changing frequencies, and how fast you are changing frequencies.

Frequency and amplitude are two very different things. Each has its own approach here in Max.

For example, you can have a note playing for 10 seconds that keeps changing frequency but amplitude stays the same.

You can have short burst of notes the have only one frequency.

To have the amplitude turn on and off each time you change a note, is also an option.

These are all basic.

Here are some simple examples:

Max Patch
Copy patch and select New From Clipboard in Max.


Roman Thilenius's icon

pff. ok. 30 seconds for this.

the helpfile... is more or less giving the answer already - because it has a gain object. when you move the gain slider up, you can hear the tone. when you move it down, it stops.

the same way how this gainslider does the on/off thing, it can also be implemented as simple code without GUI - and without the requirement of user interaction.

[line~] is one option - sending a "bang" to a [delay] to set a multiplication object to 1 and 0 is another one.

there is always a way (or multiple ways) how to make one thing depend on another thing. that is more or less what it is all about. :)

this is not best practice for this kind of thing. this is most noobish as possible.