One notable aspect of Handel is the behavior of its procedures, which are called chunks. Each chunk is conceptually a song track and all run chunks (from procedure calls) play at the same time. A run of a chunk can be customized by passing in arguments (ex. chords to use). The bpm, instrument, and loop amount of a run of a chunk can also be optionally set to further customize that run.
Open to questions and feedback!
Had long discussions with my brother (the family musician) on how to encode chords. At some point I even used the actual UTF characters for sharp and bemol and was a total nightmare to write :D
My effort is mostly abandoned (I switched to teach my kids to actually play!). Courage!
The editor is pretty barebones at the moment
A couple of things I noted:
- I couldn't work out how to run two chunks in sequence - I'm presuming the language doesn't support it yet, since none of the examples do it either?
- It would be nice if the "play" keyword accepted the "loop" syntax too (or something similar)
- On the web editor, despite the song reaching the finish, you have to press stop before you can press play again. It's a little thing, but I spent an embarrassingly long amount of time thinking it was just a firefox bug, copying my song to clipboard, refreshing the page and pasting it back in!
That said, have enjoyed playing with it. Any future plans?
Running two chunks in sequence is currently not supported, but I've been considering a separate block (or a customization of a run of a chunk) that could allow that behavior.
Adding looping functionality to play would also be a nice addition.
Future plans wise, in the short term I'm looking to address some bugs and proposed features. But generally want to get the interpreter to a stable state
In terms of extending, is there an easy interface for generating custom waveforms? Or alternatively, if I generate sine oscillator raw data just using javascript math functions, can I mix the resulting waveform into a Handel chuck that's already running?
My first though was that this would make a great basis for Visual Coding! Great Work ;)
I'm looking for something that helps my get back into chip-tunes composing. I used to be an ImpulseTracker junkie in the past.
start
chunk lefthand
play C3, Eb3, G3 for 2b
rest for 2b
endchunk
chunk righthand
play C3 for 1b
play Gb3 for 1b
play Eb3 for 1b
play Db3 for 1b
endchunk
run lefthand with loop for 100
run righthand with loop for 100
finish
1. Readability:
Ex.
start
play E3, Ab3 for 1b
rest 5b
play E3, Ab3 for 1b
finish
It is somewhat intuitive to read the above without experience with the language (or with programming in general).
2. Procedures: You can create chunks (procedures), which are reusable. For example you can create a chunk which takes 3 chord playables as parameters and run that chunk with any arguments. And also stack those runs on top of each other (because all run chunks play at the same time).
Also apparently a naturalised British citizen without the umlaut [0]
EDIT check out his signature on [0] no umlaut so he was Handel even to himself!
So for repeating commands you can use this syntax:
play somenotelist for 1b loop for 5
Here is your code using the new feature: https://pastebin.com/bNwUHNaM
To make this more robust, I'll be looking to add looping constructs to allow more customized looping in the future.
I agree, it is still in its early stages.
Looking at your code it seems it would be useful to have a way to repeat a play command without a chunk.
I think something like: " play E4 for 1b rep 5 "
As a way to repeat something 5 times for example (and reduce duplicates) could be a future solution.
And no, the website is not using midi at all. Midi is a protocol for sending notes between devices, but there is neither any notes to be sent nor any connections to other devices, this is all local. My guess would be that Handel is using the various Audio APIs only.
I may be missing it from the description, but when I think "procedural" I think that I should be able to change the variables with math, or at the very least increment variables. Are there any examples of that?
For example, I would think I could play a scale with something like
save myPlayable = C1 for 1b
do
play myPlayable
myPlayable.note++
while (myPlayable.note < C2)So by procedural what is meant is that the there are chunks (which are Handel's procedures/functions).
Currently your code snippet can't be replicated in Handel. Looping is accomplished by telling a chunk to loop (giving it a number of times to loop). ex. run somechunk with loop for 100
But there is no arithmetic in the language. Adding arithmetic to playables like you mentioned could be a nice feature
save myNote as C1
save myPlayable = myNote for 1b
do
play myPlayable
save myNote as myNote + 1
while (myNote < C2)
(That is, the dot notation looked out of place given your language.)There are others that have been around for a lot longer and have incorporated many (all?) of the features you will start to long for if you use this sort of tool a lot.
Live-coding is an insanely geeky way to make music, but there are people out there doing quite interesting things with it. I use "interesting" deliberately ... I haven't heard anything that I've actually liked :)
Just FYI to the author, the code samples have dead scrollbars, due to pre elements having overflow: scroll set
And nice catch on the scroll bars, will fix, thanks!
The Handel interpreter uses Tone.js for scheduling and playing notes. But because there is only one Tone.Transport per page, changing the bpm of the Transport would change it for all tracks.
So instead of using Tone.js for setting bpms, the note lengths are calculated based on the bpm and amount of beats, and scheduled in seconds. Which could lead to greater imprecision over time
For now there are a couple examples in the examples folder here: https://github.com/ddj231/Handel/tree/master/Examples
that demo the current core language features.
One thing that would be helpful that I didn't see would be able to write transformations of chunks. For a few examples: (1) taking a chunk and replaying it in a different scale (or with a different starting note), (2) having the end of a chunk resolve to the tonic up an octave, (3) inverting or chunking chords following common patterns.
It would also be great if instead of just outputting midi, it could also output either to engraved music, or to some other format (e.g., LilyPond) that someone could then use to create a PDF.