Skip to content

Programming Music with Python, Sonic Pi and Supercollider

License

Notifications You must be signed in to change notification settings

gkvoelkl/python-sonic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

python-sonic - Programming Music with Python, Sonic Pi or Supercollider

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.

Installation

Limitations

  • You have to start Sonic Pi first before you can use it with python-sonic
  • Only the notes from C5 to C6

Examples

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)

More Informations

Sonic Pi

..

OSC

..

MIDI

..

About

Programming Music with Python, Sonic Pi and Supercollider

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published