please help :) simple question concerning oscillators

Dec 26, 2013 at 12:06pm

please help :) simple question concerning oscillators

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:

https://www.wetransfer.com/downloads/1cdde0d9b3a2261bab318e7c6f1adc9220131226200211/0bcde50f0e38c36b5323a1b37c4fdc4420131226200211/624f53

(= simple triangular-ish tone at 440hz)

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

#276715
Dec 26, 2013 at 12:38pm

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

#276717
Dec 26, 2013 at 1:29pm

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:

https://www.wetransfer.com/downloads/e692443ce88e01aa18c8f5ed098e28f220131226212507/1cae563b31bfd5e88496874cefff87f320131226212507/c2103a

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

#276721
Dec 26, 2013 at 4:46pm

>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.

#276726
Dec 26, 2013 at 5:13pm

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

#276728
Dec 27, 2013 at 4:47am

what about loading the sample into [wave~]?

#276747
Dec 27, 2013 at 12:12pm

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

#276764
Dec 27, 2013 at 12:37pm

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 .

#276769
Dec 27, 2013 at 1:35pm

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

#276772
Dec 27, 2013 at 1:58pm

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

#276774
Dec 27, 2013 at 2:05pm

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 .

#276775
Dec 27, 2013 at 2:07pm

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

#276776
Dec 27, 2013 at 2:12pm

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

#276777
Dec 27, 2013 at 2:13pm

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

#276778
Dec 27, 2013 at 2:15pm

all good then

#276779
Dec 27, 2013 at 2:21pm

thanks again man, looking forward to your patch!

#276780
Dec 28, 2013 at 2:11pm

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..

<code>

– Pasted Max Patch, click to expand. –

</code>

#276836

You must be logged in to reply to this topic.