MOSAIC


Project information

MOSAIC logo


My final year project is a collection of tools for Max/MSP developers to help create music-generating programs with. The tools are collectively known as MOSAIC (Max Open-Source tools for Artificial Intelligence in Composition).

I've also released an example program that was made using these tools, which uses probabilities as well as music theory to generate eight bars of music with three tracks: melody, chords and percussion.

This program can also be seen as an open work; I.e. every piece written with it has the same aesthetic. So in effect, all users are composing music in a style defined by me.


Features

  • MOSAIC - A set of 26 Max/MSP tools, all designed to aid computer-generated music composition
  • Includes an example Max patch which uses these tools

Downloads



Project blog

MOSAIC recognition on Cycling '74

15th May 2008

Max/MSP creators Cycling '74 are now hosting MOSAIC tools and the example application on their website.

Have a look at http://www.cycling74.com/twiki/bin/view/Share/TomTurton.

Tags: MOSAICComments (0)

Project uploaded to Google Code site

9th May 2008

I've uploaded the MOSAIC tools and example Max 5 application.

http://code.google.com/p/mosaic/

Tags: MOSAICComments (0)

Finishing touches

8th May 2008

One day left, and I'm just finishing the final touches to the program. This includes toying with random factors, making the interface look a bit nicer and easier to use and labelling all the tools correctly. I'm quite happy it hasn't been a big rush towards the finish.

Tags: MOSAICComments (0)

Theme generation

6th May 2008

I've decided to reintroduce the theme generation ideas that I had previously abandoned in favour of user input. I reckon it's probably better to show I can do this than leave it out for the sake of consistency. It didn't take me long to rewrite the javascript files to make them fit, and it works a lot better than before.

Tags: MOSAICComments (0)

Percussion

3rd May 2008

I haven't a lot of time left before I have to hand in the project, so I've decided to leave out the bass track. However, today I've finished working on the percussion track, which adds a lot to the overall sound. It's interesting to hear the virtual drummer add the odd snare in at a random time if the 'random factor' is turned up a notch. Turning it up too high is dangerous however - sounds like Animal from the Muppets.

Tags: MOSAICComments (0)

MIDI recording

1st May 2008

A major breakthough! Users of my program can now play in the melody for the first two bars of the piece, by using a MIDI keyboard! I'm very proud of this feature, if only because it's saving me time writing in test melodies using just numbers.

Tags: MOSAICComments (0)

Melody generation

29th April 2008

My program is starting to do what it's actually designed to - write it's own music. Today I finished the melody-creating algorithms, which work quite well in my opinion. Muzac to my ears!

Tags: MOSAICComments (0)

Abandoning Flash and Introducing random factors

28th April 2008

After speaking with Dan today, I've decided to scrap the Flash interface idea, which was only really a way to make the program easier and more friendly to use. This comfort would have taken a great chunk of my development time up though, and Max 5 offers a great new mode to allow cleaner interfaces, so I've decided to abandon Flash.

Another good idea that came out of the meeting with Dan was to have a dial to switch between what Dan calls 'Tom music' (the tedious elevator music my program wants to make) and totally random music (total cacophony). This idea makes me laugh, and will be fun to play with so I'm definitely going to try and implement it. Watch this space!

Tags: MOSAICComments (0)

Project name and Google Code page

25th April 2008

My final year project is a collection of tools for Max/MSP, designed to help users make computer-generated music.

I've decided to name the project Max Open-Source tools for Artificial Intelligence in Composition (MOSAIC), which I think sums it up fairly nicely.

MOSAIC now has a project page at Google Code.

Tags: MOSAICComments (0)

Max 5 is here!

24th April 2008

Version 5 of Max/MSP has just been released. I was fairly quick to download and try the new version (apparently Cycling '74 are letting people with student licenses migrate for free!)

I'm quite impressed with Max 5. Although there is little new functionality, the user interface has greatly improved most of the ridiculous flaws from Max 4.6 have been ironed out. However, a new flaw comes with the object creation window, which I have found no quick way to navigate through.

Unfortunately, if I'm to use Flash as an interface to my toolset, I have to use a plugin called 'flashserver', which Max 5 doesn't support at the time of writing.

Tags: MOSAIC, Max/MSPComments (0)

Chord testing

22nd April 2008

My dissertation's finished now, so I can focus all my efforts into developing my project. I've started by writing a simple chord generation patch in Max, which takes chords from the first two bars of a piece and uses them (and some music theory) to write chords for the rest of the piece.

It works quite well, but unsurprisingly, after a few loops it becomes quite tedious to listen to. I will make some alternative chord generation patterns for the program to choose between to make things more interesting.

Tags: MOSAICComments (0)

Microsoft MySong

8th April 2008

Microsoft are developing a program called MySong, which lets users sing into a microphone, and produces a chord sequence over the top. It's a lot harder to achieve than it sounds, and the videos I've seen show it working quite well.

Tags: dissertation, MOSAICComments (0)

Flash interface ideas

26th March 2008

I've been planning the Flash interface program that uses the Max/MSP toolset. I've decided on there being 4 tracks (melody, chords, bass and drums). For each of these tracks, the user will write the first two bars. The program will then use the tools to write six more bars.

This sort of moves away from the theme generation ideas I experimented with before. However, I'll probably be using random numbers, probabilities and Markov chains throughout the toolset anyway.

Tags: MOSAIC, flashComments (0)

Moving to Max

14th March 2008

It had to happen soon. I've started developing a Max patch to generate a theme using Markov chains. It sounds a bit rubbish at the moment, but it's certainly a start.

Tags: MOSAIC, Max/MSPComments (0)

The Creativity Machine

14th March 2008

Back in the late 80s, an AI researcher called Steve Thaler designed a neural network program he later dubbed 'The Creativity Machine'. What was special about this program was that, given enough examples, it would design its own products. The Creativity Machine designed cars, soft drinks and even music. It generated 11,000 sequences of pop music, which Thaler sent off straight away to be copyrighted! Apparently there's an album of music by the Creativity Machine, which I'll have to track down.

In just over a month I will have finished my dissertation. That's a scary thought.

Tags: dissertation, MOSAICComments (0)

Tools

11th March 2008

Another direction change! I've decided with Dan to build a set of tools in Max/MSP to help programmers to write music-generating Max patches. This has been done before (Karlheinz Essl has been adding to his Realtime Composition Library since 1992!), but the twist in my project is that I'm also going to make an example interface (in Flash) which uses the tools to create music. Dan says, the interface can also be considered an open work, as all music created with it will have the same sort of aesthetic (or style).

Tags: MOSAICComments (0)

Project update

6th March 2008

After a meeting with Dan on Monday I am now definitely a lot more confident about what I'm making and how I'm making it. (I know I keep saying this!)

There are basically two main parts to my project: the creation and distribution of a collection of AI music tools, and an example interface that allows anyone to compose music using these tools. I will also be presenting material that others have produced using the interface and tools.

Dan offered me a third alternative to the Flash vs MMF development environment debate: Max/MSP. I hadn't considered using Max for this 'sound toy' idea as I never expected it to be a good interface, but I didn't realise there is a plugin that allows me to plug a Flash interface into Max. So now I plan to use Flash simply for visuals and interaction, and Max (w/ javascript perhaps) for all the logic and playback.

Progress-wise I'd started building algorithms in PHP (yet another language!) to prototype them. I'm now in the process of moving it over to Max.

Tags: MOSAICComments (0)

Markov chains

27th February 2008

Through more research for my dissertation, I've discovered that the main process I was using in my prototype PHP code has a name! A Markov Chain is a set of probabilities, picked based on information about the last notes in the chain. In my case I've been using first-order Markov chains, which only consider the note directly before. Higher level chains consider more notes. I don't think I'll be using anything more than a first-order MC because very quickly the amount of probabilities I'll have to consider will start to get unmanageable (not to mention extremely tedious to program).

Tags: MOSAICComments (0)

Cellular automata

25th February 2008

I've been looking into Cellular automata (CA) as part of my dissertation research. CA are a form of genetic algorithms, which are often used to show a visual representation of artificial life (alife). Apparently they are quite popular for music-generating too.

I'm disappointed to find that examples of CA music (eg. Miranda's CAMUS (1991)) aren't that great at producing aesthetically pleasing music. I doubt I'll be using CA in my project unless I uncover some more promising research.

Tags: MOSAIC, dissertationComments (0)

Contemporary Music

23rd February 2008

I've just come back from a concert at the University of Plymouth Contemporary Music Festival, featuring performances from members of the university's computer music research group, ICCMR. I enjoyed most of the performances, but the one that particularly caught my eye was Marcelo Gimenes' Interactive Musical Environments (iMe).

This performance featured Marcelo playing improv jazz with the iMe computer program, which seemed to mimic and improvise with Marcelo. It was very entertaining and fascinating to watch and listen to.

Tags: dissertation, MOSAICComments (0)

Project - Progress Report #3

22nd February 2008

I'm now entering the final stretch of my degree: the last three months. It's pretty scary thinking that my project has to be handed in on 9 May, when I haven't really started making it yet!

My idea seems a lot more solid than it did in previous posts. I'm making a sound toy with artificial intelligence (to produce music) and am releasing it as an open work. This means that when others use it, even though their compositions will be unique to them, they will be using my designed style of writing music.

The big query is how I'm going to make it. Do I use Flash to get my finished applet to as many people as possible to play with? Or do I use Multimedia Fusion so I can confidently create the project in as little time as possible? I'm tempted to use MMF, as most people have access to a Windows PC, but if I was confident enough, Flash would be preferred.

To prototype the project I created a collection of sound toys for the Sound Practice module. This was worthwhile as I got to experiment with four different designs for toys and also with note probabilities (not unlike Hiller and Isaacson used for their Illiad Suite (1957)).

For this project, I'll focus on one large sound toy, rather than several small ones. And I'll only employ two or three methods of autonomous composition, selected from research for my dissertation. I'll then distribute it on the web and to as many of my friends and family as possible and ask them to record a piece they made with it.

The resulting project will be a demonstration of the program and the algorithms behind it, along with a collection of unique, but similar sounding(?) compositions made with the program.

Wish me luck!

Tags: MOSAIC, dissertationComments (0)

PHP tests

8th February 2008

I've started work on my final year project! For now, I'm experimenting with some ideas to do with probability to produce a theme. I'm using PHP to do this, because it's a fairly quick and hassle free programming language for these tests.

So far, so good. It's proving to be quite easy in PHP, but for sound toys, I'll probably be using Multimedia Fusion or Flash. It should be easy to port PHP code to Flash, but MMF uses a totally different method of programming, so this might influence my decision about with programming environment I'll ultimately use. At least I won't have to port it to Max/MSP, which could be a nightmare!

Tags: MOSAIC, phpComments (0)

Electroplankton

29th January 2008

Electroplankton

Available for Nintendo DS

As research for my sound project and final year project, I've been playing sound artist Toshio Iwai's Electroplankton for the DS.

With Electoplankton the player can choose one of ten sound toy environments to make music in, and then tap and drag objects in the play area to manipulate music. There is also some basic microphone recording in the game.

Electroplankton is a fun pickup-and-play music toy that I'd recommend to anyone. The following is a short critique of the game, where I outline it's strengths and weaknesses:

Short critique of Electroplankton

The game has been designed so that resulting music sounds aesthetically pleasing regardless of the player's actions. They can quite happily randomly tap on the screen wherever and whenever, or with their Master's Degree in composition they can carefully choose what they do. Both these methods will create fairly pleasing soundscapes, more often than not. This isn't a bad thing; It allows the game to be accessible to everyone, not just musicians and in fact it's probably aimed more at the musically-challenged, who don't have much experience in creating music. I suppose Electroplankton could even spark a child's interest in music and encourage them to learn an instrument.

However, this feature leaves the game without any challenge whatsoever. So perhaps calling it a game isn't quite accurate. The term 'game' is a vague word that people tend to have different definitions for. In my eyes, a game is an organised enjoyable activity, with rules, objectives, interactivity and challenge. Electroplankton doesn't have challenge, so in my opinion it's not a game, it's a toy. I'll probably refer to Electroplankton as a game anyway, as that's how Nintendo have marketed the product.

I've analysed each of the ten environments in Electroplankton. Here are my thoughts on a few of them:

(3) Luminaria - possibly my favourite of the ten environments. This level comprises of a 6x6 grid of 'notes' in the natural G minor scale (no sharpened 7th). The scale is obvious when each note is tapped in order. There are also four 'plankton', acting as instruments that navigate the grid and sound the note of the corresponding grid reference when they touch it. The plankton move at different speeds too, but in time with each other (ie on the beat). The player only really controls the directions the plankton move in, by rotating the facing direction of each note. The effect is like four people playing random notes of the Gm scale with different sounding vibraphones, but because they all play in time it doesn't sound quite as bad as I thought it should.

(5) Rec Rec - a very simple multi-tracking environment where players can use the microphone to record their voice onto one of four tracks, which loops every bar and is played simultaneously with the other tracks. Good fun, but in this unusual case, is only as creative as the player. A drum beat is played over the top to enhance the music, else it would sound very dry.

(7) Lumiloop - Just five notes that players can activate. The notes are of a pentatonic scale (C D E G A), so most combinations of them don't sound too bad. The hook in this game is the circular spinning gestures the player has to use; if a note is spun fast enough, an overtone of an octave can be heard.

(8) Marine Snow - It seems to me that Toshio Iwai was running out of ideas when he created this environment. Like Luminaria, there's a grid of notes, this time in the Natural F Minor scale. Tapping a grid reference sounds the note, which then swaps positions with the last note tapped. The only way to make a tune, is to randomly squiggle the touch screen. Very dull, and musically not as strong as the others.

Overall I was surprised at the lack of composition algorithms were used, I assumed there would need to be some in order to make the music sound aesthetically pleasing. Instead, the game uses very basic music theory (simple time, instruments and scales) to produce surprisingly pleasant-sounding results. I was hoping for something more musically clever to research though.

Electroplankton doesn't let players save the state of each environment to return to later. This can be quite annoying if a player has worked hard to mould the environment to something they really like. For example, using Rec Rec players can record samples at specific times in the loop. As soon as they exit the Rec Rec environment, their samples are lost.

Also, each environment is only designed to be played on its own. A player cannot use multiple environments together, without running a copy of the game on another DS. It would have been nice to at least be able to minimise an environment and leave it running in the background while you play with another one. (That's not to say they'd all work together - looking at the scales used I wouldn't recommend it! But they could have been designed to work well with each other.)

You can see Luminaria, Lumiloop and a few other environments in action in this YouTube video.

Tags: music, games, soundspace, MOSAIC, dissertationComments (0)

Project - Progress Report #2

12th January 2008

Progress Report #2

Since my last report I've spent most of my time developing my knowledge of Max/MSP and DirectX as well as reading for my dissertation, which of course has a direct link to the theory behind the project.

The Sound applet project, which uses an unusual compositional technique, Musical Dice, really helped to further my understanding of Max, including the things it is really good at and the things it isn't.

Meanwhile, for another module I have been learning how to use DirectX (particularly Direct3D) to design 3D environments within a C++ Windows application. The relevance this has to autonomous composition is minimal, but I am now hoping to link the two for this project.

The idea is to produce a collection of 'sound toys', in my case mini-games which depending on how they are played, influence the sound/music the player hears while playing them; perhaps to investigate the effect music-making can have on motivating a player.

There are lots of examples of sound toys floating around the Internet at the moment, many of which I hope to play and critique to inform my own project. One more famous and commercial example of a set of sound toys is Nintendo's Electroplankton for the DS platform.

I plan to prototype at least one or two of my mini-game ideas in Flash or Multimedia Fusion 2 for the Sound Practice module. I haven't decided which of these development environments to use yet: Flash is ideal because it's very portable and uses fast vector graphics, but I can get prototypes out a lot faster in MMF2. The advantage of using DirectX over other development tools is that I can share some of the code with my Games Programming module. However it may be easier and more beneficial to do everything in Flash ultimately, as it is much more portable and quicker to develop for.

One of the challenges I will face will be getting the right balance between the player's influence on the music and the computers. The player must have some control, else the sound toy will not be a game at all, and certainly not engaging and fun to use. But likewise, the computer must have a lot of input into the resulting music as it is primarily an autonomous music composition project. So I expect the best sort of game will be one where the player feels they are producing the music, but in reality the computer is doing an awful lot of work to make the player's instructions sound aesthetically pleasing. I imagine a very simple soundscape at the start of a game, that the player builds upon, with the computer's help.

I would like the theme of the game to directly influence the type of music they produce. At the moment I have two ideas, both with a sci-fi space theme to them, but I'm hoping to have a collection of about 4 or 5 games.

Tags: MOSAIC, gamesComments (0)

A soundtrack to life

8th January 2008

Today I've been pondering about autonomous composition again. There's a Family Guy episode where Peter manages to get his own theme music that reflects his current situation whether he's getting up, walking to the shops, emotionally moved by the homeless, or just riding on a bus. It's a very funny clip, and I've used it before in an AI music presentation as an example of personal theme music.

But I was wondering today how possible that idea actually is. Most of us already do something similar. Whatever mood we're in, there's nearly always a certain style of music we can put on to enhance the atmosphere. For example, if you are feeling quite low you might put on some slow, mellow music to soothe you, or maybe when you're excited you might play some loud feel-good happy fanfares! Regardless of your personal taste, there is nearly always something that you feel like listening to, to reflect your mood or situation. (Themes from Pirates of the Caribbean make great driving music by the way!)

The next stage is to link our brains to a program that reads our emotions or moods and selects relevant music. There is already a lot of research into this.

And finally we can even replace our favourite familiar tracks with autonomous music, created on-the-fly as our situations and moods change, just like Peter in Family Guy.

Of course, we'd have to keep our own music to ourselves, so not to cause sound pollution or invade someone's 'personal musical space'. Or perhaps in the future it could be a new form of reading someone's current situation, just as we read face expressions all the time today?

Regardless, I'd love to try out such a system one day, as long as there's an off switch built in!

Tags: music, dissertation, MOSAICComments (5)

New year, new term

7th January 2008

Happy new year! I hope yours is less of a panic than mine will be...

In total I've got six rather large projects to hand in before May. That's two DirectX projects for Programming, a project for Sound, a team project for Games Design that seems to be behind schedule, a 10,000 word dissertation and a 40-credit final year project, which I still don't really have a direction for.

Everything I'm working on this year is going to be very exciting no doubt, but also very stressful. Wish me luck!

Tags: games, programming, dissertation, MOSAIC, soundComments (1)

Experiments in Musical Intelligence

4th January 2008

It seems I've totally underestimated the capabilities of computers to create music - I've just discovered David Cope's Experiments in Musical Intelligence (EMI) program. It basically is given music by a specific composer and spits out new music in their style. I was skeptical until I heard some of the output music, which I think sounds very much like the style of the original composers (e.g. Beethoven, Chopin, Joplin)

Listen to EMI-produced music

Tags: dissertation, music, MOSAICComments (0)

Project - Progress Report #1

16th November 2007

Development of Idea

when a note is received it is converted to an

interval (from the root note of the key)

The idea of my project is to create a piece of software that composes its own music based on limited (if any) user input. However, defining 'music' has proven fairly tricky so far; ideally I would like the program to create tunes and themes that don't seem random, like a lot of computer 'music' does. I would like the program instead compose properly formed music with musical phrases that the average listener will be able to understand and perhaps even remember.

However even that definition of music is still not focused enough. I'm still considering what genre of music to use - perhaps jazz blues, or simple theme tunes.

I do not want the software to be evaluated on the methods it uses to perform the music, only the semantics of the tunes it creates. In the same way, you wouldn't judge Beethoven by the way an orchestra plays one of his pieces.

The project is limited to using only the 127 General MIDI instruments and will not compose or perform lyrics.

Programming languages

After comparing many different programming languages I have decided to use the Cycling '74's Max environment for developing the software behind the project. Max allows me to very quickly create MIDI music without the hassle or error handling that DirectSound or the Java Sound API would require. However, as I only need Max for the performance, I am tempted to do most of the compositional computing in a standard programming language such as C++. All Max will need is a file to read from.

Brief plan of action

My plan is to firstly create a simple, but versatile patch in Max to play any tune I give it. The instructions to this patch will cause it to figure out timing, pitch, velocity, channel, program (instruments), key signatures, tempo and more.

Once I have this, then I can start creating the main part of the project, which composes the music. I still need to plan the methods I will use to do this, and I don't want to until I have gained more of an understanding of the processes, through my research.

note durations are combined with the tempo of the piece to work out the actual duration of the note in milliseconds

PROJECT PLAN

06-11-07

Playback controls

------------------------

enough to give me a versatile synth to compose with

- intervals with key and octave changes so I can use transpositions easily

- array of lists (note, velocity, duration, channel) to create a tune

- tempo and patch changing

- a few simple tunes to test

Composition

------------------

based on methods researched for dissertation

some ideas;

-decide on a form (eg ABA, ABACA)

-create probability function

-phrasing function

-throw in an effect at appropriate points in the piece (eg minor 7th chord, ornaments, dynamics, techniques)

Software progress

I have started to create the MIDI performance patch. It recognises only note-based instructions so far. The next step is to get it to read a list of instructions and figure out the timings, as well as being able to act on instructions to do with tempo and key changes etc.


the interval is turned into a MIDI note


the finished note is sent to the MIDI synth to be played

Tags: MOSAICComments (1)

Dissertation and Final Year Project

7th November 2007

One and a half months into my final year of uni, I've now started doing research for my dissertation and final year project. The two are meant to be connected in some way, one complimenting the other, so I have chosen the subject of generative computer music to link them.

For my dissertation I will be researching the extent of which computers can compose music. There is lots of research into this field so my aim is to bring some of the main ideas together, summarise and discuss them and present them as a brief guide.

My project, worth twice as many marks, will be using this research to compose generative autonomous music. I am uncertain how focused the style or methods of composition will be yet, or even if any human input will influence the software. I will be using Max/MSP to create the program, which I have now started a love/hate relationship with. I have started by creating a simple synth that the program will use to perform the music.

Stay tuned for updates, which I hope to post quite regularly.

Tags: dissertation, MOSAICComments (0)

The first week of the final year

28th September 2007

I've been back at uni for a week now, so I have a little more of an idea about what is expected of me this year:

For my Games Design module I'll be working in a group to design and ultimately produce a prototype for a game. The game will have to stand out among others to be worth a good mark, but as a group we are confident we can do this.

For Games Programming I'll be making example programs with DirectX. I'm not required to do anything totally unique here or magnificent, but I am told it will be a hard ride to get there.

For Sound Practice it appears I have to design and make interesting ways to interact with and dynamically produce sounds. I start of slowly though, by scoring a piece against a film clip.

I also have to build a final year project, which is worth 40 credits and write a dissertation that will compliment it.

Tags: games, 3D, programming, dissertation, MOSAICComments (0)



Comment on this project

Name:
Comment:
 
 

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