Live data from Hacker News

Show HN: Handel – A procedural programming language for writing songs in browser

handel-pl.github.io

31–40 of 57 posts

Re: Show HN: Handel – A procedural programming language for writing songs in browser

#31
post #2

I started building Handel some weeks ago, as a simple way of writing music with code. While the livecoding movement focuses on providing solutions for performing music live with code, and making changes on the fly -- I focused on simple song writing (one reason why I wouldn't consider Handel an esoteric language). One notable aspect of Handel is the behavior of its procedures, which are called chunks. Each chunk is c…

How do you run two runnables at the same time? Like, chords for the left hand, and then the melody for the right?

Re: Show HN: Handel – A procedural programming language for writing songs in browser

#32
This looks wonderful.

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 

Re: Show HN: Handel – A procedural programming language for writing songs in browser

#34
This is really cool. I like domain languages like this a lot. I basically hand rolled a very primitive version of this for a game I made. I wonder if game devs in general would find it useful for prototyping, game jams, etc.

Just FYI to the author, the code samples have dead scrollbars, due to pre elements having overflow: scroll set

https://i.imgur.com/2LWhKWj.png

Re: Show HN: Handel – A procedural programming language for writing songs in browser

#35
post #2

I started building Handel some weeks ago, as a simple way of writing music with code. While the livecoding movement focuses on providing solutions for performing music live with code, and making changes on the fly -- I focused on simple song writing (one reason why I wouldn't consider Handel an esoteric language). One notable aspect of Handel is the behavior of its procedures, which are called chunks. Each chunk is c…

Syntax is very human readable, yet still expressive.

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 ;)

Re: Show HN: Handel – A procedural programming language for writing songs in browser

#36
post #12
post #9

Just FYI: Handel translates to „Trade“ in German. I think you picked it to refer to the composer „Händel”, right? Anyway I expected something different after reading the name ;)

Ever tried putting an umlaut in a URL?

RFC 3987 never really caught on.

See also https://www.w3.org/International/wiki/IRIStatus

Re: Show HN: Handel – A procedural programming language for writing songs in browser

#37
Looks interesting. I had spent a while playing around with LilyPond (http://lilypond.org/), and I think something like Handel would solve issues with some of the more repetitive parts of using LilyPond.

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.

Re: Show HN: Handel – A procedural programming language for writing songs in browser

#38
post #2

I started building Handel some weeks ago, as a simple way of writing music with code. While the livecoding movement focuses on providing solutions for performing music live with code, and making changes on the fly -- I focused on simple song writing (one reason why I wouldn't consider Handel an esoteric language). One notable aspect of Handel is the behavior of its procedures, which are called chunks. Each chunk is c…

Hi! I built something similar: https://fergonco.org/MusicJargon/ . I think you will find it interesting. It compiles to midi, though. Your browser support is quite a feature, indeed. 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 t…

Hi! Compiling to midi is also a great feature. I think having both the immediate feedback of hearing your compositions, and the ability to export to midi would be useful

Re: Show HN: Handel – A procedural programming language for writing songs in browser

#39
post #31
post #2

I started building Handel some weeks ago, as a simple way of writing music with code. While the livecoding movement focuses on providing solutions for performing music live with code, and making changes on the fly -- I focused on simple song writing (one reason why I wouldn't consider Handel an esoteric language). One notable aspect of Handel is the behavior of its procedures, which are called chunks. Each chunk is c…

How do you run two runnables at the same time? Like, chords for the left hand, and then the melody for the right?

On a basic level the program below would accomplish that (can't promise this sounds pleasing to the ear ;) -

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

Re: Show HN: Handel – A procedural programming language for writing songs in browser

#40
post #32

This looks wonderful. 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

Thanks!

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

Post reply on HN