4 ms·
Show HN: Midibin – Turn Clojure code into MIDI music
- vikeri 8y agoSuper cool! Even though I'm far from musical I instantly got the urge to come up with some tunes :)
- giancarlostoro 8y agoIt is amazing never thought about how you could translate a music sheet to Lisp but it makes total sense... Also somewhat relevant though not in Lisp for anyone interested in programming music check out Sonic Pi: https://sonic-pi.net/ https://sonic-pi.net/ I'm not affiliated with that project, just find it fun. It's in Ruby btw, I'm not a Rubyist but when it comes to Vagrant and Sonic Pi that's the full extent of my Ruby usage.
- chrismorgan 8y agoLilypond is best-in-class and is in Scheme; it uses a DSL for friendliness, but it all comes down to Scheme after that.
- simongray 8y agoYou know, Sam Aaron, the guy who made Sonic Pi, actually started out making his music in Clojure before focusing on Sonic Pi. He's behind the pretty awesome Overtone library: https://github.com/overtone/overtone https://github.com/overtone/overtone
- math 8y agoDavid Cope used lisp for his 'Experiments in Musical Intelligence'. Lisp is very suited to this problem, and it's through his books that I first 'got' lisp (at the time, I was trying to do something similar in Java). Anyone interested in algorithmic composition should absolutely check out his work. http://www.computerhistory.org/atchm/algorithmic-music-david-cope-and-emi/ http://www.computerhistory.org/atchm/algorithmic-music-david... http://artsites.ucsc.edu/faculty/cope/cmmc.html http://artsites.ucsc.edu/faculty/cope/cmmc.html
- kennywinker 8y agoThe editor auto-linting my input is incredibly frustrating - try pasting anything of complexity in, for example.
- r-w 8y agoA tempo-correct version of the default tune, which was really getting on my nerves: [:piano {:tempo 130} 1/8 :c :c 5/8 :a 1/8 :f :g :f 3/4 :d 1/8 :d :d 5/8 :a# 1/8 :g :a :g 3/4 :e 1/8 :e :e 5/8 :+c 1/8 :a :a# :+c 3/4 :+d 1/8 :f :g 5/8 :a 1/8 :e :f :g 3/4 :f]
- gw 8y agoThanks i posted your version here https://midibin.com/midi/7 https://midibin.com/midi/7
- r-w 8y agoI don’t want to minimize any of the work being put into this, which is clearly not a trivial amount, and is actually quite interesting and useful for learning purposes. That being said, I have some blunt criticism to offer that I hope provides some context as to what kind of tooling is useful in this space: I’m not sure I would prefer this over a different (probably visual) tool that facilitates, e.g., ensuring that a given set of notes fits into a measure, or checking which notes are played simultaneously. It also frustratingly does not take advantage of any of Clojure’s functional affordances, such as the ability to transform data programmatically, and does introduce global state, harkening back to C’s misplaced notion of “macros”. Not much here seems Clojure-specific other than the sometimes confusing dynamic behavior, such as implicit list interpolation, and JS interop. All that said, I hope this becomes more than just a Lisp-based clone of an existing format with mature tooling: http://lilypond.org/text-input.html http://lilypond.org/text-input.html
- gw 8y agoYou actually have full access to ClojureScript functions, including all data transformation functions. I just didn't make use of them in any of the posted midis. Also i have no idea what global state you are talking about.
- gw 8y agoHere is an example that uses functions: https://midibin.com/midi/11 https://midibin.com/midi/11
- boo_boo 8y agoAnyone into both Clojure and music production should look into Overtone: https://github.com/overtone/overtone https://github.com/overtone/overtone It's essentially a synthesizer in a REPL + a multitude of other capabilities (sequencing, sampling, MIDI)
- lorenzosnap 8y agoI always have the radio on when I am on my pc... but hey this is so cool ... so cool ... that I had to turn the radio off well done