September 22, 200817 yr This is an atonal algorithmic piece that I originally wrote in ForMuLa on the Atari 1040 ST: Dothing (mp3) The Atari was lost and the environment could not be recreated, so I decided to rewrite the algorithm in Java using jMusic. Also, Java is easier to read than Forth, the language of ForMuLa. Here's the algorithm in Java/jMusic, and the MIDI file that it created. package com.b0b.academy;import jm.music.data.*;import jm.JMC;/** * Title: Dothing * Description: This is a port of the Technical Academy file "dothing", * written in Forth, dated 30Dec89 * Copyright (c) 1989, 2002 * @author b0b Lee */public class Dothing extends Rand implements JMC{ public Dothing() { } void wha(int its, Phrase phrase, int volume, int bottom) { phrase.add(new Note(bottom, WHOLE_NOTE, volume)); for (int i = 3; i < (its + 3); ++i) { volume = volume + (get(21) - 10); int third = i / 3; int pitch = bottom + ((get(37) / third) * third); pitch = Math.min(pitch, 127); phrase.add(new Note(pitch, QUARTER_NOTE, volume)); } phrase.add(new Note(bottom, WHOLE_NOTE, volume)); } Phrase do1 = new Phrase(0); Phrase do2 = new Phrase(0); Phrase do3 = new Phrase(SIXTEENTH_NOTE); Phrase do4 = new Phrase(SIXTEENTH_NOTE * 3.0); Phrase do5 = new Phrase(EIGHTH_NOTE); Phrase do6 = new Phrase(THIRTYSECOND_NOTE * 5.0); void thing(int its) { wha(its, do1, 35, 40); wha(its, do2, 80, 33); wha(its, do3, 60, 43); wha(its, do4, 30, 45); wha(its, do5, 70, 34); wha(its, do6, 60, 69); do6.add(new Note(0, THIRTYSECOND_NOTE, 0)); } public Score getScore() { Score score = new Score(); score.setTempo(144.0); thing(36); thing(72); thing(24); thing(96); thing(1); score.add(new Part(do1, "vibes", VIBRAPHONE, 0)); score.add(new Part(do2, "bass", SLAP_BASS, 1)); score.add(new Part(do3, "guitar1", SGUITAR, 2)); score.add(new Part(do4, "guitar2", SGUITAR, 3)); // don't set instrument on drum channels // synths know that channel 10 is for drums // note that setChannel is zero-based Part drum1 = new Part(do5, "drum1"); drum1.setChannel(9); score.add(drum1); Part drum2 = new Part(do6, "drum2"); drum2.setChannel(9); score.add(drum2); return score; }}[/CODE] I hope people enjoy this sort of thing. I know it's a bit "out there", but I've always liked to try new things. dothing.mid
September 22, 200817 yr That's pretty awesome; it's a bit random soundsing, but you kind of get into it after a while... I'm having trouble following the code: So it does triads off of .... what exactly? I'm sorry, I just can't read code to save my life.
September 23, 200817 yr Author I see that some explanation is in order. Here are a few things you need to know to understand the algorithm. JMusic is a MIDI composition tool. Pitches and volumes are represented by integers between 0 and 127. The get(i) method returns a random integer between 0 (inclusive) and i (exclusive). The Phrase object takes a start time in its constructor. So, for example Phrase do5 = new Phrase(EIGHTH_NOTE); creates a new Phrase that starts an eighth note into its part. The getScore() method is what creates the music. Six Phrases are constructed, and they are each built out with random notes by calling thing(its) repeatedly. Then the 6 Phrases are assigned to Parts (instruments with MIDI channels), which are added to the Score. A host program writes the score to a MIDI file. This is a very random, very simple piece of music. I wrote it to get up to speed on the idea of algorithmic composition - it was my first piece. Each run of the algorithm creates a different sequence of notes, but they all sound pretty much the same.
September 23, 200817 yr I really enjoy this stuff and I think it's great. Unfortunately, that is all I can really say about it with my lack of knowledge on the genre.
September 23, 200817 yr All makes sense -- there are a few other compositions like that around on the forum :) Thanks for the explaination
September 23, 200817 yr I have to agree. That was quite awesome. Quite possibly one of the most interesting things I've heard on this forum. However, I don't think it's atonal. There are clear moments of resolution throughout the piece. In truly atonal music, a feeling of resolution shouldn't exist because there is nothing to resolve to. Still quite enjoyable, however you choose to describe it.
September 23, 200817 yr Author I don't think it's atonal. There are clear moments of resolution throughout the piece. In truly atonal music, a feeling of resolution shouldn't exist because there is nothing to resolve to. The note called "bottom" could be considered a tonal center, I suppose.