I'm trying to create a synth using python with raspberry pi. I've written the code for manipulate the gpio input (i've modified the electronic of an old pianola and connected it to raspberry with the gpio) but I don't know how to create a sound. I want raspberry to reproduce a sound on the audio-output when I'm pressing a specific key (for example the pressing of the 9th key will callback a functionthat will reproduce the D note etc..). I gave a look to nsound (http://nsound.sourceforge.net/) and to PySynth (http://home.arcor.de/mdoege/pysynth/) but I can't get how to directly reproduce a sound without writing it before in a .wav file.
Any suggestions? Thanks