dirpax.blogg.se

10 oscillator monomorphic additive synthesizer max patch
10 oscillator monomorphic additive synthesizer max patch







The one catch is that there is a clipping that can happen when adjusting the phase or the frequency. This result is pretty much exactly what I was hoping for. There was still the tricky part of handling the phase offsets, but I found a nice solution where you simply apply a 2D rotation to the value in the Fourier Series! First, it creates two blank arrays (real and imag) that will function like a Fourier Series and then populating them with the values from the oscillators. What I ended up doing was using Web Audio's createPeriodicWave() method.

10 oscillator monomorphic additive synthesizer max patch

It also kinda fealt like cheating since the goal in my mind was to create a synthesizer that outputs one compound tone rather than one that creates multiple tones and mixes them together on output. The original solution I came up with was to give each oscillator its own Web Audio OscillatorNode, but that wouldn't allow for proper phasing of the waves.

10 oscillator monomorphic additive synthesizer max patch

This is in part because it is a lot of data to process on the fly! While I had some luck using turbo.js to offload the processing to the gpu, I found it to be virtually impossible to sync the waves on each cycle. I originally tried building the sound wave manually by pulling values form the oscillators to calculate each sample and pushing it to the audio buffer as one compound wave, but timing the updates is problematic.









10 oscillator monomorphic additive synthesizer max patch