| Note: I realized I did not push the code last night, and have pushed
that just now.
On Mon, Oct 10, 2011 at 9:58 PM, Steven Yi wrote:
> Following up, there were some subtle differences between how transegr
> was grabbing the current segment. It also was missing some code to
> sustain on the 2nd to last segment before releasing. I've modified
> the code and committed it. I found too that the original test csd that
> menno sent isn't so good to illustrate the problems, and it was much
> better to use a vco2 example (attached). All is working well here now.
>
> On Mon, Oct 10, 2011 at 9:29 PM, Steven Yi wrote:
>> I checked linsegr and it looks like the segsrem is set as count + 1 in
>> the init function, which is the same in transegr, so that code to get
>> to the last segment looks alright.
>>
>> I do notice something odd but haven't figured it out quite yet, in
>> comparing linsegr's k-time function and transegr. Still looking.
>>
>> On Mon, Oct 10, 2011 at 7:57 PM, wrote:
>>> usy at present, but i thought tis logic was a direct copy of
>>> linsegr/expsegr. If you are correct then they may be wrong also
>>> ==John ff
>>>
>>>> Hi John,
>>>>
>>>> I took a look again, I think the logic is incorrect for advancing to
>>>> the last segment. If one releases before the first segment is
>>>> complete, it goes off.
>>>>
>>>> I've attached a CSD with a score that can be run without midi that
>>>> shows the issue. GDB log is at end of thi method.
>>>>
>>>> I think this code:
>>>>
>>>> while (p->segsrem > 1) { /* reles flag new: */
>>>> segp = ++p->cursegp; /* go to last segment */
>>>> p->segsrem--;
>>>> } /* get univ relestim */
>>>>
>>>>
>>>> should look for segsrem > 0, if it's trying to get to the last
>>>> segment. Also, since the last segment has a value cached for its
>>>> increment, I think that is the reason the release stage is something
>>>> generating inf signal as I think the code (if read correctly) assumes
>>>> that the release is going to be starting at the value of the previous
>>>> segment. In the case where a user releases before the other segments
>>>> complete, the value should probably be calculated at that time so that
>>>> the value doesn't generate wild values.
>>>>
>>>> Could you take another look and confirm if my diagnosis is correct?
>>>>
>>>> Thanks!
>>>> steven
>>>>
>>>>
>>>> Breakpoint 1, ktrnsegr (csound=0x100800000, p=0x10205b098) at pitch.c:1976
>>>> 1976 while (p->segsrem > 1) { /* reles flag new: */
>>>> (gdb) print p->segsrem
>>>> $1 = 2
>>>> (gdb) n
>>>> 1977 segp = ++p->cursegp; /* go to last segment */
>>>> (gdb) n
>>>> 1978 p->segsrem--;
>>>> (gdb) n
>>>>
>>>> Breakpoint 1, ktrnsegr (csound=0x100800000, p=0x10205b098) at pitch.c:1976
>>>> 1976 while (p->segsrem > 1) { /* reles flag new: */
>>>> (gdb) print p->segsrem
>>>> $2 = 1
>>>> (gdb) print p->cursegp
>>>> $3 = (NSEG *) 0x10140d168
>>>> (gdb) n
>>>> 1980 segp->cnt = p->xtra>=0 ? p->xtra : p->h.insdshead->xtratim;
>>>> (gdb) n
>>>> 1992 if (!(p->curcnt = segp->cnt)) { /* nonlen = discontin */
>>>> (gdb) n
>>>>
>>>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>>>> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
>>>> 0x00000001004fac5b in ktrnsegr (csound=0x100800000, p=0x10205b098) at
>>>> pitch.c:1992
>>>> 1992 if (!(p->curcnt = segp->cnt)) { /* nonlen = discontin */
>>>> (gdb) Quit
>>>>
>>>>
>>>>
>>>> On Mon, Oct 10, 2011 at 4:47 PM, wrote:
>>>>> I really have no idea how to debug this; I do not get any problems on my
>>>>> computer (64bit Linux, doubles), and I have read the code withpout
>>>>> seeong
>>>>> anything odd. Indeed I cannot see any way segp can be null unless the
>>>>> arguments to the opcode are wrong
>>>>> ==John ff
>>>>>
>>>>>> I get the same unstable result in Kubuntu10.04 32bit double samples.
>>>>>> The
>>>>>> transegr example crashes while the linsegr example does not.
>>>>>> ?
>>>>>>
>>>>>> Here is the linsegr example that works fine over here.
>>>>>>
>>>>>>
>>>>>>
>>>>>> ; Select audio/midi flags here according to platform
>>>>>> -odac -+rtmidi=virtual -M0 ;;;realtime audio out and realtime midi
>>>>>> in
>>>>>> ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
>>>>>> ; For Non-realtime ouput leave only the line below:
>>>>>> ; -o linsegr.wav -W ;;; for file output any platform
>>>>>>
>>>>>>
>>>>>>
>>>>>> sr = 44100
>>>>>> ksmps = 32
>>>>>> nchnls = 2
>>>>>> 0dbfs = 1
>>>>>>
>>>>>> instr 1
>>>>>>
>>>>>>
>>>>>> icps cpsmidi
>>>>>> iamp ampmidi .3
>>>>>>
>>>>>> kenv linsegr 1, .05, 0.5, 1, 0
>>>>>> asig pluck kenv, icps, 200, 1, 1
>>>>>> outs asig, asig
>>>>>>
>>>>>> endin
>>>>>>
>>>>>>
>>>>>> f 1 0 4096 10 1 ;sine wave
>>>>>>
>>>>>> f0 30 ;runs 30 seconds
>>>>>> e
>>>>>>
>>>>>>
>>>>>>
>>>>>> greetings
>>>>>> Menno
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://csound.1045644.n5.nabble.com/transegr-issue-tp4885520p4887870.html
>>>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> All the data continuously generated in your IT infrastructure contains a
>>> definitive record of customers, application performance, security
>>> threats, fraudulent activity and more. Splunk takes this data and makes
>>> sense of it. Business sense. IT sense. Common sense.
>>> http://p.sf.net/sfu/splunk-d2dcopy1
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |