Sound applet


Project information

The random bar version generator


Musical Dice is an unusual composition technique made famous by composers such as Mozart and Haydn. The idea behind musical dice is that performers have a number of versions for each bar in a piece, and the version they play is decided by a dice roll. At the end of each bar, the die is rolled again to choose another variation. As there are six sides to a die, there are usually six versions of each bar.

This project takes the idea of musical dice to create autonomous computer music. The Max/MSP patch plays 12-bar blues with a piano (musical dice melody), bass guitar (static) and drum kit (static). Each of the 72 bars were written first in notation software and then translated to a custom format that the Max patch understands.

The patch chooses a random number between 1 and 6 for each bar and plays the appropriate file. There are 2,176,782,336 ways of playing each set of 12 bars! Each files comprises of lists of notes, each with a time, pitch, duration and velocity.


Features

  • 12 bar blues composed at runtime using the musical dice technique
  • Three speeds to choose from
  • Six melody instruments to choose from
  • Switch melody, bass and drum tracks on and off at runtime
  • Watch the program work, with Max's flow diagram interface

Downloads



Project blog

Finishing off the sound applet

11th December 2007

this part of the patch controls the note timings and the overall speed of the piece

Today I've been working hard to polish off the sound applet project. I've added bass guitar and drum kit accompaniments for aesthetic purposes, and have also included a feature to let the user change the instrument that plays the melody. The user can also choose to speed up or slow down the music.

The longest part of the project wasn't actually building the patch that does all the work, it was converting the music I had written into numbers that the patch would understand.

The finished program can play 2,176,782,336 (ie 6 to the power of 12) different versions of 12-bar blues.

See the finished patch

Tags: sound applet, musicComments (0)

Breathing life into the sound applet

2nd December 2007

this part of the patch counts the bars and chooses a random variation

After a few problems with trying to link the random numbers generated, with corresponding file names, I've finally managed to build a working prototype of a 12-bar blues musical dice program.

I've also improved on the player mentioned in my last post. It now plays a note based on where it is in the bar. Before it simply waited for the previous note to finish playing. The new format is: time, type of message, channel, pitch, duration, velocity. eg. 100 0 1 60 250 80.

I've managed to write three sets of 12 bars so far (36 bars), so I've half way to finishing the program. Converting each not of the music I've written into a set of six numbers is very time consuming and I'm spending more time doing that than I am writing the software itself!

So far then, the Max patch picks a random number (1 to 6) and combines it with the bar number to pick the right file to play. It then plays the file using the player patch and moves on to the next bar. At the moment it's not perfect, but I expect to finish and debug it over the next couple of day and perhaps even add some extra features, such as some accompaniment.

Tags: sound appletComments (0)

Test player for sound applet

26th November 2007

the prototype player for the project

I've created a Max patch that plays MIDI notes from a file. Each note is a list of numbers which include: a message type to tell the program what to do (eg play a note), pitch of note, duration and velocity (volume of the note).

for example:

0 60 250 85

will play middle C for 250 milliseconds at a velocity of 85.

I can tell it's going to take ages to write out all the notes of the 72 bars, but it will be worth it.

Tags: sound appletComments (0)

Sound applet idea

12th November 2007

Musical dice is a method of composing music, most notably used by Mozart and Haydn. The idea is that for every bar of a piece, there are a number of variations of that bar. When the piece is played, the performer will roll a dice to choose which variation of the bar to play. Because of this there are a huge number of different ways to play the same piece.

My idea for a sound applet is to create a musical dice program using Max/MSP. Instead of playing a Haydn-esque minuet, my program will use musical dice to compose 12-bar blues in real-time.

To do this I will write 6 ways of playing 12 bars (72 bars altogether) and program Max to play a variation at random for each of the bars.

Watch this space for a progress report soon!

Tags: sound appletComments (0)



Comment on this project

Name:
Comment:
 
 

To avoid spam, your comment will be checked before it is displayed here.