simple question: vibrato/tremolo?

Diane's icon

Hey, sorry to bug everyone with a newbie question, but there must be a simple way to put vibrato on your variables... I just want to put an LFO on a slider in my patch with variable amplitude and frequency. I understand that cycle~ does this, but only with other MSP objects, not regular old sliders. There must be a simple solution, but honestly I can't find it anywhere! Ideally I'd like to control the LFO's amp/freq with constrained random numbers, even having a more random waveform rather than just a sine wave would be ideal (though I would absolutely want something with smooth interpolation between the points - some kind of portamento.) Can anyone help? Much appreciated.

Luke Hall's icon

Have a look at Peter Nyboer's javascript LFO. It was posted on this forum, here's the link.

lh

samuelnichols's icon

try hooking up cycle~ to number~, and use the right outlet of number~
to see the signal value as a float.

then you can scale it however you want (or use a different waveform,
etc.)...

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

On Feb 5, 2009, at 1:55 PM, Diane Douglas wrote:

>
> Hey, sorry to bug everyone with a newbie question, but there must be
> a simple way to put vibrato on your variables... I just want to put
> an LFO on a slider in my patch with variable amplitude and
> frequency. I understand that cycle~ does this, but only with other
> MSP objects, not regular old sliders. There must be a simple
> solution, but honestly I can't find it anywhere! Ideally I'd like
> to control the LFO's amp/freq with constrained random numbers, even
> having a more random waveform rather than just a sine wave would be
> ideal (though I would absolutely want something with smooth
> interpolation between the points - some kind of portamento.) Can
> anyone help? Much appreciated.

ongo73's icon

Firstly you don't bug anyone , !!!!!!

I guess the simplest way is to acctually disect and see what a vibrato is

'A perceptibly slow quasi-periodic excursion both above and below the fundamental frequency' (taken from C dodge and T Jerse 'computer music glossary page)

Now translate this action in Max/Msp language , the above suggestion made by Sam , is surely one way of doing just that

Diane's icon

Thanks so much for your help guys, The cycle~ and number~ solution works beautifully. Just needed to do some tinkering with scale. If anyone wants it, I built this into a useful little LFO abstraction that could be plugged into any control rate variable. If anyone wants a copy I can post it up later tonight after I add some more randomization and control.
-D

samuelnichols's icon

yes, please...

--SN

On Feb 7, 2009, at 12:27 PM, Diane Douglas wrote:

>
> Thanks so much for your help guys, The cycle~ and number~ solution
> works beautifully. Just needed to do some tinkering with scale. If
> anyone wants it, I built this into a useful little LFO abstraction
> that could be plugged into any control rate variable. If anyone
> wants a copy I can post it up later tonight after I add some more
> randomization and control.
> -Diane

seejayjames's icon

Quote: diane.douglas1@gmail.com wrote on Thu, 05 February 2009 15:55
----------------------------------------------------
> Hey, sorry to bug everyone with a newbie question, but there must be a simple way to put vibrato on your variables... I just want to put an LFO on a slider in my patch with variable amplitude and frequency. I understand that cycle~ does this, but only with other MSP objects, not regular old sliders. There must be a simple solution, but honestly I can't find it anywhere! Ideally I'd like to control the LFO's amp/freq with constrained random numbers, even having a more random waveform rather than just a sine wave would be ideal (though I would absolutely want something with smooth interpolation between the points - some kind of portamento.) Can anyone help? Much appreciated.
----------------------------------------------------

The advice with number~ is good. Check the sampling time in the Inspector. Also you can hook this up to a line (not line~) so that all changes will be smooth. For more interpolation options look into pattr, which should be looked into for lots of other (very juicy) reasons. :)

Diane's icon

Holy shit... this forum is amazing. I had just logged on to ask a question about smooth interpolation when I found your post about pattr. But I've been looking at the help file, and indeed it looks very useful, but I'm not sure how to apply it to my problem. is there any way to make the line object take floats? I've been running line with a message box going into it saying $1 600 and a float box going into that hooked up to the rest of the patch, but it seems to only take integers. I tried saying $1. 600 and I kept getting errors like "line doesn't understand 1.00" any suggestions?

Luke Hall's icon

If you want [line] to work with floats you need to give it a float argument when you create the object. For example [line 0] is the integer version whereas [line 0.] will work with floats. It's on the right side of the help file if you want to take a closer look.

lh

seejayjames's icon

Quote: diane.douglas1@gmail.com wrote on Sun, 08 February 2009 12:03
----------------------------------------------------
> Holy shit... this forum is amazing. I had just logged on to ask a question about smooth interpolation when I found your post about pattr. But I've been looking at the help file, and indeed it looks very useful, but I'm not sure how to apply it to my problem. is there any way to make the line object take floats? I've been running line with a message box going into it saying $1 600 and a float box going into that hooked up to the rest of the patch, but it seems to only take integers. I tried saying $1. 600 and I kept getting errors like "line doesn't understand 1.00" any suggestions?
----------------------------------------------------

Yes, you don't use $1. you always use just $1 --- which can be an int or a float, and is kind of confusing. (max actually reads that as $1. --- the variable with a dot added afterwards, so line is confused.) So use the float argument to line for floats. You can also set the time grain in ms which is helpful (if you want it smooth set it to 20 ms or less). Or you can have it "stepped" according to some kind of clock---I've used this to apply video effects like brightness that sync to a master beat.

Sounds like line will do what you need, and maybe not require pattr. But do take some time to check into pattr and pattrstorage for all kinds of other stuff. IMO the best interface for it is to utilize the preset object, then in the Inspector, set the pattrstorage name you're using. Then you have an intuitive GUI object to work with pattr.

Note that you can interpolate directly between whatever stored values you want just by sending floats in between the desired numbers, you can send ints to jump between presets (which essentially acts like the standard preset) or you can use the "recall" message to go between non-sequential stored presets (so "recall 2 4 0.5" would give you the value halfway between presets 2 and 4, without incorporating preset 3 at all. It works great with line too, so that the interpolation is controlled by the smoothly changing line values which go into pattrstorage to access the data.

Try the pattr with a matrixctrl and a multislider. Step sequencers or oscillator frequency banks, anyone? So easy to create, store, and mess with!

ComfortableInClouds's icon

surprised no one mentioned [snapshot~] connected to cycle~. [snapshot~] is a wonderful object for using MSP generated values to control Max objects.

Diane's icon

Cool, thank you! I'm sure connecting snapshot~ to MSP objects is a cool trick. Also, thanks for clearing up the float issue with line (to seejayjames and thereishopeforus) my problem was trying to use 1. as an argument instead of 0. and trying to use it as an argument in the message box ($1. instead of $1.) Everything is working great. Just one more thing for now - anyone know a better pitch tracker than pitch~? It seems to be getting confused by low frequencies. I'll try playing around with its parameters, but I don't really know where to start. Thanks! -Diane

Navid's icon

gbr.yin is nice and free.

otherwise IRCAM forum has yin~ and iana~

On Sun, Feb 8, 2009 at 11:27 PM, Diane Douglas wrote:

>
> Cool, thank you! I'm sure connecting snapshot~ to MSP objects is a cool
> trick. Also, thanks for clearing up the float issue with line (to
> seejayjames and thereishopeforus) my problem was trying to use 1. as an
> argument instead of 0. and trying to use it as an argument in the message
> box ($1. instead of $1.) Everything is working great. Just one more thing
> for now - anyone know a better pitch tracker than pitch~? It seems to be
> getting confused by low frequencies. I'll try playing around with its
> parameters, but I don't really know where to start. Thanks! -Diane
>