-
-
Save thomasballinger/f72c2a4ca5dba8d1b38db33458962ef1 to your computer and use it in GitHub Desktop.
a simple remix file format | |
Files are always UTF-8 | |
a syntax like | |
episode <episode query> of <podcast url> | |
play from <time> to <time> [at 2x speed] [at +12 dB] | |
example: | |
remix v. 0.1 | |
episode 17 of "http://mypodcast.com/feed.rss" | |
play from 0:00 to 1:23:45.678 at 2x speed at +12 db | |
play from 0:01 to 0:02 at .7x speed at +20 db | |
episode 14 of "http://mypodcast.com/feed.rss" | |
play from 0:00 to 1:23:45.678 | |
episode 12 of "http://mypodcast.com/feed.rss" | |
play | |
Grammar: | |
<session> ::= (<version> \n)? <section> (\n <section>)* | |
<section> ::= <track spec> \n (<play stmt> \n)* | |
<track spec> ::= <episode query> of <feed url> | |
<episode query> ::= title=".*" | \d+ | |
<play stmt> ::= play <duration>? <modifier>* | |
<duration> ::= from <time> to <time> | |
<modifier> ::= <speed>|<loudness>|((at|with|as) ^(at|with|as)*) | |
<speed> ::= at <float>x | |
<loudness> ::= at [+-]<float> dB | |
<time> ::= beginning|end|<hms>|<ms> | |
<hms> ::= (\d*:)?\d\d?:\d\d?([.\]d+) | |
<ms> ::= \d+ | |
<float> ::= (\d?[.]\d+)|\d+ |
And also doesn't have (speed)?
.
Hi Tom! Came here from your tweet. Do you know about Edit Decision Lists? Seems relevant, and they tend to be more terse than what you've got here.
Mplayer2's EDL format (found in a random pastebin) in particular has an idea for giving a file an identifier so you can switch between files as you mix them without having to re-specify the file's location.
You could almost have a separate section of "variable declaration" for all of the sources, and then use them separately... with an implicit "state machine" holding a reference to the last defined file. Using f1
as a placeholder for some user-specified identifier...
remix v. 0.1
f1 episode 17 of "http://mypodcast.com/feed.rss"
play from 0:00 to 1:23:45.678 at 2x speed at +12 db
play from 0:01 to 0:02 at .7x speed at +20 db
episode 14 of "http://mypodcast.com/feed.rss"
play from 0:00 to 1:23:45.678
f1 play from 0:01 to 0:02 at .7x speed at +20 db
episode 12 of "http://mypodcast.com/feed.rss"
play
f1 play from 0:01 to 0:02 at .7x speed at +20 db
Also missing from this is the ability to specify a file directly, i.e. not from an RSS feed:
file "http://example.com/something.mp3"
And I think a more terse format for specifying intervals/duration, speed, volume would be nice, having to always have the word play in there seems redundant - so why not just leave it out?
0:00-0:23:45.678 2x +12 db
0:01+30
+30
2x
would correspond to
play from 0 to 23.45.678 seconds, at double speed, raising the volume by 12 decibels
play from 1 second in for 30 seconds.
play the first 30 seconds
play entire file at 2x speed
Speed at
\d+x
doesn't allow.7x
from your example.