Play a recording on phone, and record it in a window

A phone function key names a wav file instead of words, which is what N1MM's
own SSB file holds: `F1 CQ,{WAVDIR}\Cq.wav`. `{WAVDIR}` is the folder named
after whoever is at the microphone, a name is taken relative to `Wav`, and
commas play several files in a row. An SSB `.mc` file written for N1MM plays
here.

Window ▸ Voice Keyer lists every recording the messages name, says which of
them are there for the operator picked at the top, plays one, and records over
one. The recording is written beside the wanted file and moved over it at the
end, so a recorder that will not start takes nothing away.

`CommandSoundCard` runs `aplay` and `arecord`, and both commands are settings:
the audio path belongs to whatever the station runs, and a library would pick
one of them for the operator. A recorder is stopped with an interrupt so it
closes its wav file, and killed only if it ignores that. PTT is cwdaemon's
`<ESC>a` for as long as the recording plays, off for a station on VOX.

Two things follow. The QTC window sends on SSB: N1MM's four recordings on the
Ready, Agn, Cfm and Close buttons, with the lines still read out by the
operator. And alternating CQ duels on phone, because the voice keyer says when
a recording has finished — which it had to, since the CQ message is picked by
the radio's mode and would otherwise have been keyed as Morse.

Nothing here has been played on a radio: this machine has no sound card, so
what is tested is the program being run, the file filled in, the exit code and
the interrupt, with shell commands standing in for the two.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0157i7PiZyqBkquxS9A6FTdQ
This commit is contained in:
2026-09-11 07:51:58 +00:00
co-authored by Claude Opus 5
parent dae1f4f197
commit 082fa75a40
28 changed files with 1564 additions and 86 deletions
+29 -14
View File
@@ -20,6 +20,7 @@ is still sitting there undiscovered.
| `CwDaemonSender` | the UDP messages, and a fake daemon that answers the `<ESC>h` reply request | no `cwdaemon`, no radio keyed. |
| `MmttyEngine` and the Wine bridge | MMTTY 1.70 under Wine 10 on a machine with a sound card: started, keyed, a message transmitted and decoded back off the air, and stopped | no radio. No FSK through EXTFSK, no PTT on a serial port, and 2Tone has never been run. Keying was wrong until 2026-09-01: `SetMmttyPTT` stops a transmission and does not start one, which is why nothing ever went out before then. `docs/digital-bridge.md` |
| `WinkeyerSender` | the status-byte reader, on its own | no test of the serial side, and no WinKeyer. The host-mode open sequence is from the WinKeyer datasheet; the status bits are from N1MM's `Winkey.cs`. |
| `CommandSoundCard` and the voice keyer | shell commands standing in for `aplay` and `arecord`: the program being run, the file filled in, the exit code, the interrupt that ends a recording | no sound card on this machine, so nothing has been played or recorded, and nothing has gone on the air. cwdaemon's `<ESC>a` PTT is from its published protocol and has never keyed a radio. |
The Cabrillo output has not been put in front of a contest sponsor's robot.
@@ -511,19 +512,27 @@ finishes, which is the flag on the end of `CHECKSUM`.
What the link does not do yet: the log check that compares two stations' logs
row by row. It is a message type this program can already frame; it is not
written. There is also no guard against two stations taking the same station
number.
written.
**Voice keying.** `MessageSender` was written to cover a voice keyer playing a
recording, and nothing implements it. Each operator's recordings folder is
stored with the rest of his settings and waits on the same thing. No DVK support either, so the second radio
of an SO2R station cannot call CQ by voice. Alternating CQ therefore works on CW
only, though nothing in it is CW-specific: a voice keyer that reports when the
recording has finished would drive it as it stands.
**Voice keying.** The keyer is written: a phone function key names a wav file,
`VoiceKeyer` plays it out of the sound card and keys the transmitter through
cwdaemon while it plays, and the voice keyer window lists every recording the
messages name, says which are there and records the rest. Alternating CQ duels
on phone as well as on CW, because the voice keyer says when a recording has
finished.
**The QTC window sends on CW and RTTY, not on SSB.** On CW the header, the
lines, the QRV, the TU and the again messages go out through the keyer, with
N1MM's messages and N1MM's defaults.
What is not written: N1MM's advanced voicing, which says a callsign or a serial
number by stringing together a recording per letter and per number out of
`LettersFiles`. That is why F5 sends nothing on phone, as it does in N1MM's own
default file. There is no DVK support either — the recordings are played on the
station's own sound card, so two radios transmitting at once share one card and
the second radio is what an SO2R station adds a box for. `{SETWAVDIR}`, which
points the folder somewhere else in the middle of a contest, is read and passed
over.
**The QTC window sends on all three modes.** On CW the header, the lines, the
QRV, the TU and the again messages go out through the keyer, with N1MM's
messages and N1MM's defaults.
On RTTY the station reading traffic out has Send All, which is N1MM's: the whole
series as one message, the heading, then every line with the operator's spacing
@@ -547,8 +556,13 @@ Agn n and Save, its `WAERXReadyText`, `WAEAllAgnText`, `WAEAGNText` and
setup area, with N1MM's defaults. Clicking a line in the digital window fills
the next row, which is how a series is copied on RTTY.
What is not here: N1MM's four SSB recordings — QRV, Agn, Cfm and TU — which need
a voice keyer, and the green mark N1MM puts on each line as Send All reads it
On SSB the four buttons N1MM has recordings for play them — `WAEQRV.wav`,
`WAEAgain.wav`, `WAEConfirm.wav` and `WAETu.wav`, out of the `Wav` folder
rather than an operator's, which is where N1MM plays them from. The lines
themselves are read out by the operator: a line is a time, a callsign and a
serial number, and advanced voicing is what N1MM says those with.
What is not here: the green mark N1MM puts on each line as Send All reads it
out, which this sends as one message and cannot follow line by line.
**Cut numbers are not sent.** N1MM can key a serial number as letters — `N` for
@@ -579,7 +593,8 @@ that this program can carry out are listed in the README. What is read and
passed over: the `{CAT…}` and radio-hex families, the audio and rotator macros,
`{STEREOON}` and `{STEREOOFF}`, `{CONDJUMP}`,
`{QSYCQ}`, `{FORCELOG}`, `{SwapContests}`, the digital TNC macros (`{ENTER}`,
`{ESC}`, `{CTRL-A}`…), and the wav-directory macros, which wait on voice keying.
`{ESC}`, `{CTRL-A}`…), and `{SETWAVDIR}`, which moves the voice keyer's folder
in the middle of a contest.
A message holding any of them still sends the right characters.
The CW keyer macros are not read either: `<` and `>` for speed, `~` for a half