3

I am using matlab to construct a simple synthesizer, starting from fundamental sin waves. When playing two successive pitches their is a "tick" noise appearing at the junction which I would like to remove. I have tried to correct the phase angle of the second pitch in order to adjust the junction between the two sin waves but this doesn't get rid of the noise.

(I have also tried to shape the sequence by damping at junction, which works, but also gives an annoying "staccato" feeling.)

My question's are:

what is causing this behavior?

How could (and should) I remove it?

Is there good introductory literature to fundamental sound processing (I am quite new to sound design but have some background in mathematics)?

Thanks a lot for you help.

  • What you're hearing is technically correct, and what you're expecting might be a very fast cross-fade or something of the sort. – Andrew Cheong Sep 7 '15 at 9:08
3

What is causing this behavior?

The tick sound is caused by a discontinuity in the derivative of your signal, producing a noisy sound at this very moment.

How could (and should) I remove it?

To keep your sound clean when changing frequency, you should avoid the discontinuity in the derivative of the sine wave before the change and the sine wave after the change. The only easy solution is to take advantage of the zero derivate on every local extrema of a sine wave.

So, when a new note is played, your synthesizer algorithm should save its frequency but not apply it straightaway. It should rather wait for the next maximum/minimum of amplitude to switch frequency.

By the way, if you add a velocity feature to your synthesizer, the amplitude change will have to be done when the sine wave is crossing zero.

Update:

By velocity, I mean the intensity of the note. In musical terms we would say piano, pianissimo, forte, fortissimo... In your case you just have to change the amplitude of the sine wave.

  • Ok fantastic, thanks a lot maxime !! (sorry I cannot vote you up as a guest) I am not sure to understand what you mean by velocity feature, is it related to a change in sampling frequency? – user16305 Sep 7 '15 at 10:10
  • Also, as John AM says, You should use the restart or 'sync' feature so that the phase of the wave is synced with every key press event. Adjust the phase so the wave starts on a zero crossing angle(for every wave). If not; just turn up attack from an envelope module and it should solve it. – Marc W Sep 13 '15 at 4:13
1

The click is produced by the discontinuity of the signal and is easily heard with sine waves. Use an envelope to amplitude modulate the signal and raise the attack a bit so to smooth the attack phase of the sound.

https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope

Another way is to "sync" your oscillator and make it restart its phase on each keystroke or gate signal. Preferably at zero crossing...


You can check the sos articles "synth secrets" The list is in descending order check from part 1 to 25 for a detailed introduction in synthesis.

http://www.soundonsound.com/search?page=3&Keyword=synth%20secrets&Year=%20&Month=%20&Words=All&Summary=Yes&Section=0&Subject=&ShowResults=yes


http://www.soundonsound.com/sos/nov99/articles/synthsecrets.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.