Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install midi2sc

How to install midi2sc

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install midi2sc
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1 Available View build log
Windows (64-bit)
0.1 Available View build log
Mac OS X (10.5+)
0.1 Available View build log
Linux (32-bit)
0.1 Available View build log
Linux (64-bit)
0.1 Available View build log
 
Author
License
MIT
Imports
Lastest release
version 0.1 on Jan 5th, 2011

Installation

You can install midi2sc with easy_install:

$ easy_install midi2sc

However, you also need to install pkaudio and its dependencies.

Usage

midi2sc allows you to assign MIDI controllers to SuperCollider SynthDefs.

Configuration

An example configuration:

[SOSkick]

System Message: ERROR/3 (<string>, line 31)

Inconsistent literal block quoting.

midi_channel = 01 001 = amp_mul= AbsoluteControl(min=0.0, max=1.27, start_vel=100.0) 106 = mod_freq= IDC(min=2.0, max=20.0, steps=50, value=2.0) 107 = mod_index= IDC(min=2.0, max=20.0, steps=50, value=2.0) 108 = beater_noise_level= IDC(min=2.0, max=20.0, steps=50, value=18.0) 109 = decay= IDC(min=0.05, max=1.0, steps=70, value=0.3) noteon_args = out=18

This configuration will create and assign 7 controls: one of type AbsoluteControl, four of type IDC (IncDecControl). The two controls implicitly created are a NoteOnControl and a NoteOffControl.

The 001 midi controller is usually the modulation wheel. Here it's bound to the amp_mul argument of an SOSkick SynthDef. min is the value sent to the SuperCollider Synth when the wheel is at its lowest position, max the value at its highest position.

The 106 midi controller is bound to an endless encoder that sends relative values between 01 to 64 for increment and 127 to 065 for decrement. There's 50 steps between the min and max value. And the value at which we start is 2.0.

SuperCollider

This is how a SynthDef could look like that uses the configuration from before:

System Message: WARNING/2 (<string>, line 60)

Literal block expected; none found.

SynthDef("SOSkick", {

arg out = 0, freq = 50, mod_freq = 6.5, mod_index = 19.5, decay = 0.1, amp = 0.8, beater_noise_level = 0.001, amp_mul = 1.0;

var x; // ... Out.ar(out, x); });

Make sure you have your SuperCollider server up and SynthDefs loaded before you start midi2sc.

Starting midi2sc

On the command-line, midi2sc is run like this:

$ midi2sc

This assumes that you have a midi2sc.ini configuration file in the current working directory. You can also provide this filename as an option on the command-line. Refer to the built-in help for more options:

$ midi2sc --help

midi2sc will ask you for a MIDI port to bind to, and then it'll start a GUI that shows all sliders and finally drop you into an interactive shell with access to variables like dictionary of control handlers and the save_presets and load_presets functions. To save presets (values from all controllers) from a file on the Python shell and then load them again later, you write:

>>> save_presets('presets1.pickle', midi_in)
>>> # ... time passes
>>> load_presets('presets0.pickle', midi_in)

You can also load a new midi2sc.ini configuration:

>>> handlers.update(configure.read('midi2sc2.ini'))
Screenshot
http://danielnouri.org/media/midi2sc-01.png

System Message: WARNING/2 (<string>, line 106)

Explicit markup ends without a blank line; unexpected unindent.
alt:midi2sc's GUI together with Seq24

Development Status

midi2sc is somewhat mature, and I use it. At the same time it's a big hack and probably not thread-safe.

Change Log
0.1 - 2009-06-30
  • First release.

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:2

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.