Go back to main page

Go to most recent news

unixcw - older news


This is an official release of unixcw version 3.4.0.

No changes have been made in source code compared to version 3.4.0-RC.

Changes since version 3.3.1:


  • improved compilation of unixcw under FreeBSD and OpenBSD


  • fixed and tested OSS audio output under FreeBSD and OpenBSD


  • fixed reading CWCP_OPTIONS environment variable by cwcp


Release Candidate for unixcw version 3.4.0 is available in git repository.

If you want to:

  • compile unixcw under FreeBSD or OpenBSD with much less trouble
  • have OSS audio output working again under FreeBSD or OpenBSD
  • have cwcp reading correctly CWCP_OPTIONS environment variable

then you should definitely check out unixcw 3.4.0-RC available in git repository (git tag: v3.4.0-RC). Check NEWS file for more details on changes in unixcw 3.4.0.

I will make a proper release later.


Release of unixcw version 3.3.1

Changes since version 3.3.0:


  • Fixing bug discovered when fixing a problem with cwdaemon, reported by Pino Zollo ZP4KFX. Condition for calling 'low water mark in tone queue' callback was invalid. This resulted in calling the callback too early or too often.
  • Library version changed from 6.0.1 to 6.1.1.

Big *thank you* to Pino Zollo ZP4KFX for reporting a problem with cwdaemon and for helping to solve it in cwdaemon and in libcw.


Release of unixcw version 3.3.0

Changes since version 3.2.0:


  • Thomas Beierlein has reported that some combinations of '--enable-*'/'--disable-*' flags result in a code that fails to compile. He also provided a patch that fixes it. I've created a tool ('unixcw/tools/test_configure_flags.sh') that tests all combinations of configure flags, which also detected one more faulty configuration, in addition to the ones discovered by Thomas. Thanks Thomas!
  • FreeBSD patches: Diane Bruce provided a set of patches that fix compilation on FreeBSD (thank you!). Thanks to the patches the ./configure script now should support two new flags:
    The state of build system on FreeBSD may still not be perfect (I didn't test this myself on FreeBSD), but should now be better than it was.


  • new functions: adding new functions:
    cw_character_is_valid() (replaces cw_check_character())
    cw_string_is_valid() (replaces cw_check_string())
    The old functions are still available, but have been marked as deprecated.
  • unit tests: improvements and expansion of unit test code testing public API.
  • unit tests: improvements and expansion of unit test code testing libcw's internal functions.
  • receiver code (responsible for receiving and recognizing Morse code keyed with iambic keyer or straight key) has been reviewed.
  • code handling incoming events for receiving iambic keyer has been improved. iambic keyer events sent from client code to libcw are recognized with better precision, which leads to better recognition of keyed characters. These changes don't change public API nor "external" behaviour of libcw - these are just improvements of existing functionality.
  • new function:
    To be used by client code that wants to receive Morse code sent with mouse or keyboard keys emulating iambic key. The function is related to the change mentioned one point above.

    At this point the interface to iambic keying becomes a bit more complicated. It will take me some more time to figure it out completely. For now I've made some internal fixes and changes that improve one aspect of this functionality, and as a result I had to add this one function. Expect more changes in future.

    If you want to see an example of usage of the keyer API, see xcwcp source code.
  • Library version changed from 5.0.0 to 6.0.1.


  • xcwcp takes advantage of changes in how libcw handles iambic keying, and - with some additional modifications in xcwcp's code - gets improved handling of iambic keying.


  • improving randomness of generated strings; until now if cwgen was called twice within the same second, it produced the same result (since the random function has been seeded with value returned by time()). Now the seed comes from gettimeofday() (the milliseconds part), so randomness has been improved a bit.


  • unit tests: adding first unit test in cwutils/dictionary module.
  • bugfix: usage of __attribute__((deprecated("message"))) construct in cwutils/dictionary.h may have lead to compilation failure. This has been fixed by getting rid of "message" argument.


Release of unixcw version 3.2.0

Changes since version 3.1.1:


  • Fixing faulty logic checking "--disable-feature" flags in configure.ac. Bug reported by Thomas Beierlein. Thanks Thomas!


  • Debugging facilities of the library are being rewritten and have been moved to new file: src/lib/libcw_debug.h. See the file for details of new interface. The interface may still change, and it isn't documented yet. List of CW_DEBUG_* flags has been modified. The old interface is being deprecated.
  • libcw now can generate tones with slopes shaped as sine function or as raised cosine function. The 'raised cosine' slope is now default.
  • Rewriting usage of __attribute__ ((deprecated(msg))) facility in libcw.h. A user has reported errors related to the attribute when compiling libcw with gcc 4.3.3.
  • Improving the method of queuing a space character. This helps me avoid problems in some corner cases (e.g. when a single space is queued, and tone queue's low watermark is set to 1).
  • Improving behaviour of cw_generator_new(). Under some circumstances it is less likely to fail to create new generator. There was also possibility of causing a client application to crash if the function failed, but this has been fixed.
  • Library version changed from 4.1.1 to 5.0.0.


  • Fixing one small issue: in every new session with cwcp the application printed a space at the beginning of played text.


Release of unixcw version 3.1.1

Changes since version 3.1.0:


  • Fixing problem with interlocks in thread code. Library version changed from 4.0.0 to 4.1.1.


Release of unixcw version 3.1.0

Changes since version 3.0.2:


  • Added support for PulseAudio. All applications from unixcw that produce audio output benefit from this. PulseAudio is the default audio backend on machines with installed and accessible PulseAudio server. If audio backend hasn't been specified by user, the applications try to access different sound backends in following order: PulseAudio -> OSS -> ALSA -> console buzzer. The usual restrictions for console buzzer output (root privileges required) still apply. Running application from unixcw package (cw, cwcp, xcwcp) with ALSA selected as sound backend while PulseAudio server is running will result in all kinds of different problems. User is warned about such situation by the application.
  • Added 'Null' audio system as an optional audio backend. No sound is being played if this system is selected, libcw is spending its time only on generating tones of proper length and sending then in proper moments to a pseudo-device. Pass '-s n' option to unixcw application to use this 'audio' backend.
  • Thanks to changes in libcw, unixcw doesn't 'require' ALSA or PulseAudio libraries, or PulseAudio server on target system, even if support for the two audio backends was compiled in. The two audio backends are now only recommended, thanks to linking to the libraries at run time.
  • Build system now uses libtool. 'libtool' script is in release archive, so there are no new compile-time requirements related to this (at least 'make distcheck' completes successfully with libtool package uninstalled).
  • It is possible to explicitly disable support for audio backends at compile time. Pass '--disable-{console|oss|alsa|pulseaudio}' to ./configure to do this.
  • It is possible to explicitly disable compilation of cwcp and xcwcp. Pass '--disable-{cwcp|xcwcp}' to ./configure to do this.
  • Build system now uses Makefile.am files as a basis to generate Makefile files.
  • Build system now supports and correctly builds 'make distcheck' target.
  • This version closes following Debian bugs: #237891, #567394, #567392.


  • Added support for PulseAudio. There are still some things to be improved in code implementing support for PulseAudio, but pretty solid basics are there.
  • Added support for Null pseudo audio system. Not sure if it will be useful, I just thought that someone would like to use libcw without generating any sound. Perhaps some simple platforms without audio devices, perhaps practicing sending/keying without playback. Who knows. It was easy to do, so I did it.
  • If you compare libcw.c files from this and previous release, you will notice lots of changes. This is because I've changed the algorithm that controls time periods when generating tones (generating sine wave). Until now the periods were measured with itimers. The tricky part was to keep two processed in sync: turning sine wave on and off, and sending the content of audio buffer with sine wave to audio backend. I'm calling it 'tricky' because it works fine only for small sizes of audio buffer, as was is in case of OSS (~128 samples). With larger buffer sizes forced by ALSA (~1k samples) the two processes de-synchronize. I had to come up with better design, and the side effect of the design is total rewrite of parts of libcw.c (for my own purposes I call the rewrite a 'butchering', but that is a different story). New design relies on blocking writes to audio systems, and their property of being able to play only X samples (Y milliseconds) at a time (with given sample rate).

    This small image below shows the benefits of new design. Upper part of the screenshot is sound of two letters 'h', produced by libcw3, the lower part shows sound of the same letters produced by libcw4. (The screenshot shows wave plot in Audacity).

  • Following functions are deprecated:

    • cw_check_representation(),
    • cw_lookup_representation(),
    • cw_lookup_character().

    Use these instead:

    • cw_representation_is_valid(),
    • cw_representation_to_character(),
    • cw_character_to_representation().
  • library's soname changed from 3.0.1 to 4.0.0. Library's version becomes independent from version of unixcw.


  • Fixing small bug in user interface: till now modifying practice time didn't work correctly, any attempts to do so resulted in resetting the time to zero. Now this is fixed.


Release of unixcw version 3.0.2

New version. You won't find it in git repo, but only in SourceForge download area and on Debian webpage. This is a special release with two changes related to Debian packaging.

Changes since version 3.0.1:


  • fixing Debian's FTBFS bug #676752
  • removing debian/ from unixcw_X.Y.Z.orig.tar.gz. Contents of debian/ can be found in separately provided unixcw_X.Y.Z-W.debian.tar.gz

Thanks to Kamal Mostafa for patiently explaining to me some details of Debian/Ubuntu packaging.


Release of unixcw version 3.0.1

Changes since version 3.0:


  • added proper "Section" field in control file;
  • fixed library dependencies in control file;
  • fixed "Replaces:"/"Conflicts:" fields in control file;
  • fixed Debian bug #653411: changes in *.preinst files to remove;
  • dangling symlinks left by old packaging (suggested by Bob Proulx);


  • fixed library dependencies in "configure" script;
  • fixed library dependencies provided by libcw.pc file;


  • proper detection of capabilities of liboss-salsa-dev (kfreebsd's libasound implementation); libcw now can be built properly on Debian/kFreeBSD;
  • fixing awk scripts producing man pages: the awk scripts now work with mawk too;


  • fixed list of libraries in Makefile;

Thanks to Kamal Mostafa for providing patches that are the reason for 3.0.1 release. Content of upstream package unixcw-3.0.1 is approximately the same as of Debian source package unixcw_3.0-5.


Release of unixcw version 3.0

Thanks to Simon Baldwin for creating this software in the first place, and to Kamal Mostafa for helping me with packaging unixcw 3.0 for Debian.

Changes since version 2.3:


  • Changed major version of unixcw package to '3'. Changes listed below probably justify this.
  • New main developer: Kamil Ignacak (acerion at wp dot pl)
  • New website: http://unixcw.sourceforge.net
  • Scripts building Debian packages now build 'libcw3' package instead of 'unixcw' package, and 'libcw3-dev' Debian package instead of 'unixcw-dev' Debian package.


  • Renamed 'cwlib' part of unixcw package to 'libcw'.
  • Renamed library's header file from cwlib.h to libcw.h.
  • Changed library's soname from 0 to 3 (/usr/lib/libcw.so.3.0.0 / libcw.so.3).
  • Added support for ALSA. OSS is still the default backend.
  • As a consequence, libasound2 is a new dependency. There is no possibility (yet) to disable or reconfigure this at build time. It is possible to select sound backend in applications that use libcw.
  • Added implicit dependency on pthread library (which is a part of libc library, so it should be available on target system by default). Main routine generating sine wave operates as a separate thread.
  • Added actual slopes to dot and dash sounds produced by the library. This should result in less of (or even none) audible pops. Unfortunately current implementation makes dots and dashes a tiny bit longer than they would be without the slopes. The difference is not significant, but I plan to re-implement it in the future to make this feature 100% correct. The slopes are linear.
  • Rewritten management of sound volume so that the library doesn't use OSS mixer. This should resolve Debian bug #567394. Code that controls volume level is common for OSS and ALSA.
  • Since libcw doesn't touch the mixer device anymore, then Debian bug #567392 should be resolved as well.
  • Added code that attempts to discover proper audio buffer size for both OSS and ALSA. This should resolve Debian bug #567395.
  • Fix of Debian bug #567395 should also solve Debian bug #567397.
  • Changed library's API. There will be more API changes in 3.1, so consider current API to be unstable.
  • Changed volume change step from 5% to 1%.
  • Changed frequency change step from 100Hz to 20Hz.
  • The library no longer can produce sound on console buzzer and on sound card at the same time.
  • The library knows default names of OSS, ALSA and console buzzer devices. The names are used to open sound devices if no other names are provided explicitly as function arguments.
  • Introduced symbolic names of int values returned by most of library's function: CW_FAILURE / CW_SUCCESS.


  • Ported xcwcp to QT4. This should resolve Debian bug #604386.
  • Added auto-detection of QT4 headers and QT4 moc by build files.
Top of page
Go back to main page