CWKeyerShield Library #19
Replies: 2 comments
-
|
Is is really logical to set midi_ptt_note, midi_keydown_note and midi_channel via the constructor argument list? For these "volatile" parameters there should be interfaces, as already the case for midi_channel, where we have void set_midi_channel(int v) { midi_channel = v; } In my view it is more logical to restrict the constructor argument list to reflect the hard-wired things. Whatever software uses this class can then, at any time, do a set_midi_channel() call. |
Beta Was this translation helpful? Give feedback.
-
|
It is nice to have everything with default values in the constructor as it makes it easier to read and understand. Initial "volatile" values can be set in the constructor. Volatile values may also have accessor functions so that they can be changed later if desired. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
This is a discussion about the CWKeyerShield Library which is currently used by the TeensyWinkeyEmulator and eventually with the K3NG keyer. I made another round of updates to this library today:
The code is the best current documentation:
There was some discussion that the way this midi handler is done puts it in an interrupt handler context. I don't think that is the case, and the alternate way of doing midi event handling is in the same category as this. See the documentation and the line "The callback functions are only called when you use read." This is when CWKeyerShield process MIDI data and is the same as when hasak will.
There has been some back and forth regarding responses. I'd like all responses to be turned on or off. For some reason this causes problems with piHPSDR and TeensyWinkeyEmulator? Please check, and if there are problems, let us discuss here before changing code.
Note that in this library I am focusing on MIDI and Audio related settings since most keyer functionality can be changed via a WinKey interface. (The keyer-specific support for hang and leadin times was added by Christoph.) I am starting to be satisfied with this library. My next steps are to finish up a few audio related settings such as balance, pan and input level, complete the Python test interface, and work on issue #5
Please add any requests for this library and bug reports for this library to this discussion thread.
73,
Steve
kf7o
Beta Was this translation helpful? Give feedback.
All reactions