Music, Composition and the ComputerThe marriage of music, composition and the computer may seem like an unlikely partnership, bringing together the arts, mathematics and the sciences in what many would see as an unholy trinity. It is not however as unnatural as you might first think. Many great scientists have also been exceptional artists and vice versa, the most famous of whom is unquestionably Leonard Da Vinci. Music and technology have in fact had an intimate relationship throughout time with technological advances aiding music in many diverse ways. Take the printing press as an example, the ability to shape iron over a flame, or the phonograph. What makes older technologies significantly different from the use of computers in music making is their effect on the compositional process rather than on the instrument building or performance processes. Computers have the ability to radically change the way in which we compose and the compositional processes that we use due to thier ability to be programmed and to execute operations quickly. This is the opening of some Masters thesis found around the place : )
It is these structural formalisms that computer music composition utilises. Read this article on "Why employ computer programming for music making" by Chris Dobrian. Anyway enough of this tripe, show me the code! For those who can't wait to see code and hear results, here is a trivial jMusic class. import jm.JMC;import jm.music.data.*; import jm.util.Play; public final class Bing implements JMC { public static void main(String[] args) { Play.midi(new Note(C4, QN)); Here is a less terse example that writes out a MIDI file. (Green type is simply comments, not the code itself.) //give this class access to the jMusic classes import jm.JMC; import jm.music.data.*; import jm.util.*; /** * This is the simplest jMusic program of all. * The eqivalent to a programming language's 'Hello World' */ public final class Bing implements JMC{
} To run this program copy and paste the code into a text editor, save it as Bing.java and compile and run it with your Java tools. A more compact version of this jMusic class that also renders the score as an audio file is shown below. import jm.JMC; public static void main(String[] args){Score score = new Score(new Part(new Phrase(new Note(C4, MINIM)))); } |
|
|
|
|
|
|