Sexy Compositions and Luscious Rhythms
Testing SyntaxChecker.jj:
- ./javacc/javacc SyntaxChecker.jj
- javac *.java
- java SyntaxChecker test.txt
Installing midiutil:
python python-midiutil/setup.py install
Running string-to-midi converter:
python midi_generator.py "[60,1,100|64,1,100|65,1,100][64,1,100|67,2,100]"
Square braces denote a track, inside the square braces are notes delimited by |.
The notes are specified by pitch, duration (in quarter notes), volume.
To run scalr:
Bash:
function scalr1() { make -C parser clean; make -C parser run f="../"$@ > tempscalr.scalrlog; midistring=`tail -n1 tempscalr.scalrlog`; rm tempscalr.scalrlog;if echo $midistring | grep -Eq '^\[.*\]$' ; then python python-midi-generator/midi_generator.py $midistring; fi;}
alias scalr=scalr1
scalr test/tests-that-should-succeed/hello/hello.tscalr
Alternatively, you can run scalr (in the parser directory) as follows:
./scalr <file.tscalr>
scalr can be run from any directory, but it can't be moved from parser. Don't forget to chmod +x if it isn't already executable.