latest python cw keyboard, with improvements

361 views
Skip to first unread message

Chuck Vaughn

unread,
Mar 6, 2025, 12:59:36 PMMar 6
to iCW - internet CW
here is the latest python cw keyboard written by GROK3 with
many more cw timing adjustments , a better GUI TEXT TYPING AREA BOX text color change from 
text entered, to text sent...(this example uses YELLOW when you are still ahead of the buffer to BLACK once each character gets 'sent')
 
now has a better TAB FEATURE that immediately stops the sending, for super fast QSK, when other OP interrupts you ... 
hitting the TAB ,  stops sending immediately, forwards the cursor to the end of the buffer and turns, in this example
turns the text that was still in the buffer from YELLOW(still in buffer) to BLACK(sent) and the quick STOP is done without causing a CLICK


newcwkeyboardc5.png

df7t...@gmail.com

unread,
Mar 9, 2025, 12:17:03 PMMar 9
to iCW - internet CW
Hi Chuck,
just tried

cwkeyboardGROK3_c5.py

using AV Linux 23.2 and Thonny as Python IDE and it works!
Thank you for the code.

CU 73
Tom

Chuck Vaughn

unread,
Mar 9, 2025, 1:16:29 PMMar 9
to i_...@googlegroups.com
Tom
happy to hear it is working on your OS and setup there
RE: works

wonder if you can elaborate and bring out more of some of the highlights GROK3 has accomplished
that you have noticed with this version...

thanks if you have time...
c
...

--

---
You received this message because you are subscribed to the Google Groups "iCW - internet CW" group.
To unsubscribe from this group and stop receiving emails from it, send an email to i_cw+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/i_cw/ae2376bc-898d-431d-8017-e8015582fd31n%40googlegroups.com.

df7t...@gmail.com

unread,
Mar 9, 2025, 2:03:30 PMMar 9
to iCW - internet CW
cwkeyboardGROK3_c5.py

OK Chuck,

using Audacity (resolution is only 1 ms; for higher precision measurements, samples could be used)
and a test message of "PARIS PARIS " (including the word-space after the second PARIS),
I have made some measurements for the timing at 60 wpm:

test message: 2.133 s (should be 2 s)

DIT: 22 ms (should be 20 ms)
DAH: 62 ms (should be 60 ms)
Inter-DIT-space 21 ms (should be 20 ms)
Inter-DAH-space: 21 ms (should be 20 ms)
Inter-WORD-space: 151 ms (should be 140 ms)

That's not bad at all!

The sound, as well as signal shape and spectrum in Audacity are fine.


Good work Chuck!

73
Tom

df7t...@gmail.com

unread,
Mar 9, 2025, 2:18:52 PMMar 9
to iCW - internet CW
cwkeyboardGROK3_c5.py

Hi again Chuck,

...the same test, this time at 100 wpm:

test message: 1.278 s (should be 1.2 s)

DIT: 15 ms (should be 12 ms)
DAH: 39 ms (should be 36 ms)
Inter-DIT-space 12 ms (should be 12 ms -> exact)
Inter-DAH-space: 12 ms (should be 12 ms -> exact)
Inter-WORD-space: 87 ms (should be 84 ms)

Again (very) good results.

Compared to earlier versions of the keyboard,
there seems to be a remarkable improvement in timing.

Congrats Chuck!
CU 73
Tom

Chuck Vaughn

unread,
Mar 9, 2025, 2:45:22 PMMar 9
to i_...@googlegroups.com
there is a compensation of 3ms in the raised cosine edge code to help
de-shorten/de-lighten  how the cw sounds   when the rise/fall time is 5ms,  s
o the extra few ms helps with that a bit...

df7t...@gmail.com

unread,
Mar 9, 2025, 3:12:23 PMMar 9
to iCW - internet CW
OK Chuck --

cwkeyboardGROK3_c5.py

seems to be a huge step forward; I made some additonal quick and dirty tests at 1 wpm and at 200 wpm --

Really nice results!

Yes -- at 200 wpm the dit duration is 9 ms instead of 6 ms -- in accordance with your "compensation" value.

I think, there should be a way to include the rise/fall time within the DITs and DAHs durations.
(I remember, that I used the Numpy np.vectorize function applied on a raised-cosine function, when I made experiments on that. The number of samples corresponding to the rise/fall time are just shaped (at the start/end of the array), and the remaining rest of the DIT/DAH duration (samples) is left at 100 % volume.)

               ...But as long as you stay below 150 wpm, I think it's already very fine like it is :)

Congrats again
CU 73
Tom

df7t...@gmail.com

unread,
Mar 9, 2025, 3:44:53 PMMar 9
to iCW - internet CW
Here's the idea I had for shaping:

#
# # RAISED COSINE function for transition shape during rise/fall time
# def raised_cosine(x):
#     return (1-np.cos(np.pi*x))/2
#
#
#     def generate_tone(self, duration_ms):
#         duration_sec = duration_ms / 1000.0
#         samples = int(self.sample_rate * duration_sec)
#         t = np.linspace(0, duration_sec, samples, endpoint=False)
#        
#         # Generate clean sine wave with proper amplitude
#         tone = np.sin(2 * np.pi * self.frequency * t)
#  
#         envelope_ms = TRANSITION_TIME_MS  # Envelope duration in milliseconds
#         envelope_samples = int(self.sample_rate * envelope_ms / 1000.0)
#         envelope = np.ones(samples)
#        
#
#         # array of time/index n° of samples during rise/fall time
#         array1 = np.linspace(0, 1, envelope_samples)
#
#         # SHAPE for the transistion time (rise & fall)        
#         # vectorize() to vectorize the function raised_cosine()
#         vectorized_function = np.vectorize(raised_cosine)
#
#         # passing an array to a vectorized function
#         transit_shape = vectorized_function(array1)
#
# # Smooth envelope to prevent clicks
#      
#         if samples > 2 * envelope_samples:
#             envelope[:envelope_samples] = transit_shape
#             envelope[-envelope_samples:] = transit_shape[::-1]
#             return (0.3 * tone * envelope).astype(np.float32)  # Reduced amplitude to 0.3
#
#
#

The "magic" happens in these lines

#         if samples > 2 * envelope_samples:
#             envelope[:envelope_samples] = transit_shape  # RISE SHAPE
#             envelope[-envelope_samples:] = transit_shape[::-1] # FALL SHAPE -- just the #                                                                  inverse of RISE SHAPE
#             return (0.3 * tone * envelope).astype(np.float32)  # Reduced amplitude to 0.3


the "tone" at the begin and the end of the DIT/DAHs,  are multiplied with the rising/falling shape


At present, I have no time to program on this, but I wanted to share this idea, because, as far as I remember - it works principally :)

73
Tom

df7t...@gmail.com

unread,
Mar 9, 2025, 4:21:48 PMMar 9
to iCW - internet CW
Shaping

These are the formulas for further shapes (taken from the sineCW60 project).
They could be added as alternatives to the raised-cosine function

def raised_cosine(x):
     return (1-np.cos(np.pi*x))/2


 shown in the previous post.

At extremely high speeds, the Blackman-Harris shape sounds best to my ears.

73
Tom


# LINEAR (TRIANGULAR)
y0 = x

# 3/5 LINEAR + 2/5 RC
y1 = 0.6 * x + 0.2 * (1.0 - np.cos(np.pi * x))

# 3/5 LINEAR + 2/5 SIGMOID
# avoid numpy warning due to division by zero for x = 0
with np.errstate(divide='ignore', invalid='ignore'):
    y2 = 0.6 * x + 0.4 * (1.0 / (1.0 + ((1.0/x - 1.0) ** 2.0)))

# RAISED COSINE (RC)
y3 = 0.5 * (1.0 - np.cos(np.pi * x))

# BLACKMAN-HARRIS (3-TERM, NUTTALL [1981], MODIFIED)
y4 = 0.4213021 -0.5 * np.cos(np.pi * x) + 0.0786979 * np.cos(2.0 * np.pi * x)

# SIGMOID (LOGISTC)
# avoid numpy warning due to division by zero for x = 0
with np.errstate(divide='ignore', invalid='ignore'):
    y5 = (1.0 / (1.0 + ((1.0/x - 1.0) ** 2.0)))


--

Chuck Vaughn

unread,
Mar 9, 2025, 5:25:42 PMMar 9
to i_...@googlegroups.com
Here is an experimental version , this adds variable RISE/FALL time and variable COMPENSATION adjustments
you can set it to test up to 1 decimal point values...

the idea behind the compensation, is that the more you ramp the rise/fall time, the less you hear the peaks of the full volume tone...
by increasing the elements compensation control length by a certain amount, you can make up for the higher rise/fall time's reduction
in volume percentage of total full volumes peaks of the raised cosine waveform... otherwise, at higher values for rise/fall time
the more it will 'sound'   LIGHT   etc...
attached is version   "D" 

be interesting to compare 'best sound'  per RISE/FALL/COMPENSATION settings derived by ear... per SPEED...
at what speed, at what rise/fall time,  at what compensation setting for that rise/fall, does the code sound best to that person....etc



cwkeyboardGROK3_d5.py

df7t...@gmail.com

unread,
Mar 9, 2025, 10:14:34 PMMar 9
to iCW - internet CW
Thank you for the clarification on the compensation, Chuck!

I assume that's especially useful at speeds above 70 wpm and for the (otherwise very short and
low "sound-energy" providing) DITs.

Alternatively one might increase the "sound-enegy" (sound-pressure level) of the DITs, compared to
the DAHs by a few dBs (3 to 6 dB, perhaps). The perceived loudness of the DITs would increase in this manner and perhaps could be made equal to the perceived loudness of the DAHs.


73
Tom

df7t...@gmail.com

unread,
Mar 9, 2025, 10:34:01 PMMar 9
to iCW - internet CW


...see (e.g.) page 60, Fig.3-12 of Master Book of Acoustics

Loudness-Pulse-Duration.png


73
Tom

S. Steltzer

unread,
Mar 10, 2025, 4:45:32 AMMar 10
to df7t...@gmail.com, 'joe living' via iCW - internet CW
Good morning!

I'm still trying to get this to compile. I've made a lot of progress. Now the errors are down to this. Suggestions?

73!
Steve

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
jackdmp 1.9.21
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2022 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
JackTemporaryException : now quits...
Released audio card Audio0
audio_reservation_finish
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Traceback (most recent call last):
  File "/home/steve/Downloads/cwkeyboardGROK3_d5.py", line 587, in <module>
    morse_keyboard = MorseCodeKeyboard()
  File "/home/steve/Downloads/cwkeyboardGROK3_d5.py", line 32, in __init__
    self.client = jack.Client("MorseCodeKeyboard")
  File "/usr/lib/python3/dist-packages/jack.py", line 213, in __init__
    raise JackOpenError(name, self._status)
jack.JackOpenError: Error initializing "MorseCodeKeyboard": <jack.Status 0x11: failure, server_failed>
>>> 



Chuck Vaughn

unread,
Mar 10, 2025, 6:30:55 AMMar 10
to i_...@googlegroups.com
CHAT GPT said the following:  maybe something here can help...

1.     Check permissions for real-time scheduling

  • Add the user to the audio group:
    sudo usermod -aG audio $(whoami)
  • Enable RT scheduling in /etc/security/limits.d/audio.conf (or similar):
  • open up the audio.conf file and add these 2 lines at the bottom and re-save
     
    @audio - rtprio 99
    @audio - memlock unlimited
  THEN LOG OUT and log back in or  REBOOT... 
     to get all that registered...

2. Check for missing JACK dependencies

                 sudo apt install jackd2 libjack-jackd2-dev  

then SETUP  QJACKCTL   with the alsa sound card you want to use...
         start QJACKCTL      then try and run the python program again..

you will have to make sure you have done   
pip3 install jack-client    
so that python has the proper jack stuff to work with
the now running jack server... 

here are GROK3's suggestions 
To run the provided Python script successfully within your virtual environment, you need to install specific Python packages using pip3. The script relies on libraries for audio processing with JACK and creating a graphical user interface with GTK. Since you already have JACK running and are part of the audio user group with real-time privileges, the focus is on ensuring all necessary Python dependencies are installed. Below are the required pip3 installations based on the script's imports and functionality.
Required Python Packages
The script uses the following non-standard libraries, which need to be installed:
  1. jack - This provides Python bindings for the JACK Audio Connection Kit, used for audio output in the MorseCodeKeyboard class.
    • Package Name: jack-client
    • Install Command: pip3 install jack-client
  2. numpy - Used for numerical computations, such as generating sine waves and handling audio buffers (imported as np).
    • Package Name: numpy
    • Install Command: pip3 install numpy
  3. gi - This is part of PyGObject, which provides Python bindings for GObject-based libraries like GTK, Gdk, Pango, and GLib, used extensively in the MorseCodeGUI class for the graphical interface.
    • Package Name: pygobject
    • Install Command: pip3 install pygobject
Installation Command
You can install all these packages in your virtual environment with a single command. Assuming your virtual environment is activated, run the following in your terminal:
bash
pip3 install jack-client numpy pygobject
Additional Notes
  • Standard Library Modules: The script also imports os, signal, and collections.deque, but these are part of Python's standard library and do not require separate installation.
  • System Dependencies: Since pygobject interfaces with system libraries like GTK 3, you need to ensure that the necessary development libraries are installed on your system (e.g., libgtk-3-dev, libgirepository1.0-dev, libcairo2-dev on Debian-based systems like Ubuntu). However, given that you have JACK running and real-time privileges set up, it’s likely your system is already configured for such development tasks. If you encounter errors during the installation of pygobject (e.g., missing headers), you may need to install these system packages using your package manager (e.g., sudo apt-get install libgirepository1.0-dev libcairo2-dev libgtk-3-dev on Ubuntu).
  • GTK Version: The script specifies gi.require_version("Gtk", "3.0"), confirming it uses GTK 3. The pygobject package supports this, but your system must have GTK 3 installed.
Verification
After running the installation command, you can verify the packages are installed by activating your virtual environment and running:
bash
pip3 list
Look for jack-client, numpy, and pygobject in the output. If they’re present, you should be ready to run the script without missing any Python dependencies.
Running the Script
With these packages installed, and assuming your JACK server is active, you can execute the script using:
bash
python3 your_script_name.py
Replace your_script_name.py with the actual filename. The script should launch a GUI window and process Morse code audio output via JACK.
If you encounter any issues related to missing system libraries or JACK connectivity, let me know your Linux distribution, and I can provide more specific guidance!

--

---
You received this message because you are subscribed to the Google Groups "iCW - internet CW" group.
To unsubscribe from this group and stop receiving emails from it, send an email to i_cw+uns...@googlegroups.com.

S. Steltzer

unread,
Mar 10, 2025, 7:48:44 AMMar 10
to 'joe living' via iCW - internet CW
Ok, very good, thanks. Will probably be the wee hours of the morning tomorrow till I get back to working on it but I'll let you know how I make out. 

73!
Steve


aa0hw

unread,
Mar 10, 2025, 2:40:36 PMMar 10
to iCW - internet CW
Here is an upgraded PRACTICE CW KEYBOARD, that transers and converts the accurate timing code from GROK3's QRQ CW KEYBOARD into this TEXT FILE PRACTICE sending keyboard

see discussion for more info at the qrqCW WEBSITE

this keyboard retains the features for going back from 1 to 9 words to repeat and send again from that point by
just hitting any number key... it also retains the function of hot key for the arrow keys, to speed up or slow down the current wpm
it also retains the feature of highlighting the current word being sent and keeps it in view by scrolling with the text to it is always visible 

grok3practicecwkb2.png

download the file here  

aa0hw

unread,
Mar 14, 2025, 1:17:48 PMMar 14
to iCW - internet CW
Here is yet another updated GROK3 CW KEYBOARD python version,   this version hides the controls you don't need to see once they have been set to your preferences, 
some of the timing controls, and some of the text color/font chooser buttons...are now hiding behind a gtkexpander code block..
 
here are 3 pictures of this code, you can download this new version  to test here:

groki1.png


groki2.png


groki3.png

df7t...@gmail.com

unread,
Mar 16, 2025, 8:09:15 PMMar 16
to iCW - internet CW
cwkeyboardGROK3_i5-mod_001.py

Thank you for the code Chuck!

I have played a bit with it and changed the shape of the "ramp".
The Blackman-Harris shape sounds a bit more accentuated than the original Raised Cosine.
I have tried the "Compensation" setting and found a 2 ms value to be fine to my ears at 70 wpm.

Good idea to hide the settings, when configuration is done.

CU 73
Tom

# cwkeyboardGROK3_i5-mod_001.py (DF7TV) based on cwkeyboardGROK3_i5.py (AA0HW)
# MOD: BLACKMAN-HARRIS (3-TERM, NUTTALL [1981], MODIFIED) shape, instead of RAISED COSINE (RC) for "ramp_in", "ramp_out"
# see: lines 188 to 195
#
# 2025-03-16

...

#
#            RAISED COSINE (RC)
#            ramp_in = (1 - np.cos(np.linspace(0, np.pi, ramp_samples))) / 2
#            ramp_out = (1 - np.cos(np.linspace(np.pi, 0, ramp_samples))) / 2
#

#           BLACKMAN-HARRIS (3-TERM, NUTTALL [1981], MODIFIED)
            ramp_in = (0.4213021 - 0.5 * np.cos(np.linspace(0, np.pi, ramp_samples)) + 0.0786979 * np.cos( 2.0 * (np.linspace(0, np.pi, ramp_samples))))
            ramp_out = (0.4213021 - 0.5 * np.cos(np.linspace(np.pi, 0, ramp_samples)) + 0.0786979 * np.cos( 2.0 * (np.linspace(np.pi, 0, ramp_samples))))



cwkeyboardGROK3_i5-mod_001.png
cwkeyboardGROK3_i5-mod_001.mp3
cwkeyboardGROK3_i5-mod_001.py

df7t...@gmail.com

unread,
Mar 16, 2025, 11:38:00 PMMar 16
to iCW - internet CW
cwkeyboardGROK3_i5-mod_003.py

This mod (with help from GROK3 AI) adds radio buttons for the selection of the ramp function (shape).

All six shapes of the sineCW60 project are available.
They are arranged in the sequence "soft" to "pointed" sound.

The default shape is RAISED COSINE (RC)

CU 73
Tom

cwkeyboardGROK3_i5-mod_003.png
cwkeyboardGROK3_i5-mod_003.py

Chuck Vaughn

unread,
Mar 17, 2025, 6:08:10 AMMar 17
to i_...@googlegroups.com
Great Idea TOM ! 
ill be listening to those window options and testing & comparing...

--

---
You received this message because you are subscribed to the Google Groups "iCW - internet CW" group.
To unsubscribe from this group and stop receiving emails from it, send an email to i_cw+uns...@googlegroups.com.

Chuck Vaughn

unread,
Mar 17, 2025, 7:23:03 AMMar 17
to i_...@googlegroups.com
Here is a C++ VERSION of the CW KEYBOARD to test, 
have to ask GROK3 or GPT or GEMINI how to compile it ...
attached main.cpp file for this c++ version      This feels FASTER than the previous python versions
from typing ,  seeing , and hearing what you type immediately... 
cwkeyboardceeplulsplus.png

On Sun, Mar 16, 2025 at 10:38 PM df7t...@gmail.com <df7t...@gmail.com> wrote:
--

---
You received this message because you are subscribed to the Google Groups "iCW - internet CW" group.
To unsubscribe from this group and stop receiving emails from it, send an email to i_cw+uns...@googlegroups.com.
main.cpp

Chuck Vaughn

unread,
Mar 17, 2025, 11:20:42 AMMar 17
to i_...@googlegroups.com
Here is an updated version of the c++ CW KEYBOARD CODE file, main.cpp   (attached)
 
in this version, it adds a feature where you can copy paste a text file into the typing screen area,
it will immediately start to send that text, and you can adjust any of the 11 cw timing controls on the fly,
until you like what you hear  etc...
maincppcopypaste.png
  
here is how i was instructed to compile this main.cpp file,  the cw keyer c++ code,  on my ubuntu 24.04 desktop
i had to make a file, and put it in the home directory containing these lines :

QT += widgets
CONFIG += c++17 console
SOURCES += main.cpp
LIBS += -ljack

save the 4 lines above as a file called MorseApp.pro in the Home directory...
NOTE, the cw keyboard code,  main.cpp,  was already saved in the Home directory

NOTE: i do not have any other "make" type files in my home directory than this cw keyboard...
be careful if you try this, make sure you don't either, or  otherwise, might be better to create a new folder and do all the make stuff in the new folder...

then in terminal grok3 told me to put these commands, one at a time, via terminal, which defaults to the home directory by default...

- make clean         
         then
- qmake MorseApp.pro
        then
- make
        then to load it up the new CW KEYBOARD on desktop
        after the make command, it creates in the home directory
        an executable file  that looks like this
                     
MorseAppiconinhomedirect.png
anyway, via terminal,   running this command brings up the new CW KEYBOARD 
  ./MorseApp



main.cpp

df7t...@gmail.com

unread,
Mar 17, 2025, 4:37:08 PMMar 17
to iCW - internet CW
Thanks Chuck!

After installing some required (QT-related) packages, I could compile the app.
Then, after starting  and configuring QJackCtl for the output socket "MorseCodeKeyboardCPP", your latest version
works under AV Linux 23.2

73
Tom

MorseKeybard-CPP.png


QjackCtl-MorseApp-CPP.png

Chuck Vaughn

unread,
Mar 17, 2025, 5:35:14 PMMar 17
to i_...@googlegroups.com
Great to hear you got it running with the c++ compile ...

after using it,  do you have any interesting findings or thoughts 
  
              on the c++  version, vs,  the python version ?

here, right now,  GROK3 is trying to figure out why my latest c++ version is seg defaulting and crashing...
might have something to do with copy/pasting a super large text file...will take many morse hours of fighting the ai's to get an answer on this one

ond of the downsides of using c++ stuff... can go south on  yah...   if the slightest code is out of range... etc..                               

GROK  has failed over 3 times so far this afternoon,  to fix it...   may take days more, to figure this out with these slow ai's 


df7t...@gmail.com

unread,
Mar 17, 2025, 6:07:00 PMMar 17
to iCW - internet CW
Just pasted the 504 KiB file for "The Art and Skill of Radio Telegraphy" into the C++ version's text window  -- it looks like NEARLY the complete file is accepted.



Only some lines at the end were missing in the Morse Code Keyboard text-window. Perhaps there is some kind of limit at 500 KiB.

After deleting about 1% of the text-file at the end and then pasting again, the whole (reduced) file was accepted.

GL 73
Tom

df7t...@gmail.com

unread,
Mar 17, 2025, 7:19:05 PMMar 17
to iCW - internet CW
...perhaps the size limitation is just a problem of the general CLIPBOARD and not of Morse Code Keyboard itself --

I think, there are Clipboard Manger tools (CopyQ ?), which might help to overcome such size limits, if that's really the problem.


73
Tom

aa0hw

unread,
Mar 19, 2025, 9:04:46 AMMar 19
to iCW - internet CW
Here is another update for the c++ Morse Code Keyboard's main.cpp file:
NOTE , change the file name to remove the  (2) after downloading and saving it
it must read    main.cpp   and it has to be the only one in the directory you are compiling this c++ code


This version uses optimizations via .pro contents:
qmake MorseApp.pro
 
MorseApp.pro file shows this:
************************************************************
QT += widgets
CONFIG += c++17 console release  # use debug instead of release for debug'N

SOURCES += main.cpp
LIBS += -ljack
QMAKE_CXXFLAGS += -O2  #  -00 Disables optimizations for easier debugging(-03 = aggressive optimizations)
**********************************************************************************************************

df7t...@gmail.com

unread,
Mar 25, 2025, 10:22:08 PMMar 25
to iCW - internet CW
C++ Morse Keyboard (March 19, 2025)

Hi Chuck,
Using your intructions and the updated MorseApp.pro file content, I have been able to compile and run your latest C++ version on my AV Linux notebook.

TNX and Congrats!

73
Tom

--
System:
  Kernel: 6.6.12-1-liquorix-amd64 [6.6-16~mx23ahs] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 parameters: audit=0
    intel_pstate=disable rcupdate.rcu_expedited=1 BOOT_IMAGE=/boot/vmlinuz-6.6.12-1-liquorix-amd64
    root=UUID=<filter> ro threadirqs quiet init=/lib/systemd/systemd
  Desktop: Enlightenment v: 0.25.4 vt: 7 dm: LightDM v: 1.32.0 Distro: AVL_MXE-23.2-20240405_x64
    Enlightened April 5 2024 base: Debian GNU/Linux 12 (bookworm)

Machine:
  Type: Laptop System: Dell product: XPS 13 9350 CPU:
  Info: model: Intel Core i7-6560U bits: 64 type: MT MCP arch: Skylake gen: core 6 level: v3
  Speed (MHz): avg: 2200 high: 2201 min/max: 400/2201 boost: enabled scaling:
    driver: acpi-cpufreq governor: performance cores: 1: 2200 2: 2201 3: 2201 4: 2200 bogomips: 17599

Repos:
Packages: pm: dpkg pkgs: 2897 libs: 1666 tools: apt,apt-get,aptitude,synaptic pm: rpm pkgs: 0
pm: flatpak pkgs: 0
Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security/ bookworm-security non-free-firmware non-free contrib main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb https://mx-linux.ethz.ch/mx-packages/mx/repo/ bookworm non-free main
    2: deb https://mx-linux.ethz.ch/mx-packages/mx/repo/ bookworm ahs

df7t...@gmail.com

unread,
Mar 26, 2025, 12:47:46 AMMar 26
to iCW - internet CW

C++ Morse Keyboard (March 19, 2025) -- VIDEO

...and here is a live video (including MY typing errors / mistakes) of the download, compilation and runing the latest C++ Morse Keyboard on an Dell XPS 13 notebook using AV Linux.

                                                                          C++ Morse Keyboard Compile & Run

(The file is too large to be uploaded here. I is available only temporarily via my QSL.NET page. Download it, if you want to keep it.)

So far, it works great :)

73
Tom


Message has been deleted

df7t...@gmail.com

unread,
Mar 26, 2025, 3:09:03 AMMar 26
to iCW - internet CW
...sorry for the audio crackles -- they are due to my faulty setup of the recorder -- they are not present when using the Morse Code Keyboard :)

May be, that I replace the recording by a better one at a later time....

73
Tom

S. Steltzer

unread,
Mar 26, 2025, 5:21:56 AMMar 26
to 'joe living' via iCW - internet CW
Nice.


aa0hw

unread,
Mar 26, 2025, 8:39:44 AMMar 26
to iCW - internet CW
excellent video Tom !   really shows the step by step ... nicely done...

Here is another PYTHON VERSION attached,
this version allows you to send a text file and listen while
you adjust all the window options to find your favorite one,
it will also save the best settings you found for each function 
and when you bring it up again, it will put your saved settings into operation...
pythonkblatest1.png

On Wednesday, March 26, 2025 at 4:21:56 AM UTC-5 wf...@fastmail.com wrote:
Nice.


newkb2_sliders_d.py

df7t...@gmail.com

unread,
Mar 26, 2025, 2:12:50 PMMar 26
to iCW - internet CW
Chuck -- your nice scope/spectrum diplay -- are they from this site


73
Tom

Chuck Vaughn

unread,
Mar 26, 2025, 5:05:07 PMMar 26
to i_...@googlegroups.com
RECRI KEYER also has SPECTR plugin... and a couple more too

--

---
You received this message because you are subscribed to the Google Groups "iCW - internet CW" group.
To unsubscribe from this group and stop receiving emails from it, send an email to i_cw+uns...@googlegroups.com.

S. Steltzer

unread,
Mar 27, 2025, 6:46:54 AMMar 27
to 'joe living' via iCW - internet CW
Just beautiful keying envelopes! Good work!


aa0hw

unread,
Mar 27, 2025, 8:42:18 AMMar 27
to iCW - internet CW
Here is a live demo of choosing between and back and forth, all of the wave shaping ramp functions while listening to  a text file being sent at 65 wpm
from the latest python grok3 version...  

GROK 3 wrote this cw keyboard's python code: https://u.pcloud.link/publink/show?code=XZQK7Q5Zdop7IHYv5fYN5yrThsFH8H7QE4ck each of the different individual function wave shape's can be customized and save from all the cw timing options, including the unique function's own option...
includes PSWF, KAISER, RAISED COSINE, SIGMOID, others while sending a text file, copy/paste into the typing screen, this CW KEYBOARD will start sending immediately, and while it does so, any cw timing parameter, excluding, speed/pitch/volume, can be saved so the next time you choose that function, it will bring up your last saved settings you preferred and saved...etc... headphones are needed to hear the subtle differences between some of these functions... each function, has its own, unique, room noise/echo/harmonics & resonance characteristics.. its own, percussive attack rise/fall edge noise etc... see our qrq cw website for more info on this python cw keyboard, plus its c++ versions: https://qrqcwnet.ning.com/profiles/blogs/new-improved-python-qrq-cw-keyboard-from-grok3-ai

df7t...@gmail.com

unread,
Mar 27, 2025, 10:40:54 AMMar 27
to iCW - internet CW
Really impressive, what you have achieved Chuck!

Very nice video https://youtu.be/NT-8bu3l2gQ  showing all the available shapes in the Python Morse Code Keyboard and allowing to get a feeling for their different sounds.

Varying the Compensation time in the range of some ms, and not leaving it at the "standard" value of "0 ms",  makes a clear difference for the readability of the code.

Good idea to save some of the settings in a file, so that they are reloaded at next restart of the program.

I have just tried the latest Python version https://u.pcloud.link/publink/show?code=XZQK7Q5Zdop7IHYv5fYN5yrThsFH8H7QE4ck on my AV Linux notebook and it works like shown in your video.



Thank you!

73
Tom

Chuck Vaughn

unread,
Mar 27, 2025, 12:08:19 PMMar 27
to i_...@googlegroups.com
Thanks for the feedback Tom...
be great after you mess with all the different functions,
to see if you have eventually found one particular function and all its settings that you consider '
'ideal',  for how you like to hear it...

--

---
You received this message because you are subscribed to the Google Groups "iCW - internet CW" group.
To unsubscribe from this group and stop receiving emails from it, send an email to i_cw+uns...@googlegroups.com.

Chuck Vaughn

unread,
Mar 27, 2025, 12:11:26 PMMar 27
to i_...@googlegroups.com
by the way , there was one errata  on one line of code...
easy to fix and then re-save the python file

for the sigmoids, 
on line 55    there is    ()     right have the last    p    
 those 2 parenthesis  need to be removed to look like the ones that follow
ERRATA on line 55 should look like this AT THE END of that line: in reference to SIGMOID A = 2 (1 + np.exp(p['steepness']))), NOT: (1 + np.exp(p()['steepness']))), so just remove these two ( ) right after the last p

df7t...@gmail.com

unread,
Mar 27, 2025, 1:42:39 PMMar 27
to iCW - internet CW
Python Morse Code Keyboard

Okay Chuck -- easy to fix :)


....ERRATA on line 55 should look like this AT THE END of that line: in reference to SIGMOID A = 2 (1 + np.exp(p['steepness']))), NOT: (1 + np.exp(p()['steepness']))), so just remove these two ( ) right after the last p.........

# newkb2_sliders_d-mod_001.py
# Corrected SIGMOID A=2 (deleting empty "()" in "RAMP_FUNCTIONS = {..."

The modified Python script is attached

73
Tom
newkb2_sliders_d-mod_001.py
Reply all
Reply to author
Forward
0 new messages