Csound Csound-dev Csound-tekno Search About

[Cs-dev] Hold on Release

Date2014-01-05 02:55
FromSteven Yi
Subject[Cs-dev] Hold on Release
Hi All,

I'm back home from holidays and am starting to get back into
development. I noticed that one of my projects still has some kind of
performance degredation as the project keeps rendering.  I suspect it
is related to certain instances continuing to be kept around due to
miscalculation of times.

I did a:

grep "csound->ekr" * -n -r

in the csound6 directory and found a number of uses.  Some look
correct but others I'm not quite sure.

I'm going to do some further testing tomorrow after creating a test
file to use.  I forgot if we were waiting until Monday or not, but I'd
like to ask to hold on the release until at least then so I can
diagnose this issue.

Thanks,
steven

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-05 11:40
FromVictor Lazzarini
SubjectRe: [Cs-dev] Hold on Release
I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.

This means these guys are probably wrong:

../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);

disprep.c is displays.
dumpf.c is the dump opcodes
The problem in goto_ops.c is in the timout opcode (i-pass).
midiout.c is midi output.
schedule.c issue is in schedkwhen, schedkwhennamed.
there is a final problem in oscil1 (ugens2.c).

Victor
On 5 Jan 2014, at 02:55, Steven Yi  wrote:

> Hi All,
> 
> I'm back home from holidays and am starting to get back into
> development. I noticed that one of my projects still has some kind of
> performance degredation as the project keeps rendering.  I suspect it
> is related to certain instances continuing to be kept around due to
> miscalculation of times.
> 
> I did a:
> 
> grep "csound->ekr" * -n -r
> 
> in the csound6 directory and found a number of uses.  Some look
> correct but others I'm not quite sure.
> 
> I'm going to do some further testing tomorrow after creating a test
> file to use.  I forgot if we were waiting until Monday or not, but I'd
> like to ask to hold on the release until at least then so I can
> diagnose this issue.
> 
> Thanks,
> steven
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-05 16:00
FromSteven Yi
SubjectRe: [Cs-dev] Hold on Release
Hi Victor,

I've modified the ones you listed to use CS_EKR.  I'll see if any of
those fixes the issue I have here.  I may need help testing the
opcodes individually though.  I'll report back here as I find out
more.

Thanks!
steven

On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
 wrote:
> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>
> This means these guys are probably wrong:
>
> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>
> disprep.c is displays.
> dumpf.c is the dump opcodes
> The problem in goto_ops.c is in the timout opcode (i-pass).
> midiout.c is midi output.
> schedule.c issue is in schedkwhen, schedkwhennamed.
> there is a final problem in oscil1 (ugens2.c).
>
> Victor
> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>
>> Hi All,
>>
>> I'm back home from holidays and am starting to get back into
>> development. I noticed that one of my projects still has some kind of
>> performance degredation as the project keeps rendering.  I suspect it
>> is related to certain instances continuing to be kept around due to
>> miscalculation of times.
>>
>> I did a:
>>
>> grep "csound->ekr" * -n -r
>>
>> in the csound6 directory and found a number of uses.  Some look
>> correct but others I'm not quite sure.
>>
>> I'm going to do some further testing tomorrow after creating a test
>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>> like to ask to hold on the release until at least then so I can
>> diagnose this issue.
>>
>> Thanks,
>> steven
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-05 16:13
FromSteven Yi
SubjectRe: [Cs-dev] Hold on Release
Attachmentstest_hold_bug.csd  None  None  
I'm still getting underruns with cs6.  I've attached a test CSD here.
With CS5 I am not getting underruns.  The suspicion is that there is a
timeout value being incorrectly calculated, but I am not sure.  This
CSD starts to stutter for me around 12 seconds into the render, but
this should differ depending on CPU/machine/etc.

On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
> Hi Victor,
>
> I've modified the ones you listed to use CS_EKR.  I'll see if any of
> those fixes the issue I have here.  I may need help testing the
> opcodes individually though.  I'll report back here as I find out
> more.
>
> Thanks!
> steven
>
> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>  wrote:
>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>
>> This means these guys are probably wrong:
>>
>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>
>> disprep.c is displays.
>> dumpf.c is the dump opcodes
>> The problem in goto_ops.c is in the timout opcode (i-pass).
>> midiout.c is midi output.
>> schedule.c issue is in schedkwhen, schedkwhennamed.
>> there is a final problem in oscil1 (ugens2.c).
>>
>> Victor
>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>
>>> Hi All,
>>>
>>> I'm back home from holidays and am starting to get back into
>>> development. I noticed that one of my projects still has some kind of
>>> performance degredation as the project keeps rendering.  I suspect it
>>> is related to certain instances continuing to be kept around due to
>>> miscalculation of times.
>>>
>>> I did a:
>>>
>>> grep "csound->ekr" * -n -r
>>>
>>> in the csound6 directory and found a number of uses.  Some look
>>> correct but others I'm not quite sure.
>>>
>>> I'm going to do some further testing tomorrow after creating a test
>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>> like to ask to hold on the release until at least then so I can
>>> diagnose this issue.
>>>
>>> Thanks,
>>> steven
>>>
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2014-01-05 16:31
FromSteven Yi
SubjectRe: [Cs-dev] Hold on Release
I'm currently looking at set_xtratim() in insert.c:

static void set_xtratim(CSOUND *csound, INSDS *ip)
{
    if (ip->relesing)
      return;
    ip->offtim = (csound->icurTime +
                  csound->ksmps * (double) ip->xtratim)/csound->esr;
    ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
    ip->relesing = 1;
    csound->engineState.instrtxtp[ip->insno]->pending_release++;
}

It looks to me that timexpire() gets called when the note's p3 is
done. I'm not sure the values being calculated here are correct, but
I'm also wondering if the xtratim change I did (commit
a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
investigating.

On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
> I'm still getting underruns with cs6.  I've attached a test CSD here.
> With CS5 I am not getting underruns.  The suspicion is that there is a
> timeout value being incorrectly calculated, but I am not sure.  This
> CSD starts to stutter for me around 12 seconds into the render, but
> this should differ depending on CPU/machine/etc.
>
> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>> Hi Victor,
>>
>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>> those fixes the issue I have here.  I may need help testing the
>> opcodes individually though.  I'll report back here as I find out
>> more.
>>
>> Thanks!
>> steven
>>
>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>  wrote:
>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>
>>> This means these guys are probably wrong:
>>>
>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>
>>> disprep.c is displays.
>>> dumpf.c is the dump opcodes
>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>> midiout.c is midi output.
>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>> there is a final problem in oscil1 (ugens2.c).
>>>
>>> Victor
>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>
>>>> Hi All,
>>>>
>>>> I'm back home from holidays and am starting to get back into
>>>> development. I noticed that one of my projects still has some kind of
>>>> performance degredation as the project keeps rendering.  I suspect it
>>>> is related to certain instances continuing to be kept around due to
>>>> miscalculation of times.
>>>>
>>>> I did a:
>>>>
>>>> grep "csound->ekr" * -n -r
>>>>
>>>> in the csound6 directory and found a number of uses.  Some look
>>>> correct but others I'm not quite sure.
>>>>
>>>> I'm going to do some further testing tomorrow after creating a test
>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>> like to ask to hold on the release until at least then so I can
>>>> diagnose this issue.
>>>>
>>>> Thanks,
>>>> steven
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-05 18:47
FromVictor Lazzarini
SubjectRe: [Cs-dev] Hold on Release
Shouldn’t this be:

ip->offtim = (csound->icurTime +
                 ip->ksmps * (double) ip->xtratim)/csound->esr;

On 5 Jan 2014, at 16:31, Steven Yi  wrote:

> I'm currently looking at set_xtratim() in insert.c:
> 
> static void set_xtratim(CSOUND *csound, INSDS *ip)
> {
>    if (ip->relesing)
>      return;
>    ip->offtim = (csound->icurTime +
>                  csound->ksmps * (double) ip->xtratim)/csound->esr;
>    ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>    ip->relesing = 1;
>    csound->engineState.instrtxtp[ip->insno]->pending_release++;
> }
> 
> It looks to me that timexpire() gets called when the note's p3 is
> done. I'm not sure the values being calculated here are correct, but
> I'm also wondering if the xtratim change I did (commit
> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
> investigating.
> 
> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>> With CS5 I am not getting underruns.  The suspicion is that there is a
>> timeout value being incorrectly calculated, but I am not sure.  This
>> CSD starts to stutter for me around 12 seconds into the render, but
>> this should differ depending on CPU/machine/etc.
>> 
>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>> Hi Victor,
>>> 
>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>> those fixes the issue I have here.  I may need help testing the
>>> opcodes individually though.  I'll report back here as I find out
>>> more.
>>> 
>>> Thanks!
>>> steven
>>> 
>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>  wrote:
>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>> 
>>>> This means these guys are probably wrong:
>>>> 
>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>> 
>>>> disprep.c is displays.
>>>> dumpf.c is the dump opcodes
>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>> midiout.c is midi output.
>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>> there is a final problem in oscil1 (ugens2.c).
>>>> 
>>>> Victor
>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>> 
>>>>> Hi All,
>>>>> 
>>>>> I'm back home from holidays and am starting to get back into
>>>>> development. I noticed that one of my projects still has some kind of
>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>> is related to certain instances continuing to be kept around due to
>>>>> miscalculation of times.
>>>>> 
>>>>> I did a:
>>>>> 
>>>>> grep "csound->ekr" * -n -r
>>>>> 
>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>> correct but others I'm not quite sure.
>>>>> 
>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>> like to ask to hold on the release until at least then so I can
>>>>> diagnose this issue.
>>>>> 
>>>>> Thanks,
>>>>> steven
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>> organizations don't have a clear picture of how application performance
>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-05 18:56
FromSteven Yi
SubjectRe: [Cs-dev] Hold on Release
Tried that here but that didn't change the behavior (so, I can't tell
if that change is necessary or not).  What I'm seeing is that with
debugger is that xtratim gets modified in useropcdset. In CS5, it's a
stable value, but in CS6, it looks to be getting multiplied over and
over. I think there's a scaling factor that is missing somehow.  I've
got both CS5 and 6 in XCode now and am continuing to debug.

On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
 wrote:
> Shouldn’t this be:
>
> ip->offtim = (csound->icurTime +
>                  ip->ksmps * (double) ip->xtratim)/csound->esr;
>
> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>
>> I'm currently looking at set_xtratim() in insert.c:
>>
>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>> {
>>    if (ip->relesing)
>>      return;
>>    ip->offtim = (csound->icurTime +
>>                  csound->ksmps * (double) ip->xtratim)/csound->esr;
>>    ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>    ip->relesing = 1;
>>    csound->engineState.instrtxtp[ip->insno]->pending_release++;
>> }
>>
>> It looks to me that timexpire() gets called when the note's p3 is
>> done. I'm not sure the values being calculated here are correct, but
>> I'm also wondering if the xtratim change I did (commit
>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>> investigating.
>>
>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>> timeout value being incorrectly calculated, but I am not sure.  This
>>> CSD starts to stutter for me around 12 seconds into the render, but
>>> this should differ depending on CPU/machine/etc.
>>>
>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>> Hi Victor,
>>>>
>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>> those fixes the issue I have here.  I may need help testing the
>>>> opcodes individually though.  I'll report back here as I find out
>>>> more.
>>>>
>>>> Thanks!
>>>> steven
>>>>
>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>  wrote:
>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>
>>>>> This means these guys are probably wrong:
>>>>>
>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>
>>>>> disprep.c is displays.
>>>>> dumpf.c is the dump opcodes
>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>> midiout.c is midi output.
>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>
>>>>> Victor
>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I'm back home from holidays and am starting to get back into
>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>> is related to certain instances continuing to be kept around due to
>>>>>> miscalculation of times.
>>>>>>
>>>>>> I did a:
>>>>>>
>>>>>> grep "csound->ekr" * -n -r
>>>>>>
>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>> correct but others I'm not quite sure.
>>>>>>
>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>> like to ask to hold on the release until at least then so I can
>>>>>> diagnose this issue.
>>>>>>
>>>>>> Thanks,
>>>>>> steven
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>> organizations don't have a clear picture of how application performance
>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>> organizations don't have a clear picture of how application performance
>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-05 19:02
FromVictor Lazzarini
SubjectRe: [Cs-dev] Hold on Release
If there is an INSDS *, it’s always good to refer to its ksmps, as it will be always correct.

Victor
On 5 Jan 2014, at 18:56, Steven Yi  wrote:

> Tried that here but that didn't change the behavior (so, I can't tell
> if that change is necessary or not).  What I'm seeing is that with
> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
> stable value, but in CS6, it looks to be getting multiplied over and
> over. I think there's a scaling factor that is missing somehow.  I've
> got both CS5 and 6 in XCode now and am continuing to debug.
> 
> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>  wrote:
>> Shouldn’t this be:
>> 
>> ip->offtim = (csound->icurTime +
>>                 ip->ksmps * (double) ip->xtratim)/csound->esr;
>> 
>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>> 
>>> I'm currently looking at set_xtratim() in insert.c:
>>> 
>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>> {
>>>   if (ip->relesing)
>>>     return;
>>>   ip->offtim = (csound->icurTime +
>>>                 csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>   ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>   ip->relesing = 1;
>>>   csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>> }
>>> 
>>> It looks to me that timexpire() gets called when the note's p3 is
>>> done. I'm not sure the values being calculated here are correct, but
>>> I'm also wondering if the xtratim change I did (commit
>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>> investigating.
>>> 
>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>> this should differ depending on CPU/machine/etc.
>>>> 
>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>> Hi Victor,
>>>>> 
>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>> those fixes the issue I have here.  I may need help testing the
>>>>> opcodes individually though.  I'll report back here as I find out
>>>>> more.
>>>>> 
>>>>> Thanks!
>>>>> steven
>>>>> 
>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>  wrote:
>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>> 
>>>>>> This means these guys are probably wrong:
>>>>>> 
>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>> 
>>>>>> disprep.c is displays.
>>>>>> dumpf.c is the dump opcodes
>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>> midiout.c is midi output.
>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>> 
>>>>>> Victor
>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>> 
>>>>>>> Hi All,
>>>>>>> 
>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>> miscalculation of times.
>>>>>>> 
>>>>>>> I did a:
>>>>>>> 
>>>>>>> grep "csound->ekr" * -n -r
>>>>>>> 
>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>> correct but others I'm not quite sure.
>>>>>>> 
>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>> diagnose this issue.
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> steven
>>>>>>> 
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>> 
>>>>>> 
>>>>>> ------------------------------------------------------------------------------
>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>> organizations don't have a clear picture of how application performance
>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-05 19:05
FromVictor Lazzarini
SubjectRe: [Cs-dev] Hold on Release
I am not sure whether csound->icurTime is correct when an instrument has local ksmps.

Victor
On 5 Jan 2014, at 18:56, Steven Yi  wrote:

> Tried that here but that didn't change the behavior (so, I can't tell
> if that change is necessary or not).  What I'm seeing is that with
> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
> stable value, but in CS6, it looks to be getting multiplied over and
> over. I think there's a scaling factor that is missing somehow.  I've
> got both CS5 and 6 in XCode now and am continuing to debug.
> 
> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>  wrote:
>> Shouldn’t this be:
>> 
>> ip->offtim = (csound->icurTime +
>>                 ip->ksmps * (double) ip->xtratim)/csound->esr;
>> 
>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>> 
>>> I'm currently looking at set_xtratim() in insert.c:
>>> 
>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>> {
>>>   if (ip->relesing)
>>>     return;
>>>   ip->offtim = (csound->icurTime +
>>>                 csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>   ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>   ip->relesing = 1;
>>>   csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>> }
>>> 
>>> It looks to me that timexpire() gets called when the note's p3 is
>>> done. I'm not sure the values being calculated here are correct, but
>>> I'm also wondering if the xtratim change I did (commit
>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>> investigating.
>>> 
>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>> this should differ depending on CPU/machine/etc.
>>>> 
>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>> Hi Victor,
>>>>> 
>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>> those fixes the issue I have here.  I may need help testing the
>>>>> opcodes individually though.  I'll report back here as I find out
>>>>> more.
>>>>> 
>>>>> Thanks!
>>>>> steven
>>>>> 
>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>  wrote:
>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>> 
>>>>>> This means these guys are probably wrong:
>>>>>> 
>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>> 
>>>>>> disprep.c is displays.
>>>>>> dumpf.c is the dump opcodes
>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>> midiout.c is midi output.
>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>> 
>>>>>> Victor
>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>> 
>>>>>>> Hi All,
>>>>>>> 
>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>> miscalculation of times.
>>>>>>> 
>>>>>>> I did a:
>>>>>>> 
>>>>>>> grep "csound->ekr" * -n -r
>>>>>>> 
>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>> correct but others I'm not quite sure.
>>>>>>> 
>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>> diagnose this issue.
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> steven
>>>>>>> 
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>> 
>>>>>> 
>>>>>> ------------------------------------------------------------------------------
>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>> organizations don't have a clear picture of how application performance
>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-05 19:06
FromSteven Yi
SubjectRe: [Cs-dev] Hold on Release
I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
 It looks like the issue manifests when a UDO calls another UDO.  In
this case, I think the 2nd or 3rd level down UDO is using setksmps,
but the callers are not using setksmps.  I think I saw local_ksmps and
ksmps_scale not agreeing in value just now, going to rerun a few more
times and see if I find it.

On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
 wrote:
> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>
> Victor
> On 5 Jan 2014, at 18:56, Steven Yi  wrote:
>
>> Tried that here but that didn't change the behavior (so, I can't tell
>> if that change is necessary or not).  What I'm seeing is that with
>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>> stable value, but in CS6, it looks to be getting multiplied over and
>> over. I think there's a scaling factor that is missing somehow.  I've
>> got both CS5 and 6 in XCode now and am continuing to debug.
>>
>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>  wrote:
>>> Shouldn’t this be:
>>>
>>> ip->offtim = (csound->icurTime +
>>>                 ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>
>>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>>>
>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>
>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>> {
>>>>   if (ip->relesing)
>>>>     return;
>>>>   ip->offtim = (csound->icurTime +
>>>>                 csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>   ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>   ip->relesing = 1;
>>>>   csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>> }
>>>>
>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>> done. I'm not sure the values being calculated here are correct, but
>>>> I'm also wondering if the xtratim change I did (commit
>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>> investigating.
>>>>
>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>> this should differ depending on CPU/machine/etc.
>>>>>
>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>>> Hi Victor,
>>>>>>
>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>> more.
>>>>>>
>>>>>> Thanks!
>>>>>> steven
>>>>>>
>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>  wrote:
>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>
>>>>>>> This means these guys are probably wrong:
>>>>>>>
>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>
>>>>>>> disprep.c is displays.
>>>>>>> dumpf.c is the dump opcodes
>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>> midiout.c is midi output.
>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>
>>>>>>> Victor
>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>>>
>>>>>>>> Hi All,
>>>>>>>>
>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>> miscalculation of times.
>>>>>>>>
>>>>>>>> I did a:
>>>>>>>>
>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>
>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>
>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>> diagnose this issue.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> steven
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>> _______________________________________________
>>>>>>>> Csound-devel mailing list
>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-05 19:33
FromSteven Yi
SubjectRe: [Cs-dev] Hold on Release
I think I found the bug: in CS5, setksmpsset in insert.c pre-caches
some ksmps_scale value.  In CS6, this is not done, but there was some
code there that multiplied the xtratim:

//    p->h.insdshead->xtratim *= n;

I commented that out and the xtratim values seem stable again.  The
calculated values do differ a little bit from CS5.  Will do some
testing now.

On Sun, Jan 5, 2014 at 2:06 PM, Steven Yi  wrote:
> I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
>  It looks like the issue manifests when a UDO calls another UDO.  In
> this case, I think the 2nd or 3rd level down UDO is using setksmps,
> but the callers are not using setksmps.  I think I saw local_ksmps and
> ksmps_scale not agreeing in value just now, going to rerun a few more
> times and see if I find it.
>
> On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
>  wrote:
>> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>>
>> Victor
>> On 5 Jan 2014, at 18:56, Steven Yi  wrote:
>>
>>> Tried that here but that didn't change the behavior (so, I can't tell
>>> if that change is necessary or not).  What I'm seeing is that with
>>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>>> stable value, but in CS6, it looks to be getting multiplied over and
>>> over. I think there's a scaling factor that is missing somehow.  I've
>>> got both CS5 and 6 in XCode now and am continuing to debug.
>>>
>>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>>  wrote:
>>>> Shouldn’t this be:
>>>>
>>>> ip->offtim = (csound->icurTime +
>>>>                 ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>>
>>>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>>>>
>>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>>
>>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>>> {
>>>>>   if (ip->relesing)
>>>>>     return;
>>>>>   ip->offtim = (csound->icurTime +
>>>>>                 csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>   ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>>   ip->relesing = 1;
>>>>>   csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>>> }
>>>>>
>>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>>> done. I'm not sure the values being calculated here are correct, but
>>>>> I'm also wondering if the xtratim change I did (commit
>>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>>> investigating.
>>>>>
>>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>>> this should differ depending on CPU/machine/etc.
>>>>>>
>>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>>>> Hi Victor,
>>>>>>>
>>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>>> more.
>>>>>>>
>>>>>>> Thanks!
>>>>>>> steven
>>>>>>>
>>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>>  wrote:
>>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>>
>>>>>>>> This means these guys are probably wrong:
>>>>>>>>
>>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>>
>>>>>>>> disprep.c is displays.
>>>>>>>> dumpf.c is the dump opcodes
>>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>>> midiout.c is midi output.
>>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>>
>>>>>>>> Victor
>>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>>>>
>>>>>>>>> Hi All,
>>>>>>>>>
>>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>>> miscalculation of times.
>>>>>>>>>
>>>>>>>>> I did a:
>>>>>>>>>
>>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>>
>>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>>
>>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>>> diagnose this issue.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> steven
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>> _______________________________________________
>>>>>>>>> Csound-devel mailing list
>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>> _______________________________________________
>>>>>>>> Csound-devel mailing list
>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>> organizations don't have a clear picture of how application performance
>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-05 19:39
FromSteven Yi
SubjectRe: [Cs-dev] Hold on Release
Still has an issue, but getting closer.  In CS5, when timexpire first
gets called, the calculated offtim and offbet (this is in
insert.c:set_xtratim() ) are 1.187120181405783.  In CS6, this was
something like 20000, but after commenting out the setksmpsset code,
I'm getting values of 39.39555555555555.  There must still be some
multiply that is off somewhere.

On Sun, Jan 5, 2014 at 2:33 PM, Steven Yi  wrote:
> I think I found the bug: in CS5, setksmpsset in insert.c pre-caches
> some ksmps_scale value.  In CS6, this is not done, but there was some
> code there that multiplied the xtratim:
>
> //    p->h.insdshead->xtratim *= n;
>
> I commented that out and the xtratim values seem stable again.  The
> calculated values do differ a little bit from CS5.  Will do some
> testing now.
>
> On Sun, Jan 5, 2014 at 2:06 PM, Steven Yi  wrote:
>> I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
>>  It looks like the issue manifests when a UDO calls another UDO.  In
>> this case, I think the 2nd or 3rd level down UDO is using setksmps,
>> but the callers are not using setksmps.  I think I saw local_ksmps and
>> ksmps_scale not agreeing in value just now, going to rerun a few more
>> times and see if I find it.
>>
>> On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
>>  wrote:
>>> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>>>
>>> Victor
>>> On 5 Jan 2014, at 18:56, Steven Yi  wrote:
>>>
>>>> Tried that here but that didn't change the behavior (so, I can't tell
>>>> if that change is necessary or not).  What I'm seeing is that with
>>>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>>>> stable value, but in CS6, it looks to be getting multiplied over and
>>>> over. I think there's a scaling factor that is missing somehow.  I've
>>>> got both CS5 and 6 in XCode now and am continuing to debug.
>>>>
>>>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>>>  wrote:
>>>>> Shouldn’t this be:
>>>>>
>>>>> ip->offtim = (csound->icurTime +
>>>>>                 ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>
>>>>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>>>>>
>>>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>>>
>>>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>>>> {
>>>>>>   if (ip->relesing)
>>>>>>     return;
>>>>>>   ip->offtim = (csound->icurTime +
>>>>>>                 csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>   ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>>>   ip->relesing = 1;
>>>>>>   csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>>>> }
>>>>>>
>>>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>>>> done. I'm not sure the values being calculated here are correct, but
>>>>>> I'm also wondering if the xtratim change I did (commit
>>>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>>>> investigating.
>>>>>>
>>>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>>>> this should differ depending on CPU/machine/etc.
>>>>>>>
>>>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>>>>> Hi Victor,
>>>>>>>>
>>>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>>>> more.
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>> steven
>>>>>>>>
>>>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>>>  wrote:
>>>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>>>
>>>>>>>>> This means these guys are probably wrong:
>>>>>>>>>
>>>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>>>
>>>>>>>>> disprep.c is displays.
>>>>>>>>> dumpf.c is the dump opcodes
>>>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>>>> midiout.c is midi output.
>>>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>>>
>>>>>>>>> Victor
>>>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>>>>>
>>>>>>>>>> Hi All,
>>>>>>>>>>
>>>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>>>> miscalculation of times.
>>>>>>>>>>
>>>>>>>>>> I did a:
>>>>>>>>>>
>>>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>>>
>>>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>>>
>>>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>>>> diagnose this issue.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> steven
>>>>>>>>>>
>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>> _______________________________________________
>>>>>>>>> Csound-devel mailing list
>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>> organizations don't have a clear picture of how application performance
>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>> organizations don't have a clear picture of how application performance
>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-06 02:45
FromSteven Yi
SubjectRe: [Cs-dev] Hold on Release
I think I got it.  I went back and forth a few times, reverting
things, etc.  I did find a solution which was to modify a check in
useropcdset to compare local_ksmps to csound->ksmps; if they were
unequal, I put in a recalculation of ksmps_scale and then modified
xtratim with that.  What I found was that CS5's code did something
similar but in a roundabout way: in setksmpsset, it would calculate a
new ksmps_scale. setksmpsset was called during the initialization of
the UDO instance, about midway through useropcdset.  That in turn made
it hard to find out what was going on.

To note: I am somewhat confident that the code is now working, but I
am not entirely confident that there aren't other bugs.  This area of
code was difficult for me to go through.

Also to note, I didn't not change instances of csound->ekr to CS_EKR
in my commit.  I'm a bit spent to try that again and to do any
testing.

I've merged in the changes from develop and pushed those and my fix up
to SF in the release/6.02.0 branch.

Thanks
steven

On Sun, Jan 5, 2014 at 2:39 PM, Steven Yi  wrote:
> Still has an issue, but getting closer.  In CS5, when timexpire first
> gets called, the calculated offtim and offbet (this is in
> insert.c:set_xtratim() ) are 1.187120181405783.  In CS6, this was
> something like 20000, but after commenting out the setksmpsset code,
> I'm getting values of 39.39555555555555.  There must still be some
> multiply that is off somewhere.
>
> On Sun, Jan 5, 2014 at 2:33 PM, Steven Yi  wrote:
>> I think I found the bug: in CS5, setksmpsset in insert.c pre-caches
>> some ksmps_scale value.  In CS6, this is not done, but there was some
>> code there that multiplied the xtratim:
>>
>> //    p->h.insdshead->xtratim *= n;
>>
>> I commented that out and the xtratim values seem stable again.  The
>> calculated values do differ a little bit from CS5.  Will do some
>> testing now.
>>
>> On Sun, Jan 5, 2014 at 2:06 PM, Steven Yi  wrote:
>>> I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
>>>  It looks like the issue manifests when a UDO calls another UDO.  In
>>> this case, I think the 2nd or 3rd level down UDO is using setksmps,
>>> but the callers are not using setksmps.  I think I saw local_ksmps and
>>> ksmps_scale not agreeing in value just now, going to rerun a few more
>>> times and see if I find it.
>>>
>>> On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
>>>  wrote:
>>>> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>>>>
>>>> Victor
>>>> On 5 Jan 2014, at 18:56, Steven Yi  wrote:
>>>>
>>>>> Tried that here but that didn't change the behavior (so, I can't tell
>>>>> if that change is necessary or not).  What I'm seeing is that with
>>>>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>>>>> stable value, but in CS6, it looks to be getting multiplied over and
>>>>> over. I think there's a scaling factor that is missing somehow.  I've
>>>>> got both CS5 and 6 in XCode now and am continuing to debug.
>>>>>
>>>>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>>>>  wrote:
>>>>>> Shouldn’t this be:
>>>>>>
>>>>>> ip->offtim = (csound->icurTime +
>>>>>>                 ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>
>>>>>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>>>>>>
>>>>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>>>>
>>>>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>>>>> {
>>>>>>>   if (ip->relesing)
>>>>>>>     return;
>>>>>>>   ip->offtim = (csound->icurTime +
>>>>>>>                 csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>   ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>>>>   ip->relesing = 1;
>>>>>>>   csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>>>>> }
>>>>>>>
>>>>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>>>>> done. I'm not sure the values being calculated here are correct, but
>>>>>>> I'm also wondering if the xtratim change I did (commit
>>>>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>>>>> investigating.
>>>>>>>
>>>>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>>>>> this should differ depending on CPU/machine/etc.
>>>>>>>>
>>>>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>>>>>> Hi Victor,
>>>>>>>>>
>>>>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>>>>> more.
>>>>>>>>>
>>>>>>>>> Thanks!
>>>>>>>>> steven
>>>>>>>>>
>>>>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>>>>  wrote:
>>>>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>>>>
>>>>>>>>>> This means these guys are probably wrong:
>>>>>>>>>>
>>>>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>>>>
>>>>>>>>>> disprep.c is displays.
>>>>>>>>>> dumpf.c is the dump opcodes
>>>>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>>>>> midiout.c is midi output.
>>>>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>>>>
>>>>>>>>>> Victor
>>>>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi All,
>>>>>>>>>>>
>>>>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>>>>> miscalculation of times.
>>>>>>>>>>>
>>>>>>>>>>> I did a:
>>>>>>>>>>>
>>>>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>>>>
>>>>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>>>>
>>>>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>>>>> diagnose this issue.
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>> steven
>>>>>>>>>>>
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>> organizations don't have a clear picture of how application performance
>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>> organizations don't have a clear picture of how application performance
>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-06 04:26
FromMichael Gogins
SubjectRe: [Cs-dev] Hold on Release
AttachmentsNone  None  

Thanks, I will rebuild my release tomorrow evening.

On Jan 5, 2014 9:46 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
I think I got it.  I went back and forth a few times, reverting
things, etc.  I did find a solution which was to modify a check in
useropcdset to compare local_ksmps to csound->ksmps; if they were
unequal, I put in a recalculation of ksmps_scale and then modified
xtratim with that.  What I found was that CS5's code did something
similar but in a roundabout way: in setksmpsset, it would calculate a
new ksmps_scale. setksmpsset was called during the initialization of
the UDO instance, about midway through useropcdset.  That in turn made
it hard to find out what was going on.

To note: I am somewhat confident that the code is now working, but I
am not entirely confident that there aren't other bugs.  This area of
code was difficult for me to go through.

Also to note, I didn't not change instances of csound->ekr to CS_EKR
in my commit.  I'm a bit spent to try that again and to do any
testing.

I've merged in the changes from develop and pushed those and my fix up
to SF in the release/6.02.0 branch.

Thanks
steven

On Sun, Jan 5, 2014 at 2:39 PM, Steven Yi <stevenyi@gmail.com> wrote:
> Still has an issue, but getting closer.  In CS5, when timexpire first
> gets called, the calculated offtim and offbet (this is in
> insert.c:set_xtratim() ) are 1.187120181405783.  In CS6, this was
> something like 20000, but after commenting out the setksmpsset code,
> I'm getting values of 39.39555555555555.  There must still be some
> multiply that is off somewhere.
>
> On Sun, Jan 5, 2014 at 2:33 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> I think I found the bug: in CS5, setksmpsset in insert.c pre-caches
>> some ksmps_scale value.  In CS6, this is not done, but there was some
>> code there that multiplied the xtratim:
>>
>> //    p->h.insdshead->xtratim *= n;
>>
>> I commented that out and the xtratim values seem stable again.  The
>> calculated values do differ a little bit from CS5.  Will do some
>> testing now.
>>
>> On Sun, Jan 5, 2014 at 2:06 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>> I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
>>>  It looks like the issue manifests when a UDO calls another UDO.  In
>>> this case, I think the 2nd or 3rd level down UDO is using setksmps,
>>> but the callers are not using setksmps.  I think I saw local_ksmps and
>>> ksmps_scale not agreeing in value just now, going to rerun a few more
>>> times and see if I find it.
>>>
>>> On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
>>> <Victor.Lazzarini@nuim.ie> wrote:
>>>> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>>>>
>>>> Victor
>>>> On 5 Jan 2014, at 18:56, Steven Yi <stevenyi@gmail.com> wrote:
>>>>
>>>>> Tried that here but that didn't change the behavior (so, I can't tell
>>>>> if that change is necessary or not).  What I'm seeing is that with
>>>>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>>>>> stable value, but in CS6, it looks to be getting multiplied over and
>>>>> over. I think there's a scaling factor that is missing somehow.  I've
>>>>> got both CS5 and 6 in XCode now and am continuing to debug.
>>>>>
>>>>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>>>> <Victor.Lazzarini@nuim.ie> wrote:
>>>>>> Shouldn’t this be:
>>>>>>
>>>>>> ip->offtim = (csound->icurTime +
>>>>>>                 ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>
>>>>>> On 5 Jan 2014, at 16:31, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>>
>>>>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>>>>
>>>>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>>>>> {
>>>>>>>   if (ip->relesing)
>>>>>>>     return;
>>>>>>>   ip->offtim = (csound->icurTime +
>>>>>>>                 csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>   ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>>>>   ip->relesing = 1;
>>>>>>>   csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>>>>> }
>>>>>>>
>>>>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>>>>> done. I'm not sure the values being calculated here are correct, but
>>>>>>> I'm also wondering if the xtratim change I did (commit
>>>>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>>>>> investigating.
>>>>>>>
>>>>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>>>>> this should differ depending on CPU/machine/etc.
>>>>>>>>
>>>>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>>>>> Hi Victor,
>>>>>>>>>
>>>>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>>>>> more.
>>>>>>>>>
>>>>>>>>> Thanks!
>>>>>>>>> steven
>>>>>>>>>
>>>>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>>>> <Victor.Lazzarini@nuim.ie> wrote:
>>>>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>>>>
>>>>>>>>>> This means these guys are probably wrong:
>>>>>>>>>>
>>>>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>>>>
>>>>>>>>>> disprep.c is displays.
>>>>>>>>>> dumpf.c is the dump opcodes
>>>>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>>>>> midiout.c is midi output.
>>>>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>>>>
>>>>>>>>>> Victor
>>>>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi All,
>>>>>>>>>>>
>>>>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>>>>> miscalculation of times.
>>>>>>>>>>>
>>>>>>>>>>> I did a:
>>>>>>>>>>>
>>>>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>>>>
>>>>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>>>>
>>>>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>>>>> diagnose this issue.
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>> steven
>>>>>>>>>>>
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>> organizations don't have a clear picture of how application performance
>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>> organizations don't have a clear picture of how application performance
>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2014-01-06 08:47
FromVictor Lazzarini
SubjectRe: [Cs-dev] Hold on Release
I think we might need to hold on for a little while, to make sure this is correct.

I had a look at your changes. From what I can see, the issue was that we were using p->h.insdshead->ksmps instead of csound->ksmps
in that bit of code. That is, the parent instrument ksmps, instead of the global ksmps.

The idea was that if the local ksmps differed from the parent instrument ksmps, then when copying the parameters
back to the parent instrument (saved_curip), we would scale xtratim accordingly.

Now that you are comparing to csound->ksmps, if the parent instrument has a different ksmps to csound->ksmps, I think
the value copied back might be wrong.

I wonder if all this copying back to save_curip is necessary at all. I think we might need to remove that and just point
csound->curip to parent_ip after the init-pass loop, and save a lot of trouble.

Do you have a simple test CSD for this? I might try to put one together and look at this problem this morning.

Victor
On 6 Jan 2014, at 02:45, Steven Yi  wrote:

> I think I got it.  I went back and forth a few times, reverting
> things, etc.  I did find a solution which was to modify a check in
> useropcdset to compare local_ksmps to csound->ksmps; if they were
> unequal, I put in a recalculation of ksmps_scale and then modified
> xtratim with that.  What I found was that CS5's code did something
> similar but in a roundabout way: in setksmpsset, it would calculate a
> new ksmps_scale. setksmpsset was called during the initialization of
> the UDO instance, about midway through useropcdset.  That in turn made
> it hard to find out what was going on.
> 
> To note: I am somewhat confident that the code is now working, but I
> am not entirely confident that there aren't other bugs.  This area of
> code was difficult for me to go through.
> 
> Also to note, I didn't not change instances of csound->ekr to CS_EKR
> in my commit.  I'm a bit spent to try that again and to do any
> testing.
> 
> I've merged in the changes from develop and pushed those and my fix up
> to SF in the release/6.02.0 branch.
> 
> Thanks
> steven
> 
> On Sun, Jan 5, 2014 at 2:39 PM, Steven Yi  wrote:
>> Still has an issue, but getting closer.  In CS5, when timexpire first
>> gets called, the calculated offtim and offbet (this is in
>> insert.c:set_xtratim() ) are 1.187120181405783.  In CS6, this was
>> something like 20000, but after commenting out the setksmpsset code,
>> I'm getting values of 39.39555555555555.  There must still be some
>> multiply that is off somewhere.
>> 
>> On Sun, Jan 5, 2014 at 2:33 PM, Steven Yi  wrote:
>>> I think I found the bug: in CS5, setksmpsset in insert.c pre-caches
>>> some ksmps_scale value.  In CS6, this is not done, but there was some
>>> code there that multiplied the xtratim:
>>> 
>>> //    p->h.insdshead->xtratim *= n;
>>> 
>>> I commented that out and the xtratim values seem stable again.  The
>>> calculated values do differ a little bit from CS5.  Will do some
>>> testing now.
>>> 
>>> On Sun, Jan 5, 2014 at 2:06 PM, Steven Yi  wrote:
>>>> I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
>>>> It looks like the issue manifests when a UDO calls another UDO.  In
>>>> this case, I think the 2nd or 3rd level down UDO is using setksmps,
>>>> but the callers are not using setksmps.  I think I saw local_ksmps and
>>>> ksmps_scale not agreeing in value just now, going to rerun a few more
>>>> times and see if I find it.
>>>> 
>>>> On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
>>>>  wrote:
>>>>> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>>>>> 
>>>>> Victor
>>>>> On 5 Jan 2014, at 18:56, Steven Yi  wrote:
>>>>> 
>>>>>> Tried that here but that didn't change the behavior (so, I can't tell
>>>>>> if that change is necessary or not).  What I'm seeing is that with
>>>>>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>>>>>> stable value, but in CS6, it looks to be getting multiplied over and
>>>>>> over. I think there's a scaling factor that is missing somehow.  I've
>>>>>> got both CS5 and 6 in XCode now and am continuing to debug.
>>>>>> 
>>>>>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>>>>>  wrote:
>>>>>>> Shouldn’t this be:
>>>>>>> 
>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>                ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>> 
>>>>>>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>>>>>>> 
>>>>>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>>>>> 
>>>>>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>>>>>> {
>>>>>>>>  if (ip->relesing)
>>>>>>>>    return;
>>>>>>>>  ip->offtim = (csound->icurTime +
>>>>>>>>                csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>  ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>>>>>  ip->relesing = 1;
>>>>>>>>  csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>>>>>> }
>>>>>>>> 
>>>>>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>>>>>> done. I'm not sure the values being calculated here are correct, but
>>>>>>>> I'm also wondering if the xtratim change I did (commit
>>>>>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>>>>>> investigating.
>>>>>>>> 
>>>>>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>>>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>>>>>> this should differ depending on CPU/machine/etc.
>>>>>>>>> 
>>>>>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>>>>>>> Hi Victor,
>>>>>>>>>> 
>>>>>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>>>>>> more.
>>>>>>>>>> 
>>>>>>>>>> Thanks!
>>>>>>>>>> steven
>>>>>>>>>> 
>>>>>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>>>>>  wrote:
>>>>>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>>>>> 
>>>>>>>>>>> This means these guys are probably wrong:
>>>>>>>>>>> 
>>>>>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>>>>> 
>>>>>>>>>>> disprep.c is displays.
>>>>>>>>>>> dumpf.c is the dump opcodes
>>>>>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>>>>>> midiout.c is midi output.
>>>>>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>>>>> 
>>>>>>>>>>> Victor
>>>>>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> Hi All,
>>>>>>>>>>>> 
>>>>>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>>>>>> miscalculation of times.
>>>>>>>>>>>> 
>>>>>>>>>>>> I did a:
>>>>>>>>>>>> 
>>>>>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>>>>> 
>>>>>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>>>>> 
>>>>>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>>>>>> diagnose this issue.
>>>>>>>>>>>> 
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> steven
>>>>>>>>>>>> 
>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>> 
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>> _______________________________________________
>>>>>>>> Csound-devel mailing list
>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>> 
>>>>>>> 
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>> 
>>>>>> ------------------------------------------------------------------------------
>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>> organizations don't have a clear picture of how application performance
>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>> 
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>> organizations don't have a clear picture of how application performance
>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-06 10:27
FromVictor Lazzarini
SubjectRe: [Cs-dev] Hold on Release
The code needs to look at CS_KSMPS, not csound->ksmps, because otherwise the perf function selected
(useropcd1) will be wrong when both local ksmps and CS_KSMPS are the same and are different from csound->ksmps
(in that case, useropcd2 needs to be selected).

So, there is more that needs to be looked at. I’m working on it now, but we need to test with your CSD that was showing
the broken code.

Victor

On 6 Jan 2014, at 08:47, Victor Lazzarini  wrote:

> I think we might need to hold on for a little while, to make sure this is correct.
> 
> I had a look at your changes. From what I can see, the issue was that we were using p->h.insdshead->ksmps instead of csound->ksmps
> in that bit of code. That is, the parent instrument ksmps, instead of the global ksmps.
> 
> The idea was that if the local ksmps differed from the parent instrument ksmps, then when copying the parameters
> back to the parent instrument (saved_curip), we would scale xtratim accordingly.
> 
> Now that you are comparing to csound->ksmps, if the parent instrument has a different ksmps to csound->ksmps, I think
> the value copied back might be wrong.
> 
> I wonder if all this copying back to save_curip is necessary at all. I think we might need to remove that and just point
> csound->curip to parent_ip after the init-pass loop, and save a lot of trouble.
> 
> Do you have a simple test CSD for this? I might try to put one together and look at this problem this morning.
> 
> Victor
> On 6 Jan 2014, at 02:45, Steven Yi  wrote:
> 
>> I think I got it.  I went back and forth a few times, reverting
>> things, etc.  I did find a solution which was to modify a check in
>> useropcdset to compare local_ksmps to csound->ksmps; if they were
>> unequal, I put in a recalculation of ksmps_scale and then modified
>> xtratim with that.  What I found was that CS5's code did something
>> similar but in a roundabout way: in setksmpsset, it would calculate a
>> new ksmps_scale. setksmpsset was called during the initialization of
>> the UDO instance, about midway through useropcdset.  That in turn made
>> it hard to find out what was going on.
>> 
>> To note: I am somewhat confident that the code is now working, but I
>> am not entirely confident that there aren't other bugs.  This area of
>> code was difficult for me to go through.
>> 
>> Also to note, I didn't not change instances of csound->ekr to CS_EKR
>> in my commit.  I'm a bit spent to try that again and to do any
>> testing.
>> 
>> I've merged in the changes from develop and pushed those and my fix up
>> to SF in the release/6.02.0 branch.
>> 
>> Thanks
>> steven
>> 
>> On Sun, Jan 5, 2014 at 2:39 PM, Steven Yi  wrote:
>>> Still has an issue, but getting closer.  In CS5, when timexpire first
>>> gets called, the calculated offtim and offbet (this is in
>>> insert.c:set_xtratim() ) are 1.187120181405783.  In CS6, this was
>>> something like 20000, but after commenting out the setksmpsset code,
>>> I'm getting values of 39.39555555555555.  There must still be some
>>> multiply that is off somewhere.
>>> 
>>> On Sun, Jan 5, 2014 at 2:33 PM, Steven Yi  wrote:
>>>> I think I found the bug: in CS5, setksmpsset in insert.c pre-caches
>>>> some ksmps_scale value.  In CS6, this is not done, but there was some
>>>> code there that multiplied the xtratim:
>>>> 
>>>> //    p->h.insdshead->xtratim *= n;
>>>> 
>>>> I commented that out and the xtratim values seem stable again.  The
>>>> calculated values do differ a little bit from CS5.  Will do some
>>>> testing now.
>>>> 
>>>> On Sun, Jan 5, 2014 at 2:06 PM, Steven Yi  wrote:
>>>>> I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
>>>>> It looks like the issue manifests when a UDO calls another UDO.  In
>>>>> this case, I think the 2nd or 3rd level down UDO is using setksmps,
>>>>> but the callers are not using setksmps.  I think I saw local_ksmps and
>>>>> ksmps_scale not agreeing in value just now, going to rerun a few more
>>>>> times and see if I find it.
>>>>> 
>>>>> On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
>>>>>  wrote:
>>>>>> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>>>>>> 
>>>>>> Victor
>>>>>> On 5 Jan 2014, at 18:56, Steven Yi  wrote:
>>>>>> 
>>>>>>> Tried that here but that didn't change the behavior (so, I can't tell
>>>>>>> if that change is necessary or not).  What I'm seeing is that with
>>>>>>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>>>>>>> stable value, but in CS6, it looks to be getting multiplied over and
>>>>>>> over. I think there's a scaling factor that is missing somehow.  I've
>>>>>>> got both CS5 and 6 in XCode now and am continuing to debug.
>>>>>>> 
>>>>>>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>>>>>>  wrote:
>>>>>>>> Shouldn’t this be:
>>>>>>>> 
>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>               ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>> 
>>>>>>>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>>>>>>>> 
>>>>>>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>>>>>> 
>>>>>>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>>>>>>> {
>>>>>>>>> if (ip->relesing)
>>>>>>>>>   return;
>>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>>               csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>> ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>>>>>> ip->relesing = 1;
>>>>>>>>> csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>>>>>>> }
>>>>>>>>> 
>>>>>>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>>>>>>> done. I'm not sure the values being calculated here are correct, but
>>>>>>>>> I'm also wondering if the xtratim change I did (commit
>>>>>>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>>>>>>> investigating.
>>>>>>>>> 
>>>>>>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>>>>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>>>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>>>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>>>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>>>>>>> this should differ depending on CPU/machine/etc.
>>>>>>>>>> 
>>>>>>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>>>>>>>> Hi Victor,
>>>>>>>>>>> 
>>>>>>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>>>>>>> more.
>>>>>>>>>>> 
>>>>>>>>>>> Thanks!
>>>>>>>>>>> steven
>>>>>>>>>>> 
>>>>>>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>>>>>>  wrote:
>>>>>>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>>>>>> 
>>>>>>>>>>>> This means these guys are probably wrong:
>>>>>>>>>>>> 
>>>>>>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>>>>>> 
>>>>>>>>>>>> disprep.c is displays.
>>>>>>>>>>>> dumpf.c is the dump opcodes
>>>>>>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>>>>>>> midiout.c is midi output.
>>>>>>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>>>>>> 
>>>>>>>>>>>> Victor
>>>>>>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> Hi All,
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>>>>>>> miscalculation of times.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I did a:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>>>>>> 
>>>>>>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>>>>>>> diagnose this issue.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>> steven
>>>>>>>>>>>>> 
>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>> 
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>> _______________________________________________
>>>>>>>>> Csound-devel mailing list
>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>> 
>>>>>>>> 
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>> _______________________________________________
>>>>>>>> Csound-devel mailing list
>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>> 
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>> 
>>>>>> 
>>>>>> ------------------------------------------------------------------------------
>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>> organizations don't have a clear picture of how application performance
>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT 
>> organizations don't have a clear picture of how application performance 
>> affects their revenue. With AppDynamics, you get 100% visibility into your 
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-06 12:37
FromVictor Lazzarini
SubjectRe: [Cs-dev] Hold on Release
OK, I’ve made some modifications to usropcdset():

1) I reverted the check to CS_KSMPS, which I think is the correct thing to do. I’ve also reverted the
ksmps_scale calculations to use CS_KSMPS.


2) I removed the save_curip variable, and replaced its use with parent_ip, so the code is clearer
in terms of what it is doing.

3) I’ve added a debug printout, showing extratim values for each instance (current, parent).


So, with the following test code

0dbfs=1
ksmps=100

 opcode Test1,a,a
  setksmps 1
  a1 xin
  k1 linsegr 1,1,1,1,0
   xout a1*k1
endop


opcode Test2,a,a
  a1 xin
  k1 linsegr 1,1,1,0.5,1
  a2 Test1 a1
      xout a2*k1
endop

 instr 1
  a1 vco2 0.5, 440
  a2 Test2 a1
        out a2
 endin

I get a correct length of audio, and the following debug trace

EXTRATIM=> cur(0x1060f0210): 44100, parent(0x10609ca10): 441
EXTRATIM=> cur(0x10609ca10): 441, parent(0x1010a5810): 441

The inner opcode (Test1), with ksmps 1, shows a xtratim of 44100 (correctly, 1 second at kr=44100),
and the outer opcode (Test2) with ksmps = 100 shows a xtratim of 441 (1 second at kr=441) and
the calling instrument has the same xtratim.

So all appears correct to me. I am pushing this to the release/6.02.0 branch.

Steven: could you check your test case?

Victor

On 6 Jan 2014, at 10:27, Victor Lazzarini  wrote:

> The code needs to look at CS_KSMPS, not csound->ksmps, because otherwise the perf function selected
> (useropcd1) will be wrong when both local ksmps and CS_KSMPS are the same and are different from csound->ksmps
> (in that case, useropcd2 needs to be selected).
> 
> So, there is more that needs to be looked at. I’m working on it now, but we need to test with your CSD that was showing
> the broken code.
> 
> Victor
> 
> On 6 Jan 2014, at 08:47, Victor Lazzarini  wrote:
> 
>> I think we might need to hold on for a little while, to make sure this is correct.
>> 
>> I had a look at your changes. From what I can see, the issue was that we were using p->h.insdshead->ksmps instead of csound->ksmps
>> in that bit of code. That is, the parent instrument ksmps, instead of the global ksmps.
>> 
>> The idea was that if the local ksmps differed from the parent instrument ksmps, then when copying the parameters
>> back to the parent instrument (saved_curip), we would scale xtratim accordingly.
>> 
>> Now that you are comparing to csound->ksmps, if the parent instrument has a different ksmps to csound->ksmps, I think
>> the value copied back might be wrong.
>> 
>> I wonder if all this copying back to save_curip is necessary at all. I think we might need to remove that and just point
>> csound->curip to parent_ip after the init-pass loop, and save a lot of trouble.
>> 
>> Do you have a simple test CSD for this? I might try to put one together and look at this problem this morning.
>> 
>> Victor
>> On 6 Jan 2014, at 02:45, Steven Yi  wrote:
>> 
>>> I think I got it.  I went back and forth a few times, reverting
>>> things, etc.  I did find a solution which was to modify a check in
>>> useropcdset to compare local_ksmps to csound->ksmps; if they were
>>> unequal, I put in a recalculation of ksmps_scale and then modified
>>> xtratim with that.  What I found was that CS5's code did something
>>> similar but in a roundabout way: in setksmpsset, it would calculate a
>>> new ksmps_scale. setksmpsset was called during the initialization of
>>> the UDO instance, about midway through useropcdset.  That in turn made
>>> it hard to find out what was going on.
>>> 
>>> To note: I am somewhat confident that the code is now working, but I
>>> am not entirely confident that there aren't other bugs.  This area of
>>> code was difficult for me to go through.
>>> 
>>> Also to note, I didn't not change instances of csound->ekr to CS_EKR
>>> in my commit.  I'm a bit spent to try that again and to do any
>>> testing.
>>> 
>>> I've merged in the changes from develop and pushed those and my fix up
>>> to SF in the release/6.02.0 branch.
>>> 
>>> Thanks
>>> steven
>>> 
>>> On Sun, Jan 5, 2014 at 2:39 PM, Steven Yi  wrote:
>>>> Still has an issue, but getting closer.  In CS5, when timexpire first
>>>> gets called, the calculated offtim and offbet (this is in
>>>> insert.c:set_xtratim() ) are 1.187120181405783.  In CS6, this was
>>>> something like 20000, but after commenting out the setksmpsset code,
>>>> I'm getting values of 39.39555555555555.  There must still be some
>>>> multiply that is off somewhere.
>>>> 
>>>> On Sun, Jan 5, 2014 at 2:33 PM, Steven Yi  wrote:
>>>>> I think I found the bug: in CS5, setksmpsset in insert.c pre-caches
>>>>> some ksmps_scale value.  In CS6, this is not done, but there was some
>>>>> code there that multiplied the xtratim:
>>>>> 
>>>>> //    p->h.insdshead->xtratim *= n;
>>>>> 
>>>>> I commented that out and the xtratim values seem stable again.  The
>>>>> calculated values do differ a little bit from CS5.  Will do some
>>>>> testing now.
>>>>> 
>>>>> On Sun, Jan 5, 2014 at 2:06 PM, Steven Yi  wrote:
>>>>>> I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
>>>>>> It looks like the issue manifests when a UDO calls another UDO.  In
>>>>>> this case, I think the 2nd or 3rd level down UDO is using setksmps,
>>>>>> but the callers are not using setksmps.  I think I saw local_ksmps and
>>>>>> ksmps_scale not agreeing in value just now, going to rerun a few more
>>>>>> times and see if I find it.
>>>>>> 
>>>>>> On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
>>>>>>  wrote:
>>>>>>> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>>>>>>> 
>>>>>>> Victor
>>>>>>> On 5 Jan 2014, at 18:56, Steven Yi  wrote:
>>>>>>> 
>>>>>>>> Tried that here but that didn't change the behavior (so, I can't tell
>>>>>>>> if that change is necessary or not).  What I'm seeing is that with
>>>>>>>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>>>>>>>> stable value, but in CS6, it looks to be getting multiplied over and
>>>>>>>> over. I think there's a scaling factor that is missing somehow.  I've
>>>>>>>> got both CS5 and 6 in XCode now and am continuing to debug.
>>>>>>>> 
>>>>>>>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>>>>>>>  wrote:
>>>>>>>>> Shouldn’t this be:
>>>>>>>>> 
>>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>>              ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>> 
>>>>>>>>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>>>>>>>>> 
>>>>>>>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>>>>>>> 
>>>>>>>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>>>>>>>> {
>>>>>>>>>> if (ip->relesing)
>>>>>>>>>>  return;
>>>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>>>              csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>>> ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>>>>>>> ip->relesing = 1;
>>>>>>>>>> csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>>>>>>>> }
>>>>>>>>>> 
>>>>>>>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>>>>>>>> done. I'm not sure the values being calculated here are correct, but
>>>>>>>>>> I'm also wondering if the xtratim change I did (commit
>>>>>>>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>>>>>>>> investigating.
>>>>>>>>>> 
>>>>>>>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>>>>>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>>>>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>>>>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>>>>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>>>>>>>> this should differ depending on CPU/machine/etc.
>>>>>>>>>>> 
>>>>>>>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>>>>>>>>> Hi Victor,
>>>>>>>>>>>> 
>>>>>>>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>>>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>>>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>>>>>>>> more.
>>>>>>>>>>>> 
>>>>>>>>>>>> Thanks!
>>>>>>>>>>>> steven
>>>>>>>>>>>> 
>>>>>>>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>>>>>>>  wrote:
>>>>>>>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> This means these guys are probably wrong:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>>>>>>> 
>>>>>>>>>>>>> disprep.c is displays.
>>>>>>>>>>>>> dumpf.c is the dump opcodes
>>>>>>>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>>>>>>>> midiout.c is midi output.
>>>>>>>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Victor
>>>>>>>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Hi All,
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>>>>>>>> miscalculation of times.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I did a:
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>>>>>>>> diagnose this issue.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>> steven
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>> 
>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>> _______________________________________________
>>>>>>>>> Csound-devel mailing list
>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>> 
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>> _______________________________________________
>>>>>>>> Csound-devel mailing list
>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>> 
>>>>>>> 
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT 
>>> organizations don't have a clear picture of how application performance 
>>> affects their revenue. With AppDynamics, you get 100% visibility into your 
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT 
>> organizations don't have a clear picture of how application performance 
>> affects their revenue. With AppDynamics, you get 100% visibility into your 
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-06 16:27
FromSteven Yi
SubjectRe: [Cs-dev] Hold on Release
Hi Victor,

I agree that csound->ksmps is not the right way. I had put that in
because I was seeing the parent_ip's ksmps value matching the cur_ip
which seemed wrong, but I might have been just mistaken in reading
debugger output and should have been looking elsewhere.

I tested here on commandline with the test file I had sent earlier and
that worked.  Also, I tested my original project in Blue and that is
working too. In the debugger in XCode, I'm seeing values that look
consistent with CS5 now.

Awesome! Thanks for fixing that code up!

steven

On Mon, Jan 6, 2014 at 7:37 AM, Victor Lazzarini
 wrote:
> OK, I’ve made some modifications to usropcdset():
>
> 1) I reverted the check to CS_KSMPS, which I think is the correct thing to do. I’ve also reverted the
> ksmps_scale calculations to use CS_KSMPS.
>
>
> 2) I removed the save_curip variable, and replaced its use with parent_ip, so the code is clearer
> in terms of what it is doing.
>
> 3) I’ve added a debug printout, showing extratim values for each instance (current, parent).
>
>
> So, with the following test code
>
> 0dbfs=1
> ksmps=100
>
>  opcode Test1,a,a
>   setksmps 1
>   a1 xin
>   k1 linsegr 1,1,1,1,0
>    xout a1*k1
> endop
>
>
> opcode Test2,a,a
>   a1 xin
>   k1 linsegr 1,1,1,0.5,1
>   a2 Test1 a1
>       xout a2*k1
> endop
>
>  instr 1
>   a1 vco2 0.5, 440
>   a2 Test2 a1
>         out a2
>  endin
>
> I get a correct length of audio, and the following debug trace
>
> EXTRATIM=> cur(0x1060f0210): 44100, parent(0x10609ca10): 441
> EXTRATIM=> cur(0x10609ca10): 441, parent(0x1010a5810): 441
>
> The inner opcode (Test1), with ksmps 1, shows a xtratim of 44100 (correctly, 1 second at kr=44100),
> and the outer opcode (Test2) with ksmps = 100 shows a xtratim of 441 (1 second at kr=441) and
> the calling instrument has the same xtratim.
>
> So all appears correct to me. I am pushing this to the release/6.02.0 branch.
>
> Steven: could you check your test case?
>
> Victor
>
> On 6 Jan 2014, at 10:27, Victor Lazzarini  wrote:
>
>> The code needs to look at CS_KSMPS, not csound->ksmps, because otherwise the perf function selected
>> (useropcd1) will be wrong when both local ksmps and CS_KSMPS are the same and are different from csound->ksmps
>> (in that case, useropcd2 needs to be selected).
>>
>> So, there is more that needs to be looked at. I’m working on it now, but we need to test with your CSD that was showing
>> the broken code.
>>
>> Victor
>>
>> On 6 Jan 2014, at 08:47, Victor Lazzarini  wrote:
>>
>>> I think we might need to hold on for a little while, to make sure this is correct.
>>>
>>> I had a look at your changes. From what I can see, the issue was that we were using p->h.insdshead->ksmps instead of csound->ksmps
>>> in that bit of code. That is, the parent instrument ksmps, instead of the global ksmps.
>>>
>>> The idea was that if the local ksmps differed from the parent instrument ksmps, then when copying the parameters
>>> back to the parent instrument (saved_curip), we would scale xtratim accordingly.
>>>
>>> Now that you are comparing to csound->ksmps, if the parent instrument has a different ksmps to csound->ksmps, I think
>>> the value copied back might be wrong.
>>>
>>> I wonder if all this copying back to save_curip is necessary at all. I think we might need to remove that and just point
>>> csound->curip to parent_ip after the init-pass loop, and save a lot of trouble.
>>>
>>> Do you have a simple test CSD for this? I might try to put one together and look at this problem this morning.
>>>
>>> Victor
>>> On 6 Jan 2014, at 02:45, Steven Yi  wrote:
>>>
>>>> I think I got it.  I went back and forth a few times, reverting
>>>> things, etc.  I did find a solution which was to modify a check in
>>>> useropcdset to compare local_ksmps to csound->ksmps; if they were
>>>> unequal, I put in a recalculation of ksmps_scale and then modified
>>>> xtratim with that.  What I found was that CS5's code did something
>>>> similar but in a roundabout way: in setksmpsset, it would calculate a
>>>> new ksmps_scale. setksmpsset was called during the initialization of
>>>> the UDO instance, about midway through useropcdset.  That in turn made
>>>> it hard to find out what was going on.
>>>>
>>>> To note: I am somewhat confident that the code is now working, but I
>>>> am not entirely confident that there aren't other bugs.  This area of
>>>> code was difficult for me to go through.
>>>>
>>>> Also to note, I didn't not change instances of csound->ekr to CS_EKR
>>>> in my commit.  I'm a bit spent to try that again and to do any
>>>> testing.
>>>>
>>>> I've merged in the changes from develop and pushed those and my fix up
>>>> to SF in the release/6.02.0 branch.
>>>>
>>>> Thanks
>>>> steven
>>>>
>>>> On Sun, Jan 5, 2014 at 2:39 PM, Steven Yi  wrote:
>>>>> Still has an issue, but getting closer.  In CS5, when timexpire first
>>>>> gets called, the calculated offtim and offbet (this is in
>>>>> insert.c:set_xtratim() ) are 1.187120181405783.  In CS6, this was
>>>>> something like 20000, but after commenting out the setksmpsset code,
>>>>> I'm getting values of 39.39555555555555.  There must still be some
>>>>> multiply that is off somewhere.
>>>>>
>>>>> On Sun, Jan 5, 2014 at 2:33 PM, Steven Yi  wrote:
>>>>>> I think I found the bug: in CS5, setksmpsset in insert.c pre-caches
>>>>>> some ksmps_scale value.  In CS6, this is not done, but there was some
>>>>>> code there that multiplied the xtratim:
>>>>>>
>>>>>> //    p->h.insdshead->xtratim *= n;
>>>>>>
>>>>>> I commented that out and the xtratim values seem stable again.  The
>>>>>> calculated values do differ a little bit from CS5.  Will do some
>>>>>> testing now.
>>>>>>
>>>>>> On Sun, Jan 5, 2014 at 2:06 PM, Steven Yi  wrote:
>>>>>>> I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
>>>>>>> It looks like the issue manifests when a UDO calls another UDO.  In
>>>>>>> this case, I think the 2nd or 3rd level down UDO is using setksmps,
>>>>>>> but the callers are not using setksmps.  I think I saw local_ksmps and
>>>>>>> ksmps_scale not agreeing in value just now, going to rerun a few more
>>>>>>> times and see if I find it.
>>>>>>>
>>>>>>> On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
>>>>>>>  wrote:
>>>>>>>> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>>>>>>>>
>>>>>>>> Victor
>>>>>>>> On 5 Jan 2014, at 18:56, Steven Yi  wrote:
>>>>>>>>
>>>>>>>>> Tried that here but that didn't change the behavior (so, I can't tell
>>>>>>>>> if that change is necessary or not).  What I'm seeing is that with
>>>>>>>>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>>>>>>>>> stable value, but in CS6, it looks to be getting multiplied over and
>>>>>>>>> over. I think there's a scaling factor that is missing somehow.  I've
>>>>>>>>> got both CS5 and 6 in XCode now and am continuing to debug.
>>>>>>>>>
>>>>>>>>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>>>>>>>>  wrote:
>>>>>>>>>> Shouldn’t this be:
>>>>>>>>>>
>>>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>>>              ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>>>
>>>>>>>>>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>>>>>>>>>>
>>>>>>>>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>>>>>>>>
>>>>>>>>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>>>>>>>>> {
>>>>>>>>>>> if (ip->relesing)
>>>>>>>>>>>  return;
>>>>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>>>>              csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>>>> ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>>>>>>>> ip->relesing = 1;
>>>>>>>>>>> csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>>>>>>>>> done. I'm not sure the values being calculated here are correct, but
>>>>>>>>>>> I'm also wondering if the xtratim change I did (commit
>>>>>>>>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>>>>>>>>> investigating.
>>>>>>>>>>>
>>>>>>>>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>>>>>>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>>>>>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>>>>>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>>>>>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>>>>>>>>> this should differ depending on CPU/machine/etc.
>>>>>>>>>>>>
>>>>>>>>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>>>>>>>>>> Hi Victor,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>>>>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>>>>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>>>>>>>>> more.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>> steven
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>>>>>>>>  wrote:
>>>>>>>>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>>>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> This means these guys are probably wrong:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>>>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>>>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>>>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>>>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>>>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>>>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> disprep.c is displays.
>>>>>>>>>>>>>> dumpf.c is the dump opcodes
>>>>>>>>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>>>>>>>>> midiout.c is midi output.
>>>>>>>>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>>>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Victor
>>>>>>>>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi All,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>>>>>>>>> miscalculation of times.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I did a:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>>>>>>>>> diagnose this issue.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>> steven
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>> _______________________________________________
>>>>>>>>> Csound-devel mailing list
>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>> _______________________________________________
>>>>>>>> Csound-devel mailing list
>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-06 16:39
FromVictor Lazzarini
SubjectRe: [Cs-dev] Hold on Release
Well, that’s great. I really don’t know what we fixed that was wrong, but there you go. At least the code is clearer now.

Victor
On 6 Jan 2014, at 16:27, Steven Yi  wrote:

> Hi Victor,
> 
> I agree that csound->ksmps is not the right way. I had put that in
> because I was seeing the parent_ip's ksmps value matching the cur_ip
> which seemed wrong, but I might have been just mistaken in reading
> debugger output and should have been looking elsewhere.
> 
> I tested here on commandline with the test file I had sent earlier and
> that worked.  Also, I tested my original project in Blue and that is
> working too. In the debugger in XCode, I'm seeing values that look
> consistent with CS5 now.
> 
> Awesome! Thanks for fixing that code up!
> 
> steven
> 
> On Mon, Jan 6, 2014 at 7:37 AM, Victor Lazzarini
>  wrote:
>> OK, I’ve made some modifications to usropcdset():
>> 
>> 1) I reverted the check to CS_KSMPS, which I think is the correct thing to do. I’ve also reverted the
>> ksmps_scale calculations to use CS_KSMPS.
>> 
>> 
>> 2) I removed the save_curip variable, and replaced its use with parent_ip, so the code is clearer
>> in terms of what it is doing.
>> 
>> 3) I’ve added a debug printout, showing extratim values for each instance (current, parent).
>> 
>> 
>> So, with the following test code
>> 
>> 0dbfs=1
>> ksmps=100
>> 
>> opcode Test1,a,a
>>  setksmps 1
>>  a1 xin
>>  k1 linsegr 1,1,1,1,0
>>   xout a1*k1
>> endop
>> 
>> 
>> opcode Test2,a,a
>>  a1 xin
>>  k1 linsegr 1,1,1,0.5,1
>>  a2 Test1 a1
>>      xout a2*k1
>> endop
>> 
>> instr 1
>>  a1 vco2 0.5, 440
>>  a2 Test2 a1
>>        out a2
>> endin
>> 
>> I get a correct length of audio, and the following debug trace
>> 
>> EXTRATIM=> cur(0x1060f0210): 44100, parent(0x10609ca10): 441
>> EXTRATIM=> cur(0x10609ca10): 441, parent(0x1010a5810): 441
>> 
>> The inner opcode (Test1), with ksmps 1, shows a xtratim of 44100 (correctly, 1 second at kr=44100),
>> and the outer opcode (Test2) with ksmps = 100 shows a xtratim of 441 (1 second at kr=441) and
>> the calling instrument has the same xtratim.
>> 
>> So all appears correct to me. I am pushing this to the release/6.02.0 branch.
>> 
>> Steven: could you check your test case?
>> 
>> Victor
>> 
>> On 6 Jan 2014, at 10:27, Victor Lazzarini  wrote:
>> 
>>> The code needs to look at CS_KSMPS, not csound->ksmps, because otherwise the perf function selected
>>> (useropcd1) will be wrong when both local ksmps and CS_KSMPS are the same and are different from csound->ksmps
>>> (in that case, useropcd2 needs to be selected).
>>> 
>>> So, there is more that needs to be looked at. I’m working on it now, but we need to test with your CSD that was showing
>>> the broken code.
>>> 
>>> Victor
>>> 
>>> On 6 Jan 2014, at 08:47, Victor Lazzarini  wrote:
>>> 
>>>> I think we might need to hold on for a little while, to make sure this is correct.
>>>> 
>>>> I had a look at your changes. From what I can see, the issue was that we were using p->h.insdshead->ksmps instead of csound->ksmps
>>>> in that bit of code. That is, the parent instrument ksmps, instead of the global ksmps.
>>>> 
>>>> The idea was that if the local ksmps differed from the parent instrument ksmps, then when copying the parameters
>>>> back to the parent instrument (saved_curip), we would scale xtratim accordingly.
>>>> 
>>>> Now that you are comparing to csound->ksmps, if the parent instrument has a different ksmps to csound->ksmps, I think
>>>> the value copied back might be wrong.
>>>> 
>>>> I wonder if all this copying back to save_curip is necessary at all. I think we might need to remove that and just point
>>>> csound->curip to parent_ip after the init-pass loop, and save a lot of trouble.
>>>> 
>>>> Do you have a simple test CSD for this? I might try to put one together and look at this problem this morning.
>>>> 
>>>> Victor
>>>> On 6 Jan 2014, at 02:45, Steven Yi  wrote:
>>>> 
>>>>> I think I got it.  I went back and forth a few times, reverting
>>>>> things, etc.  I did find a solution which was to modify a check in
>>>>> useropcdset to compare local_ksmps to csound->ksmps; if they were
>>>>> unequal, I put in a recalculation of ksmps_scale and then modified
>>>>> xtratim with that.  What I found was that CS5's code did something
>>>>> similar but in a roundabout way: in setksmpsset, it would calculate a
>>>>> new ksmps_scale. setksmpsset was called during the initialization of
>>>>> the UDO instance, about midway through useropcdset.  That in turn made
>>>>> it hard to find out what was going on.
>>>>> 
>>>>> To note: I am somewhat confident that the code is now working, but I
>>>>> am not entirely confident that there aren't other bugs.  This area of
>>>>> code was difficult for me to go through.
>>>>> 
>>>>> Also to note, I didn't not change instances of csound->ekr to CS_EKR
>>>>> in my commit.  I'm a bit spent to try that again and to do any
>>>>> testing.
>>>>> 
>>>>> I've merged in the changes from develop and pushed those and my fix up
>>>>> to SF in the release/6.02.0 branch.
>>>>> 
>>>>> Thanks
>>>>> steven
>>>>> 
>>>>> On Sun, Jan 5, 2014 at 2:39 PM, Steven Yi  wrote:
>>>>>> Still has an issue, but getting closer.  In CS5, when timexpire first
>>>>>> gets called, the calculated offtim and offbet (this is in
>>>>>> insert.c:set_xtratim() ) are 1.187120181405783.  In CS6, this was
>>>>>> something like 20000, but after commenting out the setksmpsset code,
>>>>>> I'm getting values of 39.39555555555555.  There must still be some
>>>>>> multiply that is off somewhere.
>>>>>> 
>>>>>> On Sun, Jan 5, 2014 at 2:33 PM, Steven Yi  wrote:
>>>>>>> I think I found the bug: in CS5, setksmpsset in insert.c pre-caches
>>>>>>> some ksmps_scale value.  In CS6, this is not done, but there was some
>>>>>>> code there that multiplied the xtratim:
>>>>>>> 
>>>>>>> //    p->h.insdshead->xtratim *= n;
>>>>>>> 
>>>>>>> I commented that out and the xtratim values seem stable again.  The
>>>>>>> calculated values do differ a little bit from CS5.  Will do some
>>>>>>> testing now.
>>>>>>> 
>>>>>>> On Sun, Jan 5, 2014 at 2:06 PM, Steven Yi  wrote:
>>>>>>>> I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
>>>>>>>> It looks like the issue manifests when a UDO calls another UDO.  In
>>>>>>>> this case, I think the 2nd or 3rd level down UDO is using setksmps,
>>>>>>>> but the callers are not using setksmps.  I think I saw local_ksmps and
>>>>>>>> ksmps_scale not agreeing in value just now, going to rerun a few more
>>>>>>>> times and see if I find it.
>>>>>>>> 
>>>>>>>> On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
>>>>>>>>  wrote:
>>>>>>>>> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>>>>>>>>> 
>>>>>>>>> Victor
>>>>>>>>> On 5 Jan 2014, at 18:56, Steven Yi  wrote:
>>>>>>>>> 
>>>>>>>>>> Tried that here but that didn't change the behavior (so, I can't tell
>>>>>>>>>> if that change is necessary or not).  What I'm seeing is that with
>>>>>>>>>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>>>>>>>>>> stable value, but in CS6, it looks to be getting multiplied over and
>>>>>>>>>> over. I think there's a scaling factor that is missing somehow.  I've
>>>>>>>>>> got both CS5 and 6 in XCode now and am continuing to debug.
>>>>>>>>>> 
>>>>>>>>>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>>>>>>>>>  wrote:
>>>>>>>>>>> Shouldn’t this be:
>>>>>>>>>>> 
>>>>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>>>>             ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>>>> 
>>>>>>>>>>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>>>>>>>>> 
>>>>>>>>>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>>>>>>>>>> {
>>>>>>>>>>>> if (ip->relesing)
>>>>>>>>>>>> return;
>>>>>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>>>>>             csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>>>>> ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>>>>>>>>> ip->relesing = 1;
>>>>>>>>>>>> csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>>>>>>>>>> }
>>>>>>>>>>>> 
>>>>>>>>>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>>>>>>>>>> done. I'm not sure the values being calculated here are correct, but
>>>>>>>>>>>> I'm also wondering if the xtratim change I did (commit
>>>>>>>>>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>>>>>>>>>> investigating.
>>>>>>>>>>>> 
>>>>>>>>>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>>>>>>>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>>>>>>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>>>>>>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>>>>>>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>>>>>>>>>> this should differ depending on CPU/machine/etc.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>>>>>>>>>>> Hi Victor,
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>>>>>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>>>>>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>>>>>>>>>> more.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>>> steven
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>>>>>>>>>  wrote:
>>>>>>>>>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>>>>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> This means these guys are probably wrong:
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>>>>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>>>>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>>>>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>>>>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>>>>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>>>>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> disprep.c is displays.
>>>>>>>>>>>>>>> dumpf.c is the dump opcodes
>>>>>>>>>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>>>>>>>>>> midiout.c is midi output.
>>>>>>>>>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>>>>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Victor
>>>>>>>>>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Hi All,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>>>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>>>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>>>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>>>>>>>>>> miscalculation of times.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I did a:
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>>>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>>>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>>>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>>>>>>>>>> diagnose this issue.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>>> steven
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>> 
>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>> 
>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>> _______________________________________________
>>>>>>>>> Csound-devel mailing list
>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>> organizations don't have a clear picture of how application performance
>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-06 16:44
FromSteven Yi
SubjectRe: [Cs-dev] Hold on Release
Well the key issue is the recalculation of ksmps_scale in line 1262.
That was using the default value of 1.  In CS5, the recalculation
happened in setksmpsset but stored as a value in the INSDS (I think it
was there), then reused in that code around 1262.  That recalculation
didn't happen so the xtratim was orders of magnitude bigger than it
should have been.

And definitely the code is clearer. :)

On Mon, Jan 6, 2014 at 11:39 AM, Victor Lazzarini
 wrote:
> Well, that’s great. I really don’t know what we fixed that was wrong, but there you go. At least the code is clearer now.
>
> Victor
> On 6 Jan 2014, at 16:27, Steven Yi  wrote:
>
>> Hi Victor,
>>
>> I agree that csound->ksmps is not the right way. I had put that in
>> because I was seeing the parent_ip's ksmps value matching the cur_ip
>> which seemed wrong, but I might have been just mistaken in reading
>> debugger output and should have been looking elsewhere.
>>
>> I tested here on commandline with the test file I had sent earlier and
>> that worked.  Also, I tested my original project in Blue and that is
>> working too. In the debugger in XCode, I'm seeing values that look
>> consistent with CS5 now.
>>
>> Awesome! Thanks for fixing that code up!
>>
>> steven
>>
>> On Mon, Jan 6, 2014 at 7:37 AM, Victor Lazzarini
>>  wrote:
>>> OK, I’ve made some modifications to usropcdset():
>>>
>>> 1) I reverted the check to CS_KSMPS, which I think is the correct thing to do. I’ve also reverted the
>>> ksmps_scale calculations to use CS_KSMPS.
>>>
>>>
>>> 2) I removed the save_curip variable, and replaced its use with parent_ip, so the code is clearer
>>> in terms of what it is doing.
>>>
>>> 3) I’ve added a debug printout, showing extratim values for each instance (current, parent).
>>>
>>>
>>> So, with the following test code
>>>
>>> 0dbfs=1
>>> ksmps=100
>>>
>>> opcode Test1,a,a
>>>  setksmps 1
>>>  a1 xin
>>>  k1 linsegr 1,1,1,1,0
>>>   xout a1*k1
>>> endop
>>>
>>>
>>> opcode Test2,a,a
>>>  a1 xin
>>>  k1 linsegr 1,1,1,0.5,1
>>>  a2 Test1 a1
>>>      xout a2*k1
>>> endop
>>>
>>> instr 1
>>>  a1 vco2 0.5, 440
>>>  a2 Test2 a1
>>>        out a2
>>> endin
>>>
>>> I get a correct length of audio, and the following debug trace
>>>
>>> EXTRATIM=> cur(0x1060f0210): 44100, parent(0x10609ca10): 441
>>> EXTRATIM=> cur(0x10609ca10): 441, parent(0x1010a5810): 441
>>>
>>> The inner opcode (Test1), with ksmps 1, shows a xtratim of 44100 (correctly, 1 second at kr=44100),
>>> and the outer opcode (Test2) with ksmps = 100 shows a xtratim of 441 (1 second at kr=441) and
>>> the calling instrument has the same xtratim.
>>>
>>> So all appears correct to me. I am pushing this to the release/6.02.0 branch.
>>>
>>> Steven: could you check your test case?
>>>
>>> Victor
>>>
>>> On 6 Jan 2014, at 10:27, Victor Lazzarini  wrote:
>>>
>>>> The code needs to look at CS_KSMPS, not csound->ksmps, because otherwise the perf function selected
>>>> (useropcd1) will be wrong when both local ksmps and CS_KSMPS are the same and are different from csound->ksmps
>>>> (in that case, useropcd2 needs to be selected).
>>>>
>>>> So, there is more that needs to be looked at. I’m working on it now, but we need to test with your CSD that was showing
>>>> the broken code.
>>>>
>>>> Victor
>>>>
>>>> On 6 Jan 2014, at 08:47, Victor Lazzarini  wrote:
>>>>
>>>>> I think we might need to hold on for a little while, to make sure this is correct.
>>>>>
>>>>> I had a look at your changes. From what I can see, the issue was that we were using p->h.insdshead->ksmps instead of csound->ksmps
>>>>> in that bit of code. That is, the parent instrument ksmps, instead of the global ksmps.
>>>>>
>>>>> The idea was that if the local ksmps differed from the parent instrument ksmps, then when copying the parameters
>>>>> back to the parent instrument (saved_curip), we would scale xtratim accordingly.
>>>>>
>>>>> Now that you are comparing to csound->ksmps, if the parent instrument has a different ksmps to csound->ksmps, I think
>>>>> the value copied back might be wrong.
>>>>>
>>>>> I wonder if all this copying back to save_curip is necessary at all. I think we might need to remove that and just point
>>>>> csound->curip to parent_ip after the init-pass loop, and save a lot of trouble.
>>>>>
>>>>> Do you have a simple test CSD for this? I might try to put one together and look at this problem this morning.
>>>>>
>>>>> Victor
>>>>> On 6 Jan 2014, at 02:45, Steven Yi  wrote:
>>>>>
>>>>>> I think I got it.  I went back and forth a few times, reverting
>>>>>> things, etc.  I did find a solution which was to modify a check in
>>>>>> useropcdset to compare local_ksmps to csound->ksmps; if they were
>>>>>> unequal, I put in a recalculation of ksmps_scale and then modified
>>>>>> xtratim with that.  What I found was that CS5's code did something
>>>>>> similar but in a roundabout way: in setksmpsset, it would calculate a
>>>>>> new ksmps_scale. setksmpsset was called during the initialization of
>>>>>> the UDO instance, about midway through useropcdset.  That in turn made
>>>>>> it hard to find out what was going on.
>>>>>>
>>>>>> To note: I am somewhat confident that the code is now working, but I
>>>>>> am not entirely confident that there aren't other bugs.  This area of
>>>>>> code was difficult for me to go through.
>>>>>>
>>>>>> Also to note, I didn't not change instances of csound->ekr to CS_EKR
>>>>>> in my commit.  I'm a bit spent to try that again and to do any
>>>>>> testing.
>>>>>>
>>>>>> I've merged in the changes from develop and pushed those and my fix up
>>>>>> to SF in the release/6.02.0 branch.
>>>>>>
>>>>>> Thanks
>>>>>> steven
>>>>>>
>>>>>> On Sun, Jan 5, 2014 at 2:39 PM, Steven Yi  wrote:
>>>>>>> Still has an issue, but getting closer.  In CS5, when timexpire first
>>>>>>> gets called, the calculated offtim and offbet (this is in
>>>>>>> insert.c:set_xtratim() ) are 1.187120181405783.  In CS6, this was
>>>>>>> something like 20000, but after commenting out the setksmpsset code,
>>>>>>> I'm getting values of 39.39555555555555.  There must still be some
>>>>>>> multiply that is off somewhere.
>>>>>>>
>>>>>>> On Sun, Jan 5, 2014 at 2:33 PM, Steven Yi  wrote:
>>>>>>>> I think I found the bug: in CS5, setksmpsset in insert.c pre-caches
>>>>>>>> some ksmps_scale value.  In CS6, this is not done, but there was some
>>>>>>>> code there that multiplied the xtratim:
>>>>>>>>
>>>>>>>> //    p->h.insdshead->xtratim *= n;
>>>>>>>>
>>>>>>>> I commented that out and the xtratim values seem stable again.  The
>>>>>>>> calculated values do differ a little bit from CS5.  Will do some
>>>>>>>> testing now.
>>>>>>>>
>>>>>>>> On Sun, Jan 5, 2014 at 2:06 PM, Steven Yi  wrote:
>>>>>>>>> I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
>>>>>>>>> It looks like the issue manifests when a UDO calls another UDO.  In
>>>>>>>>> this case, I think the 2nd or 3rd level down UDO is using setksmps,
>>>>>>>>> but the callers are not using setksmps.  I think I saw local_ksmps and
>>>>>>>>> ksmps_scale not agreeing in value just now, going to rerun a few more
>>>>>>>>> times and see if I find it.
>>>>>>>>>
>>>>>>>>> On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
>>>>>>>>>  wrote:
>>>>>>>>>> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>>>>>>>>>>
>>>>>>>>>> Victor
>>>>>>>>>> On 5 Jan 2014, at 18:56, Steven Yi  wrote:
>>>>>>>>>>
>>>>>>>>>>> Tried that here but that didn't change the behavior (so, I can't tell
>>>>>>>>>>> if that change is necessary or not).  What I'm seeing is that with
>>>>>>>>>>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>>>>>>>>>>> stable value, but in CS6, it looks to be getting multiplied over and
>>>>>>>>>>> over. I think there's a scaling factor that is missing somehow.  I've
>>>>>>>>>>> got both CS5 and 6 in XCode now and am continuing to debug.
>>>>>>>>>>>
>>>>>>>>>>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>>>>>>>>>>  wrote:
>>>>>>>>>>>> Shouldn’t this be:
>>>>>>>>>>>>
>>>>>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>>>>>             ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>>>>>
>>>>>>>>>>>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>>>>>>>>>>
>>>>>>>>>>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>>>>>>>>>>> {
>>>>>>>>>>>>> if (ip->relesing)
>>>>>>>>>>>>> return;
>>>>>>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>>>>>>             csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>>>>>> ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>>>>>>>>>> ip->relesing = 1;
>>>>>>>>>>>>> csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>>>>>>>>>>> done. I'm not sure the values being calculated here are correct, but
>>>>>>>>>>>>> I'm also wondering if the xtratim change I did (commit
>>>>>>>>>>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>>>>>>>>>>> investigating.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>>>>>>>>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>>>>>>>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>>>>>>>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>>>>>>>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>>>>>>>>>>> this should differ depending on CPU/machine/etc.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>>>>>>>>>>>> Hi Victor,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>>>>>>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>>>>>>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>>>>>>>>>>> more.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>>>> steven
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>>>>>>>>>>  wrote:
>>>>>>>>>>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>>>>>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> This means these guys are probably wrong:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>>>>>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>>>>>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>>>>>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>>>>>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>>>>>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> disprep.c is displays.
>>>>>>>>>>>>>>>> dumpf.c is the dump opcodes
>>>>>>>>>>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>>>>>>>>>>> midiout.c is midi output.
>>>>>>>>>>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>>>>>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Victor
>>>>>>>>>>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Hi All,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>>>>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>>>>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>>>>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>>>>>>>>>>> miscalculation of times.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I did a:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>>>>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>>>>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>>>>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>>>>>>>>>>> diagnose this issue.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>>>> steven
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>>>
>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>> organizations don't have a clear picture of how application performance
>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>> organizations don't have a clear picture of how application performance
>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-01-06 18:04
FromVictor Lazzarini
SubjectRe: [Cs-dev] Hold on Release
yes, that's right, because  local_ksmps changed after the init pass, and we need to recalculate ksmps_scale. Now that
you've pointed it out, it's clear as daylight.
On 6 Jan 2014, at 16:44, Steven Yi wrote:

> Well the key issue is the recalculation of ksmps_scale in line 1262.
> That was using the default value of 1.  In CS5, the recalculation
> happened in setksmpsset but stored as a value in the INSDS (I think it
> was there), then reused in that code around 1262.  That recalculation
> didn't happen so the xtratim was orders of magnitude bigger than it
> should have been.
> 
> And definitely the code is clearer. :)
> 
> On Mon, Jan 6, 2014 at 11:39 AM, Victor Lazzarini
>  wrote:
>> Well, that’s great. I really don’t know what we fixed that was wrong, but there you go. At least the code is clearer now.
>> 
>> Victor
>> On 6 Jan 2014, at 16:27, Steven Yi  wrote:
>> 
>>> Hi Victor,
>>> 
>>> I agree that csound->ksmps is not the right way. I had put that in
>>> because I was seeing the parent_ip's ksmps value matching the cur_ip
>>> which seemed wrong, but I might have been just mistaken in reading
>>> debugger output and should have been looking elsewhere.
>>> 
>>> I tested here on commandline with the test file I had sent earlier and
>>> that worked.  Also, I tested my original project in Blue and that is
>>> working too. In the debugger in XCode, I'm seeing values that look
>>> consistent with CS5 now.
>>> 
>>> Awesome! Thanks for fixing that code up!
>>> 
>>> steven
>>> 
>>> On Mon, Jan 6, 2014 at 7:37 AM, Victor Lazzarini
>>>  wrote:
>>>> OK, I’ve made some modifications to usropcdset():
>>>> 
>>>> 1) I reverted the check to CS_KSMPS, which I think is the correct thing to do. I’ve also reverted the
>>>> ksmps_scale calculations to use CS_KSMPS.
>>>> 
>>>> 
>>>> 2) I removed the save_curip variable, and replaced its use with parent_ip, so the code is clearer
>>>> in terms of what it is doing.
>>>> 
>>>> 3) I’ve added a debug printout, showing extratim values for each instance (current, parent).
>>>> 
>>>> 
>>>> So, with the following test code
>>>> 
>>>> 0dbfs=1
>>>> ksmps=100
>>>> 
>>>> opcode Test1,a,a
>>>> setksmps 1
>>>> a1 xin
>>>> k1 linsegr 1,1,1,1,0
>>>>  xout a1*k1
>>>> endop
>>>> 
>>>> 
>>>> opcode Test2,a,a
>>>> a1 xin
>>>> k1 linsegr 1,1,1,0.5,1
>>>> a2 Test1 a1
>>>>     xout a2*k1
>>>> endop
>>>> 
>>>> instr 1
>>>> a1 vco2 0.5, 440
>>>> a2 Test2 a1
>>>>       out a2
>>>> endin
>>>> 
>>>> I get a correct length of audio, and the following debug trace
>>>> 
>>>> EXTRATIM=> cur(0x1060f0210): 44100, parent(0x10609ca10): 441
>>>> EXTRATIM=> cur(0x10609ca10): 441, parent(0x1010a5810): 441
>>>> 
>>>> The inner opcode (Test1), with ksmps 1, shows a xtratim of 44100 (correctly, 1 second at kr=44100),
>>>> and the outer opcode (Test2) with ksmps = 100 shows a xtratim of 441 (1 second at kr=441) and
>>>> the calling instrument has the same xtratim.
>>>> 
>>>> So all appears correct to me. I am pushing this to the release/6.02.0 branch.
>>>> 
>>>> Steven: could you check your test case?
>>>> 
>>>> Victor
>>>> 
>>>> On 6 Jan 2014, at 10:27, Victor Lazzarini  wrote:
>>>> 
>>>>> The code needs to look at CS_KSMPS, not csound->ksmps, because otherwise the perf function selected
>>>>> (useropcd1) will be wrong when both local ksmps and CS_KSMPS are the same and are different from csound->ksmps
>>>>> (in that case, useropcd2 needs to be selected).
>>>>> 
>>>>> So, there is more that needs to be looked at. I’m working on it now, but we need to test with your CSD that was showing
>>>>> the broken code.
>>>>> 
>>>>> Victor
>>>>> 
>>>>> On 6 Jan 2014, at 08:47, Victor Lazzarini  wrote:
>>>>> 
>>>>>> I think we might need to hold on for a little while, to make sure this is correct.
>>>>>> 
>>>>>> I had a look at your changes. From what I can see, the issue was that we were using p->h.insdshead->ksmps instead of csound->ksmps
>>>>>> in that bit of code. That is, the parent instrument ksmps, instead of the global ksmps.
>>>>>> 
>>>>>> The idea was that if the local ksmps differed from the parent instrument ksmps, then when copying the parameters
>>>>>> back to the parent instrument (saved_curip), we would scale xtratim accordingly.
>>>>>> 
>>>>>> Now that you are comparing to csound->ksmps, if the parent instrument has a different ksmps to csound->ksmps, I think
>>>>>> the value copied back might be wrong.
>>>>>> 
>>>>>> I wonder if all this copying back to save_curip is necessary at all. I think we might need to remove that and just point
>>>>>> csound->curip to parent_ip after the init-pass loop, and save a lot of trouble.
>>>>>> 
>>>>>> Do you have a simple test CSD for this? I might try to put one together and look at this problem this morning.
>>>>>> 
>>>>>> Victor
>>>>>> On 6 Jan 2014, at 02:45, Steven Yi  wrote:
>>>>>> 
>>>>>>> I think I got it.  I went back and forth a few times, reverting
>>>>>>> things, etc.  I did find a solution which was to modify a check in
>>>>>>> useropcdset to compare local_ksmps to csound->ksmps; if they were
>>>>>>> unequal, I put in a recalculation of ksmps_scale and then modified
>>>>>>> xtratim with that.  What I found was that CS5's code did something
>>>>>>> similar but in a roundabout way: in setksmpsset, it would calculate a
>>>>>>> new ksmps_scale. setksmpsset was called during the initialization of
>>>>>>> the UDO instance, about midway through useropcdset.  That in turn made
>>>>>>> it hard to find out what was going on.
>>>>>>> 
>>>>>>> To note: I am somewhat confident that the code is now working, but I
>>>>>>> am not entirely confident that there aren't other bugs.  This area of
>>>>>>> code was difficult for me to go through.
>>>>>>> 
>>>>>>> Also to note, I didn't not change instances of csound->ekr to CS_EKR
>>>>>>> in my commit.  I'm a bit spent to try that again and to do any
>>>>>>> testing.
>>>>>>> 
>>>>>>> I've merged in the changes from develop and pushed those and my fix up
>>>>>>> to SF in the release/6.02.0 branch.
>>>>>>> 
>>>>>>> Thanks
>>>>>>> steven
>>>>>>> 
>>>>>>> On Sun, Jan 5, 2014 at 2:39 PM, Steven Yi  wrote:
>>>>>>>> Still has an issue, but getting closer.  In CS5, when timexpire first
>>>>>>>> gets called, the calculated offtim and offbet (this is in
>>>>>>>> insert.c:set_xtratim() ) are 1.187120181405783.  In CS6, this was
>>>>>>>> something like 20000, but after commenting out the setksmpsset code,
>>>>>>>> I'm getting values of 39.39555555555555.  There must still be some
>>>>>>>> multiply that is off somewhere.
>>>>>>>> 
>>>>>>>> On Sun, Jan 5, 2014 at 2:33 PM, Steven Yi  wrote:
>>>>>>>>> I think I found the bug: in CS5, setksmpsset in insert.c pre-caches
>>>>>>>>> some ksmps_scale value.  In CS6, this is not done, but there was some
>>>>>>>>> code there that multiplied the xtratim:
>>>>>>>>> 
>>>>>>>>> //    p->h.insdshead->xtratim *= n;
>>>>>>>>> 
>>>>>>>>> I commented that out and the xtratim values seem stable again.  The
>>>>>>>>> calculated values do differ a little bit from CS5.  Will do some
>>>>>>>>> testing now.
>>>>>>>>> 
>>>>>>>>> On Sun, Jan 5, 2014 at 2:06 PM, Steven Yi  wrote:
>>>>>>>>>> I'm watching the ksmps_scale and local_ksmps value now in useropcdset.
>>>>>>>>>> It looks like the issue manifests when a UDO calls another UDO.  In
>>>>>>>>>> this case, I think the 2nd or 3rd level down UDO is using setksmps,
>>>>>>>>>> but the callers are not using setksmps.  I think I saw local_ksmps and
>>>>>>>>>> ksmps_scale not agreeing in value just now, going to rerun a few more
>>>>>>>>>> times and see if I find it.
>>>>>>>>>> 
>>>>>>>>>> On Sun, Jan 5, 2014 at 2:05 PM, Victor Lazzarini
>>>>>>>>>>  wrote:
>>>>>>>>>>> I am not sure whether csound->icurTime is correct when an instrument has local ksmps.
>>>>>>>>>>> 
>>>>>>>>>>> Victor
>>>>>>>>>>> On 5 Jan 2014, at 18:56, Steven Yi  wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> Tried that here but that didn't change the behavior (so, I can't tell
>>>>>>>>>>>> if that change is necessary or not).  What I'm seeing is that with
>>>>>>>>>>>> debugger is that xtratim gets modified in useropcdset. In CS5, it's a
>>>>>>>>>>>> stable value, but in CS6, it looks to be getting multiplied over and
>>>>>>>>>>>> over. I think there's a scaling factor that is missing somehow.  I've
>>>>>>>>>>>> got both CS5 and 6 in XCode now and am continuing to debug.
>>>>>>>>>>>> 
>>>>>>>>>>>> On Sun, Jan 5, 2014 at 1:47 PM, Victor Lazzarini
>>>>>>>>>>>>  wrote:
>>>>>>>>>>>>> Shouldn’t this be:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>>>>>>            ip->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>>>>>> 
>>>>>>>>>>>>> On 5 Jan 2014, at 16:31, Steven Yi  wrote:
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I'm currently looking at set_xtratim() in insert.c:
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> static void set_xtratim(CSOUND *csound, INSDS *ip)
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>> if (ip->relesing)
>>>>>>>>>>>>>> return;
>>>>>>>>>>>>>> ip->offtim = (csound->icurTime +
>>>>>>>>>>>>>>            csound->ksmps * (double) ip->xtratim)/csound->esr;
>>>>>>>>>>>>>> ip->offbet = csound->curBeat + (csound->curBeat_inc * (double) ip->xtratim);
>>>>>>>>>>>>>> ip->relesing = 1;
>>>>>>>>>>>>>> csound->engineState.instrtxtp[ip->insno]->pending_release++;
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> It looks to me that timexpire() gets called when the note's p3 is
>>>>>>>>>>>>>> done. I'm not sure the values being calculated here are correct, but
>>>>>>>>>>>>>> I'm also wondering if the xtratim change I did (commit
>>>>>>>>>>>>>> a559181723567dc47168585fa5e0c9ed64cb0800) was correct.  Still
>>>>>>>>>>>>>> investigating.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> On Sun, Jan 5, 2014 at 11:13 AM, Steven Yi  wrote:
>>>>>>>>>>>>>>> I'm still getting underruns with cs6.  I've attached a test CSD here.
>>>>>>>>>>>>>>> With CS5 I am not getting underruns.  The suspicion is that there is a
>>>>>>>>>>>>>>> timeout value being incorrectly calculated, but I am not sure.  This
>>>>>>>>>>>>>>> CSD starts to stutter for me around 12 seconds into the render, but
>>>>>>>>>>>>>>> this should differ depending on CPU/machine/etc.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On Sun, Jan 5, 2014 at 11:00 AM, Steven Yi  wrote:
>>>>>>>>>>>>>>>> Hi Victor,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I've modified the ones you listed to use CS_EKR.  I'll see if any of
>>>>>>>>>>>>>>>> those fixes the issue I have here.  I may need help testing the
>>>>>>>>>>>>>>>> opcodes individually though.  I'll report back here as I find out
>>>>>>>>>>>>>>>> more.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>>>>> steven
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On Sun, Jan 5, 2014 at 6:40 AM, Victor Lazzarini
>>>>>>>>>>>>>>>>  wrote:
>>>>>>>>>>>>>>>>> I’d say the only ones we need to worry are in opcodes. This means the ones in OOps/*.c
>>>>>>>>>>>>>>>>> As a rule of thumb, wherever p->h.insdshead->ekr is available, it should be used.
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> This means these guys are probably wrong:
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> ../OOps/disprep.c:90:      npts = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>>>>>>> ../OOps/disprep.c:250:      step_size = (int32)(*p->iprd * csound->ekr);
>>>>>>>>>>>>>>>>> ../OOps/disprep.c:440:    if (UNLIKELY((p->timcount = (int)(csound->ekr * iperiod)) <= 0))
>>>>>>>>>>>>>>>>> ../OOps/disprep.c:442:    if (UNLIKELY((p->dtimcnt = (int)(csound->ekr * *p->idisprd)) < 0))
>>>>>>>>>>>>>>>>> ../OOps/disprep.c:540:    p->tempscal = FL(60.0) * csound->ekr / p->timcount;
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:58:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:87:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:112:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:140:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:166:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:195:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:220:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:247:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:396:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:422:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:448:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:476:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:502:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:530:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:556:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:584:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:757:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/dumpf.c:784:    if ((p->timcount = (int32)(*p->iprd * csound->ekr)) <= 0)
>>>>>>>>>>>>>>>>> ../OOps/goto_ops.c:97:    if (UNLIKELY((p->cnt1 = (int32)(*p->idel * csound->ekr + FL(0.5))) < 0L ||
>>>>>>>>>>>>>>>>> ../OOps/goto_ops.c:98:                 (p->cnt2 = (int32)(*p->idur * csound->ekr + FL(0.5))) < 0L))
>>>>>>>>>>>>>>>>> ../OOps/midiout.c:80:    p->period= csound->ekr / *p->freq;
>>>>>>>>>>>>>>>>> ../OOps/schedule.c:368:      int32 timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>>>>>>> ../OOps/schedule.c:433:      p->timrem = (int32) (*p->mintime * csound->ekr + FL(0.5));
>>>>>>>>>>>>>>>>> ../OOps/ugens2.c:1014:    p->dcnt = (int32)(*p->idel * csound->ekr);
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> disprep.c is displays.
>>>>>>>>>>>>>>>>> dumpf.c is the dump opcodes
>>>>>>>>>>>>>>>>> The problem in goto_ops.c is in the timout opcode (i-pass).
>>>>>>>>>>>>>>>>> midiout.c is midi output.
>>>>>>>>>>>>>>>>> schedule.c issue is in schedkwhen, schedkwhennamed.
>>>>>>>>>>>>>>>>> there is a final problem in oscil1 (ugens2.c).
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Victor
>>>>>>>>>>>>>>>>> On 5 Jan 2014, at 02:55, Steven Yi  wrote:
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> Hi All,
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> I'm back home from holidays and am starting to get back into
>>>>>>>>>>>>>>>>>> development. I noticed that one of my projects still has some kind of
>>>>>>>>>>>>>>>>>> performance degredation as the project keeps rendering.  I suspect it
>>>>>>>>>>>>>>>>>> is related to certain instances continuing to be kept around due to
>>>>>>>>>>>>>>>>>> miscalculation of times.
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> I did a:
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> grep "csound->ekr" * -n -r
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> in the csound6 directory and found a number of uses.  Some look
>>>>>>>>>>>>>>>>>> correct but others I'm not quite sure.
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> I'm going to do some further testing tomorrow after creating a test
>>>>>>>>>>>>>>>>>> file to use.  I forgot if we were waiting until Monday or not, but I'd
>>>>>>>>>>>>>>>>>> like to ask to hold on the release until at least then so I can
>>>>>>>>>>>>>>>>>> diagnose this issue.
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>>>>> steven
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>> 
>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>> 
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>>> organizations don't have a clear picture of how application performance
>>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>> 
>>>>>> 
>>>>>> ------------------------------------------------------------------------------
>>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>>> organizations don't have a clear picture of how application performance
>>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>> 
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>>> organizations don't have a clear picture of how application performance
>>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>>> organizations don't have a clear picture of how application performance
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net