Python-Sonic is a simple Python interface for Sonic Pi, which is a real great music software created by Sam Aaron (http://sonic-pi.net).
At the moment Python-Sonic is in pre-pre-alpha status. It is planned, that it will work with Supercollider, too.
If you like it, use it. If you have some suggestions, tell me (gkvoelkl@nelson-games.de).
But no debugging now or help on how to install it on your system.
- First you need Python 3 (https://www.python.org, ) - Python 3.4 should work, because it's the development environment
- Then Sonic Pi (https://sonic-pi.net) - That makes the sound
- Modul python-osc (https://pypi.python.org/pypi/python-osc) - Connection between Python and Sonic Pi Server
- And this modul python-sonic - simply copy the source, no setup available at the moment
- You have to start Sonic Pi first before you can use it with python-sonic
- Only the notes from C5 to C6
Many of the examples are inspired from the help menu in Sonic Pi.
from psonic import *
The first sound
play(70) #play MIDI note 70
Some more notes
play(72)
sleep(1)
play(75)
sleep(1)
play(79)
In more tratitional music notation
play(C5)
sleep(0.5)
play(D5)
sleep(0.5)
play(G5)
Play sharp notes like F# or dimished ones like Eb
play(Fs5)
sleep(0.5)
play(Eb5)
Play louder (parameter amp) or from a different direction (parameter pan)
play(72,amp=2)
sleep(0.5)
play(74,pan=-1) #left
Different synthesizer sounds
use_synth(SAW)
play(38)
sleep(0.25)
play(50)
sleep(0.5)
use_synth(PROPHET)
play(57)
sleep(0.25)
..
..
..