Csound Csound-dev Csound-tekno Search About

Re: 'ftgen' and 'turnon' opcodes in csound 3.47 beta

Date1997-12-31 05:11
FromSreenivasa R Inukoti
SubjectRe: 'ftgen' and 'turnon' opcodes in csound 3.47 beta
Gabriel Maldonado wrote:
> 
> Some question.
> 
> 1)  'turnon' opcode activates an instrument with a different number of
> the one of the note call. Why the following orc example does not
> generate any sound?
> Is it possible to use turnon as a subroutine call?
> 
> 2) the new opcodes manual says  turnon activates an instrument for an
> indefinite time. Is the new instrument deactivated at the same time
> (when the old one is deactivated)?
>

As far as i know, turnon has to be declared as a part of a header, not
inside an insturment.

> 3) Is it possible to use 'ftgen' opcode in the header section of the
> orchestra instead of within an instr body? If not, do the tables
> allocated within an instr survive when the generating instr is turned
> off?
> 

Infact, ftgen has to be declared in the header section like turnon.
These opcodes are performed at instr 0(header) execution time. ftgen is
simillar to 'f' statement in the score file.

for example your orc header contains
  gifno   ftgen   0,0,1024, 10, 1

you can use gifno in your instruments to refer the above table.

> thank you and happy new year!

happy new year to you too..

Thanks and Regards,
isro
> 
> ;********** ftgen and turnon test.orc
> 
>  sr = 44100
>  kr = 8820
>  ksmps = 5
>  nchnls = 1
> 
>  instr 2
>  turnon 1,0
>  endin
> 
>  instr 1
> iafno   ftgen   0,0,1024, 10, 1
> a1 oscili 1000,440,iafno
> out a1
>  endin
> 
> ;********** score
> i2 0 5
> 
> --
> Gabriel Maldonado
> 
> mailto:g.maldonado@agora.stm.it
> http://www.agora.stm.it/G.Maldonado/home2.htm
> http://www.geocities.com/SiliconValley/Way/7041/home2.htm