Csound Csound-dev Csound-tekno Search About

the continuing adventures of residual Granular piercings

Date1999-09-30 17:56
Frompatrick pagano
Subjectthe continuing adventures of residual Granular piercings
Hi C sounders
i have attached a instr and was wondering if anyone can help with the
same problem
i have been experiencing for a while
: the scenario

i have say 30 seconds of granular events that are wonderful(to me) i
have usually arrived at by using random selections. I try to extend the
event by putting a
t 0 20 on it so  it becomes like a landscape. and i then try to mirror
the initial event
unextended on the otherside. usually seperating then with  sections to
remove a high piercing pitch that appears (which is not in the .sco).
so it looks like this

; Function 1 uses the GEN10 subroutine to compute a sine wave
; Function 3 uses the GEN20 subroutine to compute a Hanning window for
use as a grain envelope

f 1  0 4096 10   1
f 3  0 4097 -20   2  1
f2  0 4096 10   1  0 0 0  0 0 2
f10 0 512 -7 0 50 1 50 .5 300 .5 112 0   ;ADSR

;inst s dur     Ft    Dens   len        Fr1   Fr2   Fr3    Fr4        1
i 105      0      3      1   .05  77       896   448    64     448
0
i 105       3      6      2   .09   7       672   448   128
336        1
i 106       6      3      1  .16   6        544   816   256
272        0
i 105       9      7      1   .0036   15    544   448   512
272        1
i 106       16      6      2  .09   14      128   192   448
336        0
;inst s dur     Ft    Dens   len        Fr1   Fr2   Fr3    Fr4        1
i 107      0      3      1   .005  77      896   544    64     448
0
i 107       3      3      2   .009   7      672   544   128
336        1
i 106       6      3      1  .016   6       544   384   256
384        0
i 107       9      7      1   .036   15     544   448   512
272        1
i 106       16      6      2  .009   14     128   192   448
192        0
; inst s dur     Ft    Dens   len  Fr1   Fr2   Fr3    Fr4
i 107      0      3      1   .05  177      448   496    64     448
0
i 107       3      3      2   .09   67      336   512   224
336        1
i 106       6      10      1  .13   76      272    64   256
272        0
i 107       16      6      2  .09   114     336   512   224
336        1
i 105       21     10       1   .08  76      512   1024    64
512      0
i 106       21     10       2   .15   17     1024  496    512
816      1

;this is for reverb settings
;===========================
;p1    p2   p3    p4         p5
;instr strt  dur rvbtime hfdif
i98     0  31 5         .7
s
t 0 20 10 240 15 5
;inst s dur     Ft    Dens   len        Fr1   Fr2   Fr3    Fr4        1
i 105      0      3      1   .05  77       896   448    64     448
0
i 105       3      6      2   .09   7       672   448   128
336        1
i 106       6      3      1  .16   6        544   816   256
272        0
i 105       9      7      1   .0036   15    544   448   512
272        1
i 106       16      6      2  .09   14      128   192   448
336        0
;inst s dur     Ft    Dens   len        Fr1   Fr2   Fr3    Fr4        1
i 107      0      3      1   .005  77      896   544    64     448
0
i 107       3      3      2   .009   7      672   544   128
336        1
i 106       6      3      1  .016   6       544   384   256
384        0
i 107       9      7      1   .036   15     544   448   512
272        1
i 106       16      6      2  .009   14     128   192   448
192        0
; inst s dur     Ft    Dens   len  Fr1   Fr2   Fr3    Fr4
i 107      0      3      1   .05  177      448   496    64     448
0
i 107       3      3      2   .09   67      336   512   224
336        1
i 106       6      10      1  .13   76      272    64   256
272        0
i 107       16      6      2  .09   114     336   512   224
336        1
i 105       21     10       1   .08  76      512   1024    64
512      0
i 106       21     10       2   .15   17     1024  496    512
816      1

;this is for reverb settings
;===========================
;p1    p2   p3    p4         p5
;instr strt  dur rvbtime hfdif
i98     0  31 5         .7
s
t 0 240
;inst s dur     Ft    Dens   len        Fr1   Fr2   Fr3    Fr4        1
i 105      0      3      1   .05  77       896   448    64     448
0
i 105       3      6      2   .09   7       672   448   128
336        1
i 106       6      3      1  .16   6        544   816   256
272        0
i 105       9      7      1   .0036   15    544   448   512
272        1
i 106       16      6      2  .09   14      128   192   448
336        0
;inst s dur     Ft    Dens   len        Fr1   Fr2   Fr3    Fr4        1
i 107      0      3      1   .005  77      896   544    64     448
0
i 107       3      3      2   .009   7      672   544   128
336        1
i 106       6      3      1  .016   6       544   384   256
384        0
i 107       9      7      1   .036   15     544   448   512
272        1
i 106       16      6      2  .009   14     128   192   448
192        0
; inst s dur     Ft    Dens   len  Fr1   Fr2   Fr3    Fr4
i 107      0      3      1   .05  177      448   496    64     448
0
i 107       3      3      2   .09   67      336   512   224
336        1
i 106       6      10      1  .13   76      272    64   256
272        0
i 107       16      6      2  .09   114     336   512   224
336        1
i 105       21     10       1   .08  76      512   1024    64
512      0
i 106       21     10       2   .15   17     1024  496    512
816      1

;this is for reverb settings
;===========================
;p1    p2   p3    p4         p5
;instr strt  dur rvbtime hfdif
i98     0  32 5         .7
s; this is the section where th unwanted high pitch results
;inst s dur     Ft    Dens   len        Fr1   Fr2   Fr3    Fr4        1
i 105      0      3      1   .05  77       896   448    64     448
0
i 105       3      6      2   .09   7       672   448   128
336        1
i 106       6      3      1  .016   6        544   816   256
272        0
i 105       9      7      1   .036   15    544   448   512    272
1
i 106       16      2      2  .09   14      128   192   448
336        0
;inst s dur     Ft    Dens   len        Fr1   Fr2   Fr3    Fr4        1
i 107      0      3      1   .05  77      896   544    64     448
1
i 107       3      3      2   .09   7      672   544   128    336
0
i 106       6      3      1  .016   6       544   384   256
384        1
i 107       9      7      1   .36   15     544   448   512    272
0
i 106       16      1      2  .09   14     128   192   448    192
1
; inst s dur     Ft    Dens   len  Fr1   Fr2   Fr3    Fr4
i 107      2      3      1   .015  177      448   496    64
448       0
i 107       5      3      2   .019   67      336   512   224
336        1
i 106       9      5      1  .013   76      272    64   256
272        0
i 107       16      5      2  .09   114     336   512   224
336        1
i 105       21     1       1   .08  76      512   1024    64    512
0
i 106       21     10       2   .15   17     1024  496    512
816      1

;this is for reverb settings
;===========================
;p1    p2   p3    p4         p5
;instr strt  dur rvbtime hfdif
i98     0  33 5         .7


e
;here is the orc
sr   =   44100
kr   =   4410
ksmps  =   10
nchnls  =   2
garvbsig init 0


  instr  105
kpan=p11
koscar     oscil       500,512,1
kamp       oscil       koscar,512,10
aamp    linseg  0, .002, 1, p3-.004, 1, .002, 0  ; Declick envelope
kenv        expseg p7, p3/2, p8, p3/2, p9, p3/2,p10
a1   grain  koscar, kenv, p6, kamp+10, kenv*6, p5, p4, 3, 1
krtl=sqrt(2)/2*cos(kpan)+sin(kpan)     ;constant power panning
krtr=sqrt(2)/2*cos(kpan)-sin(kpan)     ;from C.Roads "CM Tutorial" pp460

aout=a1*aamp
al=aout*krtl
ar=aout*krtr
 outs al,ar

garvbsig=garvbsig+aout

  endin
instr  106
kpan=p11
koscar     oscil       500,256,1
kamp       oscil       koscar,256,10
aamp    linseg  0, .002, 1, p3-.004, 1, .002, 0  ; Declick envelope
kenv        expseg p7, p3/2, p8, p3/2, p9, p3/2,p10
a1   grain  koscar, kenv, p6, kamp+10, kenv*6, p5, p4, 3, 1
krtl=sqrt(2)/2*cos(kpan)+sin(kpan)     ;constant power panning
krtr=sqrt(2)/2*cos(kpan)-sin(kpan)     ;from C.Roads "CM Tutorial" pp460

aout=a1*aamp
al=aout*krtl
ar=aout*krtr
 outs al,ar

garvbsig=garvbsig+aout
  endin
instr  107
kpan=p11
koscar     oscil       500,448,1
kamp       oscil       koscar,448,10
aamp    linseg  0, .002, 1, p3-.004, 1, .002, 0  ; Declick envelope
kenv        expseg p7, p3/2, p8, p3/2, p9, p3/2,p10
a1   grain  koscar, kenv, p6, kamp+10, kenv*6, p5, p4, 3, 1
krtl=sqrt(2)/2*cos(kpan)+sin(kpan)     ;constant power panning
krtr=sqrt(2)/2*cos(kpan)-sin(kpan)     ;from C.Roads "CM Tutorial" pp460

aout=a1*aamp
afilt butterlp aout,2048; not sure if this is right  but this is what i
was thinking yet it does not woik!!!
amod  balance afilt,a1
al=aout*krtl;changing this to amod*krtl etc..did not work
ar=aout*krtr
 outs al,ar


garvbsig=garvbsig+aout
  endin
instr 98
  a1 reverb2 garvbsig, p4, p5
 outs     a1,a1

garvbsig=0

endin
; can someone suggest or implement some kind of filter to prevent the
piercing high -end squeal????
;i was thing a butterlp ?,2048 but i am unsure of where to put it or if
that is appropriate.
;again i want to limit high frequencies without having to section them
Thanks to all
Pat Pagano