Skip to content

Instantly share code, notes, and snippets.

Forked from jamiew/scratchml.xml
Created January 22, 2012 23:19
Show Gist options
  • Save kylemcdonald/1659303 to your computer and use it in GitHub Desktop.
Save kylemcdonald/1659303 to your computer and use it in GitHub Desktop.
ScratchML draft spec v3
* 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
<client>Cutcapture 9000 version 1.1</client> <!-- sml generator -->
<description>San Francisco, CA</description>
<latlon>32.44, 22.34</latlon>
<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></url> <!-- added on upload if not present -->
<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 -->
<!-- this is the raw version -->
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.
<samplerate>375</samplerate> <!-- in samples per second. every 128 samples @ 48KHz = 375 samples/second -->
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
<!-- this is transcribed version -->
<!-- there are multiple labelled scratches -->
<curve> <!-- curve: baby, scribble, etc (derivative = 0) -->
<line> <!-- lines: transformer, chirps (derivative = (next-cur)/length) -->
<!-- move means the fader is cutting in or out -->
<!-- a click is a very short, temporary move -->
<!-- a crab is a sequence of evenly spaced clicks -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment