sourcebox / mi-plaits-dsp-rs

Rust port of Mutable Instruments Plaits module DSP code.
MIT License
25 stars 4 forks source link

No AUX output from the virtual-analog engine #2

Closed crp500 closed 1 year ago

crp500 commented 1 year ago

I get AUX output from all engines except the virtual-analog engine.

The manual says: AUX: sum of two hardsync’ed waveforms, the shape of which is controlled by MORPH and detuning by HARMONICS.

I am using the engine through voice.rs No errors or crashes or anything in the audio other than silence. The main virtual-analog output is fine.

sourcebox commented 1 year ago

I added a test for the voice module which generates output under out/voice. I can confirm that the aux output is silent when harmonics and timbre are both set to 0.5. By changing harmonics to 0.6 and timbre to 0.4, some output will be generated.

@crp500 can you please check that behaviour and compare it to the hardware module? I'm quite sure there is some error in the code, but I'd like to have it checked against the original before further investigation.

sourcebox commented 1 year ago

After some further investigation, I found that having a value of exactly 0.5 for harmonics causes the aux output to be silent. Changing the value slightly above or below 0.5 will give some output signal. So I'm not sure, if there is really an error in the code or if it's the desired behaviour.

I guess that with the hardware module it's nearly impossible to match that value exactly because the pot setting is always quantized to a step because of limited resolution.

crp500 commented 1 year ago

Harmonics seems to be the problem for me. If Harmonics is set to 0.5 on startup then there is no sound even when timbre/morph are set to values other than 0.5 on startup. Also, if i move timbre/morph after startup (while leaving harmonics at 0.5) there is still no sound.

If Harmonics is any other value than 0.5 at startup then i get sound.

If Harmonics is 0.5 at strartup I get sound as soon as I move Harmonics off 0.5 and then after that i can move harmonics back to 0.5 and the sound continues to output.

I also noticed the same behaviour for the modulations_harmonics parameter. patch_harmonics = 0.5 + modulations_harmonics = 0 causes no sound modulations_harmonics > 0 or < 0 causes sound

I could not repeat this behaviour on a genuine MU plaits hardware. I could not get it to go silent no matter how close i tried to position harmonics to "12 oclock" which i presume is the equivalent of 0.5

sourcebox commented 1 year ago

Please check the latest commit. I put an offset on the start phase of the aux oscillator, so the waveforms shouldn't cancel out each other anymore.

crp500 commented 1 year ago

That seems to have fixed things.

sourcebox commented 1 year ago

Closed via ceff2993d61c9c382c9a2e57ed7924fe5e9d180a