[Stk] Pops and Crackling on Windows

Ted Stockwell emorning at yahoo.com
Tue Sep 10 18:33:39 PDT 2013


Thanks very much!

I haven't spent much time looking at the STK code since I'm currently reading Real Sound Synthesis (and this is a side project for me).
I'm curious though how you diagnosed this issue.
Was it just a matter of becoming more familiar with the code and making an intelligent guess as to what might make a difference?
Or was there a specific tool you used?
I'm guessing that a debugger is not going to be much help :-).



>________________________________
> From: Tom Gideon <tegideon at gmail.com>
>To: Ted Stockwell <emorning at yahoo.com> 
>Cc: Perry Cook <prc at cs.princeton.edu>; "stk at ccrma.stanford.edu" <stk at ccrma.stanford.edu> 
>Sent: Tuesday, September 10, 2013 6:52 PM
>Subject: Re: [Stk] Pops and Crackling on Windows
> 
>
>
>Hi
>
>    I'm new to this mailing list and STK. I think I have found the problem with regard to "Pops and Crackling ..." In the file "demo.cpp" there is a line that reads
>
>  data.voicer = (Voicer *) new Voicer( 0.0 );
>
>
>I changed the 0.0 to 0.2 and the pops and crackling disappered. The pops and crackling seemed to be the result of the release time not being activated and the waveform had a "discontinuity" at the end of each note, and this seemed, sometimes, to carry over to the beginning of the next note.
>
>I hope this helps.
>
>Tom Gideon
>
>...
>
>
>
>
>On Fri, Aug 30, 2013 at 10:18 PM, Ted Stockwell <emorning at yahoo.com> wrote:
>
>Thanks very much for the hints, I will try all of them.
>>Actually, I did see a couple of messages about exceeding +/- 1.0....
>>
>>
>>
>>>________________________________
>>> From: Perry Cook <prc at CS.Princeton.EDU>
>>>To: Ted Stockwell <emorning at yahoo.com> 
>>>Cc: "stk at ccrma.stanford.edu" <stk at ccrma.Stanford.EDU> 
>>>Sent: Friday, August 30, 2013 5:41 PM
>>>Subject: Re: [Stk] Pops and Crackling on Windows
>>> 
>>>
>>>Hey Ted,
>>>
>>>I'm doing some STK on RPi already!  It works quite well if you
>>>pay attention to how much computation you're asking for at
>>>any given time.
>>>
>>>Since it happens the same way at the same instant, it could
>>>be clipping for some reason.  The CPU spiking might be 
>>>something inside STK checking for exceeding of +/- 1.0.
>>>
>>>I'd try changing the gain (downward) just a bit.  This could 
>>>be done in a variety of places, including right in the main 
>>>program.  Find a nice place where the Instrument.tick() method
>>>is being called, and
 multiply that times your test gain hack.
>>>
>>>Something like:  dac.tick(myRev.tick(0.5*myInstrument.tick())));
>>>where you add in that 0.5.  
>>>
>>>Another thing to try would be to run the demo with the GUI
>>>and see if things click any.  Wish I could help more.  
>>>
>>>PRC
>>>
>>>On Aug 30, 2013, at 2:59 PM, Ted Stockwell wrote:
>>>
>>>> Hi All,
>>>> 
>>>> I'm a programmer that is totally new to sound synthesis and STK.
>>>> I've built the demo project on Windows XP, I'm playing with it, and I have some questions... 
>>>> 
>>>> When I play a SKINI file in realtime I hear a lot of pops and crackling/buzzes at specific times in the sequence (demo Clarinet -or -if scores/bookert.ski).
>>>> The pops and crackling always happens at the same points in the sequence.
>>>> I've noticed that my CPU usage tops out when the crackling starts (BTW, I have 3.4 Ghz Pentium 4 CPU).
>>>> If I generate a .wav file
 instead and play the .wav file then I don't hear any crackling (demo Clarinet -if scores/bookert.ski -ow clarinet.wav) .
>>>> I figure the issue must be related to the realtime synthesis of the sound (but I suppose it could be the actual playing of the sound).
>>>> 
>>>> I've tried increasing RT_BUFFER_SIZE from 512 to 4096 but that made no difference.
>>>> Can anybody suggest a remedy?
>>>> My ultimate goal is too use STK on a Raspberry Pi so I'll need to understand/solve this issue in order to be comfortable moving forward.
>>>> 
>>>> Thanks in advance,
>>>> 
>>>> -ted stockwell
>>>> 
>>>> 
>>>> PS: I've ordered a copy of Real Sound Synthesis for Interactive Applications but I haven't received it yet, so I don't understand how any of this stuff works :-).
>>>> 
>>>> _______________________________________________
>>>> Stk mailing list
>>>> Stk at ccrma.stanford.edu
>>>> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>>>
>>>
>>>
>>_______________________________________________
>>Stk mailing list
>>Stk at ccrma.stanford.edu
>>http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>>
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20130910/4f6b1467/attachment.html 


More information about the Stk mailing list