René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback

expseg (Csound opcode)

kr      expseg     ia, idur1, ib[, idur2, ic[...]]
ar      expseg     ia, idur1, ib[, idur2, ic[...]]
ia: Starting value. Zero is illegal
ib, ic, etc.: Value after dur1 seconds, etc. Must be non-zero and must agree in sign with ia.
idur1: Duration in seconds of first segment. A zero or negative value will cause all initialization to be skipped.
While expseg connects the points with exponential curves, linseg connects those with straight lines.

Graphical representation

The following simple orchester and score files can be used to show how an expseg curve looks like.
sr = 44100
kr = 4410

nchnls = 1

instr 1
  asig  expseg 10000, 0.2, 2000, 0.2, 20000, 0.2, 4000, 0.2, 30000, 0.2, 1

  out asig
i1 0 1
If run through csound, this progression is achieved:


This opcode is used for the following instruments: