mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-26 19:23:51 +01:00
132 lines
3.7 KiB
Markdown
132 lines
3.7 KiB
Markdown
# FM95 Configuration File
|
|
|
|
This document describes the configuration file format for the FM95 FM transmitter software.
|
|
|
|
## File Format
|
|
|
|
The configuration file uses standard INI format with sections and key-value pairs. Comments can be added using the `#` or `;` character at the beginning of a line.
|
|
|
|
## Configuration Sections
|
|
|
|
### [fm95] - Main Settings
|
|
|
|
This section contains the core FM95 transmission parameters.
|
|
|
|
#### Audio Processing
|
|
|
|
- **`stereo`** (0 or 1, default: 0)
|
|
Enable stereo transmission. Set to 1 for stereo, 0 for mono.
|
|
|
|
- **`audio_volume`** (float)
|
|
Audio input volume multiplier. 1.0 = unity gain, values > 1.0 may cause distortion.
|
|
|
|
- **`master_volume`** (float)
|
|
Master output volume control. Affects overall transmission level.
|
|
|
|
- **`clipper_threshold`** (float)
|
|
Audio clipper threshold to prevent overmodulation. Lower values = more aggressive clipping.
|
|
|
|
- **`preemphasis`** (float, microseconds)
|
|
Pre-emphasis time constant in microseconds. Common values: 50 (Europe), 75 (North America).
|
|
|
|
#### Stereo Processing
|
|
|
|
- **`polar_stereo`** (0 or 1, default: 0)
|
|
Enable polar stereo encoding.
|
|
|
|
#### RDS (Radio Data System)
|
|
|
|
- **`rds_streams`** (integer, range: 1-4)
|
|
Number of RDS data streams to process simultaneously. More streams allow richer RDS data but require more processing power.
|
|
|
|
#### MPX (Multiplex) Settings
|
|
|
|
- **`mpx_power`** (float)
|
|
MPX signal power level. For BS412.
|
|
|
|
- **`mpx_deviation`** (float, Hz)
|
|
Maximum frequency deviation for MPX signals. Standard value is 75000 Hz for FM broadcast.
|
|
|
|
#### Calibration
|
|
|
|
- **`calibration`** (0-2, default: 0)
|
|
Enable calibration mode for testing and adjustment. (2 enables 40 hz square wave instead of the 400 hz sine)
|
|
|
|
#### Frequency Deviation
|
|
|
|
- **`deviation`** (float, Hz)
|
|
Maximum frequency deviation. Standard FM broadcast uses 75000 Hz. This setting affects the master_volume automatically.
|
|
|
|
### [devices] - Audio Device Configuration
|
|
|
|
This section specifies the audio devices to use for input and output.
|
|
|
|
- **`input`** (string, max 63 chars)
|
|
Primary audio input device
|
|
|
|
- **`output`** (string, max 63 chars)
|
|
MPX input
|
|
|
|
- **`mpx`** (string, max 63 chars)
|
|
MPX (multiplex) input device for subcarrier input
|
|
|
|
- **`rds`** (string, max 63 chars)
|
|
RDS signal input
|
|
|
|
## Example Configuration
|
|
|
|
```ini
|
|
# FM95 Configuration File
|
|
# Lines starting with # are comments
|
|
|
|
[fm95]
|
|
# Enable stereo transmission
|
|
stereo=1
|
|
|
|
# Audio levels (1.0 = unity gain)
|
|
audio_volume=0.8
|
|
master_volume=1.0
|
|
|
|
# Prevent overmodulation
|
|
clipper_threshold=0.9
|
|
|
|
# Pre-emphasis for Europe (50µs) or North America (75µs)
|
|
preemphasis=50
|
|
|
|
# Enhanced stereo processing
|
|
polar_stereo=1
|
|
|
|
# RDS configuration
|
|
rds_streams=2
|
|
|
|
# MPX settings
|
|
mpx_power=0.1
|
|
mpx_deviation=75000
|
|
|
|
# Standard FM deviation
|
|
deviation=75000
|
|
|
|
# Enable calibration mode for testing
|
|
calibration=0
|
|
|
|
```
|
|
|
|
## Important Notes
|
|
|
|
1. **RDS Streams**: Maximum of 4 RDS streams are supported. Exceeding this limit will cause an error.
|
|
|
|
2. **String Length**: Device names are limited to 63 characters maximum.
|
|
|
|
3. **Deviation Interaction**: The `deviation` setting automatically adjusts `master_volume` using the formula: `master_volume *= (deviation / 75000.0)`. Set deviation last if you want to override master_volume.
|
|
|
|
4. **Audio Levels**: Keep audio levels reasonable to prevent distortion. Start with conservative values and adjust as needed.
|
|
|
|
5. **Preemphasis**: Use 50µs for European broadcast standards, 75µs for North American standards.
|
|
|
|
## Troubleshooting
|
|
|
|
- **No audio**: Check device names with system audio tools
|
|
- **Distorted audio**: Reduce audio_volume and clipper_threshold
|
|
- **Poor stereo separation**: Enable polar_stereo and adjust mpx_power
|
|
- **RDS not working**: Verify rds device and ensure rds_streams ≤ 4
|