[Csnd] Code Share: barmodel etude (2021)

This week I am sharing another etude. This one draws upon the incredible work being done on the Csound Manual by Stefano Cucci, Menno Knevel, and Kevin Welsh. Their example instrument (and those by many others as well). Are always a source of appreciation, understanding, and inspiration.

In this specific case, I was playing around with Stefano’s manual example for the ‘turnon’ opcode and came up with a couple of pieces. One will appear in the next manual, and the other is here. In the end, and this is the exciting thing about Csound, I don’t use the ‘turnon’ opcodes at all. Instead, I build upon Stefano’s barmodel, mpulse, and multitap instruments to create this humble sonic journey of discovery.

Thanks to Menno, Kevin, and Stefano - for all their great work. I hope you enjoy the journey.

; Barmodel Etude (2021) Richard Boulanger

; inspired by the ‘turnon’ example instrument(s) in the Csound Manual by Stefano Cucchi

sr = 44100

ksmps = 32

nchnls = 2

0dbfs = 1

gasend1 init 0

gasend2 init 0

instr bar

abarL barmodel 1, 1, p5, 0.0001+rnd(p9), 0.0001+rnd(p9), 10+rnd(10), p6, p7, p8

abarR barmodel 1, 1, p5, 0.0001+rnd(p10), 0.0001+rnd(p10), 10+rnd(11), p6, p7, p8

kenvelope expseg 1, p3, .01

abarL = abarL * kenvelope * p4

abarR = abarR * kenvelope * p4

gasend1 = gasend1 + (abarL * p12)

gasend2 = gasend2 + (abarR * p11)

endin

instr pls

idenStart = p5

kdensity expseg p5, p3, 0.001

apulse mpulse 1, rnd(kdensity)

kenvelope expseg 1, p3, .001

apulse = apulse * kenvelope * p4

gasend1 = gasend1 + apulse * p7

gasend2 = gasend2 + apulse * p6

endin

instr gat

idryLeft = p4

idryRight = p5

kgate adsr p6,.01,1,p7

outs (gasend1 * kgate) * idryLeft, (gasend2 * kgate) * idryRight

endin

instr del

afold fold gasend2, 26

adelfoldL multitap afold, .42+rnd(p5), 0.52, 1.7+rnd(p6), 0.44, .6+rnd(p7), 0.34

adelfoldR multitap afold, 1.1+rnd(p6), 0.64, 0.3+rnd(p5), 0.54, .2+rnd(p8), 0.43

outs adelfoldL * p4, adelfoldR * p4

clear gasend2

endin

instr vrb

aphsL phaser1 gasend1, 100*rnd(p7), 4, -.9

aphsR phaser1 gasend1, 200*rnd(p8), 4, -.9

aRevL reverb2 aphsL, .618+rnd(p5), .1

aRevR reverb2 aphsR, .618+rnd(p6), .1

outs aRevL * p4, aRevR * p4

clear gasend1

endin

t 0 40 5 76

i “vrb” 0 12 .5 3.1 3.8 170 189

i “del” 0 12 .6 2.12 2.26 2.39 3.02

i “pls” 0 10 .04 .0001 .87 .5

i “gat” 5 4 .4 .3 1.21 .1

i “bar” 5 4 .18 16 .23 1800 0.12 .048 .001 .48 .66

i “bar” 5.05 4 .18 18 .23 1800 0.02 .038 .001 .48 .56

i “bar” 5.09 4 .18 23 .23 1100 0.04 .028 .001 .48 .76

s ; sec 2

t 0 76 6 43 12 90

i “vrb” 0 19 .4 4.1 4 27 39

i “del” 0 19 .6 3.12 3.26 3.39 3.02

i “pls” 0 10 .05 .0002 .77 .65

i “gat” 4 5 .5 .12 1.21 .1

i “bar” 4 5 .12 9 .13 3100 0.15 .028 .002 .68 .56

i “gat” 6 5 .5 .12 1.21 .1

i “bar” 6 5 .2 13 .13 1100 0.13 .038 .001 .58 .6

i “gat” 8 6 .74 .03 .31 .81

i “pls” 8 6 .84 .2 .6 .6

s ; sec 3

t 0 40 7 100

i “vrb” 0 14 .4 2.1 3 17 19

i “del” 0 14 .6 2.12 2.26 2.39 3.02

i “pls” 0 11 .04 .0001 .87 .5

i “gat” 5 4 .65 .3 1.21 .1

i “bar” 5 4 .31 18 .13 1100 0.13 .038 .001 .88 .56

i “gat” 7 4 .65 .3 1.21 .1

i “bar” 7 4 .41 14 .13 1000 0.12 .036 .0009 .68 .46

s ; sec 4

t 0 45 9.5 30 10 50 12 43 13 50 16 40 19.1 106

i “vrb” 0 10 .4 2.1 2 7 19

i “del” 0 10 .6 2.12 2.26 2.39 3.02

i “gat” 0 5 .5 .42 1.21 .1

i “bar” 0 5 .2 21 .13 1100 0.13 .038 .001 .58 .6

i “bar” 0 5 .2 26 .13 1500 0.23

i “bar” 0 5 .2 16 .12 1800 0.33

i “bar” 0 5 .2 36 .14 1300 0.43

i “pls” 0 11 .05 .0001 .87 .5

i “gat” 5 3 .64 .43 .31 .81

i “pls” 5 6 .84 .2 .6 .6

i “gat” 8 6 .4 .53 .01 .81

i “pls” 8 6 .1 .001 .57 .45

i “vrb” 10 17 .54 2.1 3.3 668 769

i “del” 10 17 .3 2.12 2.26 2.39 3.02

i “gat” 10 3 .54 .43 .01 .81

i “pls” 10 5 .05 .0001 .87 .5

i “bar” 10.0 3 .20 13 .23 1000 0.13 .038 .001 .88 .56

i “bar” 10.2 3 .20 23 .23 1900 0.13 .028 .01 .68 .46

i “bar” 10.8 3 .20 18 .23 2900 0.13 .028 .02 .68 .36

i “bar” 10.9 3 .20 11 .23 3900 0.13 .028 .01 .68 .26

i “bar” 10.9 3 .20 61 .23 3900 0.13 .028 .01 .68 .26

i “gat” 13 4 .44 .53 .01 .41

i “pls” 13 5 .05 .0001 .87 .5

i “bar” 13.0 3 .20 14 .23 1000 0.13 .038 .001 .88 .56

i “bar” 13.2 3 .20 22 .23 1900 0.13 .028 .01 .68 .46

i “bar” 13.8 3 .20 16 .23 2900 0.13 .028 .02 .68 .36

i “bar” 13.9 3 .20 12 .23 3900 0.13 .028 .01 .68 .26

i “bar” 13.9 3 .20 71 .23 3900 0.13 .028 .01 .68 .26

i “gat” 16 5 .44 .53 .01 .41

i “pls” 16 5 .05 .0002 .77 .5

i “bar” 16.0 3 .20 15 .23 1000 0.13 .038 .001 .88 .56

i “bar” 16.2 3 .20 21 .23 1900 0.13 .028 .01 .68 .46

i “bar” 16.8 3 .20 10 .23 2900 0.13 .028 .02 .68 .36

i “bar” 16.9 3 .20 32 .23 3900 0.13 .028 .01 .68 .26

i “bar” 16.9 3 .20 61 .23 3900 0.13 .028 .01 .68 .26

i “gat” 19 5 .64 .73 .01 .1

i “pls” 19 5 .05 .0002 .77 .5

i “bar” 19.0 3 .20 11 .23 1000 0.13 .038 .001 .88 .56

i “bar” 19.2 3 .20 18 .23 1900 0.13 .028 .01 .68 .46

i “bar” 19.8 3 .20 9 .23 2900 0.13 .028 .02 .68 .36

i “bar” 19.9 3 .20 22 .23 3900 0.13 .028 .01 .68 .26

i “bar” 19.9 3 .20 31 .23 3900 0.13 .028 .01 .68 .26

s ; sec 5

t 0 76 9 56 10 76 19.1 36

i “vrb” 0 26 .64 2.1 1.6 608 469

i “del” 0 26 .33 2.12 2.26 2.39 3.02

i “gat” 0 3 .35 .43 .01 .01

i “pls” 0 5 .09 .0001 .87 .5

i “bar” 0.0 3 .22 43 .23 1000 0.12 .038 .01 .88 .56

i “bar” 0.2 3 .21 13 .23 1900 0.13 .028 .01 .68 .46

i “bar” 0.8 3 .25 38 .23 2900 0.14 .028 .02 .68 .36

i “bar” 0.9 3 .29 21 .23 3900 0.15 .028 .01 .68 .26

i “bar” 0.9 3 .29 51 .23 3900 0.16 .028 .01 .68 .26

i “gat” 3 3 .35 .43 .01 .01

i “pls” 3 5 .09 .0001 .87 .5

i “bar” 3.0 3 .22 34 .23 1000 0.10 .038 .01 .88 .56

i “bar” 3.2 3 .21 12 .23 1900 0.11 .028 .01 .68 .46

i “bar” 3.8 3 .25 26 .23 2900 0.12 .028 .02 .68 .36

i “bar” 3.9 3 .29 32 .23 3900 0.13 .028 .01 .68 .26

i “bar” 3.9 3 .29 61 .23 3900 0.14 .028 .01 .68 .26

i “gat” 6 3 .35 .53 .01 .01

i “pls” 6 5 .08 .0002 .77 .5

i “bar” 6.0 3 .22 25 .23 1000 0.08 .038 .01 .88 .56

i “bar” 6.2 3 .21 11 .23 1900 0.09 .028 .01 .68 .46

i “bar” 6.8 3 .25 20 .23 2900 0.10 .028 .02 .68 .36

i “bar” 6.9 3 .29 22 .23 3900 0.11 .028 .01 .68 .26

i “bar” 6.9 3 .29 51 .23 3900 0.12 .028 .01 .68 .26

i “gat” 9 3 .25 .23 .01 .01

i “pls” 9 5 .06 .0002 .77 .5

i “bar” 9.0 3 .22 21 .23 1000 0.10 .038 .01 .88 .56

i “bar” 9.2 3 .21 28 .23 1900 0.11 .028 .01 .68 .46

i “bar” 9.8 3 .23 19 .23 2900 0.12 .028 .02 .68 .36

i “bar” 9.9 3 .21 32 .23 3900 0.23 .028 .01 .68 .26

i “bar” 9.9 3 .21 41 .23 3900 0.14 .028 .01 .68 .26

i “gat” 10 3 .25 .29 .01 .01

i “pls” 10 5 .06 .0001 .87 .5

i “bar” 10.0 3 .22 23 .23 1000 0.12 .038 .01 .88 .56

i “bar” 10.2 3 .21 53 .23 1900 0.13 .028 .01 .68 .46

i “bar” 10.8 3 .22 28 .23 2900 0.14 .028 .02 .68 .36

i “bar” 10.9 3 .27 31 .23 3900 0.15 .028 .01 .68 .26

i “bar” 10.9 3 .26 41 .23 3900 0.16 .028 .01 .68 .26

i “gat” 13 3 .20 .20 .01 .01

i “pls” 13 5 .05 .0001 .87 .5

i “bar” 13.0 3 .15 24 .23 1000 0.10 .038 .01 .88 .56

i “bar” 13.2 3 .15 22 .23 1900 0.11 .028 .01 .68 .46

i “bar” 13.8 3 .15 16 .23 2900 0.12 .028 .02 .68 .36

i “bar” 13.9 3 .15 42 .23 3900 0.13 .028 .01 .68 .26

i “bar” 13.9 3 .15 11 .23 3900 0.14 .028 .01 .68 .26

i “gat” 16 3 .25 .28 .01 .01

i “pls” 16 5 .05 .0002 .77 .5

i “bar” 16.0 3 .22 15 .23 1000 0.08 .038 .01 .88 .56

i “bar” 16.2 3 .21 51 .23 1900 0.09 .028 .01 .68 .46

i “bar” 16.8 3 .25 10 .23 2900 0.10 .028 .02 .68 .36

i “bar” 16.9 3 .29 42 .23 3900 0.11 .028 .01 .68 .26

i “bar” 16.9 3 .29 71 .23 3900 0.12 .028 .01 .68 .26

i “gat” 19 3 .21 .23 .01 .01

i “pls” 19 5 .04 .0002 .77 .5

i “bar” 19.0 3 .21 11 .23 1000 0.10 .038 .01 .88 .56

i “bar” 19.2 3 .21 38 .23 1900 0.11 .028 .01 .68 .46

i “bar” 19.8 3 .21 49 .23 2900 0.12 .028 .02 .68 .36

i “bar” 19.9 3 .21 22 .23 3900 0.23 .028 .01 .68 .26

i “bar” 19.9 3 .21 81 .23 3900 0.14 .028 .01 .68 .26

s ; sec 6

t 0 40 5 90 8 60 16 80 17 106

i “vrb” 0 10 .5 2.1 2.3 80 90

i “del” 0 10 .4 1.12 2.6 .39 1.02

i “gat” 0 5 .84 .72 .001 .1

i “bar” 0 3 .2 12 .13 1100 0.3 .138 .019 .58 .36

i “bar” 0 4 .2 86 .13 2100 0.3

i “bar” 0 2 .2 66 .12 1800 0.3

i “bar” 0 5 .2 46 .14 1300 0.3

i “bar” 0 3 .2 16 .10 1500 0.3

i “pls” 2 9 .01 .0005 .47 .65

i “gat” 2 10 .45 .52 .01 .1

i “bar” 2 6 .2 39 .13 1100 0.903 .0038 .001 .48 .6

i “gat” 5 10 .5 .62 .001 .1

i “bar” 5 8 .2 8 .13 1100 0.3 3.038 4.01 .8 .76

i “bar” 5 7 .2 36 .13 2100 0.3

i “bar” 5 6 .2 12 .12 1800 0.3

i “bar” 5 5 .2 46 .14 1300 0.3

i “bar” 5 4 .2 21 .10 1500 0.3

i “gat” 6 10 .65 .52 .0001 .1

i “bar” 6 8 .2 49 .13 2100 0.03 .00038 .001 .28 .46

i “gat” 7 5 .4 .7 .1 .6

i “bar” 7 3 .2 9 .13 1100 0.3 4.38 .019 .58 .56

i “bar” 7 4 .2 86 .13 2100 0.3

i “bar” 7 2 .2 66 .12 1800 0.3

i “bar” 7 5 .2 46 .14 1300 0.3

i “bar” 7 3 .2 16 .10 1500 0.3

i “gat” 8 5 .64 .82 .1 1

i “bar” 8 3 .2 10 .13 1100 0.03 1.018 .0019 .58 .76

i “bar” 8 4 .2 76 .13 2100 0.03

i “bar” 8 2 .2 46 .12 1800 0.01

i “bar” 8 5 .2 86 .14 1300 0.02

i “bar” 8 3 .2 26 .10 1500 0.001

i “gat” 9 6 .84 .93 .001 .8

i “pls” 9 6 .6 .2 .6 .6

i “vrb” 10 7 .5 2.1 2.3 80 90

i “del” 10 7 .4 1.12 2.6 .39 1.02

i “pls” 10 9 .03 .0005 .67 .25

i “gat” 10 5 .44 .62 .01 .1

i “bar” 10 3 .2 12 .13 1100 0.3 .138 .019 .58 .36

i “bar” 10 4 .2 86 .13 2100 0.3

i “bar” 10 2 .2 66 .12 1800 0.3

i “bar” 10 5 .2 46 .14 1300 0.3

i “gat” 11 4 .54 .73 .1 .8

i “pls” 11 6 .86 .2 .86 .16

i “gat” 12 3 .64 .53 .01 .7

i “pls” 12 5 .3 .01 .5 .6

i “pls” 12 9 .03 .0001 .87 .35

i “gat” 13 5 .30 .41 .21 .21

i “pls” 13 5 .06 .0004 .87 .5

i “bar” 13.0 3 .16 13 .23 1000 0.13 .038 .001 .88 .56

i “bar” 13.2 3 .17 23 .23 1900 0.13 .028 .01 .68 .46

i “bar” 13.8 3 .15 18 .23 2900 0.13 .028 .02 .68 .36

i “bar” 13.9 3 .18 11 .23 3900 0.13 .028 .01 .68 .26

i “gat” 15 5 .56 .63 .1 .4

i “pls” 15 6 .2 .1 .54 .7

i “vrb” 17 13 .4 3.1 3.3 8 18

i “del” 17 13 .4 2.12 1.6 1.39 2.02

i “gat” 17 7 .34 .33 .01 .1

i “pls” 17 7 .7 .3 .7 .65

i “pls” 17 9 .05 .0001 .87 .5

i “bar” 17.0 5 .22 13 .23 1000 0.13 .038 .001 .88 .56

i “bar” 17.2 5 .21 23 .23 1900 0.13 .028 .01 .68 .46

i “bar” 17.8 5 .25 18 .23 2900 0.13 .028 .02 .68 .36

i “bar” 17.9 5 .29 11 .23 3900 0.13 .028 .01 .68 .26

i “bar” 17.9 5 .29 81 .23 3900 0.13 .028 .01 .68 .26

s ; sec 7

t 0 70 5 50

i “vrb” 0 12 .4 2.1 3 17 19

i “del” 0 12 .6 2.12 2.26 2.39 3.02

i “pls” 0 10 .05 .0001 .87 .5

i “gat” 5 4 .35 .43 .01 .1

i “bar” 5 4 .1 21 .13 1100 0.13 .038 .001 .88 .86

s ; sec 8

t 0 83 5 73 6 94

i “vrb” 0 17 .4 2.1 2 27 39

i “del” 0 17 .6 3.12 3.26 3.39 3.02

i “pls” 0 10 .05 .0003 .77 .65

i “gat” 3 5 .5 .12 1.21 .1

i “bar” 3 5 .12 12 .13 3100 0.15 .028 .002 .68 .56

i “gat” 5 5 .5 .12 1.21 .1

i “bar” 5 5 .2 32 .13 1100 0.13 .038 .001 .58 .6

i “gat” 6 6 .74 .03 .31 .81

i “pls” 6 6 .84 .2 .6 .6

i “pls” 8 6 .06 .01 .17 .65

s ; sec 9

t 0 60 5 90 6.1 156

i “vrb” 0 20 .5 4.61 4.83 80 90

i “del” 0 20 .4 1.12 2.6 3.39 1.02

i “gat” 0 5 .54 .62 .01 .1

i “bar” 0 3 .2 12 .13 1100 0.3 .138 .019 .58 .36

i “bar” 0 4 .2 86 .13 2100 0.3

i “bar” 0 2 .2 66 .12 1800 0.3

i “bar” 0 5 .2 46 .14 1300 0.3

i “bar” 0 3 .2 16 .10 1500 0.3

i “pls” 2 9 .03 .0005 .47 .65

i “gat” 2 6 .5 .72 .001 .1

i “bar” 2 6 .2 29 .13 1100 1.903 .038 .101 .48 .6

i “gat” 5 8 .25 .22 .1 .1

i “bar” 5 8 .12 8 .13 1100 1.3 2.038 1.01 .8 .7

i “bar” 5 7 .12 36 .13 2100 .7 .01 .06 .4 .2

i “bar” 5 6 .12 14 .12 1800 2.3 .04

i “bar” 5 5 .12 46 .14 1300 1.1 .02

i “bar” 5 4 .12 21 .10 1500 3.3 .12

i “gat” 6 4 .65 .72 .1 .1

i “pls” 6 8 .8 .2 .6 .6

s ; sec 10

t 0 45

i “vrb” 0 13 .4 3.1 3.3 7 19

i “del” 0 13 .6 2.12 2.26 2.39 3.02

i “gat” 0 5 .5 .42 1.21 .1

i “bar” 0 5 .2 21 .13 1100 0.13 .038 .001 .58 .6

i “bar” 0 5 .2 26 .13 1500 0.23

i “bar” 0 5 .2 16 .12 1800 0.33

i “bar” 0 5 .2 36 .14 1300 0.43

i “pls” 0 11 .05 .0001 .87 .5

i “gat” 2 5 .5 .12 1.21 .1

i “bar” 2 5 .12 9 .13 3100 0.15 .028 .002 .68 .56

i “gat” 3 5 .5 .12 1.21 .1

i “bar” 3 5 .2 13 .13 1100 0.13 .038 .001 .58 .6

i “gat” 4 5 .74 .03 .31 .81

i “pls” 4 5 .84 .2 .6 .66

s ; sec 11

t 0 60 10 38 12.1 28

i “vrb” 0 24 .34 1.68 1.79 .1 .3

i “del” 0 24 .44 2.12 1.6 1.39 2.02

i “gat” 0 3 .44 .43 .001 .31

i “pls” 0 8 .14 .0001 .6 .6

i “bar” 0 3 .32 17 .33 800 1.3 .0138 .019 .68 .46

i “bar” 0 3 .32 58 .30 900 1.13 .0138 .19 .8 .26

i “gat” 5 3 .32 .34 .01 .31

i “pls” 5 9 .14 .0002 .5 .4

i “bar” 5 3 .32 19 .23 800 1.03 .10031 .219 .68 .56

i “bar” 5 3 .32 53 .23 700 1.05 .1031 .219 .58 .56

i “gat” 10 6 .34 .34 .01 .1

i “pls” 10 9 .24 .003 .56 .41

i “bar” 10 6 .21 22 .23 1200 3.03 .0138 .019 .18 .36

i “bar” 10 6 .21 13 .23 1100 2.03 .0389 .039 .28 .26

i “bar” 10 6 .21 41 .23 1000 1.03 .0238 .029 .18 .16

i “bar” 10 6 .21 14 .23 1100 2.03 .0489 .049 .38 .26

i “bar” 10 6 .21 39 .23 1200 3.03 .0538 .099 .18 .36

i “gat” 12 7 .84 .83 .91 .1

i “pls” 12 9 .97 .01 .87 .5

i “pls” 12 9 .94 .02 .96 .81

e

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

(Attachment barmodel etude (2021) boulanger.csd is missing)

Thanks for sharing. I’ve been using csound to make various “meditation aids” and I find this “pls” instrument very interesting.

Thanks for the example…won’t have time to dig into until later. But – as a side note related to your comment about the Csound Manual: it really never ceases to amaze how much good documentation, or improving documentation with things like workable examples, goes very very far indeed to accomplish two things:

  1. gives users a useable template for their own explorations, and cement understanding of the language in question, and
  2. a related factor: the better the documentation and examples, the more likely you will attract a larger community of users for your software, b/c there will actually be satisfaction with the software, and a shared sense that it can do productive and cool things.

In other words, great documentation (and code examples therein) cannot be overestimated as a positive force for adoption and advocacy of software. This can of course, exist as official documentation, and website links to treasure-troves such as Iian McCurdy’s collection (I don’t know where I would be today w/Csound without that), etc.

Aaron,

These models are super important and I completely agree with you.

Great use cases and inspiring original music are so important.

In particular, Iain McCurdy’s work (his instruments in CsoundQt and Cabbage, and his fantastic music) is incredible and invaluable - I share some of it every week, and every office hour and study it and refer to it almost every day!

Can we cone up with the something like a Grammy or Emmy? The Csoundy award!

Dr. Richard Boulanger
Professor
Electronic Production and Design
Berklee College of Music

Can we cone up with the something like a Grammy or Emmy? The Csoundy award!

Barry?

Dr. Richard Boulanger
Professor
Electronic Production and Design
Berklee College of Music

Thanks for the example…won’t have time to dig into until later. But – as a side note related to your comment about the Csound Manual: it really never ceases to amaze how much good documentation, or improving documentation with things like workable examples, goes very very far indeed to accomplish two things:

  1. gives users a useable template for their own explorations, and cement understanding of the language in question, and
  2. a related factor: the better the documentation and examples, the more likely you will attract a larger community of users for your software, b/c there will actually be satisfaction with the software, and a shared sense that it can do productive and cool things.

In other words, great documentation (and code examples therein) cannot be overestimated as a positive force for adoption and advocacy of software. This can of course, exist as official documentation, and website links to treasure-troves such as Iian McCurdy’s collection (I don’t know where I would be today w/Csound without that), etc.

This week I am sharing another etude. This one draws upon the incredible work being done on the Csound Manual by Stefano Cucci, Menno Knevel, and Kevin Welsh. Their example instrument (and those by many others as well). Are always a source of appreciation, understanding, and inspiration.

In this specific case, I was playing around with Stefano’s manual example for the ‘turnon’ opcode and came up with a couple of pieces. One will appear in the next manual, and the other is here. In the end, and this is the exciting thing about Csound, I don’t use the ‘turnon’ opcodes at all. Instead, I build upon Stefano’s barmodel, mpulse, and multitap instruments to create this humble sonic journey of discovery.

Thanks to Menno, Kevin, and Stefano - for all their great work. I hope you enjoy the journey.

; Barmodel Etude (2021) Richard Boulanger

; inspired by the ‘turnon’ example instrument(s) in the Csound Manual by Stefano Cucchi

sr = 44100

ksmps = 32

nchnls = 2

0dbfs = 1

gasend1 init 0

gasend2 init 0

instr bar

abarL barmodel 1, 1, p5, 0.0001+rnd(p9), 0.0001+rnd(p9), 10+rnd(10), p6, p7, p8

abarR barmodel 1, 1, p5, 0.0001+rnd(p10), 0.0001+rnd(p10), 10+rnd(11), p6, p7, p8

kenvelope expseg 1, p3, .01

abarL = abarL * kenvelope * p4

abarR = abarR * kenvelope * p4

gasend1 = gasend1 + (abarL * p12)

gasend2 = gasend2 + (abarR * p11)

endin

instr pls

idenStart = p5

kdensity expseg p5, p3, 0.001

apulse mpulse 1, rnd(kdensity)

kenvelope expseg 1, p3, .001

apulse = apulse * kenvelope * p4

gasend1 = gasend1 + apulse * p7

gasend2 = gasend2 + apulse * p6

endin

instr gat

idryLeft = p4

idryRight = p5

kgate adsr p6,.01,1,p7

outs (gasend1 * kgate) * idryLeft, (gasend2 * kgate) * idryRight

endin

instr del

afold fold gasend2, 26

adelfoldL multitap afold, .42+rnd(p5), 0.52, 1.7+rnd(p6), 0.44, .6+rnd(p7), 0.34

adelfoldR multitap afold, 1.1+rnd(p6), 0.64, 0.3+rnd(p5), 0.54, .2+rnd(p8), 0.43

outs adelfoldL * p4, adelfoldR * p4

clear gasend2

endin

instr vrb

aphsL phaser1 gasend1, 100*rnd(p7), 4, -.9

aphsR phaser1 gasend1, 200*rnd(p8), 4, -.9

aRevL reverb2 aphsL, .618+rnd(p5), .1

aRevR reverb2 aphsR, .618+rnd(p6), .1

outs aRevL * p4, aRevR * p4

clear gasend1

endin

t 0 40 5 76

i “vrb” 0 12 .5 3.1 3.8 170 189

i “del” 0 12 .6 2.12 2.26 2.39 3.02

i “pls” 0 10 .04 .0001 .87 .5

i “gat” 5 4 .4 .3 1.21 .1

i “bar” 5 4 .18 16 .23 1800 0.12 .048 .001 .48 .66

i “bar” 5.05 4 .18 18 .23 1800 0.02 .038 .001 .48 .56

i “bar” 5.09 4 .18 23 .23 1100 0.04 .028 .001 .48 .76

s ; sec 2

t 0 76 6 43 12 90

i “vrb” 0 19 .4 4.1 4 27 39

i “del” 0 19 .6 3.12 3.26 3.39 3.02

i “pls” 0 10 .05 .0002 .77 .65

i “gat” 4 5 .5 .12 1.21 .1

i “bar” 4 5 .12 9 .13 3100 0.15 .028 .002 .68 .56

i “gat” 6 5 .5 .12 1.21 .1

i “bar” 6 5 .2 13 .13 1100 0.13 .038 .001 .58 .6

i “gat” 8 6 .74 .03 .31 .81

i “pls” 8 6 .84 .2 .6 .6

s ; sec 3

t 0 40 7 100

i “vrb” 0 14 .4 2.1 3 17 19

i “del” 0 14 .6 2.12 2.26 2.39 3.02

i “pls” 0 11 .04 .0001 .87 .5

i “gat” 5 4 .65 .3 1.21 .1

i “bar” 5 4 .31 18 .13 1100 0.13 .038 .001 .88 .56

i “gat” 7 4 .65 .3 1.21 .1

i “bar” 7 4 .41 14 .13 1000 0.12 .036 .0009 .68 .46

s ; sec 4

t 0 45 9.5 30 10 50 12 43 13 50 16 40 19.1 106

i “vrb” 0 10 .4 2.1 2 7 19

i “del” 0 10 .6 2.12 2.26 2.39 3.02

i “gat” 0 5 .5 .42 1.21 .1

i “bar” 0 5 .2 21 .13 1100 0.13 .038 .001 .58 .6

i “bar” 0 5 .2 26 .13 1500 0.23

i “bar” 0 5 .2 16 .12 1800 0.33

i “bar” 0 5 .2 36 .14 1300 0.43

i “pls” 0 11 .05 .0001 .87 .5

i “gat” 5 3 .64 .43 .31 .81

i “pls” 5 6 .84 .2 .6 .6

i “gat” 8 6 .4 .53 .01 .81

i “pls” 8 6 .1 .001 .57 .45

i “vrb” 10 17 .54 2.1 3.3 668 769

i “del” 10 17 .3 2.12 2.26 2.39 3.02

i “gat” 10 3 .54 .43 .01 .81

i “pls” 10 5 .05 .0001 .87 .5

i “bar” 10.0 3 .20 13 .23 1000 0.13 .038 .001 .88 .56

i “bar” 10.2 3 .20 23 .23 1900 0.13 .028 .01 .68 .46

i “bar” 10.8 3 .20 18 .23 2900 0.13 .028 .02 .68 .36

i “bar” 10.9 3 .20 11 .23 3900 0.13 .028 .01 .68 .26

i “bar” 10.9 3 .20 61 .23 3900 0.13 .028 .01 .68 .26

i “gat” 13 4 .44 .53 .01 .41

i “pls” 13 5 .05 .0001 .87 .5

i “bar” 13.0 3 .20 14 .23 1000 0.13 .038 .001 .88 .56

i “bar” 13.2 3 .20 22 .23 1900 0.13 .028 .01 .68 .46

i “bar” 13.8 3 .20 16 .23 2900 0.13 .028 .02 .68 .36

i “bar” 13.9 3 .20 12 .23 3900 0.13 .028 .01 .68 .26

i “bar” 13.9 3 .20 71 .23 3900 0.13 .028 .01 .68 .26

i “gat” 16 5 .44 .53 .01 .41

i “pls” 16 5 .05 .0002 .77 .5

i “bar” 16.0 3 .20 15 .23 1000 0.13 .038 .001 .88 .56

i “bar” 16.2 3 .20 21 .23 1900 0.13 .028 .01 .68 .46

i “bar” 16.8 3 .20 10 .23 2900 0.13 .028 .02 .68 .36

i “bar” 16.9 3 .20 32 .23 3900 0.13 .028 .01 .68 .26

i “bar” 16.9 3 .20 61 .23 3900 0.13 .028 .01 .68 .26

i “gat” 19 5 .64 .73 .01 .1

i “pls” 19 5 .05 .0002 .77 .5

i “bar” 19.0 3 .20 11 .23 1000 0.13 .038 .001 .88 .56

i “bar” 19.2 3 .20 18 .23 1900 0.13 .028 .01 .68 .46

i “bar” 19.8 3 .20 9 .23 2900 0.13 .028 .02 .68 .36

i “bar” 19.9 3 .20 22 .23 3900 0.13 .028 .01 .68 .26

i “bar” 19.9 3 .20 31 .23 3900 0.13 .028 .01 .68 .26

s ; sec 5

t 0 76 9 56 10 76 19.1 36

i “vrb” 0 26 .64 2.1 1.6 608 469

i “del” 0 26 .33 2.12 2.26 2.39 3.02

i “gat” 0 3 .35 .43 .01 .01

i “pls” 0 5 .09 .0001 .87 .5

i “bar” 0.0 3 .22 43 .23 1000 0.12 .038 .01 .88 .56

i “bar” 0.2 3 .21 13 .23 1900 0.13 .028 .01 .68 .46

i “bar” 0.8 3 .25 38 .23 2900 0.14 .028 .02 .68 .36

i “bar” 0.9 3 .29 21 .23 3900 0.15 .028 .01 .68 .26

i “bar” 0.9 3 .29 51 .23 3900 0.16 .028 .01 .68 .26

i “gat” 3 3 .35 .43 .01 .01

i “pls” 3 5 .09 .0001 .87 .5

i “bar” 3.0 3 .22 34 .23 1000 0.10 .038 .01 .88 .56

i “bar” 3.2 3 .21 12 .23 1900 0.11 .028 .01 .68 .46

i “bar” 3.8 3 .25 26 .23 2900 0.12 .028 .02 .68 .36

i “bar” 3.9 3 .29 32 .23 3900 0.13 .028 .01 .68 .26

i “bar” 3.9 3 .29 61 .23 3900 0.14 .028 .01 .68 .26

i “gat” 6 3 .35 .53 .01 .01

i “pls” 6 5 .08 .0002 .77 .5

i “bar” 6.0 3 .22 25 .23 1000 0.08 .038 .01 .88 .56

i “bar” 6.2 3 .21 11 .23 1900 0.09 .028 .01 .68 .46

i “bar” 6.8 3 .25 20 .23 2900 0.10 .028 .02 .68 .36

i “bar” 6.9 3 .29 22 .23 3900 0.11 .028 .01 .68 .26

i “bar” 6.9 3 .29 51 .23 3900 0.12 .028 .01 .68 .26

i “gat” 9 3 .25 .23 .01 .01

i “pls” 9 5 .06 .0002 .77 .5

i “bar” 9.0 3 .22 21 .23 1000 0.10 .038 .01 .88 .56

i “bar” 9.2 3 .21 28 .23 1900 0.11 .028 .01 .68 .46

i “bar” 9.8 3 .23 19 .23 2900 0.12 .028 .02 .68 .36

i “bar” 9.9 3 .21 32 .23 3900 0.23 .028 .01 .68 .26

i “bar” 9.9 3 .21 41 .23 3900 0.14 .028 .01 .68 .26

i “gat” 10 3 .25 .29 .01 .01

i “pls” 10 5 .06 .0001 .87 .5

i “bar” 10.0 3 .22 23 .23 1000 0.12 .038 .01 .88 .56

i “bar” 10.2 3 .21 53 .23 1900 0.13 .028 .01 .68 .46

i “bar” 10.8 3 .22 28 .23 2900 0.14 .028 .02 .68 .36

i “bar” 10.9 3 .27 31 .23 3900 0.15 .028 .01 .68 .26

i “bar” 10.9 3 .26 41 .23 3900 0.16 .028 .01 .68 .26

i “gat” 13 3 .20 .20 .01 .01

i “pls” 13 5 .05 .0001 .87 .5

i “bar” 13.0 3 .15 24 .23 1000 0.10 .038 .01 .88 .56

i “bar” 13.2 3 .15 22 .23 1900 0.11 .028 .01 .68 .46

i “bar” 13.8 3 .15 16 .23 2900 0.12 .028 .02 .68 .36

i “bar” 13.9 3 .15 42 .23 3900 0.13 .028 .01 .68 .26

i “bar” 13.9 3 .15 11 .23 3900 0.14 .028 .01 .68 .26

i “gat” 16 3 .25 .28 .01 .01

i “pls” 16 5 .05 .0002 .77 .5

i “bar” 16.0 3 .22 15 .23 1000 0.08 .038 .01 .88 .56

i “bar” 16.2 3 .21 51 .23 1900 0.09 .028 .01 .68 .46

i “bar” 16.8 3 .25 10 .23 2900 0.10 .028 .02 .68 .36

i “bar” 16.9 3 .29 42 .23 3900 0.11 .028 .01 .68 .26

i “bar” 16.9 3 .29 71 .23 3900 0.12 .028 .01 .68 .26

i “gat” 19 3 .21 .23 .01 .01

i “pls” 19 5 .04 .0002 .77 .5

i “bar” 19.0 3 .21 11 .23 1000 0.10 .038 .01 .88 .56

i “bar” 19.2 3 .21 38 .23 1900 0.11 .028 .01 .68 .46

i “bar” 19.8 3 .21 49 .23 2900 0.12 .028 .02 .68 .36

i “bar” 19.9 3 .21 22 .23 3900 0.23 .028 .01 .68 .26

i “bar” 19.9 3 .21 81 .23 3900 0.14 .028 .01 .68 .26

s ; sec 6

t 0 40 5 90 8 60 16 80 17 106

i “vrb” 0 10 .5 2.1 2.3 80 90

i “del” 0 10 .4 1.12 2.6 .39 1.02

i “gat” 0 5 .84 .72 .001 .1

i “bar” 0 3 .2 12 .13 1100 0.3 .138 .019 .58 .36

i “bar” 0 4 .2 86 .13 2100 0.3

i “bar” 0 2 .2 66 .12 1800 0.3

i “bar” 0 5 .2 46 .14 1300 0.3

i “bar” 0 3 .2 16 .10 1500 0.3

i “pls” 2 9 .01 .0005 .47 .65

i “gat” 2 10 .45 .52 .01 .1

i “bar” 2 6 .2 39 .13 1100 0.903 .0038 .001 .48 .6

i “gat” 5 10 .5 .62 .001 .1

i “bar” 5 8 .2 8 .13 1100 0.3 3.038 4.01 .8 .76

i “bar” 5 7 .2 36 .13 2100 0.3

i “bar” 5 6 .2 12 .12 1800 0.3

i “bar” 5 5 .2 46 .14 1300 0.3

i “bar” 5 4 .2 21 .10 1500 0.3

i “gat” 6 10 .65 .52 .0001 .1

i “bar” 6 8 .2 49 .13 2100 0.03 .00038 .001 .28 .46

i “gat” 7 5 .4 .7 .1 .6

i “bar” 7 3 .2 9 .13 1100 0.3 4.38 .019 .58 .56

i “bar” 7 4 .2 86 .13 2100 0.3

i “bar” 7 2 .2 66 .12 1800 0.3

i “bar” 7 5 .2 46 .14 1300 0.3

i “bar” 7 3 .2 16 .10 1500 0.3

i “gat” 8 5 .64 .82 .1 1

i “bar” 8 3 .2 10 .13 1100 0.03 1.018 .0019 .58 .76

i “bar” 8 4 .2 76 .13 2100 0.03

i “bar” 8 2 .2 46 .12 1800 0.01

i “bar” 8 5 .2 86 .14 1300 0.02

i “bar” 8 3 .2 26 .10 1500 0.001

i “gat” 9 6 .84 .93 .001 .8

i “pls” 9 6 .6 .2 .6 .6

i “vrb” 10 7 .5 2.1 2.3 80 90

i “del” 10 7 .4 1.12 2.6 .39 1.02

i “pls” 10 9 .03 .0005 .67 .25

i “gat” 10 5 .44 .62 .01 .1

i “bar” 10 3 .2 12 .13 1100 0.3 .138 .019 .58 .36

i “bar” 10 4 .2 86 .13 2100 0.3

i “bar” 10 2 .2 66 .12 1800 0.3

i “bar” 10 5 .2 46 .14 1300 0.3

i “gat” 11 4 .54 .73 .1 .8

i “pls” 11 6 .86 .2 .86 .16

i “gat” 12 3 .64 .53 .01 .7

i “pls” 12 5 .3 .01 .5 .6

i “pls” 12 9 .03 .0001 .87 .35

i “gat” 13 5 .30 .41 .21 .21

i “pls” 13 5 .06 .0004 .87 .5

i “bar” 13.0 3 .16 13 .23 1000 0.13 .038 .001 .88 .56

i “bar” 13.2 3 .17 23 .23 1900 0.13 .028 .01 .68 .46

i “bar” 13.8 3 .15 18 .23 2900 0.13 .028 .02 .68 .36

i “bar” 13.9 3 .18 11 .23 3900 0.13 .028 .01 .68 .26

i “gat” 15 5 .56 .63 .1 .4

i “pls” 15 6 .2 .1 .54 .7

i “vrb” 17 13 .4 3.1 3.3 8 18

i “del” 17 13 .4 2.12 1.6 1.39 2.02

i “gat” 17 7 .34 .33 .01 .1

i “pls” 17 7 .7 .3 .7 .65

i “pls” 17 9 .05 .0001 .87 .5

i “bar” 17.0 5 .22 13 .23 1000 0.13 .038 .001 .88 .56

i “bar” 17.2 5 .21 23 .23 1900 0.13 .028 .01 .68 .46

i “bar” 17.8 5 .25 18 .23 2900 0.13 .028 .02 .68 .36

i “bar” 17.9 5 .29 11 .23 3900 0.13 .028 .01 .68 .26

i “bar” 17.9 5 .29 81 .23 3900 0.13 .028 .01 .68 .26

s ; sec 7

t 0 70 5 50

i “vrb” 0 12 .4 2.1 3 17 19

i “del” 0 12 .6 2.12 2.26 2.39 3.02

i “pls” 0 10 .05 .0001 .87 .5

i “gat” 5 4 .35 .43 .01 .1

i “bar” 5 4 .1 21 .13 1100 0.13 .038 .001 .88 .86

s ; sec 8

t 0 83 5 73 6 94

i “vrb” 0 17 .4 2.1 2 27 39

i “del” 0 17 .6 3.12 3.26 3.39 3.02

i “pls” 0 10 .05 .0003 .77 .65

i “gat” 3 5 .5 .12 1.21 .1

i “bar” 3 5 .12 12 .13 3100 0.15 .028 .002 .68 .56

i “gat” 5 5 .5 .12 1.21 .1

i “bar” 5 5 .2 32 .13 1100 0.13 .038 .001 .58 .6

i “gat” 6 6 .74 .03 .31 .81

i “pls” 6 6 .84 .2 .6 .6

i “pls” 8 6 .06 .01 .17 .65

s ; sec 9

t 0 60 5 90 6.1 156

i “vrb” 0 20 .5 4.61 4.83 80 90

i “del” 0 20 .4 1.12 2.6 3.39 1.02

i “gat” 0 5 .54 .62 .01 .1

i “bar” 0 3 .2 12 .13 1100 0.3 .138 .019 .58 .36

i “bar” 0 4 .2 86 .13 2100 0.3

i “bar” 0 2 .2 66 .12 1800 0.3

i “bar” 0 5 .2 46 .14 1300 0.3

i “bar” 0 3 .2 16 .10 1500 0.3

i “pls” 2 9 .03 .0005 .47 .65

i “gat” 2 6 .5 .72 .001 .1

i “bar” 2 6 .2 29 .13 1100 1.903 .038 .101 .48 .6

i “gat” 5 8 .25 .22 .1 .1

i “bar” 5 8 .12 8 .13 1100 1.3 2.038 1.01 .8 .7

i “bar” 5 7 .12 36 .13 2100 .7 .01 .06 .4 .2

i “bar” 5 6 .12 14 .12 1800 2.3 .04

i “bar” 5 5 .12 46 .14 1300 1.1 .02

i “bar” 5 4 .12 21 .10 1500 3.3 .12

i “gat” 6 4 .65 .72 .1 .1

i “pls” 6 8 .8 .2 .6 .6

s ; sec 10

t 0 45

i “vrb” 0 13 .4 3.1 3.3 7 19

i “del” 0 13 .6 2.12 2.26 2.39 3.02

i “gat” 0 5 .5 .42 1.21 .1

i “bar” 0 5 .2 21 .13 1100 0.13 .038 .001 .58 .6

i “bar” 0 5 .2 26 .13 1500 0.23

i “bar” 0 5 .2 16 .12 1800 0.33

i “bar” 0 5 .2 36 .14 1300 0.43

i “pls” 0 11 .05 .0001 .87 .5

i “gat” 2 5 .5 .12 1.21 .1

i “bar” 2 5 .12 9 .13 3100 0.15 .028 .002 .68 .56

i “gat” 3 5 .5 .12 1.21 .1

i “bar” 3 5 .2 13 .13 1100 0.13 .038 .001 .58 .6

i “gat” 4 5 .74 .03 .31 .81

i “pls” 4 5 .84 .2 .6 .66

s ; sec 11

t 0 60 10 38 12.1 28

i “vrb” 0 24 .34 1.68 1.79 .1 .3

i “del” 0 24 .44 2.12 1.6 1.39 2.02

i “gat” 0 3 .44 .43 .001 .31

i “pls” 0 8 .14 .0001 .6 .6

i “bar” 0 3 .32 17 .33 800 1.3 .0138 .019 .68 .46

i “bar” 0 3 .32 58 .30 900 1.13 .0138 .19 .8 .26

i “gat” 5 3 .32 .34 .01 .31

i “pls” 5 9 .14 .0002 .5 .4

i “bar” 5 3 .32 19 .23 800 1.03 .10031 .219 .68 .56

i “bar” 5 3 .32 53 .23 700 1.05 .1031 .219 .58 .56

i “gat” 10 6 .34 .34 .01 .1

i “pls” 10 9 .24 .003 .56 .41

i “bar” 10 6 .21 22 .23 1200 3.03 .0138 .019 .18 .36

i “bar” 10 6 .21 13 .23 1100 2.03 .0389 .039 .28 .26

i “bar” 10 6 .21 41 .23 1000 1.03 .0238 .029 .18 .16

i “bar” 10 6 .21 14 .23 1100 2.03 .0489 .049 .38 .26

i “bar” 10 6 .21 39 .23 1200 3.03 .0538 .099 .18 .36

i “gat” 12 7 .84 .83 .91 .1

i “pls” 12 9 .97 .01 .87 .5

i “pls” 12 9 .94 .02 .96 .81

e

Dr. Richard Boulanger

Professor of Electronic Production and Design

Berklee College of Music

Professional Writing and Technology Division

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Yes. A Barry!

Dr. Richard Boulanger
Professor
Electronic Production and Design
Berklee College of Music

Brilliant.

Perfect...! (:-))

  -- Pete --

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

+1 on a Barry