A simple goal, to directly connect Emacs to running hardware and software synthesisers with realtime control. Emacs as a musical instrument. I already use code to control synths (as Repl-Electric ) but there is a level of indirection between the code and the effect on the music. You push keys on your computer keyboard and nothing happens. Only when you run the code does the music change. I wanted…
Exploring patterns as a means of documenting Clojure functions to aid recall and understanding. Whats the difference in Clojure between: partition and partition-all ? interpose and interleave ? cons and conj ? Documenting Functions All non-side effecting functions create or alter a pattern. To explain a function’s pattern we use a number of descriptions. A function signature: (nthrest n col)…
Procedurally generating music, scoring generations based on an audio service (like SoundCloud) identifying it as an existing song/artist. The more famous the track/artist the better. Machines identifying audio tend to: Reduce the audio features to their essence (facilitating fast lookup or accuracy on a sliding scale). Rely on computer vision techniques to create audio fingerprints. Account for…
Exploring techniques for creating live coded performances with Overtone and OpenGL Fragment Shaders . Much learnt from my work performing as Repl Electric . All my shader source code for these performances is open: https://github.com/repl-electric/cassiopeia/tree/master/resources/shaders To bring OpenGl to Clojure I use Shadertone written by rogerallen . This utilises LWJGL (Java Light Weight Java…
Emacs is designed for fast, highly customisable manipulation of text. ASCII animation requires manipulating text at a sufficient speed that it appears animated. Emacs is also used by a number of performers to live code musical & visual performances (and many other things). Where the audience can see the code in emacs and hear it. In my live coding performances as Repl Electric I’ve used…
I’ve been working over the last year in the data team at SoundCloud building a realtime data pipeline using Clojure and Amazon’s Kinesis. Kinesis is Amazons equivalent to Kafka, “Real-Time data processing on the Cloud”. This is a summary of what was built, some lessons learnt and all the details in-between. Fig1: Overall System flow Tapping Real traffic The first step was…
Using Clojure we create interesting 3D shapes in Minecraft to the beat of music generated from Overtone. We achieve this by embedding a Clojure REPL inside a Java Minecraft server which loads Overtone and connects to an external Supercollider instance (What Overtone uses for sound). Demo Demo Source code: https://github.com/josephwilk/clj-minecraft/blob/master/src/cljminecraft/overtone.clj Tools…
Live coding is the act of turning a programming session into a performance. This can constitute improvisation, music, visuals, poetry, hardware, robots, dance, textiles and people. Pretty much anything with an input and output can be controlled live by programming. This is not just a performance by programmers for programmers. While this is often where it starts as a live coder, the type of…
When Alan Turing asked if a machine can be intelligent one aspect of this question focused on “could machines be creative”? Ada Lovelace seemed convinced that originality was not a feat a computer was capable of: it can do whatever we know how to order it to perform, it has no pretensions whatever to originate anything Before we outrightly dismiss the idea of creative machines do we…
What does your brain sound like? Does it sound like “Rise of the Valkyrie” or more like “Hit me baby one more time”? Step 1: Acquire a human brain (alive) We are interested in capturing the brain waves. Specifically the: Delta waves: Deepest stages of sleep. Beta waves: Normal waking consciousness. Alpha waves: Relaxation and meditation (creativity). Theta waves: REM sleep…
At SoundCloud I’ve been experimenting over the last year with how we build the services that power a number of heavily loaded areas across our site. All these services have been built in Clojure with bits of Java tacked on the sides. Here are some of my personal thoughts on how to build Clojure services: Netflix or Twitter At some-point when you require a sufficient level of scaling you turn…
Overtone is an open source audio environment which uses Clojure and SuperCollider (an environment and programming language for real time audio synthesis and algorithmic composition). Overtone makes it very easy to define instruments based on sound samples from freesound . We will walk through getting samples for a flute and then using them to define the flute instrument in Overtone. The Flute…
I recently contributed the Set data structure to the Elixir programming language. The Set is implemented through a HashSet. 1 2 3 4 s1 = HashSet . new ([ 1 , 2 , 3 , 4 ]) s2 = HashSet . new ([ 3 , 4 ]) Set . difference ( s1 , s2 ) # => HashSet<[1, 2]> Elixir’s Set implementation is often faster than Erlangs own sets . Which is pretty impressive since Elixir runs on the same Erlang VM. It…
Isolating external dependencies helps make testing easier. We can focus on a specific unit of code and we can avoid slow tests calling real services or databases. Clojure provides many different ways of achieving isolation. Lets explore what’s possible: Redefining functions We can redefine vars and hence functions in a limited scope with with-redefs The documentation suggests its usefulness…
So your talk got selected. Great! Oh Crap! Now hits the panic, you have to actually create a presentation. Every presenter wants to give the best possible presentation they can that sticks in peoples minds. Here are some hard earned lessons for getting the best out of your presentation. Accept that most of our preconceptions of how we learn are wrong. Forget those high information dense, black and…
Programming languages can be described as Dense. What does dense mean? Closely compacted in substance. Having the constituent parts crowded closely together: What does it mean for a programming language to be dense? I consider there are two axis for the density of programming languages: Density of syntax The syntax is very dense/compact. For example Assembly has a very dense syntax, abbreviate…
Being shouted at is not a lot of fun. So why do we shout in code? Shouting code Compare "how_many_monkeys_can_a_monkey_eat_before_it_explodes" and: "HOW_MANY_MONKEYS_CAN_A_MONKEY_EAT_BEFORE_IT_EXPLODES" How do you read those differently in your head? We associate capital letters with someone shouting. Now lets turn to two functionally equivalent pieces of Ruby code: 1 2 3 4 5 6 7 8 9 class Monkey…
We look at how neural networks work, what is different about a recurrent networks and a library which allows us to use recurrent networks in Ruby ( tlearn-rb ). What the heck is a Recurrent Network? First lets look briefly at how a neural network works: Neural Networks Neural networks use the model of neurones in the human brain. Put very simply the artifical neuron given some inputs (the…
Understanding Rhetoric is an essential skill for any programmer. Here is my introduction talk “Someone is wrong”, rhetoric for programmers. Video from Scottish Ruby conference Slides Further Reading Winning Arguments: From Aristotle to Obama – Everything You Need to Know About the Art of Persuasion Rhetological Fallacies What people said about this talk
A little RubyGem for faking out execution in your tests and inspecting afterwards what was run. Why FakeExecution? I’ve been creating internal tools for developers to help improve productivity. These tools written in Ruby, ended up doing lots of shell scripting. These scripts started becoming fairly complicated so I wanted some test feedback. How could I easily test execution? Enter…