Csound Csound-dev Csound-tekno Search About

Re: Negative p3 vs polyphonicity

Date1999-08-14 10:36
FromRichard Dobson
SubjectRe: Negative p3 vs polyphonicity
It's not  quite as easy as that, unfortunately. I want to have BOTH
polyphony AND legato, and that requires more than local variables, it
also requires distinct storage per voice for all opcodes which retain
inernal state (e.g oscillator phase). Thus, if I were running eight
legato voices using instrument 1, which used oscil, each of those voices
would need to maintain distinct internal state for it, so that
independent legato van be performed. At the momnet, the only way of
acheiving this is to run eight (say) versions of the same instrument,
under different numbers. 

Kirsh Family wrote:
> 
[snip]
> Well, I wouldn't say you're coding for polyphony so much as coding for
> legato capability.  Even if an instrument is monophonic, wouldn't you
> have to code in special provisions for good legato, like having a
> parameter for portamento time, taking care to skip initialization on the
> appropriate ugens if you're not on the first note of a legato run, etc.?
> 

Yes, exactly. Current Csound allows this, bot only monophonically per
instrument.

> > If the
> > instruments could be just a little more 'object-like', you could apply a
> > polyphonic legato score to ~any~ instrument, and get the expected
> > behaviour.
> 
> But look at real instruments -- they're pretty object-like, and *they*
> have to have legato designed into *them* :-).  E.g., a voice can just
> slur to another pitch, but all a piano can do is start playing the new
> note before the old one is let go of.
>

But as a composer you write a slur for a piano, and a slur for a violin,
and leave the player of the instrument to play it in their idiomatic
way. As a Csound composer you are creating ~three~ entities - the
instrument,  the score, and the player who interprets the score using
the instrument. The player is the incompletely-defined entity - it may
be in the score, or in the orchestra, or uncomfortably divided betweeen
both.  A truly 'complete' implementation of a Csound instrument would
need to support legato (or, if is were percussive, ignore it in an
appropriate way) within the orchestra code, so that there was no need to
hard-code it in the score - then ~any~ score (e.g from a MIDI file,
which is the origin of this thread) could play that instrument legato.

A lot of this can be done now, as you say - you have to deal with a lot
of variables in the instrument to preserve state, for legato control of
phase, pitch and amplitude (at least). BUT, only monophonically, as you
don't have control of opcodes that way, only your own variables. A
polyphonic instrument according to my definition achieves the same thing
as multiple copies of an instrument, but using, say, an array indexed by
the fractional part of p1. Then, for any given voice, you recover the
previous and next pfields (using opcodes), and you automatically use the
correct instance of oscil, etc, for that voice. The size of this array
would determine the maximum polyphony which that instrument can sustain
- and it would still be possible to force an instrument to be strictly
monophonic if necessary, by confining the array to a depth of one.



Richard Dobson 

 


-- 
Test your DAW with my Soundcard Attrition Page!
http://wkweb5.cableinet.co.uk/rwd (LU: 6th July 1999)