[Stk] Pops and Crackling on Windows

Perry Cook prc at cs.princeton.edu
Fri Aug 30 15:41:31 PDT 2013


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




More information about the Stk mailing list