[Csnd] Different output on table-read out in respect to kr
Date | 2013-06-09 19:47 |
From | Jan Jacob Hofmann |
Subject | [Csnd] Different output on table-read out in respect to kr |
Dear list, if I read trough a table using a simple oscil-opcode the result will differ according to the kr used if the frequency is pretty low. Reading the table with ksmps = 10 shows an output like expected, the tabel is read once during the note. However for ksmps = 1 the table is read trough approximately only by 78 %. Have I not yet understood something fundamental or are there quite huge rounding errors going on in Csound? A simple test csd to be run with ksmps = 10 once and then with ksmps = 1 can be found below. Any hints welcome. All the best, Jan Jacob |
Date | 2013-06-09 20:36 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Different output on table-read out in respect to kr |
Not sure what you mean? With ksmps = 1 i 1 time 100.00000: 0.99805 with ksmps = 10 i 1 time 100.00000: 0.99969 with ksmps = 100 i 1 time 100.00000: 0.99997 This is to be expected with oscil/i/3 because they use integer maths for indexing. But it's not that bad in this particular example However, with poscil instead, we get i 1 time 100.00000: 0.00743 regardless of the ksmps, because it uses floating-point indexing. These results are with Csound 6. Victor On 9 Jun 2013, at 19:47, Jan Jacob Hofmann wrote: > Dear list, > > if I read trough a table using a simple oscil-opcode the result will differ according to the kr used if the frequency is pretty low. Reading the table with ksmps = 10 shows an output like expected, the tabel is read once during the note. However for ksmps = 1 the table is read trough approximately only by 78 %. Have I not yet understood something fundamental or are there quite huge rounding errors going on in Csound? > A simple test csd to be run with ksmps = 10 once and then with ksmps = 1 can be found below. Any hints welcome. > All the best, > > Jan Jacob > > |
Date | 2013-06-09 21:03 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Different output on table-read out in respect to kr |
Mind you, the rounding in Csound 5 is what you reported. But I've changed Csound 6 to use a larger range of numbers for the integer maths, and the results are as I reported. Also, interestingly Csound 6 here is performing over 4x faster than Csound 5. That's actually a surprise, but it appears to be the case across the board. Victor On 9 Jun 2013, at 20:36, Victor Lazzarini wrote: > Not sure what you mean? With ksmps = 1 > > i 1 time 100.00000: 0.99805 > > with ksmps = 10 > > i 1 time 100.00000: 0.99969 > > > with ksmps = 100 > > i 1 time 100.00000: 0.99997 > > This is to be expected with oscil/i/3 because they use integer maths for indexing. But it's not that bad in this > particular example > > However, with poscil instead, we get > > i 1 time 100.00000: 0.00743 > > regardless of the ksmps, because it uses floating-point indexing. > > These results are with Csound 6. > > Victor > > On 9 Jun 2013, at 19:47, Jan Jacob Hofmann wrote: > >> Dear list, >> >> if I read trough a table using a simple oscil-opcode the result will differ according to the kr used if the frequency is pretty low. Reading the table with ksmps = 10 shows an output like expected, the tabel is read once during the note. However for ksmps = 1 the table is read trough approximately only by 78 %. Have I not yet understood something fundamental or are there quite huge rounding errors going on in Csound? >> A simple test csd to be run with ksmps = 10 once and then with ksmps = 1 can be found below. Any hints welcome. >> All the best, >> >> Jan Jacob >> >> |
Date | 2013-06-09 21:55 |
From | Michael Gogins |
Subject | Re: [Csnd] Different output on table-read out in respect to kr |
On WIndows 8, I also find Csound 6 is now quite a bit faster than Csound 5, when earlier versions of Csound 6 were slightly slower than Csound 5.
Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Sun, Jun 9, 2013 at 4:03 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: Mind you, the rounding in Csound 5 is what you reported. But I've changed Csound 6 to use a larger range of numbers for the integer maths, and the |