W3C home > Mailing lists > Public > www-svg@w3.org > November 2010

Re: SVG and MIDI

From: James Ingram <j.ingram@netcologne.de>
Date: Thu, 04 Nov 2010 14:04:46 +0100
Message-ID: <4CD2AF6E.8080106@netcologne.de>
To: www-svg@w3.org, helder.magalhaes@gmail.com, Domenico Strazzullo <nst@dotuscomus.com>

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:

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:

It will also contain names for sliders - controllers
which change continuously until their next instance (or some
default value):
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: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:midiPitches="64 67 83 90"
          midi:expressionSlider="20 110 3500"
          <!-- etc. -->
         <!-- draw the chord symbol (and any grouped objects) -->
       </g>   <!-- end of chord -->

       <g midi:svgType="Rest"
         <!-- 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 -->

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,

p.s. I'm also sending this mail to the Yahoo group.
Received on Thursday, 4 November 2010 13:05:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:29 UTC