Re: SVG and MIDI

Hi,

As I said before somewhere, I am currently working on an Assistant
*Composer* project, which needs to *write* SVG files containing MIDI
information. I'm going to start with the scheme described below,
though it will probably change as I go along.

Doing it like this means that clients don't need to look at the
graphics *at all* in order to play the score.

I could well imagine that this way of doing things may eventually
become the basis for an official standard, but such things take
time, and some proofs of concept...

Okay, so here's how I'm going to start:

First, a new namespace:
xmlns:midi="http://www.james-ingram-act-two/svgMidi.html"

This namespace is going to contain:
     midi:channel // for use in midi:svgType "Staff" (see below)
     midi:noteNumbers // for use in midi:svgType "Chord" (see below)
     midi:velocity // for use in midi:svgType "Chord" (see below)

The names of all the MIDI switches, controllers and commands:
     midi:patch
     midi:expression
     midi:volume
     midi:modulationWheel
     midi:breathControl
     midi:celeste
     midi:pan
     etc.

It will also contain names for sliders - controllers
which change continuously until their next instance (or some
default value):
     midi:expressionSlider
     midi:panSlider
     midi:portamentoSlider
     etc.
Sliders will probably be defined analogously to SVG's multisegment
lines, containing<startValue>,<endValue>  and<msDuration>  values.

The following types need to be defined too:
     midi:svgType="System" // a container for a sequence of "Staff"s
     midi:svgType="Staff"
     midi:svgType="Chord"
     midi:svgType="Rest"

     midi:msPos (int)
     midi:msDuration (int)

     midi:staffName (string) // My client (the Assistant Performer)
                             // needs this when setting performance
                             // options.

"System" midi:msPos is the (default) number of milliseconds from
the beginning of a performance.
"Chord" and "Rest" midi:msPos are the (default) number of
milliseconds from the beginning of the "System".
If defined, the "Chord"'s midi:msDuration defines when its noteOffs
are sent. By default, the noteOffs are sent at the time of the
following "Chord" or "Rest".

Here's an example of how I imagine using these names:

<svg xmlns="http://www.w3.org/2000/svg"
   xmlns:midi="http://www.james-ingram-act-two/svgMidi.html"  ...>

   <!-- draw page objects here (title, page numbers etc.) -->

   <!-- there will be a sequence of Systems in the page -->
   <g midi:svgType="System" midi:msPos="0">
     <!-- draw any System specific graphics here -->

     <!-- there will be a sequence of Staffs in the System -->
     <g midi:svgType="Staff" midi:staffName="Flute" midi:channel="0">
       <!-- a sequence of Chords, Rests and other objects -->
       <!-- possibly draw a clef here -->
       <!-- possibly draw a key signature here -->
       <!-- possibly draw a time signature here -->
       <g midi:svgType="chord"
          midi:msPos="0"
          midi:msDuration="3500"
          midi:midiPitches="64 67 83 90"
          midi:velocity="101"
          midi:patch="75"
          midi:expressionSlider="20 110 3500"
          <!-- etc. -->
       >
         <!-- draw the chord symbol (and any grouped objects) -->
       </g>   <!-- end of chord -->

       <g midi:svgType="Rest"
          midi:msPos="4000"
       >
         <!-- draw the rest (and any grouped objects) -->
       </g>   <!-- end of rest -->

       <!-- etc. more chords, rests, barlines etc. -->

     </g>   <!-- end of staff -->
     <!-- more Staffs -->
   </g>   <!-- end of system -->
   <!-- more Systems -->
</svg>

Does that make sense?

Is there any way to set up a special interest group for working on
this subject? Neither this forum, nor the SVG developers forum at
Yahoo seem specialized enough. It would also be nice if I could
find some sponsorship of some kind...

All the best,
James

p.s. I'm also sending this mail to the Yahoo group.

Received on Thursday, 4 November 2010 13:05:27 UTC