Project
Music by Python Tips
This page is for summary of memos to implement audio progarm by python.
For making sound from MIDI input to audio output on Raspberry Pi, I run following command on Raspberry Pi :
$ qjackctl &
$ qsynth &
$ qsynth &
In detail, Raspberry Pi Tips - Fluidsynth
Generate audio files
Generate sine, sawtooth and square wave by numpy and scipy libraries.
- Environment: Rpi 3B, python 3.5.3 / 3.7.0
pip install numpy scipy
- Github
- Ref:
python-rtmidi
Search "Synth" output port and play midi file
- Environment: Rpi 3B, python 3.5.3 / 3.7.0
pip install python-rtmidi
- Github
- Ref:
Mido
- Environment: Rpi 3B, python 3.5.3 / 3.7.0
pip install mido python-rtmidi
MIDI note-on and note-off by Mido
Load MIDI file and check the length of music
Ref:
Pygame
- Environment: Rpi 3B, python 3.5.3 / 3.7.0
pip install pygame
List output ports
- Github
- Ref:
- 自由研究の準備(その6)PythonでのMIDI操作 (リアルタイム編1), (リアルタイム編2)
GUI keyboard - display piano and send MIDI message
- Github
- Ref:
Midi keyboard
Pretty_midi
- Environment: Rpi 3B, python 3.5.3 (I could not install pretty-midi to virtual env of python3.7.0 )
git clone https://github.com/craffel/pretty-midi
cd pretty-midi
python3 setup.py install
cd pretty-midi
python3 setup.py install
Make MIDI file of noteon and noteoff of "G4"
Load MIDI file
Ref: