Wednesday, April 30, 2008

Dissociative Fugue

Part three of deceptively named posts.  I've made a proto-melodic generator in Pure Data, which is kinda neat.

Right now the melodies it generates are random walks between between 90 and 600 Hz with ocassional excursions between 45 and 1200 Hz.  The occasional excursions are a function of doing the limiting based on what the note currently is, rather than what it could be.  Since one of the steps is a full octave up or down, it can bounce out pretty far before it starts getting called back in.  Ultimately that might get revised, however I don't think its terribly important.  The other component is a tempo generator that messes with the master clock for the system, speeding up when the notes are high and slowing down when they are low.  This favors the low end of the spectrum, and adds a bit more interest.  Eventually a full note length and timing module will be implemented, so that there is more freedom in determining individual note length.

 I made a nice little repetition prevention system, but sadly, I don't actually need it now, since I've placed everything relative to the preceding note.  I was using a system that played specific notes and since that system could (and frequently did) play the same note repeatedly in series the repetition limiter was far more important for it.  On the upside, making the detections system has given me some better ideas on using recursion to make the whole thing work.  Recursion and Markov chains...fun times.

I really like the infinite scale idea, but it has some downsides.  First, it is unlikely that anyone could (or would want to) manually play any pieces generated by this method: it just doesn't correlate well to existing musical notation.  Second, since it does break with the traditional notation, making music theory "work" in this context is much more difficult.  I've been having to use journal articles to supplement the theory textbook, which is good but not helpful in a lot of areas right now.

JSTOR, an online database of academic journals has been invaluable in working on this project (and just about any project in the humanities or arts).  Frankly, I'm really glad someone else sat and did a study of the mathematical basis for consonance and dissonance.  Right now my note determinations are from consonant ratios, which makes a pleasing, but very mellow melody.  I found an article on the basis for dissonance, so when I get some free time that help me will add some spice to the mix.

Next, I'm going to clean up the note selection process a bit, and try to add in some way of storing melodies for playback.  I don't really know how I'm going to work that one, as PD doesn't seem cut out to handle generating and reading complex tables.  I've decided that I'm likely wrong, and that I can, I just don't know how to do it yet.  Soon I will.  The melody needs to be stored so that it can be played back in different voices at other points, which is one of the defining characteristics of the fugue.

--
Robert Alverson

m*lambda=d*sine(theta)

No comments: