table question - need help
| Date | 1998-05-21 07:49 |
| From | Qian Chen |
| Subject | table question - need help |
Dear Csounders, Last night, I was studying _table_ opcode, using the following Csound program: ;orchestra file instr 1 a1 oscil 255,440,1 ;sine wave aout table a1,2 ;transfer function out aout*800 endin ;score file f1 0 8192 10 1 ; sinus f2 0 512 -7 -1 512 1 ; f(x)=x i1 0 2 As far as I know, the second parameter of _table_ opcode can be used to be a transfer function. In my Csound score file, I define function table 1 as a sinusoid, which means a1 is a signal like the following: a1 = sin(t) Then I use _table_ to transfer a1 into aout. Since function table 2 is f(x)=x, aout should be: aout = sin(t) Right? The question is I really got a signal other than a sine wave!!! It waveshape is half sinus half line! What is wrong? Could some help me? I am totally confused with what I've got. == Qian Chen _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com |
| Date | 1998-05-21 12:46 |
| From | Piche Jean |
| Subject | Re: table question - need help |
> ;orchestra file
> instr 1
> a1 oscil 255,440,1 ;sine wave
> aout table a1,2 ;transfer function
> out aout*800
> endin
>
> ;score file
> f1 0 8192 10 1 ; sinus
> f2 0 512 -7 -1 512 1 ; f(x)=x
>
> i1 0 2
>
> As far as I know, the second parameter of _table_ opcode can be used
> to be a transfer function. In my Csound score file, I define function
> table 1 as a sinusoid, which means a1 is a signal like the following:
> a1 = sin(t)
> Then I use _table_ to transfer a1 into aout. Since function table 2
> is f(x)=x, aout should be:
> aout = sin(t)
> Right?
>
> The question is I really got a signal other than a sine wave!!! It
> waveshape is half sinus half line! What is wrong? Could some help
> me? I am totally confused with what I've got.
>
you must place the origin of the table at the halfmark of the
table...since the driving oscilator goes positive and negative... you are
only partially confused, not totally...
aout table a1,2,0,256 (you may want to check this i 'm not certain this
is the correct parameter order...
Good luck
_____________________________________________________________________________
Jean Piche
Musique - UdM
pichej@ERE.Umontreal.ca
|