public
Last active — forked from kylemcdonald/scratchml.xml

ScratchML draft spec v5 -- with <time> and <position> as <t> and <p>

  • Download Gist
scratchml.xml
XML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
<sml>
<!--
 
# SCRATCH MARKUP LANGUAGE, WORKING DRAFT
http://scratchml.com
* version -- minor versions for small changes, major for incompatibilities
* info -- general file metadata: author info, client info etc.
* turntable - hardware metadata
* mixer -- hardware metadata
* audio -- info + raw data for audio recording, or links to external files
* transcription -- turntable markup (TTM)-style notation of fader cuts & record movements
* performance -- actual recorded fader/hand event data
most fields are optional. you can have a performance without a transcription, and vice versa.
no xml attributes are used, to aid in json/xml conversion.
all times are in milliseconds.
todo: pitch, per-channel volume, fader contour
 
-->
 
<version>
<major>0</major>
<minor>3</minor>
</version>
<info>
<client>Cutcapture 9000 version 1.1</client> <!-- sml generator -->
<author>
<name>Qbert</name>
<url>http://www.djqbert.com</url>
<location>
<description>San Francisco, CA</description>
<latlon>32.44, 22.34</latlon>
</location>
</author>
<description>Crab/flare combo, 1998</description> <!-- title/commentary -->
<tags>crab, flare, old</tags> <!-- comma-separated keywords -->
<created>2012-07-17T09:24:17Z</created> <!-- ISO-8601 -->
<url>http://scratchml.com/data/340923</url> <!-- added on upload if not present -->
</info>
 
<audio>
<sample>
<filename>samples/fresh.wav</filename> <!-- can be a local file, or a URL -->
<description></description> <!-- artist + title, break, or sample name -->
<!-- the following are used when working with multiple samples over a set -->
<deck>left</deck> <!-- which turntable -->
<start></start> <!-- when it starts during the performance -->
<stop></stop> <!-- when it stops during the performance -->
</sample>
</audio>
<!-- this is the raw version -->
<performance>
<turntable>
<!--
record movement is stored as a list of floats.
a 15 second performance at 375 Hz samplerate should be ~85KB
a record spinning at 33 1/3 rpm takes 1800 ms to do one rotation
so if you store a maximum of two decimal points, that's 500 samples per degree
which should be more than enough precision.
-->
<deck>left</deck>
<samplerate>375</samplerate> <!-- in samples per second. every 128 samples @ 48KHz = 375 samples/second -->
<data><p>1000.02</p><p>1010.32</p><p>1020.34</p><p>1030.23</p></data>
</turntable>
<mixer>
<fader>
<hamster>true</hamster>
<data>
<!--
0 means the fader is completely to the left
1 means the fader is completely to the right
normally 0 means that you can hear the left turntable
when hamster is true, 0 means you can hear the right turntable
-->
<event>
<t>0</t>
<p>0</p>
</event>
<event>
<t>1736</t>
<p>.5</p>
</event>
<event>
<t>2362</t>
<p>1</p>
</event>
<event>
<t>3034</t>
<p>.5</p>
</event>
</data>
</fader>
</mixer>
</performance>
<!-- this is transcribed version -->
<transcription>
<turntable>
<deck>left</deck>
<!-- there are multiple labelled scratches -->
<scratch>
<name>flare</name>
<curve> <!-- curve: baby, scribble, etc (derivative = 0) -->
<t>0</t>
<p>0</p>
</curve>
<line> <!-- lines: transformer, chirps (derivative = (next-cur)/length) -->
<t>1000</t>
<p>1000</p>
</curve>
</scratch>
</turntable>
<mixer>
<fader>
<!-- move means the fader is cutting in or out -->
<move>
<t>1000</t>
<p>center</p>
</move>
<!-- a click is a very short, temporary move -->
<click>
<t>1500</t>
<p>right</p>
</click>
<!-- a crab is a sequence of evenly spaced clicks -->
<crab>
<p>right</p>
<clicks>3</clicks>
<t>
<start>3000</start>
<end>3400</end>
</t>
</crab>
</fader>
</mixer>
</transcription>
</scratch>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.