Csound Csound-dev Csound-tekno Search About

Pluck broken?

Date1998-11-20 06:17
FromMatti Koskinen
SubjectPluck broken?
hello

	the following orch+sco, generated by HPKComposer makes
	Linux-csound 3.490d segfault in pluck.  Another orch,
	almost equal to this except before pluck-opcode was oscil,
	worked ok. Also i tried just a simple pluck without anything
	else and that worked too. I don't have the newest winsound,
	so I don't know about that.

	Sorry for a long post.

-matti
mjkoskin@sci.fi

Orch------------------------------

; General settings
sr = 22050
kr = 2205
ksmps = 10
nchnls = 2

gaefbusl0 init 0
gaefbusr0 init 0
gain10 init 0
gain20 init 0
gifeed0 init .5
gilp10  init 1/10
gilp20  init 1/23
gilp30  init 1/41
giroll0 init 3000
gaefbusl1 init 0
gaefbusr1 init 0
gain11 init 0
gain21 init 0
gifeed1 init .5
gilp11  init 1/10
gilp21  init 1/23
gilp31  init 1/41
giroll1 init 3000
gaefbusl2 init 0
gaefbusr2 init 0
gain12 init 0
gain22 init 0
gifeed2 init .5
gilp12  init 1/10
gilp22  init 1/23
gilp32  init 1/41
giroll2 init 3000
gaefbusl3 init 0
gaefbusr3 init 0
gain13 init 0
gain23 init 0
gifeed3 init .5
gilp13  init 1/10
gilp23  init 1/23
gilp33  init 1/41
giroll3 init 3000


; Instruments definitions

instr 1
; 


ic0 = p6
ic1 = p7
ic2 = p8
ic3 = p9
ic4 = p10
ic5 = p11
ic6 = p12
ic7 = p13
ic8 = p14
ic9 = p15
ic10 = p16
ic11 = p17
ic12 = p18
ic13 = p19
ic14 = p20
ic15 = p21


kdclick linseg  0, .002, 1, p3-.004, 1, .002, 0  ; Declick
ipitch = cpspch(p4)  ; Convert to frequency

; Sound source 1 Pluck
iamp = 1.0
itune1 = ic0
ipitch1 = ipitch + ic0
; Pitch control section
kctrl = 0
kmod = kctrl
; Modulator 1
kmodul1 = 0
; Modulator 2
kmodul2 = 0
; Pluck
kfco = (kmodul1 *1.0)
kfco = kfco + (kmodul2 *1.5)

kamp = 1

ifqcp = ipitch1
kmod = ifqcp + kmod + kfco
kampp linseg 0, .002, iamp, (p3-.002)*9/10, iamp, (p3-.002)/10, 0  ;
Declick
aout1 pluck  kampp * kamp, kmod, ifqcp, 0, 1       ; Pluck waveguide
model

aout2 = 0

; Transformers
asig = 0

; final mix and effect routing
; direct sources output
aoutmixd = 1.0 * aout1
; xform signal
aoutmixx = asig * 1.0
; mix direct out and xform signal
aoutmix = ( aoutmixd + aoutmixx ) * kdclick 
; pan and output
kpanl tablei 0.5,2,1
kpanr tablei 1.0-0.5,2,1
aoutmixl = aoutmix * kpanl * p5
aoutmixr = aoutmix * kpanr * p5
gaefbusl0 = gaefbusl0 + aoutmixl * 1.0
gaefbusr0 = gaefbusr0 + aoutmixr * 1.0
outs aoutmixl * 1.0, aoutmixr * 1.0
endin








instr 100
asigl = gaefbusl0
asigr = gaefbusr0

inputdur = 4.0
iatk = 0.5
idk = .01
idecay = .01
ioutsust = p3-idecay
idur = inputdur-(iatk+idk)
isust = p3-(iatk+idur+idk)
iorig = 0.5
irev = 1.0-iorig
igain = 1.0
kclean linseg 0,iatk,igain,idur,igain,idk,0,isust,0
kout linseg 1,ioutsust,1,idecay,0
ain1 = asigl
ain2 = asigr
ain1 = ain1*kclean
ain2 = ain2*kclean
ajunk alpass ain1,1.7,.1
aleft alpass ajunk,1.01,.07
ajunk alpass ain2,1.5,.2
aright alpass ajunk,1.33,.05
kdel1 randi .01,1,.666
kdel1 =kdel1 + .1
addl1 delayr .3
afeed1 deltapi kdel1
afeed1 = afeed1 + gifeed0*aleft
delayw aleft
kdel2 randi .01,.95,.777
kdel2 = kdel2 + .1
addl2 delayr .3
afeed2 deltapi kdel2
afeed2 = afeed2 + gifeed0*aright
delayw aright
aglobin = (afeed1+afeed2)*.05
atap1 comb aglobin,3.3,gilp10
atap2 comb aglobin,3.3,gilp20
atap3 comb aglobin,3.3,gilp30
aglobrev alpass atap1+atap2+atap3,2.6,.085
aglobrev tone aglobrev,giroll0
kdel3 randi .003,1,.888
kdel3 =kdel3 + .05
addl3 delayr .2
agr1 deltapi kdel3
delayw aglobrev
kdel4 randi .003,1,.999
kdel4 =kdel4 + .05
addl4 delayr .2
agr2 deltapi kdel4
delayw aglobrev
arevl = agr1+afeed1
arevr = agr2+afeed2
aoutl = (ain1*iorig)+(arevl*irev)
aoutr = (ain2*iorig)+(arevr*irev)
asigl = aoutl*kout
asigr = aoutr*kout
asigl = asigl * (69/100)
asigr = asigr * (69/100)

outs asigl, asigr
gaefbusl0 = 0
gaefbusr0 = 0
endin

Score-----------------------------------

f10  0 512  7 0 12 .99 500 0
f11  0 512  7 0 12 .99 500 0

f1 0 8192 19 1 1 270 1
f2 0 1025 9 .25 1 0
f3 0 65536 10 1



; Structure 1
i1  0.0  1.0  8.9  16000.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0 
1.0  1.0  1.0  1.0  1.0  1.0  1.0
i1  0.0  1.0  0.7002  16000.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0 
1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0
i1  1.0  1.0  5.3803  16000.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0 
1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0
i1  1.0  1.0  0.6157  16000.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0 
1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0
i1  2.0  1.0  6.342  16000.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0 
1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0
i1  2.0  1.0  0.7255  16000.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0 
1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0
i1  3.0  1.0  8.4779  16000.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0 
1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0
i1  3.0  1.0  0.6459  16000.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0 
1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0
i1  4.0  1.0  6.7705  16000.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0 
1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0
i1  4.0  1.0  0.9416  16000.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0 
1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0