[PD] Writing a MIDI file...or at least a qlist...to disc
richard.bowers at ntlworld.com
Wed Oct 11 23:31:01 CEST 2006
Many, many thanks, Frank (and Kyle). I'll get on the case when I'm more
alert. Tiredness can kill when driving PD ... So I'll pick up the thread
From: pd-list-bounces at iem.at [mailto:pd-list-bounces at iem.at] On Behalf
Of Frank Barknecht
Sent: 11 October 2006 22:14
To: pd-list at iem.at
Subject: Re: [PD] Writing a MIDI file...or at least a qlist...to disc
Richard Bowers hat gesagt: // Richard Bowers wrote:
> Basically, I'm running a PD patch on a Mac which is sending
> (internally, not through hardware) MIDI note on/off pairs to another
> program (Arkaos). I would like to be able to capture the MIDI stream
> within PD (or the numeric values on which the MIDI notes are based)
> into a file for later retrieval. So
> 1) is there a purpose-built object which will handle this? or
> 2) can a file be written to disc as a qlist? If so, could someone
> describe how to write such a file?
You can write a qlist's content using "write FILENAME", but I guess, you
know this already. The important thing to remember with qlist is that it
stores lists conisting of at least three elements: First the "Inter
Onset Interval" or IOI, which is the time between successive events,
then the name of a receiver, which receives the qlist data, if the qlist
is playing back, and after that the actual data to record:
qlist: IOI receiver data ...
"data" can be a list itself, in your case it is a note events consisting
of note number and velocities. Then you need to build the other two
elements: Just decide on a receiver name (attached patch uses "NOTEIN")
and calculate the IOI. IOI-calculation is very simply done by
double-banging a [timer]:
"events, events, ..."
[t b b]
At the start of a recording, you should reset the [timer] to 0 through
its left(!) inlet, and you should "clear" the qlist.
Attached is a working example, but maybe you want to try to build a
qlist-recorder on your own first. It shouldn't be too hard if you follow
the hints above.
Frank Barknecht _ ______footils.org_ __goto10.org__
More information about the Pd-list