Survey of use of Python Language in Open-source / Free Music Software


A

Alia Khouri

Hi,

Here are the results (in no particular order) of an informal survey of
open-source / free music applications which use python in some form or
the other. If you know of any other other examples please add them to
the list.

Enjoy (-;

AK

----------------------------------------------------------------------
Survey of use of Python Language in Open-source / Free Music Software
----------------------------------------------------------------------

pymps
http://www.anti-particle.com/pymps.shtml
Pymps is the PYthon Music Playing System - a web based mp3/ogg
jukebox. It's written in Python and utilises the PostgreSQL database.

m3ute2
http://sourceforge.net/projects/m3ute2/
m3ute2 is program for copying, moving, and otherwise organizing M3U
playlists and directories. m3ute2 can also generate detailed reports
about lists of files.

fmod
http://www.fmod.org/
FMOD is the fastest, most powerful and easiest to use sound system on
Windows, Linux, and Windows CE there is, and now Macintosh,
GameCube, PS2 & XBox!. FMOD supports 3d sound, midi, mods, mp3, ogg
vorbis, wma, aiff, recording, obstruction/occlusion, cd playback
(analog or digital), cd ripping, mmx, internet streaming, dsp effects,
spectrum analysis, user created samples and streams, synchronization
support, ASIO, EAX 2&3, C/C++/VB/Delphi and more.

pysonic
http://pysonic.sourceforge.net/
pySonic is a Python wrapper around the high performance, cross
platform FMOD sound library. You get all the benefits of the FMOD
library, but in a Pythonic, object oriented package.

PMIDI
http://sourceforge.net/projects/uncassist
The PMIDI library allows the generation of short MIDI sequences in
Python code.The interface allows a programmer to specify songs,
instruments, measures, and notes. Playback is handled by the Windows
MIDI stream API so proper playback timing is handled by the OS rather
than by client code. The library is especially useful for generating
earcons.

PythonMIDI
http://www.mxm.dk/products/public/pythonmidi
The Python Midi package is a collection of classes handling Midi in
and output in the Python programming language.

PythonSound
http://pythonsound.sourceforge.net/
The Python Sound Project aims to develop a productive community around
Python, Csound and other synthesis engines as tools for algorithmic
and computer assisted composition of electroacoustic music.

AthenaCL
http://www.flexatone.net/athena.html
AthenaCL is an open-source, cross-platform, command-line program that
functions as both a pitch (class) set theory utility (capable of both
set and voice-leading modeling and analysis) as well as an
object-orientated, Python-scriptable algorithmic front-end to Csound.
Combining these features allows rapid and flexible scoring of Csound
instruments with the elegance of Python-written texture algorithms.
These simple algorithms allow the organization of pitch-materials by
ordered content-groups, employing 12-tone set-class and pitch-class
notations. Rather than writing its own music, AthenaCL is a
compositional assistant: the algorithms create complex textural
surfaces, leaving the limitless mixture and placement of these
textures and their attributes entirely in the hands of the composer.

PyJack
http://www.a2hd.com/software/
This is a Python C extension module which provides an interface to the
Jack Audio Server. It is possible to access the Jack graph to perform
port connections/disconnections, monitor graph change events, and to
perform realtime audio capture and playback using Numeric Python
arrays. This is released under the GPL.

Csound / CsoundVST
http://www.csounds.com/
Csound is a programming language designed and optimized for sound
rendering and signal processing. The language consists of over 450
opcodes - the operational codes that the sound designer uses to build
"instruments" or patches. Although there are an increasing number of
graphical "front-ends" for the language, you typically design and
modify your patches using a word processor. Usually, you create two
text files - a .orc (orchestra) file containing the "instruments," and
a .sco (score) file containing the "notes." In Csound, the complexity
of your patches is limited by your knowledge, interest, and need, but
never by the language itself. For instance, a 22,050 oscillator
additive synthesizer with 1024 stage envelope generators on each is
merely a copy-and-paste operation. The same goes for a 1 million voice
granular texture! Have you ever dreamed of sounds such as these? Well
in Csound you can. And in Csound these dreams can come true!

dublin
http://seqdublin.sourceforge.net/
Dublin is an object oriented framework to generate events in pd. Every
objects is defined in python and then it interacts with other objects
in pure-data. The goal is not only the provide an external python
facility to pd but also to give the functionality of a sequencer. As
for the user interface, it uses Idle, the Python IDE to edit and run
event scripts.

MusicKit
http://musickit.sourceforge.net/
The MusicKit is an object-oriented software system for building music,
sound, signal processing, and MIDI applications. It has been used in
such diverse commercial applications as music sequencers, computer
games, and document processors. Professors and students in academia
have used the MusicKit in a host of areas, including music
performance, scientific experiments, computer-aided instruction, and
physical modeling. Using the Python to Objective C bridge PyObjC
enables applications and utilities to be written in Python, an
interpreted object-oriented language.

GNU Solfege
http://solfege.org/
GNU Solfege is a computer program written to help you practice ear
training.It can be useful when practicing the simple and mechanical
exercises.

Snack
http://www.speech.kth.se/snack/
The Snack Sound Toolkit is designed to be used with a scripting
language such as Tcl/Tk or Python. Using Snack you can create powerful
multi-platform audio applications with just a few lines of code. Snack
has commands for basic sound handling, such as playback, recording,
file and socket I/O. Snack also provides primitives for sound
visualization, e.g. waveforms and spectrograms. It was developed
mainly to handle digital recordings of speech, but is just as useful
for general audio. Snack has also successfully been applied to other
one-dimensional signals. The combination of Snack and a scripting
language makes it possible to create sound tools and applications with
a minimum of effort. This is due to the rapid development nature of
scripting languages. As a bonus you get an application that is
cross-platform from start. It is also easy to integrate Snack based
applications with existing sound analysis software.

Pygame
http://pygame.org/
Pygame is a set of Python modules designed for writing games. It is
written on top of the excellent SDL library. This allows you to create
fully featured games and multimedia programs in the python language.
Pygame is highly portable and runs on nearly every platform and
operating system.

Pyper
http://www.stanford.edu/~andyszy/pyper/
Pyper is a musical development environment. It allows you to write
Python scripts that generates music in real-time. Pyper uses QuickTime
Musical Instruments for synthesis.
 
Ad

Advertisements

A

Alia Khouri

I just realized how badly worded the subject line of the prior posting
was on this topic... ;-)

Anyways,

Here's an update to the list (which is not comprehensive at this
stage), but which includes items that haven't been mentioned in Pypi
or in Parnassus:

Hi,

Here are the results (in no particular order) of an informal survey of
open-source / free music applications which use python in some form or
the other. If you know of any other other examples please add them to
the list.

Enjoy (-;

AK

----------------------------------------------------------------------
Survey of use of Python Language in Open-source / Free Music Software
----------------------------------------------------------------------

pymps
http://www.anti-particle.com/pymps.shtml
Pymps is the PYthon Music Playing System - a web based mp3/ogg
jukebox. It's written in Python and utilises the PostgreSQL database.

m3ute2
http://sourceforge.net/projects/m3ute2/
m3ute2 is program for copying, moving, and otherwise organizing M3U
playlists and directories. m3ute2 can also generate detailed reports
about lists of files.

fmod
http://www.fmod.org/
FMOD is the fastest, most powerful and easiest to use sound system on
Windows, Linux, and Windows CE there is, and now Macintosh,
GameCube, PS2 & XBox!. FMOD supports 3d sound, midi, mods, mp3, ogg
vorbis, wma, aiff, recording, obstruction/occlusion, cd playback
(analog or digital), cd ripping, mmx, internet streaming, dsp effects,
spectrum analysis, user created samples and streams, synchronization
support, ASIO, EAX 2&3, C/C++/VB/Delphi and more.

pysonic
http://pysonic.sourceforge.net/
pySonic is a Python wrapper around the high performance, cross
platform FMOD sound library. You get all the benefits of the FMOD
library, but in a Pythonic, object oriented package.

PMIDI
http://sourceforge.net/projects/uncassist
The PMIDI library allows the generation of short MIDI sequences in
Python code.The interface allows a programmer to specify songs,
instruments, measures, and notes. Playback is handled by the Windows
MIDI stream API so proper playback timing is handled by the OS rather
than by client code. The library is especially useful for generating
earcons.

PythonMIDI
http://www.mxm.dk/products/public/pythonmidi
The Python Midi package is a collection of classes handling Midi in
and output in the Python programming language.

PythonSound
http://pythonsound.sourceforge.net/
The Python Sound Project aims to develop a productive community around
Python, Csound and other synthesis engines as tools for algorithmic
and computer assisted composition of electroacoustic music.

AthenaCL
http://www.flexatone.net/athena.html
AthenaCL is an open-source, cross-platform, command-line program that
functions as both a pitch (class) set theory utility (capable of both
set and voice-leading modeling and analysis) as well as an
object-orientated, Python-scriptable algorithmic front-end to Csound.
Combining these features allows rapid and flexible scoring of Csound
instruments with the elegance of Python-written texture algorithms.
These simple algorithms allow the organization of pitch-materials by
ordered content-groups, employing 12-tone set-class and pitch-class
notations. Rather than writing its own music, AthenaCL is a
compositional assistant: the algorithms create complex textural
surfaces, leaving the limitless mixture and placement of these
textures and their attributes entirely in the hands of the composer.

PyJack
http://www.a2hd.com/software/
This is a Python C extension module which provides an interface to the
Jack Audio Server. It is possible to access the Jack graph to perform
port connections/disconnections, monitor graph change events, and to
perform realtime audio capture and playback using Numeric Python
arrays. This is released under the GPL.

Csound / CsoundVST
http://www.csounds.com/
Csound is a programming language designed and optimized for sound
rendering and signal processing. The language consists of over 450
opcodes - the operational codes that the sound designer uses to build
"instruments" or patches. Although there are an increasing number of
graphical "front-ends" for the language, you typically design and
modify your patches using a word processor. Usually, you create two
text files - a .orc (orchestra) file containing the "instruments," and
a .sco (score) file containing the "notes." In Csound, the complexity
of your patches is limited by your knowledge, interest, and need, but
never by the language itself. For instance, a 22,050 oscillator
additive synthesizer with 1024 stage envelope generators on each is
merely a copy-and-paste operation. The same goes for a 1 million voice
granular texture! Have you ever dreamed of sounds such as these? Well
in Csound you can. And in Csound these dreams can come true!

dublin
http://seqdublin.sourceforge.net/
Dublin is an object oriented framework to generate events in pd. Every
objects is defined in python and then it interacts with other objects
in pure-data. The goal is not only the provide an external python
facility to pd but also to give the functionality of a sequencer. As
for the user interface, it uses Idle, the Python IDE to edit and run
event scripts.

MusicKit
http://musickit.sourceforge.net/
The MusicKit is an object-oriented software system for building music,
sound, signal processing, and MIDI applications. It has been used in
such diverse commercial applications as music sequencers, computer
games, and document processors. Professors and students in academia
have used the MusicKit in a host of areas, including music
performance, scientific experiments, computer-aided instruction, and
physical modeling. Using the Python to Objective C bridge PyObjC
enables applications and utilities to be written in Python, an
interpreted object-oriented language.

GNU Solfege
http://solfege.org/
GNU Solfege is a computer program written to help you practice ear
training.It can be useful when practicing the simple and mechanical
exercises.

Snack
http://www.speech.kth.se/snack/
The Snack Sound Toolkit is designed to be used with a scripting
language such as Tcl/Tk or Python. Using Snack you can create powerful
multi-platform audio applications with just a few lines of code. Snack
has commands for basic sound handling, such as playback, recording,
file and socket I/O. Snack also provides primitives for sound
visualization, e.g. waveforms and spectrograms. It was developed
mainly to handle digital recordings of speech, but is just as useful
for general audio. Snack has also successfully been applied to other
one-dimensional signals. The combination of Snack and a scripting
language makes it possible to create sound tools and applications with
a minimum of effort. This is due to the rapid development nature of
scripting languages. As a bonus you get an application that is
cross-platform from start. It is also easy to integrate Snack based
applications with existing sound analysis software.

Pygame
http://pygame.org/
Pygame is a set of Python modules designed for writing games. It is
written on top of the excellent SDL library. This allows you to create
fully featured games and multimedia programs in the python language.
Pygame is highly portable and runs on nearly every platform and
operating system.

Pyper
http://www.stanford.edu/~andyszy/pyper/
Pyper is a musical development environment. It allows you to write
Python scripts that generates music in real-time. Pyper uses QuickTime
Musical Instruments for synthesis.

blue
http://csounds.com/stevenyi/blue/index.html
blue is a java program for use with Csound. It's interface is much
like a digital multitrack, but differs in that there timelines within
timelines (polyObjects). This allows for a compositional organization
in time that seems to me to be very intuitive, informative, and
flexible. soundObjects are the building blocks within blue's score
timeline. soundObjects can be lists of notes, algorithmic generators,
python script code, csound instrument definitions, and whatever
plugins that are developed for blue. these soundObjects may be text
based, but they can be completely GUI based as well.

ID3.py
http://id3-py.sourceforge.net/
This module allows one to read and manipulate so-called ID3
informational tags on MP3 files through an object-oriented Python
interface.

id3reader.py
http://www.nedbatchelder.com/code/modules/id3reader.html
Id3reader.py is a Python module that reads ID3 metadata tags in MP3
files. It can read ID3v1, ID3v2.2, ID3v2.3, or ID3v2.4 tags. It does
not write tags at all.

PyID3
http://icepick.info/projects/pyid3/
pyid3 is a pure python library for reading and writing id3 tags
(version 1.0, 1.1, 2.3, 2.4, readonly support for 2.2). What makes
this better than all the others? Testing! This library has been
tested against some 200+ MB of just tags.

OSC.py
http://web.tiscali.it/mupuxeddu/csound/OSC.py
Python classes for OpenSoundControl library client functionality. The
OSC homepage is at http://cnmat.cnmat.berkeley.edu/OpenSoundControl/

PMask
Python implementation of CMask, a stochastic event generator for
Csound.
http://web.tiscali.it/mupuxeddu/csound/index.html

winmidi.pyd
http://www.sabren.net/code/python/midi/
A demo? of a python extension interfacing to the native windows midi
libs. This was probably a development from this point
http://www.sabren.net/rants/2000/01/20000129a.php3

PyMIDI
http://www.hyperreal.org/~est/python/MIDI/
The MIDI module provides MIDI input parsers for Python.

Nam: not about music
http://www.quitte.de/nam.html
A Python Extension for Digital Music Applications. Its purpose is
Flexible realtime MIDI and audio processing and sequencing.

midi.py
http://groups.google.com/groups?hl=en&[email protected]
Python MIDI classes: meaningful data structures that represent MIDI
events and other objects. You can read MIDI files to create such
objects, or generate a collection of objects and use them to write a
MIDI file.

hYPerSonic
http://arrowtheory.com/software/hypersonic/index.html
hYPerSonic is for building and manipulating sound processing
pipelines. It is designed for real-time control. It includes objects
for oscillators, filters, file-io, soundcard and memory operations.

pyTTS
http://www.sourceforge.net/projects/uncassist
pyTTS is a Python wrapper for the Microsoft Speech API (SAPI). The
library requires Mark Hammond's win32com extension and SAPI 5.1+.


see also:
The Vaults of Parnassus:
http://www.vex.net/parnassus/apyllo.py/63131194
Pypi: http://www.python.org/pypi?:action=browse&asdf=338
 
C

Carlos Ribeiro

Why not post this list on the main Python Wiki? It seems something
nice to have there...

I just realized how badly worded the subject line of the prior posting
was on this topic... ;-)

Anyways,

Here's an update to the list (which is not comprehensive at this
stage), but which includes items that haven't been mentioned in Pypi
or in Parnassus:


blue
http://csounds.com/stevenyi/blue/index.html
blue is a java program for use with Csound. It's interface is much
like a digital multitrack, but differs in that there timelines within
timelines (polyObjects). This allows for a compositional organization
in time that seems to me to be very intuitive, informative, and
flexible. soundObjects are the building blocks within blue's score
timeline. soundObjects can be lists of notes, algorithmic generators,
python script code, csound instrument definitions, and whatever
plugins that are developed for blue. these soundObjects may be text
based, but they can be completely GUI based as well.

ID3.py
http://id3-py.sourceforge.net/
This module allows one to read and manipulate so-called ID3
informational tags on MP3 files through an object-oriented Python
interface.

id3reader.py
http://www.nedbatchelder.com/code/modules/id3reader.html
Id3reader.py is a Python module that reads ID3 metadata tags in MP3
files. It can read ID3v1, ID3v2.2, ID3v2.3, or ID3v2.4 tags. It does
not write tags at all.

PyID3
http://icepick.info/projects/pyid3/
pyid3 is a pure python library for reading and writing id3 tags
(version 1.0, 1.1, 2.3, 2.4, readonly support for 2.2). What makes
this better than all the others? Testing! This library has been
tested against some 200+ MB of just tags.

OSC.py
http://web.tiscali.it/mupuxeddu/csound/OSC.py
Python classes for OpenSoundControl library client functionality. The
OSC homepage is at http://cnmat.cnmat.berkeley.edu/OpenSoundControl/

PMask
Python implementation of CMask, a stochastic event generator for
Csound.
http://web.tiscali.it/mupuxeddu/csound/index.html

winmidi.pyd
http://www.sabren.net/code/python/midi/
A demo? of a python extension interfacing to the native windows midi
libs. This was probably a development from this point
http://www.sabren.net/rants/2000/01/20000129a.php3

PyMIDI
http://www.hyperreal.org/~est/python/MIDI/
The MIDI module provides MIDI input parsers for Python.

Nam: not about music
http://www.quitte.de/nam.html
A Python Extension for Digital Music Applications. Its purpose is
Flexible realtime MIDI and audio processing and sequencing.

midi.py
http://groups.google.com/groups?hl=en&[email protected]
Python MIDI classes: meaningful data structures that represent MIDI
events and other objects. You can read MIDI files to create such
objects, or generate a collection of objects and use them to write a
MIDI file.

hYPerSonic
http://arrowtheory.com/software/hypersonic/index.html
hYPerSonic is for building and manipulating sound processing
pipelines. It is designed for real-time control. It includes objects
for oscillators, filters, file-io, soundcard and memory operations.

pyTTS
http://www.sourceforge.net/projects/uncassist
pyTTS is a Python wrapper for the Microsoft Speech API (SAPI). The
library requires Mark Hammond's win32com extension and SAPI 5.1+.

see also:
The Vaults of Parnassus:
http://www.vex.net/parnassus/apyllo.py/63131194
Pypi: http://www.python.org/pypi?:action=browse&asdf=338


--
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: (e-mail address removed)
mail: (e-mail address removed)
 
A

andrea valle

Hi to all,
another basic question, but...
How do I access the name of an instance?

I.e., if I have:

class MyClass:
def __init__(self):
print "here we are, kids!"

and:
I'd like to have:

Thanks a lot

-a-


Andrea Valle
Laboratorio multimediale "G. Quazza"
Facoltà di Scienze della Formazione
Università degli Studi di Torino
(e-mail address removed)
 
P

Peter Otten

andrea said:
Hi to all,
another basic question, but...
How do I access the name of an instance?

I.e., if I have:

class MyClass:
def __init__(self):
print "here we are, kids!"

and:

I'd like to have:

There is no such thing as a name for an object, as many names in many scopes
may refer to the same object. The object has no way of knowing which names
refer to it.
However, you can take the brute force approach and just scan the scope you
are interested in, which may or may not be useful for debugging purposes.
.... return [n for (n, v) in scope.iteritems() if v is obj]
....
namesFor(a, globals()) ['a', 'b']
namesFor(c, globals())
['c']

And now with different scopes:
import sys
from sys import path as sys_path
namesFor(sys_path, globals()) ['sys_path']
namesFor(sys_path, vars(sys))
['path']

Peter
 
T

Terry Reedy

andrea valle said:
How do I access the name of an instance?

By giving __init__ a name param that you store as self.name so that the
instance really has a name. (def and class statements do something
similar)
---
class MyClass:
def __init__(self, name='No name'):
self.name = name
def __str__(self): return self.name

Terry J. Reedy
 
Ad

Advertisements

A

andrea valle

Thanks,
That was a possibility. But my idea was to not requiring the instance
to know explicitly about its name. I solved passing my receiving object
not the instance's name, but the instance directly.

-a-



By giving __init__ a name param that you store as self.name so that the
instance really has a name. (def and class statements do something
similar)
---
class MyClass:
def __init__(self, name='No name'):
self.name = name
def __str__(self): return self.name

Terry J. Reedy
Andrea Valle
Laboratorio multimediale "G. Quazza"
Facoltà di Scienze della Formazione
Università degli Studi di Torino
(e-mail address removed)
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top