Control live.dial using cycle~

kmll's icon

I simply want to control a live.dial object using the cycle~ object. I.e I need the dial to go from 0 to 1 following the sine curve frequency. I guess this is straight forward but I just need some input to get this working.

Wil's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Wil's icon
Max Patch
Copy patch and select New From Clipboard in Max.

kmll's icon

Thanks for the advise:) Just one more question regarding this. Is it possible to start the cycle~ object when audio driver is set to "none"? (I am just using max to send control messages to another application)

Wil's icon

here is a way to achieve the cycle~ effect using buffer and peek- so you dont need to turn audio on. this has many more possibilities for generating various waveforms - look inside the buffer help~ at generator and functions.

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

kmll's icon

Many thanks! I need to work with this to get my head around what is going on but one question that comes to my mind. Where is the sine curve read into the waveform~ object? And is it possible to load and also even maybe "draw" other waveforms in the waveform~ object?

mda's icon
Max Patch
Copy patch and select New From Clipboard in Max.

draw you say...

kmll's icon

Thanks.. I now just need to combine the patches so that the curve I draw control the live.dial... But I then need to understand what is going on first..

mda's icon
Max Patch
Copy patch and select New From Clipboard in Max.

when you click on the multislider it outputs the values of each slider. listfunnel prepends each value with an index. So you have 0 and a value, 1 and a value, 3 and a value etc. peek uses these and stores them in the buffer~. lookup~ does the reverse, reading them out. If you connect the output of lookup~ to the audio out you will hear it... if the frequency is about 60 hz or so. MAKE SURE you put a *~ 0.1 between the lookup~ and the plugout or ezdac~ as it will be LOUD:

mda's icon

Keep in mind the range of values between mine and wil's patches may need scaling... maybe not, I have not had a proper look at wil's, your question just peek~ed my interest. ;-)

Wil's icon

combined.

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

Wil's icon

or you can just draw in waveform

(click the pencil)

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

rjungemann's icon

Why does it matter whether an audio driver is set or not? It doesn't necessarily mean that you need to use it. Any computer you would use Max with would have an audio driver.

Wil's icon

the Op wanted to use cycle~ to control a dial. but also asked if cycle could be used without audio on. the answer was no. so i created an alternative that simulates cycle using buffer and a sine wave with peek and counter.

kmll's icon

Thank you so much for the advise WIL and MDA. I see so much uses for this in the future. Inspiring:)

(RJUNGEMANN:The reason I wanted to do this without setting the audio driver is that I am using max to control Supercollider and I am using JACK to route audio and I then want to have the audio driver setup as clean as possible to avoid issues.)

rjungemann's icon

Did you try the NonRealtimeDriver?

nrt.maxpat
Max Patch
rjungemann's icon

Yes, obviously audio needs to be enabled for most signals to pass. I was wondering why setting an audio device was a big deal. It's the way it's meant to work.