Long story short, I intend to build a domotic system for controlling electric devices from an (audio) jack interface (of any computer). After designing the electronic system (PICs), I thought of encoding information in the form of sound pulses which would be played on the computer and read by the PIC (micro-controller).
I managed to design a symetrical, square signal thanks to audacity, but can’t find a way to make it assymetrical (where the steady values would be 0 and 1, no duty cycle). I could address this problem by using a (physical) diode to filter negative voltages but it was looking for a way to avoid this rather heavy solution.
Any Idea would be greatly appreciated !
Regards, Heisennberg
NB : Sorry for the approximate English, I’m French !
Select part of an audio track where you want to generate the pulses, then open the Nyquist Prompt from the Effect menu.
Copy and paste this code into the Nyquist Prompt text box.
The first three lines set the parameters used by the code. You may change the numbers to suit.
(setq hz 440) sets the pulse frequency
(setq bias 0) sets the pulse width. Must be between +/- 1. For a symmetrical square wave set to zero.
(setq level 0.5) sets the vertical height of pulse above 0. This should be between 0 and 1