Pro tips for art python

Printer-friendly version

Python: How to make it do pretty things.

see controllerism for some pythonic artstuff.

Big frameworks

  • field
    (github)
    “is an open-source software project initiated by OpenEndedGroup,
    for the creation of their digital artworks.
    It is an environment for writing code to rapidly and experimentally assemble
    and explore algorithmic systems.
    It is visual, it is hybrid, it is code-based.
    We think that it has something to offer a diverse range of programmers and artists”:

    slider1= sheetSlider("slider1")
    xySlider2 = sheetXY("xySlider2")
    aGraph = sheetGraph("aGraph")
    
    print slider1.get()
    print xySlider2.get()
    print aGraph.get().get(0.2)
    
    slider1.set(0.5)
    xySlider2.set( (0.2, 0.6))
    

    GUI toolkit looks good (Java-based)

  • pyo (github)

    “is a Python module written in C to help DSP script creation.
    Pyo contains classes for a wide variety of audio signal processing.
    With pyo, the user will be able to include signal processing chains directly
    in Python scripts or projects, and to manipulate them in real time through
    the interpreter.
    Tools in the pyo module offer primitives, like mathematical operations on
    audio signals, basic signal processing (filters, delays, synthesis
    generators, etc.), but also complex algorithms to create sound granulation
    and other creative audio manipulations.
    pyo supports the OSC protocol (Open Sound Control) to ease communications
    between softwares, and the MIDI protocol for generating sound events and
    controlling process parameters.
    pyo allows the creation of sophisticated signal processing chains with all
    the benefits of a mature, and widely used, general programming language.”:

      >>> s = Server().boot()
      >>> s.start()
      >>> wav = SquareTable()
      >>> env = CosTable([(0,0), (100,1), (500,.3), (8191,0)])
      >>> met = Metro(.125, 12).play()
      >>> amp = TrigEnv(met, table=env, dur=1, mul=.1)
      >>> pit = TrigXnoiseMidi(met, dist='loopseg', x1=20, scale=1, mrange=(48,84))
      >>> out = Osc(table=wav, freq=pit, mul=amp).out()
    
    * see alos cecilia_, a gui for pyo.
    
  • Outsourcing:

  • python’s audio analysis toolkit is much more impressive than its synthesis -
    see machine listening.

  • the graphing can be OK too - graphing in python.

See original: The Living Thing / Notebooks Pro tips for art python