id: apollo_fm_voice_subcarrier_mod label: Apollo FM Voice Subcarrier Mod category: '[Apollo USB]' flags: [python] parameters: - id: sample_rate label: Sample Rate (Hz) dtype: real default: '5120000' - id: subcarrier_freq label: Subcarrier Frequency (Hz) dtype: real default: '1250000' - id: fm_deviation label: FM Deviation (Hz) dtype: real default: '29000' - id: tone_freq label: Test Tone Frequency (Hz) dtype: real default: '1000' - id: audio_input label: Audio Source dtype: bool default: 'False' options: ['True', 'False'] option_labels: ['External Input', 'Internal Test Tone'] inputs: - label: audio domain: stream dtype: float optional: true hide: ${ 'all' if not audio_input else 'none' } outputs: - label: out domain: stream dtype: float templates: imports: from apollo.fm_voice_subcarrier_mod import fm_voice_subcarrier_mod make: >- apollo.fm_voice_subcarrier_mod.fm_voice_subcarrier_mod( sample_rate=${sample_rate}, subcarrier_freq=${subcarrier_freq}, fm_deviation=${fm_deviation}, tone_freq=${tone_freq}, audio_input=${audio_input}) documentation: |- Apollo FM Voice Subcarrier Modulator Generates a 1.25 MHz FM subcarrier for the voice channel. Can operate in two modes: Internal mode (default): Uses a built-in sine test tone as the audio source. This is useful for testing and signal validation. External mode (audio_input=True): Accepts an external float audio stream as input. Use this to modulate actual Apollo mission voice recordings or live audio onto the 1.25 MHz FM subcarrier with +/-29 kHz deviation. On the real spacecraft, voice audio (300-3000 Hz) drives an FM VCO at 113 kHz, which is mixed with the 512 kHz master clock and doubled to produce the 1.25 MHz FM subcarrier. Parameters: sample_rate: Output sample rate in Hz (default 5.12 MHz) subcarrier_freq: FM subcarrier center frequency in Hz (default 1.25 MHz) fm_deviation: FM deviation in Hz (default +/-29 kHz) tone_freq: Internal test tone frequency in Hz (default 1 kHz, ignored when audio_input=True) audio_input: When True, accept external audio via float input port file_format: 1