Re: [LAD] Click-free fade-in algorithm for synths?

From: <lacuna_@email-addr-hidden>
Date: Wed Sep 25 2019 - 16:10:03 EEST
>> For example, in zynaddsubfx, we count the ascending zero crossings and
>> calculate the fade-in length upon it [1]. Then, an S-curve of that
>> length is multiplied with the signal. Counting zero crossings prevents
>> clicking on lower notes, and it makes higher notes more punchy.
 
You are experiencing different phenomena:

- Groove: by dividing / multiplying frequencies to rhythm, envelope-times ect. - it just grooves.
In fact this is a very basic part of Electronic Dance Music.
- On lower notes the envelope might be slow here = no clicking
- Did you try syncing the oscillator with the note-on trigger? this gives a consistent "punch" and you can start it at 0, -1, +1, whatever - your choice.
Free running oscillators are more "groovy" and "alive".
- "Punch" is archived with the hold-stage in an AHDSR-envelope. Minimoog has that, - it overdrives the envelope, which rersults in a plateu.

For counting / finding zero-X it's simply this:  
 if {sample[now]*sample[before]==negative

Of course the result depends very much on the resolution (samplewise and bitwise).
Small buffersizes shouldn't be any problem anyway!? But yes for counting you have to wait, find and count.

Actually you do know the count of zerocrossings, as you know the frequency the oscillator swings!? So you don't have to mesure it!


Interesting topic... what are you working on? What is your goal?
 
 
Gesendet: Dienstag, 24. September 2019 um 20:38 Uhr
Von: "Johannes Lorenz" <j.spam@email-addr-hidden-ho.me>
An: linux-audio-dev@email-addr-hidden
Betreff: [LAD] Click-free fade-in algorithm for synths?
A note-on event can lead to clicks in synths, which is often fixed by a
fade-in algorithm.

If the attack rate for a synth's signal is 0, the synth shall not click,
and still fade in as fast as possible. What is the best algorithm for
fading in a signal, that scales also with small buffersizes, like 32
samples per buffer (at 44100 samples/s)?

For example, in zynaddsubfx, we count the ascending zero crossings and
calculate the fade-in length upon it [1]. Then, an S-curve of that
length is multiplied with the signal. Counting zero crossings prevents
clicking on lower notes, and it makes higher notes more punchy. That
algorithm works very well for a buffersize of 256 samples (at 44100
samples/s), but it fails at 32 samples (since the zero crossings of 32
samples are often not representive).

Any papers, or experience with other synths? We currently need a good
solution for (at least) zynaddsubfx and the triple oscillator in LMMS.


Links:
[1]
https://github.com/zynaddsubfx/zynaddsubfx/blob/4e36e765f677dbc689461889e502d015c22966a5/src/Synth/ADnote.cpp#L1202-L1222
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
https://lists.linuxaudio.org/listinfo/linux-audio-dev
 
 

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Jan 1 02:16:10 2020

This archive was generated by hypermail 2.1.8 : Wed Jan 01 2020 - 02:16:10 EET