Csound Csound-dev Csound-tekno Search About

[Csnd] table

Date2011-10-05 15:23
Fromk_o_m_p
Subject[Csnd] table
I'm having a problem while reading long sound files with tablei and a phasor. The file is about 3 minutes long and the GEN 01 has 2^24 points (about 6 minutes long)
At the beginning it sounds normal but after one minute there is some strange noise and I can't figure out what it could be.
Is there any limitation with tablei? (I attached the csd-file)
Many thanks,
-Luís

instr 1050;table player

Sifn = "piano_quarter2.aiff"

ifilelen filelen Sifn

gitemp1020 ftgen 987, 0, 16777216, 1, Sifn, 0, 4, 1 ;piano

itlen = ftlen(987)

ixmode = 0 ;raw index ;1; index 0-1

ixoff = 0

iwrap = 0

kcps = 1/ ifilelen

and phasor kcps

andx = (and * ifilelen * sr) ;/ kpitch ;apitch

as1 table3 andx, 987 ,ixmode, ixoff, iwrap

as2 = as1

outs as1, as2

ktime times

kmin = floor(ktime / 60)

kseconds = ktime%60

ksamples downsamp andx

printks "%n %t %d sec %t %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, ksamples, itlen

endin





--
signatur luis antunes pena
http://luisantunespena.eu


Date2011-10-05 16:10
FromIain McCurdy
SubjectRE: [Csnd] table
Hi Luís,

I tried your code with a three minute, 16 bit, 44100Hz aiff containing a held sine tone but heard nothing untoward while playing back for 3 minutes.
Can you give any further information? Exactly what is the strange noise? Command line flags? I don't think the problem is with tablei.

Iain


Date: Wed, 5 Oct 2011 16:23:46 +0200
From: k_o_m_p@yahoo.de
To: csound@lists.bath.ac.uk
Subject: [Csnd] table

I'm having a problem while reading long sound files with tablei and a phasor. The file is about 3 minutes long and the GEN 01 has 2^24 points (about 6 minutes long)
At the beginning it sounds normal but after one minute there is some strange noise and I can't figure out what it could be.
Is there any limitation with tablei? (I attached the csd-file)
Many thanks,
-Luís

instr 1050;table player

Sifn = "piano_quarter2.aiff"

ifilelen filelen Sifn

gitemp1020 ftgen 987, 0, 16777216, 1, Sifn, 0, 4, 1 ;piano

itlen = ftlen(987)

ixmode = 0 ;raw index ;1; index 0-1

ixoff = 0

iwrap = 0

kcps = 1/ ifilelen

and phasor kcps

andx = (and * ifilelen * sr) ;/ kpitch ;apitch

as1 table3 andx, 987 ,ixmode, ixoff, iwrap

as2 = as1

outs as1, as2

ktime times

kmin = floor(ktime / 60)

kseconds = ktime%60

ksamples downsamp andx

printks "%n %t %d sec %t %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, ksamples, itlen

endin





--
signatur luis antunes pena
http://luisantunespena.eu


Date2011-10-05 16:47
Fromjpff@cs.bath.ac.uk
SubjectRE: [Csnd] table
also, are you using floats or doubles?

==John ff>
> Hi Luís,
>
> I tried your code with a three minute, 16 bit, 44100Hz aiff containing a
> held sine tone but heard nothing untoward while playing back for 3
> minutes.
> Can you give any further information? Exactly what is the strange noise?
> Command line flags? I don't think the problem is with tablei.
>
> Iain
>
> Date: Wed, 5 Oct 2011 16:23:46 +0200
> From: k_o_m_p@yahoo.de
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] table
>
>
>
>
>
>
>
>
>
>
>     I'm having a problem while reading long sound files with tablei and
>     a phasor. The file is about 3 minutes long and the GEN 01 has 2^24
>     points (about 6 minutes long)
>
>     At the beginning it sounds normal but after one minute there is some
>     strange noise and I can't figure out what it could be.
>
>     Is there any limitation with tablei? (I attached the csd-file)
>
>     Many thanks,
>
>     -Luís
>
>
>
>
>     instr 1050;table player
>
>     Sifn =
>       "piano_quarter2.aiff"
>
>     ifilelen filelen Sifn
>     gitemp1020 ftgen 987, 0,csound-devel@lists.sourceforge.net
>       16777216, 1, Sifn, 0, 4, 1 ;piano
>
>     itlen = ftlen(987)
>
>     ixmode = 0 ;raw index ;1;
>       index 0-1
>     ixoff = 0
>     iwrap = 0
>
>     kcps = 1/ ifilelen
>     and phasor kcps
>
>     andx = (and * ifilelen *
>       sr) ;/ kpitch ;apitch
>
>     as1 table3 andx, 987
>       ,ixmode, ixoff, iwrap
>     as2 = as1
>
>     outs as1, as2
>
>
>     ktime times
>     kmin = floor(ktime / 60)
>     kseconds = ktime%60
>     ksamples downsamp andx
>     printks "%n %t %d sec %t
>       %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds,
>       ksamples, itlen
>
>     endin
>
>
>
>
> csound-devel@lists.sourceforge.net
>
>
>
>     --
>
>
>
>       signatur
>
>
>       luis antunes pena
>
>         http://luisantunespena.eu
>




Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-10-05 17:04
Fromk_o_m_p
SubjectRe: [Csnd] table
Hello Ian,
thanks for looking at it. The flags where -odac -m0 -d with ksmps = 128 and 0dbfs = 1. I'm on OS 10.6.8 with csound 5.13 (floats)
This is the sound file:

piano_quarter2.aiff:
    srate 44100, stereo, 16 bit AIFF, 197.168 seconds
    (8695113 sample frames)

It's strange because the noise - something like a slight distortion - appears only at about minute one.
I've uploaded the file here: http://icem.folkwang-hochschule.de/~pena/piano_quarter2.aiff if you have the time to try it, it would be nice to see if you can play it without any problems.
Thanks,
Luís



Em 05.10.11 17:10, Iain McCurdy escreveu:
Hi Luís,

I tried your code with a three minute, 16 bit, 44100Hz aiff containing a held sine tone but heard nothing untoward while playing back for 3 minutes.
Can you give any further information? Exactly what is the strange noise? Command line flags? I don't think the problem is with tablei.

Iain


Date: Wed, 5 Oct 2011 16:23:46 +0200
From: k_o_m_p@yahoo.de
To: csound@lists.bath.ac.uk
Subject: [Csnd] table

I'm having a problem while reading long sound files with tablei and a phasor. The file is about 3 minutes long and the GEN 01 has 2^24 points (about 6 minutes long)
At the beginning it sounds normal but after one minute there is some strange noise and I can't figure out what it could be.
Is there any limitation with tablei? (I attached the csd-file)
Many thanks,
-Luís

instr 1050;table player

Sifn = "piano_quarter2.aiff"

ifilelen filelen Sifn

gitemp1020 ftgen 987, 0, 16777216, 1, Sifn, 0, 4, 1 ;piano

itlen = ftlen(987)

ixmode = 0 ;raw index ;1; index 0-1

ixoff = 0

iwrap = 0

kcps = 1/ ifilelen

and phasor kcps

andx = (and * ifilelen * sr) ;/ kpitch ;apitch

as1 table3 andx, 987 ,ixmode, ixoff, iwrap

as2 = as1

outs as1, as2

ktime times

kmin = floor(ktime / 60)

kseconds = ktime%60

ksamples downsamp andx

printks "%n %t %d sec %t %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, ksamples, itlen

endin





--
signatur luis antunes pena
http://luisantunespena.eu



--
signatur luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Date2011-10-05 17:05
Fromk_o_m_p
SubjectRe: [Csnd] table

I'm using floats.
-Luís

Em 05.10.11 17:47, jpff@cs.bath.ac.uk escreveu:
also, are you using floats or doubles?

==John ff>
Hi Luís,

I tried your code with a three minute, 16 bit, 44100Hz aiff containing a
held sine tone but heard nothing untoward while playing back for 3
minutes.
Can you give any further information? Exactly what is the strange noise?
Command line flags? I don't think the problem is with tablei.

Iain

Date: Wed, 5 Oct 2011 16:23:46 +0200
From: k_o_m_p@yahoo.de
To: csound@lists.bath.ac.uk
Subject: [Csnd] table










    I'm having a problem while reading long sound files with tablei and
    a phasor. The file is about 3 minutes long and the GEN 01 has 2^24
    points (about 6 minutes long)

    At the beginning it sounds normal but after one minute there is some
    strange noise and I can't figure out what it could be.

    Is there any limitation with tablei? (I attached the csd-file)

    Many thanks,

    -Luís




    instr 1050;table player

    Sifn =
      "piano_quarter2.aiff"

    ifilelen filelen Sifn
    gitemp1020 ftgen 987, 0,csound-devel@lists.sourceforge.net
      16777216, 1, Sifn, 0, 4, 1 ;piano

    itlen = ftlen(987)

    ixmode = 0 ;raw index ;1;
      index 0-1
    ixoff = 0
    iwrap = 0

    kcps = 1/ ifilelen
    and phasor kcps

    andx = (and * ifilelen *
      sr) ;/ kpitch ;apitch

    as1 table3 andx, 987
      ,ixmode, ixoff, iwrap
    as2 = as1

    outs as1, as2


    ktime times
    kmin = floor(ktime / 60)
    kseconds = ktime%60
    ksamples downsamp andx
    printks "%n %t %d sec %t
      %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds,
      ksamples, itlen

    endin




csound-devel@lists.sourceforge.net



    --



      signatur


      luis antunes pena

        http://luisantunespena.eu




Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




--
signatur luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Date2011-10-05 17:52
FromVictor Lazzarini
SubjectRe: [Csnd] table
yes, the way you wrote your orchestra will need doubles to work. The index is 32-bit float and has not enough precision, I think the error has to do with it (the exact reasons I will have to think a bit to diagnose, it could be kcps or andx that is at fault). With doubles csound, there is no distortion.

Victor


On 5 Oct 2011, at 17:05, k_o_m_p wrote:


I'm using floats.
-Luís

Em 05.10.11 17:47, jpff@cs.bath.ac.uk escreveu:
also, are you using floats or doubles?

==John ff>
Hi Luís,

I tried your code with a three minute, 16 bit, 44100Hz aiff containing a
held sine tone but heard nothing untoward while playing back for 3
minutes.
Can you give any further information? Exactly what is the strange noise?
Command line flags? I don't think the problem is with tablei.

Iain

Date: Wed, 5 Oct 2011 16:23:46 +0200
From: k_o_m_p@yahoo.de
To: csound@lists.bath.ac.uk
Subject: [Csnd] table










    I'm having a problem while reading long sound files with tablei and
    a phasor. The file is about 3 minutes long and the GEN 01 has 2^24
    points (about 6 minutes long)

    At the beginning it sounds normal but after one minute there is some
    strange noise and I can't figure out what it could be.

    Is there any limitation with tablei? (I attached the csd-file)

    Many thanks,

    -Luís




    instr 1050;table player

    Sifn =
      "piano_quarter2.aiff"

    ifilelen filelen Sifn
    gitemp1020 ftgen 987, 0,csound-devel@lists.sourceforge.net
      16777216, 1, Sifn, 0, 4, 1 ;piano

    itlen = ftlen(987)

    ixmode = 0 ;raw index ;1;
      index 0-1
    ixoff = 0
    iwrap = 0

    kcps = 1/ ifilelen
    and phasor kcps

    andx = (and * ifilelen *
      sr) ;/ kpitch ;apitch

    as1 table3 andx, 987
      ,ixmode, ixoff, iwrap
    as2 = as1

    outs as1, as2


    ktime times
    kmin = floor(ktime / 60)
    kseconds = ktime%60
    ksamples downsamp andx
    printks "%n %t %d sec %t
      %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds,
      ksamples, itlen

    endin




csound-devel@lists.sourceforge.net



    --



      signatur


      luis antunes pena

        http://luisantunespena.eu


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




-- 
luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2011-10-05 17:55
FromIain McCurdy
SubjectRE: [Csnd] table
Hi Luís,

I have replicated your problem on 5.13 floats. Victor has kindly described the reason. You can use flooper to perform the same task, but without the quantisation noise:
as1 flooper 1, 1, 0, ifilelen, 0, 987

Iain



Date: Wed, 5 Oct 2011 18:04:48 +0200
From: k_o_m_p@yahoo.de
To: csound@lists.bath.ac.uk
Subject: Re: [Csnd] table

Hello Ian,
thanks for looking at it. The flags where -odac -m0 -d with ksmps = 128 and 0dbfs = 1. I'm on OS 10.6.8 with csound 5.13 (floats)
This is the sound file:

piano_quarter2.aiff:
    srate 44100, stereo, 16 bit AIFF, 197.168 seconds
    (8695113 sample frames)

It's strange because the noise - something like a slight distortion - appears only at about minute one.
I've uploaded the file here: http://icem.folkwang-hochschule.de/~pena/piano_quarter2.aiff if you have the time to try it, it would be nice to see if you can play it without any problems.
Thanks,
Luís



Em 05.10.11 17:10, Iain McCurdy escreveu:
Hi Luís,

I tried your code with a three minute, 16 bit, 44100Hz aiff containing a held sine tone but heard nothing untoward while playing back for 3 minutes.
Can you give any further information? Exactly what is the strange noise? Command line flags? I don't think the problem is with tablei.

Iain


Date: Wed, 5 Oct 2011 16:23:46 +0200
From: k_o_m_p@yahoo.de
To: csound@lists.bath.ac.uk
Subject: [Csnd] table

I'm having a problem while reading long sound files with tablei and a phasor. The file is about 3 minutes long and the GEN 01 has 2^24 points (about 6 minutes long)
At the beginning it sounds normal but after one minute there is some strange noise and I can't figure out what it could be.
Is there any limitation with tablei? (I attached the csd-file)
Many thanks,
-Luís

instr 1050;table player

Sifn = "piano_quarter2.aiff"

ifilelen filelen Sifn

gitemp1020 ftgen 987, 0, 16777216, 1, Sifn, 0, 4, 1 ;piano

itlen = ftlen(987)

ixmode = 0 ;raw index ;1; index 0-1

ixoff = 0

iwrap = 0

kcps = 1/ ifilelen

and phasor kcps

andx = (and * ifilelen * sr) ;/ kpitch ;apitch

as1 table3 andx, 987 ,ixmode, ixoff, iwrap

as2 = as1

outs as1, as2

ktime times

kmin = floor(ktime / 60)

kseconds = ktime%60

ksamples downsamp andx

printks "%n %t %d sec %t %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, ksamples, itlen

endin





--
signatur luis antunes pena
http://luisantunespena.eu



--
signatur luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Date2011-10-05 17:59
FromMichael Gogins
SubjectRe: [Csnd] table
It has not got enough precision. The opcode is written to add with
cumulative rounding error instead of to multiply with constant
rounding error. Doubles should work.

The code should be changed, however, it is an elementary error of
numerical programming.

Judy Klein brought this issue (or maybe a similar one) to my attention.

Regards,
Mike

On Wed, Oct 5, 2011 at 12:52 PM, Victor Lazzarini
 wrote:
> yes, the way you wrote your orchestra will need doubles to work. The index
> is 32-bit float and has not enough precision, I think the error has to do
> with it (the exact reasons I will have to think a bit to diagnose, it could
> be kcps or andx that is at fault). With doubles csound, there is no
> distortion.
> Victor
>
>
> On 5 Oct 2011, at 17:05, k_o_m_p wrote:
>
> I'm using floats.
> -Luís
>
> Em 05.10.11 17:47, jpff@cs.bath.ac.uk escreveu:
>
> also, are you using floats or doubles?
>
> ==John ff>
>
> Hi Luís,
>
> I tried your code with a three minute, 16 bit, 44100Hz aiff containing a
> held sine tone but heard nothing untoward while playing back for 3
> minutes.
> Can you give any further information? Exactly what is the strange noise?
> Command line flags? I don't think the problem is with tablei.
>
> Iain
>
> Date: Wed, 5 Oct 2011 16:23:46 +0200
> From: k_o_m_p@yahoo.de
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] table
>
>
>
>
>
>
>
>
>
>
>     I'm having a problem while reading long sound files with tablei and
>     a phasor. The file is about 3 minutes long and the GEN 01 has 2^24
>     points (about 6 minutes long)
>
>     At the beginning it sounds normal but after one minute there is some
>     strange noise and I can't figure out what it could be.
>
>     Is there any limitation with tablei? (I attached the csd-file)
>
>     Many thanks,
>
>     -Luís
>
>
>
>
>     instr 1050;table player
>
>     Sifn =
>       "piano_quarter2.aiff"
>
>     ifilelen filelen Sifn
>     gitemp1020 ftgen 987, 0,csound-devel@lists.sourceforge.net
>       16777216, 1, Sifn, 0, 4, 1 ;piano
>
>     itlen = ftlen(987)
>
>     ixmode = 0 ;raw index ;1;
>       index 0-1
>     ixoff = 0
>     iwrap = 0
>
>     kcps = 1/ ifilelen
>     and phasor kcps
>
>     andx = (and * ifilelen *
>       sr) ;/ kpitch ;apitch
>
>     as1 table3 andx, 987
>       ,ixmode, ixoff, iwrap
>     as2 = as1
>
>     outs as1, as2
>
>
>     ktime times
>     kmin = floor(ktime / 60)
>     kseconds = ktime%60
>     ksamples downsamp andx
>     printks "%n %t %d sec %t
>       %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds,
>       ksamples, itlen
>
>     endin
>
>
>
>
> csound-devel@lists.sourceforge.net
>
>
>
>     --
>
>
>
>       signatur
>
>
>       luis antunes pena
>
>         http://luisantunespena.eu
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
>
>
> --
> luis antunes pena
> Severinswall 54
> D-50678 Köln
>
> http://luisantunespena.eu
>
> +49 (0)221 29020757
> +49 (0)176 968 09 867 (mobile)
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-10-05 18:35
FromVictor Lazzarini
SubjectRe: [Csnd] table
yes, but in this case it's the line etc opcodes that are the culprit  
but the indexing of a large table using phasor. I actually think we  
fixed this for 5.14, because the internal phasor index used to be  
MYFLT and now is fixed as a double for all versions.

By the way, an oscillator like poscil (or oscili/3) should behave OK  
here because their indexing has more precision (doubles for poscil and  
better than
32bit for oscili etc), so they are also an option.

Victor

On 5 Oct 2011, at 17:59, Michael Gogins wrote:

> It has not got enough precision. The opcode is written to add with
> cumulative rounding error instead of to multiply with constant
> rounding error. Doubles should work.
>
> The code should be changed, however, it is an elementary error of
> numerical programming.
>
> Judy Klein brought this issue (or maybe a similar one) to my  
> attention.
>
> Regards,
> Mike
>
> On Wed, Oct 5, 2011 at 12:52 PM, Victor Lazzarini
>  wrote:
>> yes, the way you wrote your orchestra will need doubles to work.  
>> The index
>> is 32-bit float and has not enough precision, I think the error has  
>> to do
>> with it (the exact reasons I will have to think a bit to diagnose,  
>> it could
>> be kcps or andx that is at fault). With doubles csound, there is no
>> distortion.
>> Victor
>>
>>
>> On 5 Oct 2011, at 17:05, k_o_m_p wrote:
>>
>> I'm using floats.
>> -Luís
>>
>> Em 05.10.11 17:47, jpff@cs.bath.ac.uk escreveu:
>>
>> also, are you using floats or doubles?
>>
>> ==John ff>
>>
>> Hi Luís,
>>
>> I tried your code with a three minute, 16 bit, 44100Hz aiff  
>> containing a
>> held sine tone but heard nothing untoward while playing back for 3
>> minutes.
>> Can you give any further information? Exactly what is the strange  
>> noise?
>> Command line flags? I don't think the problem is with tablei.
>>
>> Iain
>>
>> Date: Wed, 5 Oct 2011 16:23:46 +0200
>> From: k_o_m_p@yahoo.de
>> To: csound@lists.bath.ac.uk
>> Subject: [Csnd] table
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>    I'm having a problem while reading long sound files with tablei  
>> and
>>    a phasor. The file is about 3 minutes long and the GEN 01 has 2^24
>>    points (about 6 minutes long)
>>
>>    At the beginning it sounds normal but after one minute there is  
>> some
>>    strange noise and I can't figure out what it could be.
>>
>>    Is there any limitation with tablei? (I attached the csd-file)
>>
>>    Many thanks,
>>
>>    -Luís
>>
>>
>>
>>
>>    instr 1050;table player
>>
>>    Sifn =
>>      "piano_quarter2.aiff"
>>
>>    ifilelen filelen Sifn
>>    gitemp1020 ftgen 987, 0,csound-devel@lists.sourceforge.net
>>      16777216, 1, Sifn, 0, 4, 1 ;piano
>>
>>    itlen = ftlen(987)
>>
>>    ixmode = 0 ;raw index ;1;
>>      index 0-1
>>    ixoff = 0
>>    iwrap = 0
>>
>>    kcps = 1/ ifilelen
>>    and phasor kcps
>>
>>    andx = (and * ifilelen *
>>      sr) ;/ kpitch ;apitch
>>
>>    as1 table3 andx, 987
>>      ,ixmode, ixoff, iwrap
>>    as2 = as1
>>
>>    outs as1, as2
>>
>>
>>    ktime times
>>    kmin = floor(ktime / 60)
>>    kseconds = ktime%60
>>    ksamples downsamp andx
>>    printks "%n %t %d sec %t
>>      %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds,
>>      ksamples, itlen
>>
>>    endin
>>
>>
>>
>>
>> csound-devel@lists.sourceforge.net
>>
>>
>>
>>    --
>>
>>
>>
>>      signatur
>>
>>
>>      luis antunes pena
>>
>>        http://luisantunespena.eu
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/? 
>> group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe
>> csound"
>>
>>
>>
>>
>> --
>> luis antunes pena
>> Severinswall 54
>> D-50678 Köln
>>
>> http://luisantunespena.eu
>>
>> +49 (0)221 29020757
>> +49 (0)176 968 09 867 (mobile)
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>
>
>
> -- 
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-10-05 18:44
FromVictor Lazzarini
SubjectRe: [Csnd] table
I mean it's NOT the line opcodes but phasor.
On 5 Oct 2011, at 18:35, Victor Lazzarini wrote:

> yes, but in this case it's the line etc opcodes that are the culprit  
> but the indexing of a large table using phasor. I actually think we  
> fixed this for 5.14, because the internal phasor index used to be  
> MYFLT and now is fixed as a double for all versions.
>
> By the way, an oscillator like poscil (or oscili/3) should behave OK  
> here because their indexing has more precision (doubles for poscil  
> and better than
> 32bit for oscili etc), so they are also an option.
>
> Victor
>
> On 5 Oct 2011, at 17:59, Michael Gogins wrote:
>
>> It has not got enough precision. The opcode is written to add with
>> cumulative rounding error instead of to multiply with constant
>> rounding error. Doubles should work.
>>
>> The code should be changed, however, it is an elementary error of
>> numerical programming.
>>
>> Judy Klein brought this issue (or maybe a similar one) to my  
>> attention.
>>
>> Regards,
>> Mike
>>
>> On Wed, Oct 5, 2011 at 12:52 PM, Victor Lazzarini
>>  wrote:
>>> yes, the way you wrote your orchestra will need doubles to work.  
>>> The index
>>> is 32-bit float and has not enough precision, I think the error  
>>> has to do
>>> with it (the exact reasons I will have to think a bit to diagnose,  
>>> it could
>>> be kcps or andx that is at fault). With doubles csound, there is no
>>> distortion.
>>> Victor
>>>
>>>
>>> On 5 Oct 2011, at 17:05, k_o_m_p wrote:
>>>
>>> I'm using floats.
>>> -Luís
>>>
>>> Em 05.10.11 17:47, jpff@cs.bath.ac.uk escreveu:
>>>
>>> also, are you using floats or doubles?
>>>
>>> ==John ff>
>>>
>>> Hi Luís,
>>>
>>> I tried your code with a three minute, 16 bit, 44100Hz aiff  
>>> containing a
>>> held sine tone but heard nothing untoward while playing back for 3
>>> minutes.
>>> Can you give any further information? Exactly what is the strange  
>>> noise?
>>> Command line flags? I don't think the problem is with tablei.
>>>
>>> Iain
>>>
>>> Date: Wed, 5 Oct 2011 16:23:46 +0200
>>> From: k_o_m_p@yahoo.de
>>> To: csound@lists.bath.ac.uk
>>> Subject: [Csnd] table
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>   I'm having a problem while reading long sound files with tablei  
>>> and
>>>   a phasor. The file is about 3 minutes long and the GEN 01 has 2^24
>>>   points (about 6 minutes long)
>>>
>>>   At the beginning it sounds normal but after one minute there is  
>>> some
>>>   strange noise and I can't figure out what it could be.
>>>
>>>   Is there any limitation with tablei? (I attached the csd-file)
>>>
>>>   Many thanks,
>>>
>>>   -Luís
>>>
>>>
>>>
>>>
>>>   instr 1050;table player
>>>
>>>   Sifn =
>>>     "piano_quarter2.aiff"
>>>
>>>   ifilelen filelen Sifn
>>>   gitemp1020 ftgen 987, 0,csound-devel@lists.sourceforge.net
>>>     16777216, 1, Sifn, 0, 4, 1 ;piano
>>>
>>>   itlen = ftlen(987)
>>>
>>>   ixmode = 0 ;raw index ;1;
>>>     index 0-1
>>>   ixoff = 0
>>>   iwrap = 0
>>>
>>>   kcps = 1/ ifilelen
>>>   and phasor kcps
>>>
>>>   andx = (and * ifilelen *
>>>     sr) ;/ kpitch ;apitch
>>>
>>>   as1 table3 andx, 987
>>>     ,ixmode, ixoff, iwrap
>>>   as2 = as1
>>>
>>>   outs as1, as2
>>>
>>>
>>>   ktime times
>>>   kmin = floor(ktime / 60)
>>>   kseconds = ktime%60
>>>   ksamples downsamp andx
>>>   printks "%n %t %d sec %t
>>>     %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds,
>>>     ksamples, itlen
>>>
>>>   endin
>>>
>>>
>>>
>>>
>>> csound-devel@lists.sourceforge.net
>>>
>>>
>>>
>>>   --
>>>
>>>
>>>
>>>     signatur
>>>
>>>
>>>     luis antunes pena
>>>
>>>       http://luisantunespena.eu
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/? 
>>> group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> csound"
>>>
>>>
>>>
>>>
>>> --
>>> luis antunes pena
>>> Severinswall 54
>>> D-50678 Köln
>>>
>>> http://luisantunespena.eu
>>>
>>> +49 (0)221 29020757
>>> +49 (0)176 968 09 867 (mobile)
>>>
>>> Dr Victor Lazzarini
>>> Senior Lecturer
>>> Dept. of Music
>>> NUI Maynooth Ireland
>>> tel.: +353 1 708 3545
>>> Victor dot Lazzarini AT nuim dot ie
>>>
>>>
>>>
>>
>>
>>
>> -- 
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>>
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-10-05 18:55
Fromk_o_m_p
SubjectRe: [Csnd] table
Thank you for all the answers. Indeed with csound64 works well. I also tryed with oscil3 which works fine as well. This should be a solution for me.
I also tryed poscil instead of oscil3, which gave me strange results. poscil transposes about (but not exactly) one octave higher. I think this shouldn't be the expected result.
Best,
-Luís

<CsoundSynthesizer>

<CsOptions>

-odac -d -m0

</CsOptions>

<CsInstruments>

nchnls = 2

ksmps = 128

0dbfs = 1

instr 1050;table player

Sifn = "piano_quarter2.aiff"; "western_stereo-ausschnitt.aif"

ifilelen filelen Sifn

gitemp1020 ftgen 987, 0, 16777216, 1, Sifn, 0, 4, 1 ;piano

itlen = ftlen(987)

ixmode = 0 ;raw index ;1; index 0-1

ixoff = 0

iwrap = 0

kcps = 1/ ifilelen

and phasor kcps

andx = (and * ifilelen * sr) ;/ kpitch ;apitch

as1 poscil3 1, kcps, 987

as2 oscil3 1, kcps, 987

;as1 table3 andx, 987 ,ixmode, ixoff, iwrap

;as2 = as1

outs as1, as2

ktime times

kmin = floor(ktime / 60)

kseconds = ktime%60

ksamples downsamp andx

printks "%n %t %d sec %t %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, ksamples, itlen

endin

</CsInstruments>

<CsScore>

i1050 0 6000

</CsScore>

</CsoundSynthesizer>



Em 05.10.11 19:44, Victor Lazzarini escreveu:
I mean it's NOT the line opcodes but phasor.
On 5 Oct 2011, at 18:35, Victor Lazzarini wrote:

yes, but in this case it's the line etc opcodes that are the culprit but the indexing of a large table using phasor. I actually think we fixed this for 5.14, because the internal phasor index used to be MYFLT and now is fixed as a double for all versions.

By the way, an oscillator like poscil (or oscili/3) should behave OK here because their indexing has more precision (doubles for poscil and better than
32bit for oscili etc), so they are also an option.

Victor

On 5 Oct 2011, at 17:59, Michael Gogins wrote:

It has not got enough precision. The opcode is written to add with
cumulative rounding error instead of to multiply with constant
rounding error. Doubles should work.

The code should be changed, however, it is an elementary error of
numerical programming.

Judy Klein brought this issue (or maybe a similar one) to my attention.

Regards,
Mike

On Wed, Oct 5, 2011 at 12:52 PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie> wrote:
yes, the way you wrote your orchestra will need doubles to work. The index
is 32-bit float and has not enough precision, I think the error has to do
with it (the exact reasons I will have to think a bit to diagnose, it could
be kcps or andx that is at fault). With doubles csound, there is no
distortion.
Victor


On 5 Oct 2011, at 17:05, k_o_m_p wrote:

I'm using floats.
-Luís

Em 05.10.11 17:47, jpff@cs.bath.ac.uk escreveu:

also, are you using floats or doubles?

==John ff>

Hi Luís,

I tried your code with a three minute, 16 bit, 44100Hz aiff containing a
held sine tone but heard nothing untoward while playing back for 3
minutes.
Can you give any further information? Exactly what is the strange noise?
Command line flags? I don't think the problem is with tablei.

Iain

Date: Wed, 5 Oct 2011 16:23:46 +0200
From: k_o_m_p@yahoo.de
To: csound@lists.bath.ac.uk
Subject: [Csnd] table










  I'm having a problem while reading long sound files with tablei and
  a phasor. The file is about 3 minutes long and the GEN 01 has 2^24
  points (about 6 minutes long)

  At the beginning it sounds normal but after one minute there is some
  strange noise and I can't figure out what it could be.

  Is there any limitation with tablei? (I attached the csd-file)

  Many thanks,

  -Luís




  instr 1050;table player

  Sifn =
    "piano_quarter2.aiff"

  ifilelen filelen Sifn
  gitemp1020 ftgen 987, 0,csound-devel@lists.sourceforge.net
    16777216, 1, Sifn, 0, 4, 1 ;piano

  itlen = ftlen(987)

  ixmode = 0 ;raw index ;1;
    index 0-1
  ixoff = 0
  iwrap = 0

  kcps = 1/ ifilelen
  and phasor kcps

  andx = (and * ifilelen *
    sr) ;/ kpitch ;apitch

  as1 table3 andx, 987
    ,ixmode, ixoff, iwrap
  as2 = as1

  outs as1, as2


  ktime times
  kmin = floor(ktime / 60)
  kseconds = ktime%60
  ksamples downsamp andx
  printks "%n %t %d sec %t
    %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds,
    ksamples, itlen

  endin




csound-devel@lists.sourceforge.net



  --



    signatur


    luis antunes pena

      http://luisantunespena.eu


Send bugs reports to the Sourceforge bug tracker
          https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
csound"




--
luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie






-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to the Sourceforge bug tracker
          https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Send bugs reports to the Sourceforge bug tracker
          https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




--
signatur luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Date2011-10-05 19:07
FromVictor Lazzarini
SubjectRe: [Csnd] table
well that seems very wrong. poscil and oscili should be equivalent.
On 5 Oct 2011, at 18:55, k_o_m_p wrote:

Thank you for all the answers. Indeed with csound64 works well. I also tryed with oscil3 which works fine as well. This should be a solution for me. 
I also tryed poscil instead of oscil3, which gave me strange results. poscil transposes about (but not exactly) one octave higher. I think this shouldn't be the expected result. 
Best,
-Luís

<CsoundSynthesizer>
<CsOptions>
-odac -d -m0
</CsOptions>
<CsInstruments>

nchnls = 2
ksmps = 128
0dbfs = 1

instr 1050;table player

Sifn = "piano_quarter2.aiff"; "western_stereo-ausschnitt.aif"

ifilelen filelen Sifn
gitemp1020 ftgen 987, 0, 16777216, 1, Sifn, 0, 4, 1 ;piano

itlen = ftlen(987)

ixmode = 0 ;raw index ;1; index 0-1
ixoff = 0
iwrap = 0

kcps = 1/ ifilelen
and phasor kcps

andx = (and * ifilelen * sr) ;/ kpitch ;apitch

as1 poscil3 1, kcps, 987
as2 oscil3 1, kcps, 987
;as1 table3 andx, 987 ,ixmode, ixoff, iwrap
;as2 = as1

outs as1, as2

ktime times
kmin = floor(ktime / 60)
kseconds = ktime%60
ksamples downsamp andx
printks "%n %t %d sec %t %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, ksamples, itlen

endin

</CsInstruments>
<CsScore>
i1050 0 6000
</CsScore>
</CsoundSynthesizer>


Em 05.10.11 19:44, Victor Lazzarini escreveu:
I mean it's NOT the line opcodes but phasor. 
On 5 Oct 2011, at 18:35, Victor Lazzarini wrote: 

yes, but in this case it's the line etc opcodes that are the culprit but the indexing of a large table using phasor. I actually think we fixed this for 5.14, because the internal phasor index used to be MYFLT and now is fixed as a double for all versions. 

By the way, an oscillator like poscil (or oscili/3) should behave OK here because their indexing has more precision (doubles for poscil and better than 
32bit for oscili etc), so they are also an option. 

Victor 

On 5 Oct 2011, at 17:59, Michael Gogins wrote: 

It has not got enough precision. The opcode is written to add with 
cumulative rounding error instead of to multiply with constant 
rounding error. Doubles should work. 

The code should be changed, however, it is an elementary error of 
numerical programming. 

Judy Klein brought this issue (or maybe a similar one) to my attention. 

Regards, 
Mike 

On Wed, Oct 5, 2011 at 12:52 PM, Victor Lazzarini 
<Victor.Lazzarini@nuim.ie> wrote: 
yes, the way you wrote your orchestra will need doubles to work. The index 
is 32-bit float and has not enough precision, I think the error has to do 
with it (the exact reasons I will have to think a bit to diagnose, it could 
be kcps or andx that is at fault). With doubles csound, there is no 
distortion. 
Victor 


On 5 Oct 2011, at 17:05, k_o_m_p wrote: 

I'm using floats. 
-Luís 

Em 05.10.11 17:47, jpff@cs.bath.ac.uk escreveu: 

also, are you using floats or doubles? 

==John ff> 

Hi Luís, 

I tried your code with a three minute, 16 bit, 44100Hz aiff containing a 
held sine tone but heard nothing untoward while playing back for 3 
minutes. 
Can you give any further information? Exactly what is the strange noise? 
Command line flags? I don't think the problem is with tablei. 

Iain 

Date: Wed, 5 Oct 2011 16:23:46 +0200 
From: k_o_m_p@yahoo.de 
To: csound@lists.bath.ac.uk 
Subject: [Csnd] table 










  I'm having a problem while reading long sound files with tablei and 
  a phasor. The file is about 3 minutes long and the GEN 01 has 2^24 
  points (about 6 minutes long) 

  At the beginning it sounds normal but after one minute there is some 
  strange noise and I can't figure out what it could be. 

  Is there any limitation with tablei? (I attached the csd-file) 

  Many thanks, 

  -Luís 




  instr 1050;table player 

  Sifn = 
    "piano_quarter2.aiff" 

  ifilelen filelen Sifn 
  gitemp1020 ftgen 987, 0,csound-devel@lists.sourceforge.net 
    16777216, 1, Sifn, 0, 4, 1 ;piano 

  itlen = ftlen(987) 

  ixmode = 0 ;raw index ;1; 
    index 0-1 
  ixoff = 0 
  iwrap = 0 

  kcps = 1/ ifilelen 
  and phasor kcps 

  andx = (and * ifilelen * 
    sr) ;/ kpitch ;apitch 

  as1 table3 andx, 987 
    ,ixmode, ixoff, iwrap 
  as2 = as1 

  outs as1, as2 


  ktime times 
  kmin = floor(ktime / 60) 
  kseconds = ktime%60 
  ksamples downsamp andx 
  printks "%n %t %d sec %t 
    %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, 
    ksamples, itlen 

  endin 




csound-devel@lists.sourceforge.net 



  -- 



    signatur 


    luis antunes pena 

      http://luisantunespena.eu 


Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
csound" 




-- 
luis antunes pena 
Severinswall 54 
D-50678 Köln 

http://luisantunespena.eu 

+49 (0)221 29020757 
+49 (0)176 968 09 867 (mobile) 

Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 






-- 
Michael Gogins 
Irreducible Productions 
http://www.michael-gogins.com 
Michael dot Gogins at gmail dot com 


Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 


Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 





Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 


Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 





Send bugs reports to the Sourceforge bug tracker 
           https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 




-- 
luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2011-10-05 19:17
FromVictor Lazzarini
SubjectRe: [Csnd] table
I think your kcps should be

kcps = sr/ftlen(987)

to be correct. Then oscili and poscil, oscil3 and poscil3 will agree.

Victor
On 5 Oct 2011, at 19:07, Victor Lazzarini wrote:

well that seems very wrong. poscil and oscili should be equivalent.
On 5 Oct 2011, at 18:55, k_o_m_p wrote:

Thank you for all the answers. Indeed with csound64 works well. I also tryed with oscil3 which works fine as well. This should be a solution for me. 
I also tryed poscil instead of oscil3, which gave me strange results. poscil transposes about (but not exactly) one octave higher. I think this shouldn't be the expected result. 
Best,
-Luís

<CsoundSynthesizer>
<CsOptions>
-odac -d -m0
</CsOptions>
<CsInstruments>

nchnls = 2
ksmps = 128
0dbfs = 1

instr 1050;table player

Sifn = "piano_quarter2.aiff"; "western_stereo-ausschnitt.aif"

ifilelen filelen Sifn
gitemp1020 ftgen 987, 0, 16777216, 1, Sifn, 0, 4, 1 ;piano

itlen = ftlen(987)

ixmode = 0 ;raw index ;1; index 0-1
ixoff = 0
iwrap = 0

kcps = 1/ ifilelen
and phasor kcps

andx = (and * ifilelen * sr) ;/ kpitch ;apitch

as1 poscil3 1, kcps, 987
as2 oscil3 1, kcps, 987
;as1 table3 andx, 987 ,ixmode, ixoff, iwrap
;as2 = as1

outs as1, as2

ktime times
kmin = floor(ktime / 60)
kseconds = ktime%60
ksamples downsamp andx
printks "%n %t %d sec %t %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, ksamples, itlen

endin

</CsInstruments>
<CsScore>
i1050 0 6000
</CsScore>
</CsoundSynthesizer>


Em 05.10.11 19:44, Victor Lazzarini escreveu:
I mean it's NOT the line opcodes but phasor. 
On 5 Oct 2011, at 18:35, Victor Lazzarini wrote: 

yes, but in this case it's the line etc opcodes that are the culprit but the indexing of a large table using phasor. I actually think we fixed this for 5.14, because the internal phasor index used to be MYFLT and now is fixed as a double for all versions. 

By the way, an oscillator like poscil (or oscili/3) should behave OK here because their indexing has more precision (doubles for poscil and better than 
32bit for oscili etc), so they are also an option. 

Victor 

On 5 Oct 2011, at 17:59, Michael Gogins wrote: 

It has not got enough precision. The opcode is written to add with 
cumulative rounding error instead of to multiply with constant 
rounding error. Doubles should work. 

The code should be changed, however, it is an elementary error of 
numerical programming. 

Judy Klein brought this issue (or maybe a similar one) to my attention. 

Regards, 
Mike 

On Wed, Oct 5, 2011 at 12:52 PM, Victor Lazzarini 
<Victor.Lazzarini@nuim.ie> wrote: 
yes, the way you wrote your orchestra will need doubles to work. The index 
is 32-bit float and has not enough precision, I think the error has to do 
with it (the exact reasons I will have to think a bit to diagnose, it could 
be kcps or andx that is at fault). With doubles csound, there is no 
distortion. 
Victor 


On 5 Oct 2011, at 17:05, k_o_m_p wrote: 

I'm using floats. 
-Luís 

Em 05.10.11 17:47, jpff@cs.bath.ac.uk escreveu: 

also, are you using floats or doubles? 

==John ff> 

Hi Luís, 

I tried your code with a three minute, 16 bit, 44100Hz aiff containing a 
held sine tone but heard nothing untoward while playing back for 3 
minutes. 
Can you give any further information? Exactly what is the strange noise? 
Command line flags? I don't think the problem is with tablei. 

Iain 

Date: Wed, 5 Oct 2011 16:23:46 +0200 
From: k_o_m_p@yahoo.de 
To: csound@lists.bath.ac.uk 
Subject: [Csnd] table 










  I'm having a problem while reading long sound files with tablei and 
  a phasor. The file is about 3 minutes long and the GEN 01 has 2^24 
  points (about 6 minutes long) 

  At the beginning it sounds normal but after one minute there is some 
  strange noise and I can't figure out what it could be. 

  Is there any limitation with tablei? (I attached the csd-file) 

  Many thanks, 

  -Luís 




  instr 1050;table player 

  Sifn = 
    "piano_quarter2.aiff" 

  ifilelen filelen Sifn 
  gitemp1020 ftgen 987, 0,csound-devel@lists.sourceforge.net 
    16777216, 1, Sifn, 0, 4, 1 ;piano 

  itlen = ftlen(987) 

  ixmode = 0 ;raw index ;1; 
    index 0-1 
  ixoff = 0 
  iwrap = 0 

  kcps = 1/ ifilelen 
  and phasor kcps 

  andx = (and * ifilelen * 
    sr) ;/ kpitch ;apitch 

  as1 table3 andx, 987 
    ,ixmode, ixoff, iwrap 
  as2 = as1 

  outs as1, as2 


  ktime times 
  kmin = floor(ktime / 60) 
  kseconds = ktime%60 
  ksamples downsamp andx 
  printks "%n %t %d sec %t 
    %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, 
    ksamples, itlen 

  endin 




csound-devel@lists.sourceforge.net 



  -- 



    signatur 


    luis antunes pena 

      http://luisantunespena.eu 


Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
csound" 




-- 
luis antunes pena 
Severinswall 54 
D-50678 Köln 

http://luisantunespena.eu 

+49 (0)221 29020757 
+49 (0)176 968 09 867 (mobile) 

Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 






-- 
Michael Gogins 
Irreducible Productions 
http://www.michael-gogins.com 
Michael dot Gogins at gmail dot com 


Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 


Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 





Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 


Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 





Send bugs reports to the Sourceforge bug tracker 
           https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 




-- 
luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2011-10-05 20:11
Fromk_o_m_p
SubjectRe: [Csnd] table
I see. The table length and not the sound file length. Thank you!

Em 05.10.11 20:17, Victor Lazzarini escreveu:
I think your kcps should be

kcps = sr/ftlen(987)

to be correct. Then oscili and poscil, oscil3 and poscil3 will agree.

Victor
On 5 Oct 2011, at 19:07, Victor Lazzarini wrote:

well that seems very wrong. poscil and oscili should be equivalent.
On 5 Oct 2011, at 18:55, k_o_m_p wrote:

Thank you for all the answers. Indeed with csound64 works well. I also tryed with oscil3 which works fine as well. This should be a solution for me. 
I also tryed poscil instead of oscil3, which gave me strange results. poscil transposes about (but not exactly) one octave higher. I think this shouldn't be the expected result. 
Best,
-Luís

<CsoundSynthesizer>
<CsOptions>
-odac -d -m0
</CsOptions>
<CsInstruments>
nchnls = 2
ksmps = 128
0dbfs = 1
instr 1050;table player
Sifn = "piano_quarter2.aiff"; "western_stereo-ausschnitt.aif"
ifilelen filelen Sifn
gitemp1020 ftgen 987, 0, 16777216, 1, Sifn, 0, 4, 1 ;piano
itlen = ftlen(987)
ixmode = 0 ;raw index ;1; index 0-1
ixoff = 0
iwrap = 0
kcps = 1/ ifilelen
and phasor kcps
andx = (and * ifilelen * sr) ;/ kpitch ;apitch
as1 poscil3 1, kcps, 987
as2 oscil3 1, kcps, 987
;as1 table3 andx, 987 ,ixmode, ixoff, iwrap
;as2 = as1
outs as1, as2
ktime times
kmin = floor(ktime / 60)
kseconds = ktime%60
ksamples downsamp andx
printks "%n %t %d sec %t %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, ksamples, itlen
endin
</CsInstruments>
<CsScore>
i1050 0 6000
</CsScore>
</CsoundSynthesizer>


Em 05.10.11 19:44, Victor Lazzarini escreveu:
I mean it's NOT the line opcodes but phasor. 
On 5 Oct 2011, at 18:35, Victor Lazzarini wrote: 

yes, but in this case it's the line etc opcodes that are the culprit but the indexing of a large table using phasor. I actually think we fixed this for 5.14, because the internal phasor index used to be MYFLT and now is fixed as a double for all versions. 

By the way, an oscillator like poscil (or oscili/3) should behave OK here because their indexing has more precision (doubles for poscil and better than 
32bit for oscili etc), so they are also an option. 

Victor 

On 5 Oct 2011, at 17:59, Michael Gogins wrote: 

It has not got enough precision. The opcode is written to add with 
cumulative rounding error instead of to multiply with constant 
rounding error. Doubles should work. 

The code should be changed, however, it is an elementary error of 
numerical programming. 

Judy Klein brought this issue (or maybe a similar one) to my attention. 

Regards, 
Mike 

On Wed, Oct 5, 2011 at 12:52 PM, Victor Lazzarini 
<Victor.Lazzarini@nuim.ie> wrote: 
yes, the way you wrote your orchestra will need doubles to work. The index 
is 32-bit float and has not enough precision, I think the error has to do 
with it (the exact reasons I will have to think a bit to diagnose, it could 
be kcps or andx that is at fault). With doubles csound, there is no 
distortion. 
Victor 


On 5 Oct 2011, at 17:05, k_o_m_p wrote: 

I'm using floats. 
-Luís 

Em 05.10.11 17:47, jpff@cs.bath.ac.uk escreveu: 

also, are you using floats or doubles? 

==John ff> 

Hi Luís, 

I tried your code with a three minute, 16 bit, 44100Hz aiff containing a 
held sine tone but heard nothing untoward while playing back for 3 
minutes. 
Can you give any further information? Exactly what is the strange noise? 
Command line flags? I don't think the problem is with tablei. 

Iain 

Date: Wed, 5 Oct 2011 16:23:46 +0200 
From: k_o_m_p@yahoo.de 
To: csound@lists.bath.ac.uk 
Subject: [Csnd] table 










  I'm having a problem while reading long sound files with tablei and 
  a phasor. The file is about 3 minutes long and the GEN 01 has 2^24 
  points (about 6 minutes long) 

  At the beginning it sounds normal but after one minute there is some 
  strange noise and I can't figure out what it could be. 

  Is there any limitation with tablei? (I attached the csd-file) 

  Many thanks, 

  -Luís 




  instr 1050;table player 

  Sifn = 
    "piano_quarter2.aiff" 

  ifilelen filelen Sifn 
  gitemp1020 ftgen 987, 0,csound-devel@lists.sourceforge.net 
    16777216, 1, Sifn, 0, 4, 1 ;piano 

  itlen = ftlen(987) 

  ixmode = 0 ;raw index ;1; 
    index 0-1 
  ixoff = 0 
  iwrap = 0 

  kcps = 1/ ifilelen 
  and phasor kcps 

  andx = (and * ifilelen * 
    sr) ;/ kpitch ;apitch 

  as1 table3 andx, 987 
    ,ixmode, ixoff, iwrap 
  as2 = as1 

  outs as1, as2 


  ktime times 
  kmin = floor(ktime / 60) 
  kseconds = ktime%60 
  ksamples downsamp andx 
  printks "%n %t %d sec %t 
    %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, 
    ksamples, itlen 

  endin 




csound-devel@lists.sourceforge.net 



  -- 



    signatur 


    luis antunes pena 

      http://luisantunespena.eu 


Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
csound" 




-- 
luis antunes pena 
Severinswall 54 
D-50678 Köln 

http://luisantunespena.eu 

+49 (0)221 29020757 
+49 (0)176 968 09 867 (mobile) 

Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 






-- 
Michael Gogins 
Irreducible Productions 
http://www.michael-gogins.com 
Michael dot Gogins at gmail dot com 


Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 


Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 





Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 


Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 





Send bugs reports to the Sourceforge bug tracker 
           https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 




-- 
luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





--
signatur luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Date2011-10-05 21:27
FromVictor Lazzarini
SubjectRe: [Csnd] table
yes, you want a sampling increment of 1, so you need to set the freq to sr/length. 


On 5 Oct 2011, at 20:11, k_o_m_p wrote:

I see. The table length and not the sound file length. Thank you!

Em 05.10.11 20:17, Victor Lazzarini escreveu:
I think your kcps should be

kcps = sr/ftlen(987)

to be correct. Then oscili and poscil, oscil3 and poscil3 will agree.

Victor
On 5 Oct 2011, at 19:07, Victor Lazzarini wrote:

well that seems very wrong. poscil and oscili should be equivalent.
On 5 Oct 2011, at 18:55, k_o_m_p wrote:

Thank you for all the answers. Indeed with csound64 works well. I also tryed with oscil3 which works fine as well. This should be a solution for me. 
I also tryed poscil instead of oscil3, which gave me strange results. poscil transposes about (but not exactly) one octave higher. I think this shouldn't be the expected result. 
Best,
-Luís

<CsoundSynthesizer>
<CsOptions>
-odac -d -m0
</CsOptions>
<CsInstruments>
nchnls = 2
ksmps = 128
0dbfs = 1
instr 1050;table player
Sifn = "piano_quarter2.aiff"; "western_stereo-ausschnitt.aif"
ifilelen filelen Sifn
gitemp1020 ftgen 987, 0, 16777216, 1, Sifn, 0, 4, 1 ;piano
itlen = ftlen(987)
ixmode = 0 ;raw index ;1; index 0-1
ixoff = 0
iwrap = 0
kcps = 1/ ifilelen
and phasor kcps
andx = (and * ifilelen * sr) ;/ kpitch ;apitch
as1 poscil3 1, kcps, 987
as2 oscil3 1, kcps, 987
;as1 table3 andx, 987 ,ixmode, ixoff, iwrap
;as2 = as1
outs as1, as2
ktime times
kmin = floor(ktime / 60)
kseconds = ktime%60
ksamples downsamp andx
printks "%n %t %d sec %t %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, ksamples, itlen
endin
</CsInstruments>
<CsScore>
i1050 0 6000
</CsScore>
</CsoundSynthesizer>


Em 05.10.11 19:44, Victor Lazzarini escreveu:
I mean it's NOT the line opcodes but phasor. 
On 5 Oct 2011, at 18:35, Victor Lazzarini wrote: 

yes, but in this case it's the line etc opcodes that are the culprit but the indexing of a large table using phasor. I actually think we fixed this for 5.14, because the internal phasor index used to be MYFLT and now is fixed as a double for all versions. 

By the way, an oscillator like poscil (or oscili/3) should behave OK here because their indexing has more precision (doubles for poscil and better than 
32bit for oscili etc), so they are also an option. 

Victor 

On 5 Oct 2011, at 17:59, Michael Gogins wrote: 

It has not got enough precision. The opcode is written to add with 
cumulative rounding error instead of to multiply with constant 
rounding error. Doubles should work. 

The code should be changed, however, it is an elementary error of 
numerical programming. 

Judy Klein brought this issue (or maybe a similar one) to my attention. 

Regards, 
Mike 

On Wed, Oct 5, 2011 at 12:52 PM, Victor Lazzarini 
<Victor.Lazzarini@nuim.ie> wrote: 
yes, the way you wrote your orchestra will need doubles to work. The index 
is 32-bit float and has not enough precision, I think the error has to do 
with it (the exact reasons I will have to think a bit to diagnose, it could 
be kcps or andx that is at fault). With doubles csound, there is no 
distortion. 
Victor 


On 5 Oct 2011, at 17:05, k_o_m_p wrote: 

I'm using floats. 
-Luís 

Em 05.10.11 17:47, jpff@cs.bath.ac.uk escreveu: 

also, are you using floats or doubles? 

==John ff> 

Hi Luís, 

I tried your code with a three minute, 16 bit, 44100Hz aiff containing a 
held sine tone but heard nothing untoward while playing back for 3 
minutes. 
Can you give any further information? Exactly what is the strange noise? 
Command line flags? I don't think the problem is with tablei. 

Iain 

Date: Wed, 5 Oct 2011 16:23:46 +0200 
From: k_o_m_p@yahoo.de 
To: csound@lists.bath.ac.uk 
Subject: [Csnd] table 










  I'm having a problem while reading long sound files with tablei and 
  a phasor. The file is about 3 minutes long and the GEN 01 has 2^24 
  points (about 6 minutes long) 

  At the beginning it sounds normal but after one minute there is some 
  strange noise and I can't figure out what it could be. 

  Is there any limitation with tablei? (I attached the csd-file) 

  Many thanks, 

  -Luís 




  instr 1050;table player 

  Sifn = 
    "piano_quarter2.aiff" 

  ifilelen filelen Sifn 
  gitemp1020 ftgen 987, 0,csound-devel@lists.sourceforge.net 
    16777216, 1, Sifn, 0, 4, 1 ;piano 

  itlen = ftlen(987) 

  ixmode = 0 ;raw index ;1; 
    index 0-1 
  ixoff = 0 
  iwrap = 0 

  kcps = 1/ ifilelen 
  and phasor kcps 

  andx = (and * ifilelen * 
    sr) ;/ kpitch ;apitch 

  as1 table3 andx, 987 
    ,ixmode, ixoff, iwrap 
  as2 = as1 

  outs as1, as2 


  ktime times 
  kmin = floor(ktime / 60) 
  kseconds = ktime%60 
  ksamples downsamp andx 
  printks "%n %t %d sec %t 
    %dm %ds %t %d samp %t table: %d samp", 1, ktime, kmin, kseconds, 
    ksamples, itlen 

  endin 




csound-devel@lists.sourceforge.net 



  -- 



    signatur 


    luis antunes pena 

      http://luisantunespena.eu 


Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
csound" 




-- 
luis antunes pena 
Severinswall 54 
D-50678 Köln 

http://luisantunespena.eu 

+49 (0)221 29020757 
+49 (0)176 968 09 867 (mobile) 

Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 






-- 
Michael Gogins 
Irreducible Productions 
http://www.michael-gogins.com 
Michael dot Gogins at gmail dot com 


Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 


Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 





Send bugs reports to the Sourceforge bug tracker 
          https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 


Dr Victor Lazzarini 
Senior Lecturer 
Dept. of Music 
NUI Maynooth Ireland 
tel.: +353 1 708 3545 
Victor dot Lazzarini AT nuim dot ie 





Send bugs reports to the Sourceforge bug tracker 
           https://sourceforge.net/tracker/?group_id=81968&atid=564599 
Discussions of bugs and features can be posted here 
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" 




-- 
luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





-- 
luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie