Page: http://wiki.cocoondev.org/Wiki.jsp?page=MIDI , version: 9 on Wed Aug 13 
00:19:20 2003 by MarkLeicester

- The MIDI block currently gives you a component to generate an XML 
representation from any MIDI file. The resulting XML format is called XMidi. 
XMidi was developed several years ago by Peter Loeb (see 
[http://www.palserv.com/XMidi/] for more information about the original code)
?                                    --                      ---  ------------- 
^^        ^            ^^^ ^^ ^^^^ -            ^^^^ ^^^^^^^^^^^^^^^^^

+ The MIDI block currently gives you components to generate XMidi from a MIDI 
file, and to serialize XMidi back to a MIDI file. XMidi is an XML format that 
was developed several years ago by Peter Loeb (see 
[http://www.palserv.com/XMidi/] for more information about the original code).
?                                             +                ^^       
+++++++++++++ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^ ^ ^^             
^^ ^                                                                            
                                                     +

- # Implement a MIDI serializer so that round trips are possible.
+ # Create some transformers to do some musical transformations of the XMidi, 
e.g. transposition, inversion, retrograde etc.
- # Create some transformers to do some amusing musical transformations of the 
XMidi, e.g. transposition, inversion, retrograde etc.
- The MIDI format itself provides very little presentation information thus 
limiting the scope of my second aim, but this block could well provide the 
catalyst for developments that encompass other XML formats for music (such as 
NIFF XML, MusicML, or perhaps a new markup for music).
+ The MIDI format itself provides very little presentation information thus 
limiting the scope of my second aim, but this block could well provide the 
catalyst for developments that encompass other XML formats for music (such as 
MusicXML, NIFF XML, MusicML, or perhaps a new markup for music).
?                                                                               
                                                                                
                                                                     ++++++++++

- To use the MIDIGenerator you must declare it as usual in your sitemap's 
{{<map:components>}} section thus:
?             ^^^

+ To use the XMidiGenerator you must declare it as usual in your sitemap's 
{{<map:components>}} section thus:
?            + ^^^

-   <map:generators default="file">
+   <map:generators ...>
-     <map:generator name="midi" 
src="org.apache.cocoon.generation.MIDIGenerator"
?                                                                   ^^^

+     <map:generator name="xmidi" 
src="org.apache.cocoon.generation.XMidiGenerator"
?                          +                                        + ^^^

+ 
+   <map:serializers ...>
+     <map:serializer name="xmidi" 
src="org.apache.cocoon.serializer.XMidiSerializer"
+       logger="midi.sitemap.serializer"/>
+   </map:serializers>
- To use the MIDIGenerator in your own pipelines just specify the location of 
the MIDI file in the {{src}} attribute of the {{<map:generate>}} element.
+ To use the XMidiGenerator in your own pipelines just specify the location of 
the MIDI file in the {{src}} attribute of the {{<map:generate>}} element. To 
serialize the XMidi back to MIDI just use the serializer in the normal way. The 
following pipeline generates a SAX stream representation in XMidi, and then 
serializers it back to MIDI: a round trip. I'll leave it to you to create the 
transformations that make this useful!
-   <map:generate type="midi" src="midi/prelude.mid"/>
+   <map:generate type="xmidi" src="midi/prelude.mid"/>
?                       +

-   <map:serialize type="xml"/>
?                          ^

+   <map:serialize type="xmidi"/>
?                          ^^^

- !!Sample Output
+ !!Sample XMidi


Reply via email to