This script converts GYRO_SCALED
gyro data from Betaflight blackbox logs (.bbl
files) into .wav
audio files.
Sampled at 4kHz:
demo.webm
# Clone
git clone https://github.com/vmzhivetyev/bbl2wav
cd bbl2wav
# venv
python3 -m venv venv
source venv/bin/activate
# install reqs
pip3 install -r requirements.txt
Record a blackbox log file with debug_mode set to GYRO_SCALED so unfiltered gyro data is recorded.
Important
Use blackbox sample rate of 2000Hz or higher.
Then do:
python3 bbl2wav.py <btfl_001.bbl>
Replace <btfl_001.bbl>
with the path to the .bbl
file you want to convert.
The script generates .wav
files containing the audio file by derictly converting gyro data from the log into wav file without any modifications.
Each axis (roll
, pitch
, yaw
) of the gyro data is converted into a separate audio file. The output files are named in the following format:
<original_filename>_<log_index>_<axis>.wav
For example, if the input .bbl
file is named btfl_001.bbl
and it contains multiple logs (you armed mutliple times), the generated files might be named as follows:
btfl_001_1_roll.wav
btfl_001_1_pitch.wav
btfl_001_1_yaw.wav
btfl_001_2_roll.wav
btfl_001_2_pitch.wav
btfl_001_2_yaw.wav
- and so on...