Saturday, July 17, 2010

Amazing Grace - transformation #13


I generally create many versions of a piece, and then listen to find one that has something special. Today's post is the 13th pass through the algorithm, and it has a few new sounds to recommend it.

Play it here: or download this link Subscribe here: to this RSS feed

Tuesday, July 13, 2010

Amazing Grace - Transformation #8

I fixed up a few erroneous sustain timings and created a few more versions. This one is take #8, and has a nice busy opening with a Conlon Nancarrow feel to it. That is, it would if Nancarrow had better access to a slide player piano with a whammy bar. The intonation is in 72 equal divisions of the octave. As before, we go through the melody seven times with different levels of variation each time. There are lots of slides from the 7:9:11 to 4:5:6, at various speeds, including slides with pitch vibrato.

I take advantage of some new envelopes I created to enable longer sustain, and even crescendos of piano notes. For example, the normal piano sound has a characteristic waveform that starts loud and gets quickly softer. Here is the waveform of a grand piano played fortissimo on a G at the bottom of the bass clef:

And here is an envlope that will attempt to smooth it out:


And the result, when Csound is told to modify the sample by the chosen envelope:


The result is a note that not only has some serious sustain, but in many cases it will actually crescendo as it sits on the note for a while. The effect is much like that of an electric guitar player using the combination of sustain and feedback to allow a note to grow as it's held.

There are many other possible envelopes that are applied at different times, resulting in sharp attacks and soft ones, depending on the choices available to each note in the piece.

Play it here: or download this linkSubscribe here: to this RSS feed

Saturday, July 10, 2010

Amazing Grace - transformed

Today's post is the first "final" version. At this stage I generate multiple passes through the algorithm looking for one that has something special. This one has some nice slides with shakes. Imagine a pair of grand pianos with bottle slides and special sustain pedals that allow the notes to resonate especially long. This version gets fast and slow. It has seven times through the melody, with various levels of alteration along the way.

Play it here: or download this linkSubscribe here: to this RSS feed

Monday, July 05, 2010

Amazing Grace - now with a macro inside a macro

Today's post was made using a new function in my pre-processor, which reads a text file and generates Csound source code. The new function makes it possible to change the name of a macro each time it is called. For example, I've always been able to make a different macros, and call them explicitly by name:

.pian c1v67
.any01-1-a1 d12t42
&pian.&any01-1-a1.

This snippet would produce a line like this:

c1v67d12t42

Which would in turn produce a Csound score line like this:

i1 0 42 67 42

Csound would interpret each parameter as time to start, duration, loudness, pitch, etc. There are parameters for many other note characteristics, but that's enough for this example.

I can call a macro by name, or I can let the preprocessor pick one that meets a "wild card" match. For example:

.pian c1v67
.any01-1-a1 d12t42
.any01-1-a2 d12t3
&pian.&any01-1-a*.

This would either call any01-1-a1 or any01-1-a2, chosen by one randomization method or another. That was the limit to the preprocessor up until today. This meant that I would have to generate choices for all the measures in a hymn transformation. In one case, that was over 60 different sets of possible chords to choose from. The transformation of Now Thank We All Our God had over 8000 lines of source code, all done my hand. It was very tedious, and prone to error if I missed a letter or two. And if I discovered one particularly useful way to manipulate a chord near the end of my composition process, I couldn't retrofit it to all the other measures.

The new method allows me to call a macro and change which one I call using simple indirection. For example:

.pian c1v67
.any01-1-a1 d12t42
.any02-1-a1 d12t3
.num 01
&pian.&any&num.-1-a*.
.num 02
&pian.&any&num.-1-a*.

The macro name is resolved inside out: first &num. is resolved to 01, then &any01-1-a* is resolved to d12t42 or d12t3. With recursion, any number of indirections are possible. Gotta love that 1980's Turbo Pascal compiler.

This allows me to chose a different macro for each chord at execution time, but set up a massive number of variations for all chords, without coding each measure individually. That's a 60:1 savings on code size and tedium. All good.

Today's example is the first five chords of Amazing Grace, repeated seven times. The variation is set to maximum, so there are some strange slips and slides, and trills that your ordinary piano can't do. Mine can. It still sounds like a piano, just one that has some extra mechanical do-dads inside.



Play it here: or download this linkSubscribe here: to this RSS feed