General Usage

Example Handel Snippet#

start
chunk example
play E3, C3, G3 for 2b
endchunk
run example with sound piano, loop for 5
finish

Example Using Handel In Browser#

function clicked(){
Handel.RunHandel(`
start
chunk example using somePlayable
play somePlayable
rest for 1b
endchunk
save myPlayable = Eb3 for 1b
run example using myPlayable with sound piano, loop for 5
finish
`)
}
document.addEventListener("click", clicked);

Note that you pass the Handel code into the RunHandel function Handel.RunHandel(someHandelCode).

To compile to midi, pass a config object to the RunHandel function with outputMidi set to true.

const config = {outputMidi: true};
Handel.RunHandel(`start play E4 for 1b finish`, config);

Additionally, you can use the StopHandel function to stop a running Handel program. Handel.StopHandel()