Skip to content

Commit

Permalink
Add sample ScratchML in xml and json
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiew committed Jan 25, 2012
1 parent fa870af commit 40438a0
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config.ru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$stdout.sync = true

use Rack::Static,
:urls => ["/css", "/js", "/images"],
:urls => ["/css", "/js", "/images", "/spec"],
:root => "."

run lambda { |env|
Expand Down
84 changes: 84 additions & 0 deletions spec/scratchml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"sml": {
"version": {
"major": "0",
"minor": "6"
},
"info": {
"client": "Cutcapture 9000 version 1.1",
"author": {
"name": "Qbert",
"url": "http://www.djqbert.com",
"location": {
"description": "San Francisco, CA",
"latlon": "32.44, 22.34"
}
},
"description": "Crab/flare combo, 1998",
"tags": "crab, flare, old",
"created": "2012-07-17T09:24:17Z",
"url": "http://scratchml.com/data/340923"
},
"audio": {
"sample": {
"filename": "samples/fresh.wav",
"deck": "left"
}
},
"performance": {
"turntable": {
"deck": "left",
"samplerate": "375",
"data": {
"p": [
"1000.02",
"1010.32",
"1020.34",
"1030.23"
]
}
},
"mixer": {
"fader": {
"hamster": "true",
"data": {
"events": [
{
"t": "0",
"p": "0"
},
{
"t": "1736",
"p": ".5"
},
{
"t": "2362",
"p": "1"
},
{
"t": "3034",
"p": ".5"
}
]
}
}
}
},
"transcription": {
"turntable": {
"deck": "left",
"scratch": {
"name": "flare",
"curve": {
"t": "0",
"p": "0"
},
"line": {
"t": "1000",
"p": "1000"
}
}
}
}
}
}
107 changes: 107 additions & 0 deletions spec/scratchml.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<sml>
<version>
<major>0</major>
<minor>6</minor>
</version>

<info>
<client>Cutcapture 9000 version 1.1</client>
<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>
<tags>crab, flare, old</tags>
<created>2012-07-17T09:24:17Z</created>
<url>http://scratchml.com/data/340923</url>
</info>

<audio>
<sample>
<filename>samples/fresh.wav</filename>
<description></description>

<deck>left</deck>
<start></start>
<stop></stop>
</sample>
</audio>


<performance>
<turntable>
<deck>left</deck>
<samplerate>375</samplerate>
<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>
<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>


<transcription>
<turntable>
<deck>left</deck>

<scratch>
<name>flare</name>
<curve>
<t>0</t>
<p>0</p>
</curve>
<line>
<t>1000</t>
<p>1000</p>
</curve>
</scratch>
</turntable>
<mixer>
<fader>

<move>
<t>1000</t>
<p>center</p>
</move>

<click>
<t>1500</t>
<p>right</p>
</click>

<crab>
<p>right</p>
<clicks>3</clicks>
<t>
<start>3000</start>
<end>3400</end>
</t>
</crab>
</fader>
</mixer>
</transcription>
</scratch>

1 comment on commit 40438a0

@kylemcdonald
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 when the json and xml specs disagree, the xml spec is definitive.
2 when we make a commit to these files that causes a change in meaning, we should bump the minor version number.
3 the most likely part to change is the transcription>turntable>scratch part.

Please sign in to comment.