Simple guitar soft synth written in Python, based on Real Python tutorial.
- No project management using
poetry
- Several boilerplate classes are not used
- Use of
PyAudio
to directly play sounds instead of writing files withpedalboard
- Use of
click
to build the CLI instead ofargparse
Make sure to have PyAudio and PortAudio installed (see install istructions at https://people.csail.mit.edu/hubert/pyaudio/).
Then, after setting up your Python environment:
pip install -r requirements.txt
Finally, run the CLI tool to display help and list of commands:
python src/cli.py
To reproduce the sound sequence generated at the end of step 2, run:
python src/cli.py play-sequence
To reproduce the blending of multiple notes:
python src/cli.py play-chord --delay 0
To add 40 milliseconds of delay between notes:
python src/cli.py play-chord --delay 0.04
To reverse the strumming direction:
python src/cli.py play-chord --delay 0.04 --reverse true
To generate the sequence of pitches from the beginning of the step:
python src/cli.py play-pitches
To generate the sequence of notes:
python src/cli.py play-notes
To generate the sounds of the 3 instruments:
python src/cli.py play-instruments
To generate the chorus of Jason Mraz's "I'm Yours":
python src/cli.py play-chorus
To generate the chorus of Jason Mraz's "I'm Yours" with special effects:
python src/cli.py play-chorus --effects true
Language | files | blank | comment | code |
---|---|---|---|---|
Python | 4 | 125 | 1 | 481 |
YAML | 2 | 0 | 0 | 200 |
Markdown | 1 | 43 | 0 | 61 |
Text | 1 | 0 | 0 | 6 |
-------- | -------- | -------- | -------- | -------- |
SUM: | 8 | 168 | 1 | 748 |