Hi, I am doing some experiments on sound synthesis. I've made a simple plucked string sound synthesizer (with MIDI input), but I'm experiencing some problems with the end of notes. When I hit and then release a key on my MIDI keyboard, I can hear an annoying little sound because of the signal going suddently to zero when I stop the note synthesis. I tried to figure out how software like a basic MP3 player behave when the user hits for example the 'Pause' button but I didn't manage to find anything. Do you have any insights on how to achieve a fast return to zero from an oscillating signal? Thanks in advance,
Sound synthesis and signal continuity
Started by ●January 7, 2009
Reply by ●January 7, 20092009-01-07
>Hi, > >I am doing some experiments on sound synthesis. I've made a simpleplucked>string sound synthesizer (with MIDI input), but I'm experiencing some >problems with the end of notes. When I hit and then release a key on my >MIDI keyboard, I can hear an annoying little sound because of the signal >going suddently to zero when I stop the note synthesis. > >I tried to figure out how software like a basic MP3 player behave whenthe>user hits for example the 'Pause' button but I didn't manage to find >anything. > >Do you have any insights on how to achieve a fast return to zero from an >oscillating signal? > >Thanks in advance, > > >If I understood you correctly, your notes stops when the note's signal is not equal to zero yet. As you said the note has to sound after you release a key, but volume of note has to tend to zero. In many cases it's enough to multiply every sample by a coefficient that tends to zero.
Reply by ●January 7, 20092009-01-07
randirandi wrote:> Hi, > > I am doing some experiments on sound synthesis. I've made a simple plucked > string sound synthesizer (with MIDI input), but I'm experiencing some > problems with the end of notes. When I hit and then release a key on my > MIDI keyboard, I can hear an annoying little sound because of the signal > going suddently to zero when I stop the note synthesis. > > I tried to figure out how software like a basic MP3 player behave when the > user hits for example the 'Pause' button but I didn't manage to find > anything. > > Do you have any insights on how to achieve a fast return to zero from an > oscillating signal?The simplest solution is the linear decay with the duration of ~50msec. The better solution is S-shaped transition of the volume to zero for the same duration. Both make for the soft muting/unmuting without the annoying artifacts. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com