Introduction about ToySynth
    Pure Python Software
         Synthesizer
                   2012-09-16
  Python Conference JP 2012 Open Space Session

                     Ransui Iso
        Strategic Technology R&D / X-Listing Co, Ltd.


                                              Copyright (c) 2011 Ransui Iso, All rights reserved.
First, I play a music
that generated by ToySynth.




                  Copyright (c) 2011 Ransui Iso, All rights reserved.
Johann Sebastian Bach
   March 21, 1685 – July 28, 1750

                          Copyright (c) 2011 Ransui Iso, All rights reserved.
ToySynth.
●
    Only 2 python modules.
      –   Components.py
      –   Sequencer.py
●
    Pure python.
      –   Just use standard python libraries.
      –   It has simple archtecture, easy to learn.
      –   Poor performance.
           ●
               It doesn't have a real-time rendering speed to make sound
               data.


                                                 Copyright (c) 2011 Ransui Iso, All rights reserved.
How to get ToySynth.
●
    You can download a tiny zip file.



http://alpa.homeip.net/files/PyConJP2012/ToySynth.zip




                                   Copyright (c) 2011 Ransui Iso, All rights reserved.
Components.py
●
    Component module provides some classes to make
    a sound.
      –   Oscillator
      –   Amplifier
      –   Mixer
      –   FrequencyModulator
      –   LFO
      –   Clock
      –   Renderer
      –   Sink
      –   Etc ...
                                  Copyright (c) 2011 Ransui Iso, All rights reserved.
Music Macro Language
●
    Code system for write musical notation.




    t120o4l4cdefedcrefgagfe4
    t120o4l4cdefedcrefgagfe4
    crcrcrcrl8ccddeeffl4edcr
    crcrcrcrl8ccddeeffl4edcr
                               Copyright (c) 2011 Ransui Iso, All rights reserved.
MMLCompiler
●
    It's in Sequencer module.
      –   It convert MML string to byte-code.
      –   Case insensitive.
      –   White space is now allowed.
      –   Poor lexer.
      –   Only support basic features.




                                         Copyright (c) 2011 Ransui Iso, All rights reserved.
Sequencer
●
    Executes music byte-code sequence.
       Set frequency at specified timing



                                                                      WaveFile
       osc                      Sequencer   Renderer
                                                                       Sink




      MML
                                             Clock
     Compiler   Music byte-code sequence.




                                                Copyright (c) 2011 Ransui Iso, All rights reserved.
Make your own sound module
●
    Vibrato.
                           base_osc = SineWaveOscillator()
                            base_osc = SineWaveOscillator()
                           diff_osc = SineWaveOscillator()
                            diff_osc = SineWaveOscillator()
               Frequency   diff_osc.frequency=10.0
                            diff_osc.frequency=10.0
    osc        Modulator
                           viv_amp = Amplifeir(
                            viv_amp = Amplifeir(
                               source=diff_osc,
                                source=diff_osc,
                               gain=2.0,
                                gain=2.0,
                               Attenuate=1.0)
                                Attenuate=1.0)
                           viv_osc = FrequencyModulator(
                            viv_osc = FrequencyModulator(
                               source=base_osc, 
                                source=base_osc, 
                               diff=viv_amp)
                                diff=viv_amp)
    osc          amp
                           frequency                    : frequency of vibrato.
                           Gain parameter in amp.       : depth of vivrato.




                                           Copyright (c) 2011 Ransui Iso, All rights reserved.
Thank you for listening.
     Happy Hacking with Python!




                              Copyright (c) 2011 Ransui Iso, All rights reserved.

Introduction of ToySynth

  • 1.
    Introduction about ToySynth Pure Python Software Synthesizer 2012-09-16 Python Conference JP 2012 Open Space Session Ransui Iso Strategic Technology R&D / X-Listing Co, Ltd. Copyright (c) 2011 Ransui Iso, All rights reserved.
  • 3.
    First, I playa music that generated by ToySynth. Copyright (c) 2011 Ransui Iso, All rights reserved.
  • 4.
    Johann Sebastian Bach March 21, 1685 – July 28, 1750 Copyright (c) 2011 Ransui Iso, All rights reserved.
  • 5.
    ToySynth. ● Only 2 python modules. – Components.py – Sequencer.py ● Pure python. – Just use standard python libraries. – It has simple archtecture, easy to learn. – Poor performance. ● It doesn't have a real-time rendering speed to make sound data. Copyright (c) 2011 Ransui Iso, All rights reserved.
  • 6.
    How to getToySynth. ● You can download a tiny zip file. http://alpa.homeip.net/files/PyConJP2012/ToySynth.zip Copyright (c) 2011 Ransui Iso, All rights reserved.
  • 7.
    Components.py ● Component module provides some classes to make a sound. – Oscillator – Amplifier – Mixer – FrequencyModulator – LFO – Clock – Renderer – Sink – Etc ... Copyright (c) 2011 Ransui Iso, All rights reserved.
  • 9.
    Music Macro Language ● Code system for write musical notation. t120o4l4cdefedcrefgagfe4 t120o4l4cdefedcrefgagfe4 crcrcrcrl8ccddeeffl4edcr crcrcrcrl8ccddeeffl4edcr Copyright (c) 2011 Ransui Iso, All rights reserved.
  • 10.
    MMLCompiler ● It's in Sequencer module. – It convert MML string to byte-code. – Case insensitive. – White space is now allowed. – Poor lexer. – Only support basic features. Copyright (c) 2011 Ransui Iso, All rights reserved.
  • 11.
    Sequencer ● Executes music byte-code sequence. Set frequency at specified timing WaveFile osc Sequencer Renderer Sink MML Clock Compiler Music byte-code sequence. Copyright (c) 2011 Ransui Iso, All rights reserved.
  • 12.
    Make your ownsound module ● Vibrato. base_osc = SineWaveOscillator() base_osc = SineWaveOscillator() diff_osc = SineWaveOscillator() diff_osc = SineWaveOscillator() Frequency diff_osc.frequency=10.0 diff_osc.frequency=10.0 osc Modulator viv_amp = Amplifeir( viv_amp = Amplifeir(     source=diff_osc,     source=diff_osc,     gain=2.0,     gain=2.0,     Attenuate=1.0)     Attenuate=1.0) viv_osc = FrequencyModulator( viv_osc = FrequencyModulator(     source=base_osc,      source=base_osc,      diff=viv_amp)     diff=viv_amp) osc amp frequency : frequency of vibrato. Gain parameter in amp. : depth of vivrato. Copyright (c) 2011 Ransui Iso, All rights reserved.
  • 15.
    Thank you forlistening. Happy Hacking with Python! Copyright (c) 2011 Ransui Iso, All rights reserved.