Forums > MaxMSP

please help :) simple question concerning oscillators

Dec 26 2013 | 12:06 pm

After having tried for hours I give up.. I’m just trying to make a very simple tone in Max Msp. Is there someone who can make a max oscillator sound like this:

(= simple triangular-ish tone at 440hz)

I’m not even getting close, it sounds different from tri, more like rect, but different…please help :)

Dec 26 2013 | 12:38 pm

Hi, if you open your file with an editor, it looks like it’s a triangle wave with the points rounded off (it has been shaped or filtered somehow). Try using a tri~ object with a lores~ lowpass filter after it. try changing the frequency of the filter till it sounds the same.
2000 to 3000 hz ??? With this kind of thing it helps to look at an oscilloscope or scope~ ;-)
best, Justin

Dec 26 2013 | 1:29 pm

Hi Justin,

thank you for your reply, helps a lot. Seems like I have to use a combination of a sine and a triangular wave to make it perfect.

Do you think this tone will also be possible to get using this simple idea:

it’s a lot more difficult, although you wouldn’t think so at first…

Dec 26 2013 | 4:46 pm

>Seems like I have to use a combination of a sine and a triangular wave to make it perfect.

that will give you a roundedness that your original file doesn’t have in it.

that last one looks like an oldschool analogue square, rect~ actually is a lot like that – play with the duty cycle, you’re looking for less than 0.4, I think.

Dec 26 2013 | 5:13 pm

thanks, but still impossible to get the correct sound perfectly..

Dec 27 2013 | 4:47 am

what about loading the sample into [wave~]?

Dec 27 2013 | 12:12 pm

Thanks, wave~ is very useful for my oscillators that don’t have to many upper harmonics. The sharper timbres are however more problematic : )

Dec 27 2013 | 12:37 pm

HI Nate71 , why problematic ? you can map as many cycles of frequency (sampled notes) as you want and try to morph between them while you change your playing frequency . you know what i mean ? a two dimensional wavetable . or "jump" between these phase locked cycles . or something else is stopping you ?
u will never get this un-perfect sound of an analogue oscillator with quite aliased digital implementations . but band limited oscillators are our friends . i saw some Gen examples but never analyzed them .

Dec 27 2013 | 1:35 pm

…is this really possible with a 2 dimensional wavetable? could I load 88 sampled notes?

Dec 27 2013 | 1:58 pm

an artificial one . if u can live with two playing objects for your oscillator implementation then you could load your cycles into polybuffer and reference it depending on played note , crossfade beetween last played with current note ( sin / cos ) if you dream about portamento or legato with more natural transition between quality of samples without resampling , also useful for FM . BUT you need to take care of your cycles , how you cut them etc .
another way would be more difficult , to use 2d.wave~ where you would be forced to resample all of your sampled cycles to the same amount of samples(size in samps) , lets say 512 samples per cycle ,and phase lock it into one wave to scrub through them using 2d.wave~ object .
or just play requested sample note wave from polybuffer .
i would go for the first solution i guess , so i can easily transite between octaves . im actually interested how would it work

Dec 27 2013 | 2:05 pm

as for PWM stuff you would be forced to provide altered/distorted phase that runs your cycles (some strange calcs are required unfortunately ) . it may be clumsy for this sort of things but ive been trying to do it in the past with funny results . length and distortion of your phase (to run your cycles) need to compensate to its orginal duration to keep frequency untouched . not easy but doable . cool exercise , at some point gives you power to alter sampled cycles as normal oscillators .

Dec 27 2013 | 2:07 pm

I will have to read this a couple of times : )

Dec 27 2013 | 2:12 pm

im chaotic , im sorry . i can try to implement this first solution but tomorrow if u dont mind and if u are interested of course

Dec 27 2013 | 2:13 pm

yes!!! I’m interested ! this would be awesome..

Dec 27 2013 | 2:15 pm

all good then

Dec 27 2013 | 2:21 pm

thanks again man, looking forward to your patch!

Dec 28 2013 | 2:11 pm

does anyone know how to fix the last step in this patch? If this works I will have made an oscillator out of chromatic samples..

-- Pasted Max Patch, click to expand. --


Viewing 17 posts - 1 through 17 (of 17 total)

Forums > MaxMSP