Pure Python
Software synthesizer
        2011-06-11
 Python mini Hack-a-thon #9
          at gumi
Who are you?
Ransui Iso @ X-Listing.

 I'm Common Lisper,
But use python heavily.
I like Chip-Tune Music very much.
Modern DTM system generates very rich sound,
  but the system can't generate PIKO-PIKO
                 sound well.
So, I made
   a toy software synthesizer
to generate PIKO-PIKO sound.
It generates PSG like
 square-wave sound.

PSG is 'Programmable Sound Generator”,
  which has been commonly use for
       computer and game music
               In 1980's
Square-wave form is good for PIKO-PIKO sound
Architecture of Synthesizer
              Oscillator




              Oscillator
   MML
                             Mixer
Interpreter

              Oscillator




              Oscillator


                           Raw PCM
                           binary data
Music Macro Language
●   Musical notation scores can translate to MML.
●   Note : CDEFGAB and R
    ●   + as #, - as ♭
●   Musical Control
    ●   Tempo                   T
    ●   Volume                  V
    ●   Octave                  O
    ●   Default key on length   L
How to generate MML to PCM data

   MML String




   Tokenizer    Notation Generator



                  Sequence of        Square Wave
                  Note instance       Generator



                                     RAW PCM
                                     Binary data.
Splitted output module

    Software Synthesizer          FIFO         Output Driver Software




                                                       PyQt

Qt Layer
                                                   QtMultimedia




OS Layer
                           ALSA          DIrectSound      Esound, etc...
Let's see the code!
   You can find the python source code at pasetebin.

Raw PCM data generator : http://pastebin.com/h2fxLACS
 Sound Output Program : http://pastebin.com/gf0SXULY
DEMO
Have you heard of this?
Thank you for LISTNING
     Happy Hacking!!

PySynth : A toy pure python software synthesizer.

  • 1.
    Pure Python Software synthesizer 2011-06-11 Python mini Hack-a-thon #9 at gumi
  • 2.
    Who are you? RansuiIso @ X-Listing. I'm Common Lisper, But use python heavily.
  • 3.
    I like Chip-TuneMusic very much. Modern DTM system generates very rich sound, but the system can't generate PIKO-PIKO sound well.
  • 4.
    So, I made a toy software synthesizer to generate PIKO-PIKO sound.
  • 5.
    It generates PSGlike square-wave sound. PSG is 'Programmable Sound Generator”, which has been commonly use for computer and game music In 1980's
  • 6.
    Square-wave form isgood for PIKO-PIKO sound
  • 7.
    Architecture of Synthesizer Oscillator Oscillator MML Mixer Interpreter Oscillator Oscillator Raw PCM binary data
  • 8.
    Music Macro Language ● Musical notation scores can translate to MML. ● Note : CDEFGAB and R ● + as #, - as ♭ ● Musical Control ● Tempo T ● Volume V ● Octave O ● Default key on length L
  • 9.
    How to generateMML to PCM data MML String Tokenizer Notation Generator Sequence of Square Wave Note instance Generator RAW PCM Binary data.
  • 10.
    Splitted output module Software Synthesizer FIFO Output Driver Software PyQt Qt Layer QtMultimedia OS Layer ALSA DIrectSound Esound, etc...
  • 11.
    Let's see thecode! You can find the python source code at pasetebin. Raw PCM data generator : http://pastebin.com/h2fxLACS Sound Output Program : http://pastebin.com/gf0SXULY
  • 12.
  • 13.
    Thank you forLISTNING Happy Hacking!!