When calling osc.stop(), a running oscillator is stopped immediately, which can result in a nasty click. This is because the oscillator is stopped right in the middle of a cycle. Here’s a nice tutorial on how to get rid of the click, using automation curves for smooth gain fade-outs: http://alemangui.github.io/blog//2015/12/26/ramp-to-value.html But there’s another way: When stopping… Continue reading Stopping a Web Audio oscillator at cycle completion (or zero-crossing)
Month: February 2017
A piano sustain pedal to MIDI USB adapter
I like my MIDI USB keyboard. But unfortunately, it does not have a sustain pedal jack. That is why I built an adapter, which translates the pedal input into MIDI messages. All it took was an Arduino Leonardo (Pro Micro module with ATmega32U4), a breadboard, a 7-segment LED display, two resistors, 2 toothsticks, a 6,3mm mono… Continue reading A piano sustain pedal to MIDI USB adapter