-
-
Save kylemcdonald/1659303 to your computer and use it in GitHub Desktop.
ScratchML draft spec v3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> | |
<time>0</time> | |
<position>0</position> | |
</event> | |
<event> | |
<time>1736</time> | |
<position>.5</position> | |
</event> | |
<event> | |
<time>2362</time> | |
<position>1</position> | |
</event> | |
<event> | |
<time>3034</time> | |
<position>.5</position> | |
</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) --> | |
<time>0</time> | |
<position>0</position> | |
</curve> | |
<line> <!-- lines: transformer, chirps (derivative = (next-cur)/length) --> | |
<time>1000</time> | |
<position>1000</position> | |
</curve> | |
</scratch> | |
</turntable> | |
<mixer> | |
<fader> | |
<!-- move means the fader is cutting in or out --> | |
<move> | |
<time>1000</time> | |
<position>center</position> | |
</move> | |
<!-- a click is a very short, temporary move --> | |
<click> | |
<time>1500</time> | |
<position>right</position> | |
</click> | |
<!-- a crab is a sequence of evenly spaced clicks --> | |
<crab> | |
<position>right</position> | |
<clicks>3</clicks> | |
<time> | |
<start>3000</start> | |
<end>3400</end> | |
</time> | |
</crab> | |
</fader> | |
</mixer> | |
</transcription> | |
</scratch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment