@@ -66,7 +66,10 @@ python -m bluebox -h
6666Output:
6767
6868```
69- usage: __main__.py [-h] [-l LENGTH] [-p PAUSE] [-a AMPLITUDE] [-s SAMPLE_RATE] [-m MF] [-d] [-b BACKEND] [-r PAD_PAUSE_DURATION] [-f FILE] [-P PIPE] [-S] [-i] [-v] [sequence]
69+ usage: python3 -m bluebox [-h] [-l LENGTH] [-p PAUSE] [-a AMPLITUDE] [-s SAMPLE_RATE] [-m MF]
70+ [-d] [-b BACKEND] [-o OUTPUT] [-r PAD_PAUSE_DURATION] [-f FILE]
71+ [-P PIPE] [-S] [-i] [-v]
72+ [sequence]
7073
7174Generate tone sequences.
7275
@@ -75,22 +78,21 @@ positional arguments:
7578
7679options:
7780 -h, --help show this help message and exit
78- -l LENGTH, --length LENGTH
79- The length of each tone in milliseconds.
80- -p PAUSE, --pause PAUSE
81- The length of the pause between tones in milliseconds.
82- -a AMPLITUDE, --amplitude AMPLITUDE
81+ -l, --length LENGTH The length of each tone in milliseconds.
82+ -p, --pause PAUSE The length of the pause between tones in milliseconds.
83+ -a, --amplitude AMPLITUDE
8384 The combined amplitude of the waveforms.
84- -s SAMPLE_RATE , --sample-rate SAMPLE_RATE
85+ -s, --sample-rate SAMPLE_RATE
8586 The sample rate of the waveforms.
86- -m MF , --mf MF The MF to use e.g. dtmf, mf.
87+ -m, --mf MF The MF to use e.g. dtmf, mf.
8788 -d, --debug Enable debug logging.
88- -b BACKEND, --backend BACKEND
89- The backend to use for playing the waveforms.
90- -r PAD_PAUSE_DURATION, --pad-pause-duration PAD_PAUSE_DURATION
89+ -b, --backend BACKEND
90+ The backend to use for playing the waveforms (pyaudio, wav, dummy).
91+ -o, --output OUTPUT Output file path (required for wav backend).
92+ -r, --pad-pause-duration PAD_PAUSE_DURATION
9193 The duration (ms) of the pause before/after sequence.
92- -f FILE , --file FILE The file to read the sequence from.
93- -P PIPE , --pipe PIPE Read the sequence from a pipe.
94+ -f, --file FILE The file to read the sequence from.
95+ -P, --pipe PIPE Read the sequence from a pipe.
9496 -S, --stdin Read the sequence from stdin.
9597 -i, --interactive Enter interactive mode.
9698 -v, --version show program's version number and exit
@@ -114,6 +116,14 @@ uv run python -m bluebox 123456789
114116python -m bluebox 123456789
115117```
116118
119+ Write a wav file:
120+
121+ ``` bash
122+ uv run python -m bluebox -b wav -o sequence.wav 1234567890
123+ # or with system python:
124+ python -m bluebox -b wav -o sequence.wav 1234567890
125+ ```
126+
117127### API
118128
119129You mainly need an ` BaseMF ` subclass instance and a ` Sequencer ` instance.
@@ -136,4 +146,6 @@ Same thing for audio backends.
136146
137147Currently there are two MF implementations (DTMF and MF), and two audio backends (PyAudio and Dummy).
138148
149+ If you want to contribute, make a fork, and a branch. Please make any PR against develop.
150+
139151
0 commit comments