Uploaded December 2025 | Updated December 2026, 1 day ago
DEMO of a C++ iambic CW KEYER using audio from a Tone Generator to trigger the internal L(dit)/R(dah) input gates of the C++ APP, to make the APP start sending DITs/dahs in iambic A or B mode, the TONE GEN audio going through the paddle when i press the DIT or DAH handle to ground, OR both paddle handles to ground, triggers the internal gate(s) of the C++ software keyer, creating shaped CW audio tone output - has many adjustable CW parameters to select
if you want to take a look at the C++ code it is here on this storage site:
mediafire.com/file/xti1lh6ics6o4n1/main.cpp/file
UPDATE on 12-12-2025: some significant improvements have already been made by GEMINI AI, in the internal C++ code structure, which GEMINI states is much better for production ready real time low latency audio operations...
you can take a look/and OR download this new version of main.cpp here:
mediafire.com/file/j54c07ej0s3egjp/improved_iambicKEYER_12_12_2025_main.cpp/file
the qmake.pro file contents are as shown below that i used to compile this C++ program written by several AI's together for this 1st working version
This is a REAL TIME LOW LATENCY OPERATIONS app, there is near zero latency from hitting your paddle handles until you hear
the C++ CW KEYER audio output tones...
NOTE: here is a video demo of the STRAIGHT KEY version of this C++ APP:
youtu.be/WWPe9xr1TiU
this APP specializes in using AUDIO INPUT going into a USB SOUND CARD's STEREO line input that goes into the APP's GATE INPUTs, if the gate is triggered by audio into its left channel, it sends DITs, if the gate is triggered by audio into its right channel, it sends DAHs
this C++ APP was made for ubuntu 24.04, wayland desktop, using JACK AUDIO CONNECTION kit, you can take a look at the C++ code via the link above, and ask your AI to convert it to your OS if you would like to try it on MAC or WINDOWS or BSD or .... ETC..
QMAKE.PRO
QT += widgets
CONFIG += c++17 release
TEMPLATE = app
TARGET = cw_keyer
SOURCES += main.cpp
# JACK
LIBS += -ljack
INCLUDEPATH += /usr/include/jack # more precise than /usr/include
# Real-time priorities
LIBS += -lpthread -lrt
# Absolute maximum performance + determinism
QMAKE_CXXFLAGS_RELEASE = -O3 \
-march=native \
-mtune=native \
-ffast-math \
-fno-exceptions \
-fno-rtti \
-DNDEBUG \
-flto \
-fwhole-program \
-pipe
QMAKE_LFLAGS_RELEASE = -O3 -flto -fwhole-program
# Force realtime scheduling (optional but nice)
# QMAKE_LFLAGS += -Wl,--no-as-needed,-lrt,--as-needed
DEMO of a C++ iambic CW KEYER using audio from a Tone Generator to trigger the internal L(dit)/R(dah) input gates of the C++ APP, to make the APP start sending DITs/dahs in iambic A or B mode, the TONE GEN audio going through the paddle when i press the DIT or DAH handle to ground, OR both paddle handles to ground, triggers the internal gate(s) of the C++ software keyer, creating shaped CW audio tone output - has many adjustable CW parameters to select
if you want to take a look at the C++ code it is here on this storage site:
mediafire.com/file/xti1lh6ics6o4n1/main.cpp/file
UPDATE on 12-12-2025: some significant improvements have already been made by GEMINI AI, in the internal C++ code structure, which GEMINI states is much better for production ready real time low latency audio operations...
you can take a look/and OR download this new version of main.cpp here:
mediafire.com/file/j54c07ej0s3egjp/improved_iambicKEYER_12_12_2025_main.cpp/file
the qmake.pro file contents are as shown below that i used to compile this C++ program written by several AI's together for this 1st working version
This is a REAL TIME LOW LATENCY OPERATIONS app, there is near zero latency from hitting your paddle handles until you hear
the C++ CW KEYER audio output tones...
NOTE: here is a video demo of the STRAIGHT KEY version of this C++ APP:
youtu.be/WWPe9xr1TiU
this APP specializes in using AUDIO INPUT going into a USB SOUND CARD's STEREO line input that goes into the APP's GATE INPUTs, if the gate is triggered by audio into its left channel, it sends DITs, if the gate is triggered by audio into its right channel, it sends DAHs
this C++ APP was made for ubuntu 24.04, wayland desktop, using JACK AUDIO CONNECTION kit, you can take a look at the C++ code via the link above, and ask your AI to convert it to your OS if you would like to try it on MAC or WINDOWS or BSD or .... ETC..
QMAKE.PRO
QT += widgets
CONFIG += c++17 release
TEMPLATE = app
TARGET = cw_keyer
SOURCES += main.cpp
# JACK
LIBS += -ljack
INCLUDEPATH += /usr/include/jack # more precise than /usr/include
# Real-time priorities
LIBS += -lpthread -lrt
# Absolute maximum performance + determinism
QMAKE_CXXFLAGS_RELEASE = -O3 \
-march=native \
-mtune=native \
-ffast-math \
-fno-exceptions \
-fno-rtti \
-DNDEBUG \
-flto \
-fwhole-program \
-pipe
QMAKE_LFLAGS_RELEASE = -O3 -flto -fwhole-program
# Force realtime scheduling (optional but nice)
# QMAKE_LFLAGS += -Wl,--no-as-needed,-lrt,--as-needed








![Raspberry Pi 4 Pulse Density Modulated CW Transmitter for THROUGH THE EARTH Cave Radio Comms at 8Khz
using this PDM-CW TRANSMITTER PYTHON PROGRAM:
https://u.pcloud.link/publink/show?code=XZsdt45ZB74hUtmVwMYakpGj6aapdSP0xgry
GROK3 wrote this PDM-CW TRANSMITTER user manual PDF
https://u.pcloud.link/publink/show?code=XZhb645Z2DL9sqlUnPFPoa3bOPhscVvBTIIX
a morse code keyboard is brought up to the raspberry pi 4 desktop that when text is entered, according to the speed of wpm set by the user, two well timed signals are sent to control a Capacitive Discharge Circuits POWER supply and SCR/HV Pulse Capacitor which creates a TRANSMIT Pulse Density Modulated CW signal... the setup is as follows, for each dit the program sends one 50 μS pulse width output to Trigger the PDM-CWs SCRs GATE, releasing the stored PULSE CAP energy into the TRANSMIT COIL ANTENNA, creating a self resonant DAMPED SINE WAVE VLF signal output at around 8Khz... to preserve portable battery power, PULSE DENSITY MODULATION is used so that only 1 pulse at zero point is used for a dit, and for a DAH, only 3 pulses, spaced 1 dit length apart, at ZERO, 1D, and 2D, at whatever speed is set by the user, however, each DAH and dit timing is still preserved by the python TRANSMIT CW KEYBOARDs internal timing math so that when just one dit length of time is added to every pulse at the receiver, and used to key a midi cw software keyer, the original CW ELEMENT LENGTHS are reproduced at the receive site the first thing that happens when text is entered into the cw keyboard, is that the python program turns on GPIO pin 19 for a certain amount of time according to the current WPM speed, this time charges the HV PULSE CAP of the PDM-CW transmitter(low DC TO high DC inverter) then 1 ms before the DIT or DAH pulse is keyed by the SCR signal on GPIO PIN 18, pin 19 turns off , turning off the power to the PDM-CW transmitter so that the SCR will STOP right after it fires and the damped sine wave 8khz output drops to zero(this pin 19 cycle helps to commutate the SCR in the case of using a too low of inductance EMF kick back from the coil antenna that does not contain enough ooomph to commutate the SCR itself etc) each pulse gets the same amount of charging time so that the joules collected in the pulse capacitor are the same for each pulse according to the WPM speed being used and the length of one dit minus 1 ms.... so at slower speeds, there is more charging time for each pulse and thus more VLF magnetic EMF signal at 8khz is released per pulse
NOTE: both GPIO pins activate LEDs inside SOLID STATE RELAYs one SSR can handle 6 amps and has a TURN OFF time of .1 to 1 ms, and a TURN ON time of 2 to 4 ms the other SSR is used by pin 18 with a much faster turn on time of around 30 to 50 μS so that the SCR GATE is only triggered by the least amount of pulse width possible from pin 18
NOTE: this python GPIO pdm-cw transmitter code was written by GROK3
you can attach the linked above python code in a file and feed it to GROK3 to ask more questions about this setup and how the code works on a pi4/s GPIO pins
RECEIVER SETUP
a pick up magnetic field VLF ANTENNA is connected to the LAPTOPs mic input jack... ( NOTE, you can strengthen the RX signal substantially at the receiver if you put a cap in parallel with the antenna to resonate at the TRANSMIT VLF FREQ [8Khz] ) for each pulse received, a sidechain gate adds 1 dits worth of time to each pulse and creates a CW MIDI note output restoring the original dit length that the TRANSMITTER is using... for a dah, then, since the dah sent by the transmitter is using 3 pulses sent at ZERO, 1D, AND 2D each pulse gets 1 dit worth of time added to it by the sidechain settings and at the end of 3 dits at 1d time each, = 1 dah etc..
goes to the MIDI sidechains midi output port and keys the midi input of RECRI KEYERs CW KEYER module https://github.com/recri/keyer Raspberry Pi 4 Pulse Density Modulated CW Transmitter for THROUGH THE EARTH Cave Radio Comms at 8Khz](https://i.ytimg.com/vi/hW8iGwB9C8g/mqdefault.jpg)

