|
|
|
|
kr lineto ksig, ktime kr tlineto ksig, ktime, ktrig
Generate glissandos to a stepped a control signal. New in Csound 4.14
ksig – input signal to which glissando is to be added
ktime – duration of glissando in seconds
ktrig – trigger signal
lineto adds glissando (straight lines) to a stepped-value input signal, produced, for example, by randh or lpshold. lineto generates a straight line from the first value of ksig, to the next stepped value of ksig in ktime seconds. When that value is reached, it is held until a new step occurs. ktime should be smaller than the time interval between two consecutive steps of ksig, otherwise discontinuities will occur in the output. When used together with the output of lpshold, lineto emulates the glissando effect of an analog sequencer.
tlineto is similar to lineto, except it is not limited to stepped-value signals. tlineto can be applied to any kind of signal without producing discontinuities in the output. ksig is sampled and the value held until ktrig is a non-zero value. At that point, ksig is sampled again and the new value is held. Glissando is applied as a transition between the two values. The second value is held until ktrig again becomes non-zero, and the process is repeated. Normally, ktrig should consist of a sequence of zeroes with occasional non-zero values, such as would be produced by trigger.
Orchestra:
;lineto_test.orc
sr = 44100
kr = 4410
ksmps = 10
nchnls = 2
instr 01 ;demonstrate lineto
krand randh 1, 1/p4, .125, 1, 1.25 ;control source
kctrl lineto krand, p4*.5 ;add glissando
abfor oscil3 15000, 500*krand, 1 ;audio before lineto
after oscil3 15000, 500*kctrl, 1 ;audio after lineto
;dclick
abfor linen abfor, .2*p4, p3, .2*p4
after linen after, .2*p4, p3, .2*p4
outs abfor, after
endin
instr 02 ;demonstrate tlineto
krand randh 1, 1/p4, .125, 1, 1.25 ;control source
;trigger tlineto 5 times
iseg = .2*p3
ksaw linseg 0, iseg, 1, iseg, 0, iseg, 1, iseg, 0, iseg, 1
ktrig trigger ksaw, .5, 2
kctrl tlineto krand, p4*.5, ktrig ;add glissando
abfor oscil3 15000, 500*krand, 1 ;audio before lineto
after oscil3 15000, 500*kctrl, 1 ;audio after lineto
;dclick
abfor linen abfor, .2*p4, p3, .2*p4
after linen after, .2*p4, p3, .2*p4
outs abfor, after
endin
Score:
;lineto_test.sco f1 0 1024 10 1 i1 0 10 .25 i2 11 10 .25 e
|
|
|
|