git1 ftgen 1, 0, 256, 7, 1, 80, 1, 156, -1, 20, -1 |
git3 ftgen 3, 0, 8192, 10, 1, 0 |
instr 2 |
areedbell | init | 0 |
ifqc | = | cpspch(p5) |
ifco | = | p7 |
ibore | = | 1/ifqc-15/sr |
kenv1 | linseg | 0, .005, .55+.3*p6, p3-.015, .55+.3*p6, .01, 0 |
kenvibr | linseg | 0, .1, 0, .9, 1, p3-1, 1 ;Vibrato envelope |
kemboff | = | p8 ;Can be used to adjust reed stiffness. |
avibr | oscil | .1*kenvibr, 5, git3 ;Breath pressure. |
apressm | = | kenv1+avibr |
arefilt | tone | areedbell, ifco ; Bell reflection filter(lowpass) |
abellreed | delay | arefilt, ibore ; The delay from bell to reed. |
;;; Back pressure and reed table look up. |
asum2 | = | -apressm-.95*arefilt-kemboff |
areedtab | tablei | asum2/4+.34, p9, git1, .5 |
amult1 | = | asum2*areedtab |
;;; Forward Pressure |
asum1 | = apressm+amult1 |
areedbell | delay | asum1, ibore |
aofilt | atone | areedbell, ifco |
out | aofilt*p4 |
endin |
With this definition the student could, for example, change the reed table to investigate alternative reed models, which were internal in the opcode given earlier.
The aim here naturally is to introduce the various DSP facilities of the language as their use arises, and so to avoid the deadening initial learning phase.
We do not expect that many students will aspire to this third level, but a few may wish to implement a physical model more efficiently that can be done with the opcode style of level 2. As Csound is source-open we can direct interested people at the C implementations of wgclar for example, and they can then proceed to create a new model, coding the opcode implementation at the more efficient C level. The implementation of wgclar is too long for this presentation, but can be seen in the sources in the file physmod.c
There are other areas where this preset approach can work. We have also worked with hybrid sound models, such as the Hammond organ and familiar FM synthesis sounds, and Perry Cook’s Physically Informed models.6
|