The Extended Loris Opcodes

Home | Download | Opcodes | Examples/Sounds | Contact Me


Examples/Sounds


LorisEnvelope Example

<CsoundSynthesizer>
<CsInstruments>
sr = 44100
kr = 441
ksmps = 100
nchnls = 2
instr   1

kreadline  line  0, p3, p3
lorisread   kreadline, "D2-ff.sdif", 1, 1, 1, 1, .001

kliner  line  p4, p3, p5
kcurveline  line  p4/200, p3, p5/200
ktransposeline  line  p6, p3, ((p6-1)*0.5)+1

lorisfrqenvelope   1, 1, kcurveline, kliner, 1,  3*kliner, ktransposeline,  5*kliner, 1
lorisampenvelope   1, 1, kcurveline, kliner, -12,  3*kliner, p7,  5*kliner, -12

ar  lorisplay 1, 1, 1, 1
kenvelope  linseg  0, 0.01, 1, p3-0.01, 0
outs ar*kenvelope, ar*kenvelope
endin
</CsInstruments>

<CsScore>
i1    0    5    543   137     1.089     7 
i1    5    .    100   716     1.062    -8 
i1   10    .     57   299     1.081     8
i1   15    .    446    61     1.031     5 
i1   20    7    800    30     1.052    15 
</CsScore>
</CsoundSynthesizer>
Csound doc: envelope.csd Loris Anal File: D2-ff.sdif Original Sound: D2-ff.aiff


LorisWarp Example

<CsoundSynthesizer>
<CsInstruments>
sr = 44100
kr = 441
ksmps = 100
nchnls = 2
instr   1

kreadline  line  0, p3, p3
lorisread   kreadline, "crotale-Bb7.sdif", 1, 1, 1, 1, 0.001

lorisfrqwarp 1, 2, p4, p5, p6
ar  lorisplay 2, 1, 1, 1
kenvelope  linseg  0, 0.01, 1, p3-0.01, 0

outs ar*kenvelope, ar*kenvelope
endin
</CsInstruments>

<CsScore>
i1    0  3   900    -1       1 
i1    2  3   900    -0.6     1 
i1    4  3   900    -0.2     1 
i1    6  3   900     0.2     1 
i1    8  3   900     0.6     1 
i1   10  3   900     1       1 
i1   13  3   900    -1       0 
i1   15  3   900    -0.6     0 
i1   17  3   900    -0.2     0 
i1   19  3   900     0.2     0 
i1   21  3   900     0.6     0 
i1   23  3   900     1       0 
i1   26  3   400    -0.8     0 
i1   28  3   720    -0.8     0 
i1   30  3  1040    -0.8     0 
i1   32  3  1360    -0.8     0 
i1   34  3  1680    -0.8     0 
i1   36  6  2000    -0.8     0 
</CsScore>
</CsoundSynthesizer>
Csound doc: warp.csd Loris Anal File: crotale-Bb7.sdif Original Sound: crotale-Bb7.aiff


LorisPartial Example

<CsoundSynthesizer>
<CsInstruments>
sr = 44100
kr = 441
ksmps = 100
nchnls = 2
instr   1
idur = p3

kreadline  line  0, idur, idur
lorisread   kreadline, "D2-ff.sdif", 1, 1, 1, 1, .001

kliner  line  p4, idur, p5

lorispartial  1, 2, p5, p6, p4, 1
lorispartial  1, 3, p5, p6, p4, 1, 0, 1


ar1  lorisplay 2, 1, 1, 1
ar2  lorisplay 3, 1, 1, 1
kenvelope1  linseg  0, 0.01, 1, idur-0.01, 0
kenvelope2  linseg  0, 0.05, 1, idur-0.05, 0

ar = ar1*sqrt(p7)*kenvelope1 + ar2*sqrt(1-p7)*kenvelope2

outs ar*kenvelope, ar*kenvelope
endin
</CsInstruments>

<CsScore>
;             dur   partial partial partial  cross-
;                     amp   number  trans     fade 
i1    0.000  1.250     0     7     1.000     1.000 
i1    0.500  1.250     0    11     0.998     0.974 
i1    1.000  1.250     1    10     0.995     0.947 
i1    1.500  1.250     1     6     1.005     0.921 
i1    2.000  1.250     1    12     1.006     0.895 
i1    2.500  1.250     2     3     0.989     0.868 
i1    3.000  1.250     2     9     0.996     0.842 
i1    3.500  1.250     3    16     1.020     0.816 
i1    4.000  1.251     3     5     1.011     0.789 
i1    4.500  1.251     3    14     1.025     0.763 
i1    5.000  1.253     3     4     1.020     0.737 
i1    5.500  1.254     4    15     1.010     0.711 
i1    6.000  1.256     3    13     0.977     0.684 
i1    6.500  1.259     4     8     1.009     0.658 
i1    7.000  1.264     4     3     1.033     0.632 
i1    7.500  1.269     4     8     0.987     0.605 
i1    8.000  1.277     5    15     0.987     0.579 
i1    8.500  1.286     5    12     0.972     0.553 
i1    9.000  1.298     5     6     0.965     0.526 
i1    9.500  1.313     6    16     0.966     0.500 
i1   10.000  1.332     6     4     1.034     0.474 
i1   10.501  1.355     7     5     1.049     0.447 
i1   11.002  1.384     6     7     1.001     0.421 
i1   11.503  1.419     6    13     1.011     0.395 
i1   12.006  1.463     7    11     0.989     0.368 
i1   12.510  1.516     7    14     0.955     0.342 
i1   13.016  1.583     8     9     1.020     0.316 
i1   13.527  1.666     8    10     0.947     0.289 
i1   14.043  1.771     8     3     0.963     0.263 
i1   14.569  1.906     8    16     0.968     0.237 
i1   15.108  2.082     9     8     1.025     0.211 
i1   15.667  2.315    10     7     1.012     0.184 
i1   16.253  2.630     9    15     1.048     0.158 
i1   16.881  3.061    10     5     1.035     0.132 
i1   17.565  3.659     9     6     0.905     0.105 
i1   18.328  4.496    11    12     0.996     0.079 
i1   19.201  5.678    10    14     1.070     0.053 
i1   20.223  7.358    10    10     1.095     0.026 
i1   21.449  9.750    11    13     0.950     0.000 
</CsScore>
</CsoundSynthesizer>
Csound doc: partial.csd Loris Anal File: D2-ff.sdif Original Sound: D2-ff.aiff