Csound Csound-dev Csound-tekno Search About

Problem with one instrument

Date2005-10-11 13:51
FromDrweski nicolas
SubjectProblem with one instrument
Hello to the list,

As a beginner, i am writting because I have  problems
with an instrument.
the main one is about pfield number 6.
p6 = 1 or 2 does not have insidence on the vibrato,
and I want p6=1  not to make an evolutive one ; when
p6 = 2 to make one faster as the time grow. I could I
do ?
This instrument may have other problem but seems to
work like that.
PS : Excuse my english  


Here's the orchestra file :

sr = 44100
kr = 4410
ksmps = 10 
nchnls = 1

instr 1

kamp = p4
kfreq = p5
ivibr = p6

if (ivibr = 1) igoto vibrato.non.variable 
if (ivibr = 2) igoto vibrato.variable

vibrato.non.variable:
kvib line 1, p3, 1
igoto suite.une
suite.une:  
timout 0, p3, instrument
reinit vibrato.non.variable

vibrato.variable: 
kvib line 1, p3, 1.02
igoto suite.deux
suite.deux:
timout 0, p3, instrument
reinit vibrato.variable

instrument:
kenv1 expseg 250, p3*0.8, p4, p3*0.2, 250
kenv2 expseg 200, p3*0.7, p4, p3*0.3, 200
kenv3 expseg 150, p3*0.6, p4, p3*0.4, 150
kenv4 linen 25, p3*.2, p3, p3*.3
asg1 buzz kenv1, p5,      .5, 1
asg2 buzz kenv2, p5*1.19, .5, 1
asg3 buzz kenv1, p5*1.5,  .5, 1
asg4 buzz kenv2, p5*2,    .5, 1
asg5 buzz kenv3, (p5*1.01)*kvib,      .5, 1
asg6 buzz kenv3, (p5*1.2019)*kvib, .5, 1
asg7 buzz kenv3, (p5*1.515)*kvib,  .5, 1
asg8 buzz kenv3, (p5*2.02)*kvib,    .5, 1
a1 = (asg1+asg2+asg3+asg4+asg5+asg6+asg7+asg8)*kenv4

out a1
endin   




Here's the score file:

f 1 0 16384 10 1

i 1 0 4 50 330 1
i 1 4 2.66 50 277 1
i 1 + 1.33 50 208 1
i 1 + 1    50 185 1
i 1 + 4    50 183 1
i 1 + 8    50 138.6 2

e



	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

Date2005-10-11 14:49
FromVictor Lazzarini
SubjectRe: Problem with one instrument
I think the use of timeout is problematic, also
use == for equal rather than =, which is assignment.

To use p6 to make the vibrato fixed or variable.
I would do the following thing

(...)

if (ivibr == 1) goto vibrato.non.variable
if (ivibr == 2) goto vibrato.variable

vibrato.non.variable:
kvib = 1
goto instrument

vibrato.variable:
kvib line 1, p3, 1.02
goto instrument    ; not explicitly necessary

(...)


Victor

At 13:51 11/10/2005, you wrote:
>Hello to the list,
>
>As a beginner, i am writting because I have  problems
>with an instrument.
>the main one is about pfield number 6.
>p6 = 1 or 2 does not have insidence on the vibrato,
>and I want p6=1  not to make an evolutive one ; when
>p6 = 2 to make one faster as the time grow. I could I
>do ?
>This instrument may have other problem but seems to
>work like that.
>PS : Excuse my english
>
>
>Here's the orchestra file :
>
>sr = 44100
>kr = 4410
>ksmps = 10
>nchnls = 1
>
>instr 1
>
>kamp = p4
>kfreq = p5
>ivibr = p6
>
>if (ivibr = 1) igoto vibrato.non.variable
>if (ivibr = 2) igoto vibrato.variable
>
>vibrato.non.variable:
>kvib line 1, p3, 1
>igoto suite.une
>suite.une:
>timout 0, p3, instrument
>reinit vibrato.non.variable
>
>vibrato.variable:
>kvib line 1, p3, 1.02
>igoto suite.deux
>suite.deux:
>timout 0, p3, instrument
>reinit vibrato.variable
>
>instrument:
>kenv1 expseg 250, p3*0.8, p4, p3*0.2, 250
>kenv2 expseg 200, p3*0.7, p4, p3*0.3, 200
>kenv3 expseg 150, p3*0.6, p4, p3*0.4, 150
>kenv4 linen 25, p3*.2, p3, p3*.3
>asg1 buzz kenv1, p5,      .5, 1
>asg2 buzz kenv2, p5*1.19, .5, 1
>asg3 buzz kenv1, p5*1.5,  .5, 1
>asg4 buzz kenv2, p5*2,    .5, 1
>asg5 buzz kenv3, (p5*1.01)*kvib,      .5, 1
>asg6 buzz kenv3, (p5*1.2019)*kvib, .5, 1
>asg7 buzz kenv3, (p5*1.515)*kvib,  .5, 1
>asg8 buzz kenv3, (p5*2.02)*kvib,    .5, 1
>a1 = (asg1+asg2+asg3+asg4+asg5+asg6+asg7+asg8)*kenv4
>
>out a1
>endin
>
>
>
>
>Here's the score file:
>
>f 1 0 16384 10 1
>
>i 1 0 4 50 330 1
>i 1 4 2.66 50 277 1
>i 1 + 1.33 50 208 1
>i 1 + 1    50 185 1
>i 1 + 4    50 183 1
>i 1 + 8    50 138.6 2
>
>e
>
>
>
>
>
>
>
>___________________________________________________________________________
>Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
>Téléchargez cette version sur http://fr.messenger.yahoo.com
>--
>Send bugs reports to this list.
>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth