Blog

A short guide to switching themes with CSS

User experience is paramount in web development, and a growing number of websites auto-adjust their frontend based on user preferences. For the purpose of demonstration, this guide will explore two methods for switching themes. First using the prefers-color-scheme media feature for setting the initial color scheme, and then enabling u… Read more »

What is in my toolbox

Tools are a means by which humans extend their capabilities and should not be taken for granted by those who use them. At the core of my workspace is the Lenovo ThinkPad T460s laptop running Ubuntu Linux with full disk encryption enabled. Attached to the laptop are a TKL mechanical keyboard and the UMC202HD audio interface. I don’t use… Read more »

Almost maximally even grooves

Maximal evenness is a common property of rhythmic timelines, especially in Latin America and sub-Saharan Africa, and is yet largely unknown in the wider drumming community. Put simply, a maximally even rhythm is one in which the number of onsets, or attack points, is distributed as evenly as possible among the pulses. For example, distr… Read more »

The easy way of serializing rhythm

Constraints provide an important framework for creative tasks. One example is the use of serial techniques to create atonal music, allowing all twelve notes of the chromatic scale to be featured the same number of times in the composition. Eventually, twentieth-century composers began expanding the system to include any, and in some cas… Read more »

Multi-key selection in Emacs

The org-mks function has been around for a long time. It stands for multi-key selection and lives in the org-macs.el library since 2013, but without much use outside org-capture and org-insert-structure-template. The interface is simple, allowing users to select from a list of choices by pressing keys, so here’s an example shared… Read more »

When to start a tihai

In Indian classical music, a tihai is a rhythmic phrase that repeats 3 times, usually with a gap/pause of some fixed duration between each phrase, and ends (often but not always) on the first beat of the next cycle. The problem then, at least for those of us who have not been exposed to tihais long enough, is determining when to start t… Read more »

Notes on polyrhythms

A polyrhythm is a sequence of two or more rhythms played simultaneously, but not all two rhythms create a polyrhythm in the strict sense of the term, and this is because (1) each rhythm has to be spaced evenly within the same time cycle (think tuplets), and (2) the number of onsets in rhythm A cannot be divisible by the number of onsets… Read more »

Parental controls

I haven’t put too much thought on parental controls, and I’m not sure I fully agree with it. Either way, recently I began giving my 2-year-old one small dose of 30 flexible minutes of screen time using mpv and a few handmade Bash and Lua scripts.  Read more »

Listening to music from the terminal

Not too long ago silent and solitary music listening was not possible. Only with the advent of personal stereos and headphones were humans capable of creating personalised soundtracks and engaging with them privately. Eventually, headphones became a means of negotiating social interaction in crowded urban environments, making it harder… Read more »

Binary permutations in Lisp

In the book The Elements of Rhythm Volume I rhythms are made using binary strings of N bits, where each bit or binary digit represents one of two values (0 and 1). This means there are 2 possible combinations in 1 bit, 4 combinations in 2 bits and so on.  Read more »

The ghoema beat

The ghoema beat is the underlying rhythm of the Kaapse Klopse carnival in Cape Town. With the establishment of the city as a port between West Europe and the east Indies and subsequent expansion of Dutch and British colonies, increasing cross-pollination between European, African, Southeast Asian and indigenous genres marked the onset… Read more »

Blogging with Org mode

This blog was built with Org mode, which uses a special syntax for defining the structure of documents, similar to Markdown and other markup languages, allowing Org files to be exported to a variety of formats including HTML. In this post, I describe the steps for creating a blog with Org mode.  Read more »