Csound Csound-dev Csound-tekno Search About

[Csnd] tradsyn problem was Re: little help needed...

Date2010-04-29 22:56
FromRory Walsh
Subject[Csnd] tradsyn problem was Re: little help needed...
I spotted the offending code and the problem is coming from the
tradsyn opcode. The following code will choke Csound is there is not
input, i.e., nothing from my mic..

/* partial tracking */
fs1,fsi2 pvsifd gasig,2048,512,1 ; ifd analysis
fst  partials fs1,fsi2,.03,1,1,500  ; partial tracking
/* synthesis data */
apart1  tradsyn fst, 0.2, 100, 50, 7 ; resynthesis

If I take out tradsyn it works fine. Can anyone spot an obvious error
in my code? By the way, this code has worked for some time without
modification. Perhaps it was just pure luck?


On 29 April 2010 22:45, Rory Walsh  wrote:
> I'm just stripping it down now. You're right, if there is a signal
> when the process starts it works much better, if there is silence when
> the process starts it chokes.
>
> On 29 April 2010 22:05, Oeyvind Brandtsegg  wrote:
>> I meant ,... it does *not* behave the same each time I run it,
>> sorry
>>
>> 2010/4/29 Oeyvind Brandtsegg :
>>> Also running on (a sort of) 5.11 doubles on Win,
>>> it does behave the same each time I run it,
>>> sometimes it might choke (for lack of a better word) after less than one second,
>>> but it's also possible to let it render the full 100 seconds.
>>> I can't spot the error immediately, but I think there's some "shooting
>>> oneself in the foot" in here somewhere ;-)
>>> Since it's processing live input, the actual input signal may affect
>>> how long it's allowed to run. When I run it on my laptop, it
>>> immediately goes into a thin and piercing feedback, as the mic and the
>>> speakers are close.
>>> When it choked after less than a second (this happened many times in a
>>> row), finally I tapped the laptop mic at the same time as starting
>>> csound, and that seemed to "push"  the process just enough to create a
>>> feedback loop instead of a choke.
>>> Interesting puzzle, how much more can you strip it down before it does
>>> not randomly choke anymore ?
>>>
>>> best
>>> Oeyvind
>>>
>>>
>>> 2010/4/29 Rory Walsh :
>>>> I've been using the attached instr50 for quite a while and I've just
>>>> noticed it now causes some odd behaviour to Csound(I'm using 5.11).
>>>> I've had to uproot it from it's original setting to put it into a csd
>>>> some of you may be able to try. I'm not using any of instr50's
>>>> processing, I'm simply using it to output a straight signal. When
>>>> running the audio stops after about 7/8 seconds, not just on instr50
>>>> but across ALL instruments. Csound doesn't spit out any errors except
>>>> for an interrupt message. As you can see it's a midi instrument but
>>>> you don't need MIDI hooked up to appreciate the problem here. Would
>>>> someone mind trying it on their PC to see if they get the same
>>>> behaviour? Cheers,
>>>>
>>>> Rory.
>>>>
>>>> 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"


Date2010-04-30 10:46
FromVictor Lazzarini
Subject[Csnd] Re: tradsyn problem was Re: little help needed...
Well I noticed the -b10 and the ksmps=1 being a bit excessive. I  
removed the -b10 and substituted you inch for 'diskin2'  and there is no
choking.

Then I zeroed the input to pvsifd (by using another signal set to 0,  
asig = 0). It still worked, no choking. Then I reverted to your  
original code,
without -b10. No choking.

Victor


On 29 Apr 2010, at 22:56, Rory Walsh wrote:

> I spotted the offending code and the problem is coming from the
> tradsyn opcode. The following code will choke Csound is there is not
> input, i.e., nothing from my mic..
>
> /* partial tracking */
> fs1,fsi2 pvsifd gasig,2048,512,1 ; ifd analysis
> fst  partials fs1,fsi2,.03,1,1,500  ; partial tracking
> /* synthesis data */
> apart1  tradsyn fst, 0.2, 100, 50, 7 ; resynthesis
>
> If I take out tradsyn it works fine. Can anyone spot an obvious error
> in my code? By the way, this code has worked for some time without
> modification. Perhaps it was just pure luck?
>
>
> On 29 April 2010 22:45, Rory Walsh  wrote:
>> I'm just stripping it down now. You're right, if there is a signal
>> when the process starts it works much better, if there is silence  
>> when
>> the process starts it chokes.
>>
>> On 29 April 2010 22:05, Oeyvind Brandtsegg   
>> wrote:
>>> I meant ,... it does *not* behave the same each time I run it,
>>> sorry
>>>
>>> 2010/4/29 Oeyvind Brandtsegg :
>>>> Also running on (a sort of) 5.11 doubles on Win,
>>>> it does behave the same each time I run it,
>>>> sometimes it might choke (for lack of a better word) after less  
>>>> than one second,
>>>> but it's also possible to let it render the full 100 seconds.
>>>> I can't spot the error immediately, but I think there's some  
>>>> "shooting
>>>> oneself in the foot" in here somewhere ;-)
>>>> Since it's processing live input, the actual input signal may  
>>>> affect
>>>> how long it's allowed to run. When I run it on my laptop, it
>>>> immediately goes into a thin and piercing feedback, as the mic  
>>>> and the
>>>> speakers are close.
>>>> When it choked after less than a second (this happened many times  
>>>> in a
>>>> row), finally I tapped the laptop mic at the same time as starting
>>>> csound, and that seemed to "push"  the process just enough to  
>>>> create a
>>>> feedback loop instead of a choke.
>>>> Interesting puzzle, how much more can you strip it down before it  
>>>> does
>>>> not randomly choke anymore ?
>>>>
>>>> best
>>>> Oeyvind
>>>>
>>>>
>>>> 2010/4/29 Rory Walsh :
>>>>> I've been using the attached instr50 for quite a while and I've  
>>>>> just
>>>>> noticed it now causes some odd behaviour to Csound(I'm using  
>>>>> 5.11).
>>>>> I've had to uproot it from it's original setting to put it into  
>>>>> a csd
>>>>> some of you may be able to try. I'm not using any of instr50's
>>>>> processing, I'm simply using it to output a straight signal. When
>>>>> running the audio stops after about 7/8 seconds, not just on  
>>>>> instr50
>>>>> but across ALL instruments. Csound doesn't spit out any errors  
>>>>> except
>>>>> for an interrupt message. As you can see it's a midi instrument  
>>>>> but
>>>>> you don't need MIDI hooked up to appreciate the problem here.  
>>>>> Would
>>>>> someone mind trying it on their PC to see if they get the same
>>>>> behaviour? Cheers,
>>>>>
>>>>> Rory.
>>>>>
>>>>> 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"
>



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"

Date2010-04-30 11:22
FromRory Walsh
Subject[Csnd] Re: Re: tradsyn problem was Re: little help needed...
It's still choking for me, -b10 or not? Diskin2 or not. I've also
changed ksmps to a larger number with no joy either..

On 30 April 2010 10:46, Victor Lazzarini  wrote:
> Well I noticed the -b10 and the ksmps=1 being a bit excessive. I removed the
> -b10 and substituted you inch for 'diskin2'  and there is no
> choking.
>
> Then I zeroed the input to pvsifd (by using another signal set to 0, asig =
> 0). It still worked, no choking. Then I reverted to your original code,
> without -b10. No choking.
>
> Victor
>
>
> On 29 Apr 2010, at 22:56, Rory Walsh wrote:
>
>> I spotted the offending code and the problem is coming from the
>> tradsyn opcode. The following code will choke Csound is there is not
>> input, i.e., nothing from my mic..
>>
>> /* partial tracking */
>> fs1,fsi2 pvsifd gasig,2048,512,1 ; ifd analysis
>> fst  partials fs1,fsi2,.03,1,1,500  ; partial tracking
>> /* synthesis data */
>> apart1  tradsyn fst, 0.2, 100, 50, 7 ; resynthesis
>>
>> If I take out tradsyn it works fine. Can anyone spot an obvious error
>> in my code? By the way, this code has worked for some time without
>> modification. Perhaps it was just pure luck?
>>
>>
>> On 29 April 2010 22:45, Rory Walsh  wrote:
>>>
>>> I'm just stripping it down now. You're right, if there is a signal
>>> when the process starts it works much better, if there is silence when
>>> the process starts it chokes.
>>>
>>> On 29 April 2010 22:05, Oeyvind Brandtsegg  wrote:
>>>>
>>>> I meant ,... it does *not* behave the same each time I run it,
>>>> sorry
>>>>
>>>> 2010/4/29 Oeyvind Brandtsegg :
>>>>>
>>>>> Also running on (a sort of) 5.11 doubles on Win,
>>>>> it does behave the same each time I run it,
>>>>> sometimes it might choke (for lack of a better word) after less than
>>>>> one second,
>>>>> but it's also possible to let it render the full 100 seconds.
>>>>> I can't spot the error immediately, but I think there's some "shooting
>>>>> oneself in the foot" in here somewhere ;-)
>>>>> Since it's processing live input, the actual input signal may affect
>>>>> how long it's allowed to run. When I run it on my laptop, it
>>>>> immediately goes into a thin and piercing feedback, as the mic and the
>>>>> speakers are close.
>>>>> When it choked after less than a second (this happened many times in a
>>>>> row), finally I tapped the laptop mic at the same time as starting
>>>>> csound, and that seemed to "push"  the process just enough to create a
>>>>> feedback loop instead of a choke.
>>>>> Interesting puzzle, how much more can you strip it down before it does
>>>>> not randomly choke anymore ?
>>>>>
>>>>> best
>>>>> Oeyvind
>>>>>
>>>>>
>>>>> 2010/4/29 Rory Walsh :
>>>>>>
>>>>>> I've been using the attached instr50 for quite a while and I've just
>>>>>> noticed it now causes some odd behaviour to Csound(I'm using 5.11).
>>>>>> I've had to uproot it from it's original setting to put it into a csd
>>>>>> some of you may be able to try. I'm not using any of instr50's
>>>>>> processing, I'm simply using it to output a straight signal. When
>>>>>> running the audio stops after about 7/8 seconds, not just on instr50
>>>>>> but across ALL instruments. Csound doesn't spit out any errors except
>>>>>> for an interrupt message. As you can see it's a midi instrument but
>>>>>> you don't need MIDI hooked up to appreciate the problem here. Would
>>>>>> someone mind trying it on their PC to see if they get the same
>>>>>> behaviour? Cheers,
>>>>>>
>>>>>> Rory.
>>>>>>
>>>>>> 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"
>>
>
>
>
> 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"


Date2010-04-30 11:34
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: tradsyn problem was Re: little help needed...
> It's still choking for me, -b10 or not? Diskin2 or not. I've also
> changed ksmps to a larger number with no joy either..
>

Just a random thougt; Intel or AMD hardware?



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"

Date2010-04-30 11:48
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: tradsyn problem was Re: little help needed...
Intel? But then again I've always used intel..

On 30 April 2010 11:34,   wrote:
>> It's still choking for me, -b10 or not? Diskin2 or not. I've also
>> changed ksmps to a larger number with no joy either..
>>
>
> Just a random thougt; Intel or AMD hardware?
>
>
>
> 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"


Date2010-04-30 12:14
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Re: Re: tradsyn problem was Re: little help needed...
It's Intel here too and no choking. But it's 5.12 and OSX. There was  
no change to the opcode, though between 11 and 12.

Victor
On 30 Apr 2010, at 11:48, Rory Walsh wrote:

> Intel? But then again I've always used intel..
>
> On 30 April 2010 11:34,   wrote:
>>> It's still choking for me, -b10 or not? Diskin2 or not. I've also
>>> changed ksmps to a larger number with no joy either..
>>>
>>
>> Just a random thougt; Intel or AMD hardware?
>>
>>
>>
>> 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"

Date2010-05-05 15:06
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: Re: Re: tradsyn problem was Re: little help needed...
I've been doing some more messing around with this and I can reduce
but not eliminate the error if I reduce the number of tracks used in
the resynthesis. This does get me further but it still hangs Csound.
Even if it doesn't hang Csound when the instrument is running it will
hang Csound when the instrument finishes, i.e., if it actually runs
without a problem I still have to manually kill Csound after 60
seconds. The problem seems to be consistent on windows, can someone
try the instrument on a linux machine?



-odevaudio -idevaudio -b1024


sr = 44100
kr = 4410
ksmps = 10
nchnls = 2

instr 50
asig inch 1
denorm asig
/* partial tracking */
fs1,fsi2 pvsifd asig,2048,512,1 ; ifd analysis
fst  partials fs1,fsi2,.03,1,1,500  ; partial tracking
/* synthesis data */
apart1  tradsyn fst, 0.2, .1, 10, 7 ; resynthesis
apart2  tradsyn fst, 0.2, .2, 10, 7 ; resynthesis
apart3  tradsyn fst, 0.2, .3, 10, 7 ; resynthesis

outs (apart1+apart2+apart3), (apart1+apart2+apart3)
endin



f1 0 1024 10 1
f7 0 1024 10 1
i50 0 60




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"