Music

Pattern Matching with Optima Lisp Library – Part 3

Written by on June 29, 2016 in LISP, Music, Programming with 0 Comments
Pattern Matching with Optima Lisp Library – Part 3

In the previous two posts on this topic, I explained some of the basic pattern matching facilities of Optima library. There are many more advanced features in the library and I will try to discuss them in future posts. In today’s post, I will outline a straightforward application of the library for processing scores in Opusmodus. In […]

Continue Reading

Constraint Programming in Picat

Written by on May 26, 2016 in LISP, Music, Programming with 0 Comments
Constraint Programming in Picat

In my last post I briefly described how we can use the Screamer Lisp library for constraint programming in music. Another language I have been hearing a lot about, in the context of constraint programming, is Picat, a Prolog-derived language. Although I am familiar with Prolog and have been a user of Sicstus Prolog for many […]

Continue Reading

Constraint Programming Using Screamer

Written by on May 17, 2016 in LISP, Music, Programming with 0 Comments
Constraint Programming Using Screamer

A few years I ago I had briefly experimented with the Screamer library in the context of automatic test case generation from specification. I felt it was a useful utility for doing simple constraint programming tasks. Recently while going through some of the past articles in the Opusmodus forum, I was pleasantly surprised to find references to constraint programming […]

Continue Reading

Generating Melody to Fit Harmony

Written by on May 10, 2016 in LISP, Music, Programming with 0 Comments
Generating Melody to Fit Harmony

There are two common approaches to composing music. One involves synthesizing a suitable chord progression first and then layering melody over it. The other is to start with melody and then harmonize it by applying chords. Of course, you can mix both approaches – use one technique for a portion of the song and then […]

Continue Reading

Reading and Transforming a MIDI File

Written by on April 27, 2016 in LISP, Music, Programming with 0 Comments
Reading and Transforming a MIDI File

Sometimes it can be interesting to take a MIDI file and transform the score it represents. For example, you can change the tempo, alter the instruments, or even modify the pitches and rhythm. To do something like this, it is helpful to build a convenient framework. In today’s post, I am outlining one approach that […]

Continue Reading

Motifs and Transformations

Written by on April 19, 2016 in LISP, Music, Programming with 0 Comments
Motifs and Transformations

One of the creative approaches to synthesizing music is to start with a short melodic motif and then apply various transformations on it. The motif is usually (but not necessarily) of 1 bar duration. What are some possible transformations? This depends on one’s creativity, but here is a simple list: 1) Identity transformation: Do nothing […]

Continue Reading

Rhythmically Odd Rhythms

Written by on April 12, 2016 in LISP, Music, Programming with 0 Comments
Rhythmically Odd Rhythms

In the excellent book The Geometry of Musical Rhythm – What Makes a ‘Good’ Rhythm Good? by Godfried T.Toussaint, there is an interesting discussion of Rhythmic Oddity in Chapter 15. A rhythm has this property if no two of its onsets divide the rhythmic cycle into two half-cycles, that is, two segments of equal duration. […]

Continue Reading

User-defined Literals in C++

Written by on March 27, 2016 in C++, Music, Programming with 0 Comments
User-defined Literals in C++

C++11 introduced user-defined literals, allowing programmers to define special suffixes that can be associated with the built-in literal types: character, integer, float, boolean, and pointer. When designed and used properly, these provide nice syntactic sugar facilitating readability and at the same time, increasing type safety. For example, I can define an operator _kg that can be […]

Continue Reading

Converting Text to Music

Written by on March 12, 2016 in LISP, Music, Programming with 0 Comments
Converting Text to Music

Converting text to music can be fun. Opusmodus has a few built-in functions to work with text. Look up the description of text-to-pitch, for example. As described in its documentation, (text-to-pitch ‘(“To be, or not to be, that is the question”)) => (((g5 d5) (cs4 e4) (d5 f5) (cs5 d5 g5) (g5 d5)     (cs4 […]

Continue Reading

A GUI Front-end for Cellular Automata Generator

Written by on March 4, 2016 in LISP, Music, Programming with 0 Comments
A GUI Front-end for Cellular Automata Generator

In my last post, I explained how we can use Cellular Automata (CA) in Opusmodus to create music. For today’s post, I wanted to build a simple UI to control the parameters used in the CA example. This posed a practical difficulty. Opusmodus does not yet provide a GUI library. Even Clozure CL, on which Opusmodus […]

Continue Reading

Top