This Gstreamer Script has the internal BandPass Filter used by the PI to take the QRQ CW SQUARE WAVE notes(@84wpm) from a 555 timer chip CPO's audio output, that is being keyed by a CW KEYBOARD, with the 555 output going to the PI's usb mic jack input...this Gstreamer Script filters out all of the harmonics AND puts a raised cosine edge on it too... you can VARY the bandwidth of the filter by varying the LENGTH VALUE in the script as well as the LOW and HIGH limits of the Gstreamer audio bandpass filter script numbers and you have 5 'windows' to choose from for the 'RAISED COSINE' edges that this Gstreamer seems to create on its own... HANN, HAMMING, GAUSSIAN, BLACKMAN, COSINE (window=0,1,2,3,4) ("window=3", used in this demo = cosine)
here is the Gstreamer script used by the PI: pi@raspberrypi:~ $ gst-launch-1.0 -v pulsesrc ! "audio/x-raw, channels=1, rate=48000" ! tee name=t ! audioconvert ! audiowsincband mode=band-pass lower-frequency=615 upper-frequency=855 length=480 window=3 low-latency=true ! audioconvert ! queue ! pulsesink sync=false t. ! audioconvert ! audiowsincband mode=band-pass lower-frequency=615 upper-frequency=855 length=480 window=3 low-latency=true ! audioconvert ! opusenc ! rtpopuspay ! queue ! udpsink host=(ip address of the other OP) port=7777 NOTE the "tee" in this script allows the mic jack to send audio to the headphone jack for monitoring the sidetone in REAL TIME/low latency AND also to send the same filtered QRQ CW to another OP over ip... (udp sink)...the actual final audio that you hear on this video demo.... PULSE AUDIO VOLUME CONTROL on the PI enables you to select which sound card you want for the Gstreamer INPUT and OUTPUT... in this case, a USB MIC for the PI input and the PI's own HEADPHONE jack audio output jack for monitoring the filtered SIDETONE
NOTE: the pass-through latency of this Gstreamer bandpass filter, using the Gstreamer "LOW-LATENCY" setting on the Gstreamer FILTER ELEMENT... measured to be about 5 to 7 milliseconds...