------------------------------------------------------------------------ Xenharmonic Moving Windows 26 August, 2001. Introduction: This document describes a procedure for applying tunings with more than twelve pitches per octave to MIDI instruments. It presents these tunings twelve pitches at a time, to facilitate their use by musicians having access to and experience with the tools of traditional 12-note music -- notation and ear training, keyboards and fingering, staff paper and sight-reading, and so on. The procedure is described in the context of a software implementation for Microsoft Windows. The software appears to Windows as a MIDI device, accepting MIDI-in from other MIDI devices and sending its own MIDI-out in real time (with total "latency" less than 5 ms). We call MIDI IN channels "control" channels and MIDI OUT channels "window" channels. Window channels produce sound. They comprise the local 12-tone view of the larger virtual tuning. Control channels allow the musician to move this window around in the larger tuning. Both Pitch Bend and MTS (Midi Tuning Standard) should be implemented on the MIDI-out side. Pitch Bend is supported by nearly all MIDI synthesizers, but is not as flexible as MTS. The software should be able to seamlessly acquire MIDI channels across multiple instruments. Output: (1) Standard MIDI out The General MIDI 2 (1999) standard should be sufficient. (2) Save-to-file (.mid) The software has a MIDI buffer which may be dumped to a MIDI file using standard MFC 'save-as' dialogs. (3) Save-to-file (.txt) The software generates a standard text file from the MIDI buffer, showing the final tuning of each event as cents deviation from 12-tET. Input: (1) Reference pitch (1-128) The given MIDI note and its default pitch are taken as a reference point. (2) Retune method (Pitch Bend or MTS) For each MIDI instrument, the user selects either Pitch Bend or Midi Tuning Standard. (3) MIDI channel setup The software displays two empty sequencer-style track sheets, one for window channels and one for control channels. The user populates these with MIDI channels from the devices defined in (2). A given MIDI channel can only appear in one sheet. For Pitch Bend devices, twelve channels at a time are acquired by the window channel sheet, where a bracket displays them as a group and gangs their settings together. (4) Window intervals (.scl) Twelve intervals are acquired from a standard Scala file^1. They are applied sequentially to tuning reference pitch (1) and the resulting pitches are mapped over the MIDI notes available on the window channel(s). (5) Window channel settings The window-channels sheet contains the following settings... mute volume pan patch ...which function as they would in a standard MIDI sequencer, and default to off, 63, 63, and 001, respectively. (6) Control channel settings The control-channels sheet contains the following settings... mute window channel # control type ...which default to on, "none", and "none", respectively. When mute is switched off, events sent on that channel are copied into the channel specified in its "window channel #" field, immediately after having the control effect specified in its "control type" field. A "window channel #" must be specified to enable the mute field. The "control type" field has the following possible values: "none", "diamond", "diamondrel", "cross", and "crossfree". If "none", events on the control channel do nothing to the window pitches. If "diamond", the choice of a note from that control channel is the choice of a position in the original list of window intervals. The list is rotated to this position and applied to the reference pitch in (1) to generate new window pitches.^2 If "diamondrel", the choice of a note from the control channel is the choice of a position in the current list of window intervals. The list is rotated to this position and applied to the reference pitch in (1) to generate new window pitches.^3 If "cross", the choice of a note from the control set is the choice of a pitch -- the pitch found on that note in the initial window mapping created in (4). This pitch is placed into (1), and the window pitches are rebuilt accordingly.^4 If "crossfree", things happen as in "cross", except the new reference pitch for (1) is taken from the current -- as opposed to the initial -- window mapping.^5 (7) Retune sounding notes? (Yes/No) When =Yes, tuning changes are applied to notes only at note-on. Implementation must support the issue of multiple tuning changes while a note is sounding, and apply only the last (most recent) tuning when the note finally gets a new note-on.^6 Notes: It is natural to imagine using this software with an organ, where the pedal is assigned to a control channel... with score entry software, where a particular staff may be assigned to a control channel... We suggest supporting a maximum of two simultaneous control channels; up to one each from the "cross_" and "diam_" types. The author would like to recognize Denny Genovese's contribution to the ideas presented here, and note that a similar strategy has been used by Wendy Carlos and was implemented on Kurzweil K2000 series MIDI equipment at her request. This document was inspired by a discussion with Robert Walker on the crazy_music mailing list (http://groups.yahoo.com/), and a version of the procedure described here is implemented in Fractal Tune Smithy (http://go.to/tunesmithy/). Footnotes: ^1 An error is returned if the file contains more than 12 intervals. ^2 The total tuning available to the musician with a single "diamond" control channel is the Partchian tonality diamond of the original window intervals. The reference note in (1) will always be the diamond's 1/1. ^3 This variant gives access to the same total tuning as "diamond", but offers a different way to think about the roots -- they are given relative to the window set currently in use, rather than to the original window set. ^4 This option confines the total tuning to the Cartesian cross product of the window intervals, with a maximum of 78 pitches (because the Cartesian cross product has a plane of mirror symmetry, the maximum number of pitches needed to play in every key of a scale with n notes is not n^2 but n(n+1)/2 -- the classic formula for the sum of natural numbers up to n). ^5 The result is similar to that of "cross", except the total tuning is unbounded, and the pitch at the chosen note will never change as a result of the choice. ^6 When the window intervals are in just intonation, =No facilitates "crunchy" (Keenan Pepper's term) suspended chords. ~ Carl Lumma Berkeley, California ------------------------------------------------------------------------