Skip to content

Instantly share code, notes, and snippets.

@jamiew
Created January 22, 2012 17:15
Show Gist options
  • Save jamiew/1657723 to your computer and use it in GitHub Desktop.
Save jamiew/1657723 to your computer and use it in GitHub Desktop.
ScratchML draft spec v3
<scratch>
<!--
* info -- general file metadata: author info, client info et al
* audio -- info + raw data for audio recording, or links to external files
* transcription -- turntable markup (TTM)-style notation of fader cuts & hand movements
* turntable - hardware metadata
* mixer -- hardware metadata
* data -- actual fader/hand event data.
data field should always be specified last as it can be streaming (from a realtime feed)
all fields required unless otherwise specified
DRAFT
http://scratchml.com
-->
<info>
<client>Cutcapture 9000 version 1.1</client> <!-- sml generator -->
<author>
<name>Qbert</name>
<location>San Francisco, CA</location> <!-- can be a string or a GPS pair like (32.44..., 22.34...) -->
</author>
<description>Crab/flare combo 1998</description> <!-- commentary -->
<tags>foo, bar,baz</tags> <!-- comma-separated keywords -->
<created_at></created_at> <!-- TODO ISO-9600 whatever formatted time (human-readable) -->
<permalink>http://scratchml.com/data/34</permalink> <!-- optional, added on upload -->
</info>
<audio> <!-- this is raw, recorded data -->
<format>base64</format> <!-- base64 compresses dense, evenly spaced data -->
<samplerate>
<!-- this data could be in different formats, depending on the input source (fps, samples, etc) -->
<audio>44100</audio>
<buffer>128</buffer>
</samplerate>
<data>...bWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=</data>
<!-- TODO how would we specify a remote file? -->
<!-- or even a youtube video link -->
<!-- also a link for an image of the TTM notation -->
</audio>
<!-- *** this kind of stuff should maybe just be in the [info] metadata -->
<!-- unless some of this data is required? -->
<turntable>
<brand>Technics</brand>
<make>1200 M3D</make>
<!-- pitch if not default (??) -->
</turntable>
<mixer>
<brand>Rane</brand>
<make>TTM-56SL</make>
<hamster>true</hamster>
<contour>fast</contour> <!-- *** TODO per-fader countour data -->
</mixer>
<!-- this is transcribed, notated information -->
<!-- json-friendly-style, not using attributes... -->
<transcription>
<scratch>
<name>flare</name>
<line> <!-- lines: transformer, chirps (derivative = (next-cur)/length) -->
<time>1000</time> <!-- ms -->
<position>0</position> <!-- ??? units -->
<curve> <!-- curve: baby, scribble, etc (derivative = 0) -->
<time>3000</time>
<position>1.4</position>
</curve>
</scratch>
<move>
<time>1000</time>
<position>center</position> <!-- left is open -->
</move>
<click>
<time>1500</time>
<position>right</position> <!-- left click -->
</click>
<move>
<time>2</time>
<position>right</position> <!-- left is closed -->
</move>
<move>
<time>3</time>
<position>center</position> <!-- left is open -->
</move>
<crab>
<position="right"> <!-- three click crab -->
<!-- *** click-timings should be optional...
if blank should assume a smart default based on average click time (???) -->
<clicks>
<click><time>3250</time></click>
<click><time>3500</time></click>
<clicks><time>3750</time></click>
</clicks>
</crab>
<move>
<time>5000</time>
<position>right</position> <!-- left is closed -->
</move>
</transcription>
</scratch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment