Tuesday, April 14, 2009

Short Composition Competition

Tobiah has proposed an interesting project:

"I have an idea for a brief informal contest. Given a simple,
one-oscillator orchestra, provide a score which produces the
most beautiful piece.

I offer an orchestra that I crafted for the purpose
of this event. One can make use of very limited
envelope an pan controls. Obviously, the craft will
be in the score generation program (although one is
welcome to hand edit her entry!).

If there is interest, I suggest a seven day window
for this challenge. Only the scores should be
submitted at first. We can look at source code
later. For large scores, a URL might be best. I can host
scores if you send them to me in an archive format."

Here's Tobiah's orchestra for the competition. I propose
use this blog as a means of collecting responses.

sr = 44100
ksmps = 1
nchnls = 2

giSineFunc ftgen 1, 0, 65536, 10, 1

instr 1

;***** INIT SECTION *****
iDur init p3
iVol init p4
iStartPitch init p5
iEndPitch init p6

iAttack init p7
iDecay init iDur - iAttack

iPanStart init p8
iPanEnd init p9

;***** SYNTH SECTION *****
kEnv linseg 0, iAttack, iVol, iDecay, 0
kPitch expseg iStartPitch, iDur, iEndPitch
aSig oscili kEnv, kPitch, giSineFunc

kPan linseg iPanStart, iDur, iPanEnd

aLeft = aSig * kPan
aRight = aSig * (1 - kPan)

outs aLeft, aRight



  1. instr 1
    iduration = p3
    ifrequency = cpsmidiin(p4)
    iamplitude = ampdb(p5)
    ipan = p6
    ; Cosine envelope
    aenvelope oscils iamplitude, 1.0 / iduration, 0.5
    ; Cosine waveform
    asinusoid oscils 1.0, ifrequency, 0.5
    ; Cosine grain
    agrain = asinusoid * anevelope
    aoutleft, aoutright pan2 agrain, ipan
    outs aoutleft, aoutright

    This instrument can synthesize literally any sound.

    For example, you can overlap a series of these grains at the half-amplitude point to generate a sustained sine tone, without any artifacts whatsoever.

    Or, you can synthesize any digital waveform, without any artifacts whatsoever, by a sequence of these grains at the sampling frequency (i.e., such grains are impulses).

    Or, you can perform time/frequency resynthesis. You can analyze a soundfile into a set of partial breakpoints, and then resynthesize the sound by interpolating overlapping grains between the breakpoints.

    Or, you can approximate the duplex form of the inverse Gabor transform. In the Gabor transform, the time/frequency plane is divided into rectangular cells whose area minimizes time/frequency uncertainty. Each cell has a specific time and frequency, and otherwise is represented by a complex coefficient that generates a grain with a Gaussian envelope and a specific amplitude and phase. In the duplex form of the transform, each cell is represented by two real coefficients. The first one represents the amplitude of a sine wave with a Gaussian envelope in the upper half of the cell, and the second one represents the amplitude of a sine wave with a Gaussian envelope in the lower half of the cell. The cosine grains generated by this instrument can be used to synthesize a close approximation of these duplex Gaussian grains.

    For a complete and artifact-free implementation of the inverse Gabor transform, the instrument would be modified to use a Gaussian grain and to take a phase argument. Each grain would then be placed at the center of its Gabor cell.

  2. I would like to participate in this challenge!

    Would we be limited to the instrument posted, or may we use an instrument customized for the score generator (provided it uses one oscillator)?

  3. The way I understand it is that for this particular challenge, we need to use the given orchestra.

    We could always organise another one with a slight change of rules.

  4. I was proposing a change of the instrument for this particular contest. My instrument imposes fewer constraints on the pieces, since the notes contain no discontinuities and can be combined without interference or artifacts.

  5. thanx Victor for bringing out this blog!
    am on my way to fix my oil.py which will automatically calc the relative numbers of p1-p3 + velocity + freq...parms are a bit different from this orc is using but i think i can twist the external.py to algo-comp the sco for this one .. anyway this will give me a good chance to learn from the orc others are writing .. and make it an excuse to ask relatively stupid questions ..

  6. ok, I've modified my score generator a bit to use the instrument provided. Is the instrument for this challenge set in stone, or is it going to be changed? Also, what is the date of the deadline? Are we already moving towards it or has it not been set yet?

  7. I was looking for improvements to the pan and envelope,
    but one person has already submitted a score, so I
    want to lock it down. The point is to compose in
    handcuffs anyway. I'd like to understand Michael's
    orchestra better, but by his comments about it, it
    does not suit my intention for this challenge. Perhaps
    we can do this monthly, each time using a different
    orchestra. We talked about a one month deadline. I
    think a cutoff date is good from a psychological standpoint. I know that such a thing ends up motivating me. Since this is just getting rolling, we could make it May 1st? I'm open to suggestions.

  8. May 1st works for me! ...as does the instrument.

    Thanks again for suggesting this! It's giving me a good reason to get my head out of the compiler for a while.