Csound Csound-dev Csound-tekno Search About

[Csnd] table issue

Date2013-11-24 16:09
FromPablo Frank
Subject[Csnd] table issue


The table:
"kfreq table kndx,1,0"    (*) see in the instr 1 below
already reads a normalized table: f1 0 1025 7 .5 1024 1,  (goes from .5 to 1) so why the table above (*) must have a "1"  instead of "0" in xmode? (with '0' in xmode the pitch does not go up, but remains at 400*.5)


<CsoundSynthesizer>

<CsOptions>

-odac -iadc -d ;;;RT audio I/O

</CsOptions>

<CsInstruments>

 

sr = 44100

kr = 4410

ksmps = 10

nchnls = 1

 

instr 1

 

kndx line 0, p3, 1

 

kfreq table kndx,1, 0 ;(*) REMARK: THE TABLE IS *NOT* NORMALIZED, THERE IS '0' IN THE 3RD PLACE.

 

a1 oscil 20000, 400*kfreq, 2 ;THE FREQUENCY SHOULD GO FROM  400*.5 TO 400*1, ACCORDING TO THE

;TABLE IN f1,****BUT IT REMAINS IN 400*.5*********

out a1

endin

 

 

</CsInstruments>

<CsScore>

 

; Table #1, a line from .5 to 1

f 1 0 1025 7 .5 1024 1 ;*****NORMALIZED******

; Table #2, a sine wave.

f 2 0 16384 10 1

 

; Play Instrument #1 for 2 seconds.

i 1 0 2

e

 

 

</CsScore>

</CsoundSynthesizer>


Date2013-11-25 15:09
FromSteven Yi
SubjectRe: [Csnd] table issue
Hi Pablo,

I didn't try, but you have two issues here I see:

1. your use of line is going from 0 to 1
2. your use of table is using raw index instead of normalized.

Essentially you're reading from index 0 the whole time because your
table call is using index type 0.  Try changing that to 1.

steven

On Sun, Nov 24, 2013 at 11:09 AM, Pablo Frank  wrote:
>
>
> The table:
> "kfreq table kndx,1,0"    (*) see in the instr 1 below
> already reads a normalized table: f1 0 1025 7 .5 1024 1,  (goes from .5 to
> 1) so why the table above (*) must have a "1"  instead of "0" in xmode?
> (with '0' in xmode the pitch does not go up, but remains at 400*.5)
>
>
> 
>
> 
>
> -odac -iadc -d ;;;RT audio I/O
>
> 
>
> 
>
>
>
> sr = 44100
>
> kr = 4410
>
> ksmps = 10
>
> nchnls = 1
>
>
>
> instr 1
>
>
>
> kndx line 0, p3, 1
>
>
>
> kfreq table kndx,1, 0 ;(*) REMARK: THE TABLE IS *NOT* NORMALIZED, THERE IS
> '0' IN THE 3RD PLACE.
>
>
>
> a1 oscil 20000, 400*kfreq, 2 ;THE FREQUENCY SHOULD GO FROM  400*.5 TO 400*1,
> ACCORDING TO THE
>
> ;TABLE IN f1,****BUT IT REMAINS IN 400*.5*********
>
> out a1
>
> endin
>
>
>
>
>
> 
>
> 
>
>
>
> ; Table #1, a line from .5 to 1
>
> f 1 0 1025 7 .5 1024 1 ;*****NORMALIZED******
>
> ; Table #2, a sine wave.
>
> f 2 0 16384 10 1
>
>
>
> ; Play Instrument #1 for 2 seconds.
>
> i 1 0 2
>
> e
>
>
>
>
>
> 
>
>