Topic: Crackles After Recording

After restarting Pianoteq and when recording there are no problems, but after I save a recording it starts crackling badly.

This has been happening only for the current version, 3.6.6
I'm on an iMac.
I have a gig of free memory and the CPU gets up to only about 20%.

Re: Crackles After Recording

Strange...
The oposite would be more probable, in cases the CPU it's not up to a demanding piano performance in real time.

Check if your player have the samne problem with other music files.

Re: Crackles After Recording

Let me try describing my problem again.

The problem (which I can always temporarily fix) is that Pianoteq has cracks and pops and terrible latency, and if really bad then the sustain sticks, and there's sometimes notes of a sustained chord that aren't sustained.

It usually occurs only after I've opened a lot of programs simultaneously, or even after I've closed all those programs, freeing up the memory. As I mentioned before it also happens after I make a midi recording using Pianoteq that's several minutes long; and it's not just the MIDI playback of the recording that has problems, it's all live sound generated by the program.

I can always fix the problem by quitting and re-opening Pianoteq, and it works flawlessly until I either use up my memory or make a recording, or even if I use much more of my memory while still having a lot free.

I have an Edirol FA-66 Firewire audio interface, iMac running Snow Leopard, fully updated, and 3gb ram.

I've been restarting Pianoteq several times a day for about a year now; it'd be great to be done with this foolishness.

Re: Crackles After Recording

How much total RAM is in your iMac? Maybe it's something that can be upgraded. It really sounds like Pianoteq performs badly when it's forced to swap to virtual memory, which is always going to be unavoidable.

I doubt they did anything major in the update, but you might try 3.6.8, as that's the current version. There's a very slight chance that something related to this was fixed.

EDIT: Oops, you said in your last post. 3GB memory. Yeah, definitely look for a memory upgrade, because 3GB is near the bare minimum for any modern desktop. I'd shoot for 8GB at least, depending on how much your computer can hold. Aftermarket RAM is usually fairly inexpensive. If you're in the US, try Newegg or Crucial. Outside of the US, I'm not sure. Crucial.com has a handy system finder that will tell you exactly what type of memory will work with your computer.

Last edited by JerryKnight (14-02-2012 23:53)

Re: Crackles After Recording

I don't think memory is the issue. Although 3GB is on the low side nowadays.
Even without a professional interface latency should not be a problem.

I suspect this has something to do with your drivers. Did you select the ASIO driver in Pianoteq? If so, then maybe you should check out if there any updated drivers available.
If that doesn't fix your problems you could also try the ASIO4ALL drivers.

If CPU is high you can also expect crackles. So make sure you close all programs when using Pianoteq. Also make sure you don't have full system virus scan active.

Good luck!

Re: Crackles After Recording

quote: "It usually occurs only after I've opened a lot of programs simultaneously, or even after I've closed all those programs, freeing up the memory."
Then it could simply be a problem of some programs not freeing up the memory, and this is not unusual at all. What happens if you re-start your Mac?

Also check the drivers for your Edirol interface, of course.

Last edited by Luc Henrion (15-02-2012 14:20)

Re: Crackles After Recording

FJ wrote:

I don't think memory is the issue. Although 3GB is on the low side nowadays.
Even without a professional interface latency should not be a problem.

I suspect this has something to do with your drivers. Did you select the ASIO driver in Pianoteq? If so, then maybe you should check out if there any updated drivers available.
If that doesn't fix your problems you could also try the ASIO4ALL drivers.

If CPU is high you can also expect crackles. So make sure you close all programs when using Pianoteq. Also make sure you don't have full system virus scan active.

Good luck!

You didn't notice that he's on an iMac running OS X 10.6, so ASIO is out. Still, the drivers are important with Firewire audio on a Mac.

Yes, CPU overload can easily cause crackling, but given the evidence (3GB memory, lots of other programs open, problem goes away after closing other programs) the best bet has to be memory. Once you run out of physical memory, it starts to swap data to virtual memory on the hard drive. If Pianoteq gets hit by this, performance will suffer greatly.

It would take an inordinate amount of CPU usage by other programs to inhibit Pianoteq, unless your Pianoteq settings are too high. If you're trying to play while rendering HD videos or editing huge images in Photoshop, then you shouldn't be surprised by Pianoteq choking. Simply having programs open in the background shouldn't affect CPU usage unless those programs are actually doing something. (If it is a rogue program using too much CPU, the first suspect on my hit list is the flash browser plugin.)

Of course, we can't say for sure, but my theories in order of likelihood are:

  • General memory shortage

  • Memory hog (program not freeing memory)

  • CPU hog (program taking over the CPU when it shouldn't)

  • Audio interface driver issue

  • Physical hardware problem (unlikely, but always possible)

Apart from running Pianoteq with fewer other programs running, try dropping some performance settings in Pianoteq. Increase the buffer size, decrease the polyphony, toggle the CPU overload protection and multi-core rendering settings.

Re: Crackles After Recording

almost what I wrote, but extended version ! :-)

Re: Crackles After Recording

Unfortunately, I don't think my problem is primarily because of lack of memory, CPU-overuse from other programs (it's usually at about 15% with browser and several other things open), or outdated drivers for the Edirol FA-66 (there are only drivers for Windows on their website; it's supposed to work with Mac and has been).

Perhaps this occurrence might shed some light on the issue: I started playing for the first time this morning, with plenty of system resources available, and there was no discernable latency but there were some crackles, then I played a lot of notes with sustain and there was silence for a moment (CPU overload detection kicking in?), then the latency had gone way up to about 500ms for every keystroke and stayed that way until I restarted the program.

In addition to restarting the program, it appears that I can also fix the problem by making a change to the *internal sample rate* (and then putting it back to what it was on).

Here's my Pianoteq settings:

DEVICES:
Sample rate: 48000 Hz
Audio buffer size: 256 samples (5.3ms)

PERF:
CPU identification: Core 2 Duo 2.4 GHz
Performance Index: 39
Multicore rendering: (checked)
CPU Overload detection: (checked)
Internal sample rate: 48000
Host sample rate: 48000
Buffer size: 256 samples
Maximum polyphony: 256 (I've usually been using Auto, pessimistic)

ABOUT:
Name: Pianoteq, Standalone, 64-bit
Version: 3.6.6

Thanks for the help!

Re: Crackles After Recording

what if you increase the buffer size, say to 512 ?

Re: Crackles After Recording

Okay, that does sound strange. The only real suggestion I have left is try updating to Pianoteq 3.6.8.

The sample rate is a little higher than the standard 44100 I use, but I'm not an audio engineer, so I don't know how that could affect anything.

Maybe try turning off the multicore rendering for a while to see if that changes anything. I've had problems in the past with it causing problems.

Re: Crackles After Recording

quote: "Okay, that does sound strange." Increasing the buffer size? That's a quite common cure to this type of problem... Any update is also always welcome !

Re: Crackles After Recording

I have no options to change the sample rate.

Increasing the buffer size to 512 samples (10.7ms) has no effect (but I'd rather restart the program all the time than live with that amount of latency).

I'm now running the up-to-date version, 3.6.8, and it has the same problem.

Turning off multicore rendering seems to decrease performance, otherwise it has no effect.

When it's having the problem, changing the audio buffer size (even back to the setting it was just on) fixes the latency issue, but not the crackling.

Whatever the problem is, it's something that restarting the program fixes. I can reliably cause the problem by opening iTunes, Google Earth, Safari and Firefox, and then closing all three. Pianoteq barely functions at all when the programs are opening, then has horrible latency while they're open, and still has horrible latency after all three programs are closed. If I restart Pianoteq it works fine, and even if I restart it while everything is still open it cures the latency problem, but not the crackling.

Does anyone else ever need to restart Pianoteq?

Last edited by Halleys5th (17-02-2012 00:04)

Re: Crackles After Recording

It seems a ram or driver related problem.
I tested PTQ on a lot of macs with less power and ram than yours and I can assure you that it worked very well even with maximum polyphony. 44.1 vs 48 doesn't change much both in sound or resources so usually 44.1 is ok unless you are working for video or DVD where you should use 48 or 96 to avoid sample rate conversion later..

Try these things:

-be sure you restart your system (not just put to sleep and wake it up; even if you close applications ram becomes more and more fragmented and new apps can't allocate all the free space)

-try PTQ with internal mac driver and not through your audio interface: it could be that your kernel runs 64bit but your interface driver is still 32bit

-trash PTQ preferences

-launch PTQ in 32bit mode

-reset pram and check your disk integrity and permissions

-let us know if anything change

Re: Crackles After Recording

Oh, thanks for the quick response etto, you posted before I finished editing my post (only small changes). Those look like promising suggestions - I'll give 'em a try.

Re: Crackles After Recording

(Luc, I was not responding to you. Sorry I didn't include a quote, but it didn't seem necessary at the time.)

"be sure you restart your system (not just put to sleep and wake it up; even if you close applications ram becomes more and more fragmented and new apps can't allocate all the free space)"

Not that it matters much to the discussion, but this is incorrect. RAM is allocated in pages, so there's no way to lose memory due to fragmentation. Also, access times are the same, regardless of how contiguous the pages are, so fragmentation is really not an issue. Still, rebooting will clear out any extra memory that hasn't been properly deallocated, so it's still good advice if the system has been running for a while.

Potential 64bit vs 32bit issues is a good point that I didn't think of. It will be interesting if that ends up being a contributing factor, since I'm sure many Mac users have very similar setups as Halleys5th.

Hope you can narrow down the problem. Let us know!

Re: Crackles After Recording

Apart from CPU and memory there are a number of other things on Mac that can influence performance...
Things like 'indexing' - when a lot of files need to be appended to Spotlights' index it invisibly takes away resources and thus can cause crackles and stuff like that.
The other cause can be Time Machine - Apple's backup system - if it's running by chance at the same moment as you are playing/recording it can can cause things like these as well..
Network activity can be a pain as well....

good luck

cheers
Hans

Re: Crackles After Recording

JerryKnight wrote:

RAM is allocated in pages, so there's no way to lose memory due to fragmentation. Also, access times are the same, regardless of how contiguous the pages are, so fragmentation is really not an issue. Still, rebooting will clear out any extra memory that hasn't been properly deallocated, so it's still good advice if the system has been running for a while.

Thank you for clarification Jerry

Re: Crackles After Recording

It looks like my Edirol FA-66 firewire audio interface is the culprit.

The Built-in Output appears to work flawlessly. In fact it's quite astonishing how much I can push my system, how much stuff I can have going at once, without causing any extra latency (although I can make it crackle just a little bit as CPU usage goes above about 80%).

I ran Pianoteq in 32-bit mode (checking the box in the Info window for the application in the Finder) and that had no effect.

There don't appear to be any Mac drivers for the Edirol FA-66, just for various versions of Windows, etc.

I'm still trying different things, and will post the results.

Re: Crackles After Recording

I'm happy you nailed the problem
Now, if your interface works without any driver it means that uses OSX core driver and if it is quite old is possible that is no more compatible with earlier OSX releases; if this is the case only a firmware upgrade from edirol could fix the problem.
You can still check three things in my opinion:

check the sample rates (internal core and interface one must match)
check wether your kernel runs in 64 or 32 bit
check your firewire cable

to perform the second check do the following (considering I'm translating menu from italian a little interpretation is necessary here ): open 'about this mac' from apple menu and 'more info'; you should be in system profiler now. Click on the third main menu 'Software' and check wether the line 'extensions and kernel 64 bit' says yes or not.
In the rare case of 'yes' restart your mac and keep 3 and 2 keys pressed during reboot; this will force your kernel to 32 bit (check if it worked in system profiler). Now test your interface.

Other than that I think your only possibility is to change the interface or ask to edirol that basically means change your interface..

Last edited by etto (19-02-2012 23:38)

Re: Crackles After Recording

All fixed!

Now I've got a new PreSonus FireStudio Mobile firewire audio interface and have upgraded to 4gb of ram. Pianoteq works fine now without crackles or latency (I did manage to coax temporary crackles out of it before upgrading the ram).

Before the upgrades I tried resetting pram, which didn't work.

My kernel is 32-bit.

My iMac is a mid 2007 model, Model Identifier: iMac7,1

It's a good thing you can't buy an Edirol FA-66 anymore; I can't recommend them

Thanks for all the good ideas, guys!

Re: Crackles After Recording

Perfect! Thanx for letting us know