Translate DAW (from GUI-world) to ASCII (to text-world) as "Fast DUB Prototyping" approach.
I spent lots of time using DAWs just for settings up pet projects, sandboxes, laboratories, etc.
Just having fun and brainstorming is difficult because I don't have enough instruments for playing music.
Since technology is a good solution because it's already cheap, I would like to have a "tool" for writing DUB in text format.
TODO: About
FIXMEin builder.js.
- scribbletune for the rhythm-box, since it's pattern-based and use pure array-values it can be abstracted easily
- jsmidgen for creating the MIDI data on NodeJS, support for browsers is already done by scribbletune
Each expression would generate a value or an array of values, sub-expressions are resolved and would produce one or more values, etc.
Once declared, all expressions are concatenated into a single array where possible.
# track 1
@instrument: 1
%sequence: x--- *16
%range: 10..120 /11
notes: c3 d3
pattern: %sequence
accentMap: 5 %range 127x3
The code above would produce the next scribbletune's settings:
{
notes: ['c3', 'd3'],
pattern: 'x---'.repeat(16),
accentMap: [5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 127, 127, 127],
}When calling dub it will use timidity as default for MIDI playback.
- If you specify a file, it will be loaded an played. e.g.
dub sample(.dubwill be appended if missing) - Opening a directory will watch and play on any changes. e.g.
dub music/src/
Use a different player by appending the arguments:
$ dub music/src fluidsynth -i --gain 2 music/sf2/PC51f.sf2
# under the hood it will be called as `fluidsynth music/sf2/PC51f.sf2 path/to/generated_midi_file.mid`
Try the included examples:
$ dub examples/billy_jean.dub
$ dub examples/locks.dub
$ dub examples/x.dub
To enable the Drumkit you must use the channel 9, e.g.
@tempo: 90
# hat
@channel: 9
notes: f#2
pattern: xxxx *16
# snare
notes: e2
pattern: [---x][-x] *32
Note/Sound Mappings
d1— Heart Bitd#1— Zapg1— Sticka1— Side Sticka#1— Ring Bellb1— Acoustic Bass Drumc2— Bass Drum 1c#2— Side Stickd2— Acoustic Snared#2— Hand Clape2— Electric Snaref2— Low Floor Tomf#2— Closed Hi Hatg2— High Floor Tomg#2— Pedal Hi-Hata2— Low Toma#2— Open Hi-Hatb2— Low-Mid Tomc3— Hi-Mid Tomc#3— Crash Cymbal 1d3— High Tomd#3— Ride Cymbal 1e3— Chinese Cymbalf3— Ride Bellf#3— Tambourineg3— Splash Cymbalg#3— Cowbella3— Crash Cymbal 2a#3— Vibraslapb3— Ride Cymbal 2c4— Hi Bongoc#4— Low Bongod4— Mute Hi Congad#4— Open Hi Congae4— Low Congaf4— High Timbalef#4— Low Timbaleg4— High Agogog#4— Low Agogoa4— Cabasaa#4— Maracasb4— Short Whistlec5— Long Whistlec#5— Short Guirod5— Long Guirod#5— Clavese5— Hi Wood Blockf5— Low Wood Blockf#5— Mute Cuicag5— Open Cuicag#5— Mute Trianglea5— Open Trianglea#5— Cabasa 2c6— Curtain
Those are enabled through the @instrument annotation, e.g.
@tempo: 127
# skank
@instrument: 1
notes: c4|d#4|g4 % % c4|f4|g#4
pattern: -x-x *16
Number/Sound
0-7— Piano8-15— Chromatic Percussion16-23— Organ24-31— Guitar32-39— Bass40-47— Strings48-55— Ensemble56-63— Brass64-71— Reed72-79— Pipe80-87— Synth Lead88-95— Synth Pad96-103— Synth Effects104-111— Ethnic112-119— Percussive120-127— Sound Effects