FSK modulator: converts the written characters into 16 bit PCM audio which is written to the defined output. The generated signal is compatible with minimodem –rx.
More...
|
| | FSKEncoder ()=default |
| | FSKEncoder (Print &out) |
| | FSKEncoder (audio_tools::SoundGenerator< int16_t > &generator) |
| | FSKEncoder (Print &out, audio_tools::SoundGenerator< int16_t > &generator) |
| ModemConfig | defaultConfig () |
| | Provides a default configuration for a 1200 baud Bell 202 modem.
|
| void | setAudioInfo (audio_tools::AudioInfo info) override |
| | Defines the sample rate and number of channels of the generated audio.
|
| audio_tools::AudioInfo | audioInfo () override |
| bool | begin (ModemConfig config) |
| | Starts the processing with the indicated modem configuration.
|
| bool | begin () override |
| void | end () override |
| size_t | write (const uint8_t *data, size_t len) override |
| | Modulates the characters.
|
| bool | endTransmission (size_t silence_samples=0) override |
| bool | writeIdle (size_t nsamples) override |
| | Sends the idle (mark) tone for the indicated number of samples.
|
| bool | isTransmitting () override |
| | true between the first character and endTransmission()
|
| float | symbolRate () override |
| | Bits per second.
|
| size_t | bitSamples () |
| | Number of samples of one bit.
|
| ModemConfig & | config () |
| const ModemConfig & | activeConfig () const |
| | The active configuration with all derived values (e.g. frequencies).
|
| | operator bool () override |
| void | setOutput (Print &out) override |
| void | setGenerator (audio_tools::SoundGenerator< int16_t > &generator) |
| audio_tools::SoundGenerator< int16_t > & | getGenerator () |
| | Provides the active tone generator.
|
| void | writeSilence (size_t nsamples) |
| | Writes the indicated number of samples of silence.
|
| void | writeTone (float freq, size_t nsamples) |
| | Writes a tone for the indicated number of samples.
|
| void | flush () |
| | Ends the transmission.
|
| const char * | mime () override |
FSK modulator: converts the written characters into 16 bit PCM audio which is written to the defined output. The generated signal is compatible with minimodem –rx.
The tones are produced by a SoundGenerator<int16_t>. By default this is a FSKToneGenerator, which reproduces minimodem's signal. You can replace it with setGenerator(): the generator must change the frequency immediately and keep the phase continuous in setFrequency() - e.g. the AudioTools FastIntSineGenerator, which needs no floating point and is a good choice for MCUs without FPU. FloatSineGenerator, FastSineGenerator and SineFromTable are not suited. The generator's amplitude is full scale: ModemConfig::volume is applied by the encoder.
A transmission starts with leader (mark) bits, followed by the optional sync bytes and the data frames. Call endTransmission() (or flush()) to send the trailer bits when there is no more data to send.
- Copyright
- GPLv3