Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mainstage CPU spikes

I have MainStage 2 and Lion running on my MacBook Pro . . . plenty of memory. It's a newer MBP. Anyway, I still get the red CPU spikes after I installed Pianoteq recently. I noticed in Activity monitor I max out at 50-60% CPU usage. However, in MainStage I'm way in the red.


Is this normal?

Posted on Aug 31, 2011 1:05 PM

Reply
111 replies

Feb 20, 2012 1:49 PM in response to dingdangdawg

I just got Mainstage running okay again. It's related to a few things for sure, and others perhaps.


First of all, I removed everything from the home screen except for the main drive. That might have helped. One of the guys here said it would.


The two things I know helped are this:


When the guys at the Apple store replace your logic board they reuse the thermal paste. This is a huge no-no. Mine was old and dried up in some places. I opened my MBPro 3.1 and cleaned and replaced the thermal paste with new white thermal compound, and the cooling became much more effective. I also used the smcFanControl to boost the fan speed to 5000 rpms. This pre-emptively keeps the machine below 212º. At least with the core duo CPU, the processor slows down to prevent overheating, and then gets in a loop of using over 100% to keep up with the demands of Mainstage, and overheating from that which slows it down even further.


The other thing I discovered and fixed was a patch that was running over 0.0dB. Even if that patch isn't in use, it manages to use extra machine cycles for something, I don't know what. When you get all your patches not to overrun 0.0dB under any circumstances, Mainstage runs much easier. The signal to noise ratio of Mainstage is so good that there's no need to run the output up against the edge to make it sound good.


The audio dropouts are caused by lack of processing power, caused by overload of CPU or CPU slowdown from overheat. That's fixed, too.


My big question is now: Is it possible to set the fans to respond to heat with higher rpms? There should be no need to force the fans to a minimum speed of 5000 rpms to prevent overheating. They should be glad to go there automatically as necessary.


Either way, I've got Mainstage back up and running without wierd CPU spikes. With a patch consisting of 8 instruments and a live voice channel, I'm idling at 36% and running at up to about 89%. I can close my eyes and just play again!


P.S. I was getting cyclic spiking in Logic, too. That was fixed by shutting off the input to a vocal channel when it's not in use. My code writing engineer people tell me that extremely low random signal levels can cause 32 bit floating point audio code to drift off of zero and use tons of machine cycles. To fix that, I just delete the audio input when it's not in use.

Feb 20, 2012 4:36 PM in response to lohogan

Well, its refreshing to hear about some things that work. Those are interesting tips, especially the one about running over 0.0dB. Of course, that makes no sense in terms of how audio is processed in software but, hey, whatever works! And also of course, it seems silly to me that a MainStage user should have to be concerned about their thermal paste, underwear, exceeding 0.0dB, or fan speed.


I have a new Mac Mini Server on order which will be replacing my live performance MacBook. If figure if a quad core i7 doesn't give MainStage all the horsepower it needs to get through a performance without choking, then forget it. I'll let you know what happens.

Feb 20, 2012 4:57 PM in response to dingdangdawg

The 0.0dB thing is really huge. You can hook the mini server to the laptop with firewire, and divide the needs between the two for huge processing power. Also, your license allows you to run the software on both machines, a desktop and a laptop at the same time. OTOH, at $30, Mainstage isn't a serious expense for the second machine. With that hookup, you can use the laptop as a screen and keyboard for both machines. Like I said, a mondo setup.

I have my 15" MBPro stuck to the top of my keyboard with one of those thermoplastic pads with two dots of velcro to keep it from tipping back. That way, it's there all the time for me to use it. To the right of it is the Arturia 49, and it all sits on top of a VAX77. Very effective for live performance. I use the knobs and stuff on top of the Arturia for all the controls I need.

Feb 21, 2012 6:12 PM in response to lohogan

lohogan wrote:

When you get all your patches not to overrun 0.0dB under any circumstances, Mainstage runs much easier.

.....

My code writing engineer people tell me that extremely low random signal levels can cause 32 bit floating point audio code to drift off of zero and use tons of machine cycles




There's no magic here --- we're just talking about multiplication of numbers here --- if you run out of bits you'll get nasty clipping distortion. On my old Mac (from around 2006) running 10.7.3, I just loaded a Digital Performer session with 12 audio tracks and a ton of real time procesing. Shoved all the faders all the way up (6db I believe) --- sounds horrible but it didn't change cpu utilization other than momentarily a little bit, most likely related to reallocating the processor to handle the GUI events (and there's more flashing LEDs at higher volumes!)


How do floating point numbers use tons of machine cycles if they drift off to 0? Even if handling division by zero was expensive, no decent DSP developer is going to allow that to happen. Won't you get these low random signal levels when you fade out channel strips? Is the CPU going to blow up when a song fades out? What happens if you play a note and then release it? Won't the signal drift down to zero?


I'm no DSP expert, but if these were fundamental issues, they'd be happening to everyone and they'd be happening on every DAW out there. But people are routinely processing large numbers of tracks in real-time with DP, Protools, Cubase, etc, and at all sorts of gains....


No pun intended but this just doesn't sound right --- I'd like to see some non-anecdotal evidence to support these claims. Any peer reviewed papers anywhere describing how such behavior works?

Feb 21, 2012 8:50 PM in response to dhjdhj

Hi dhjdhj,

You don't have to believe what I say. My beliefs don't require that you do.


I shut off a mic pre input with no mic on it, and Logic 9 stabilized.


I made sure that none of my levels on any of the patches would generate signals anywhere in the system that exceeded 0.0dB. Mainstage CPU spikes went way down.


Probably just coincidence. =H^)


BTW, people have been saying for a long time now that Mainstage doesn't play nice with wifi. I agree.

Feb 22, 2012 7:54 AM in response to dhjdhj

I was actually talking to one of the coders for Mainstage when I got the info about 32 bit floating point. When they encounter instabilities caused by this sort of thing, they take evasive maneuvers. I guess we just have a spot where they didn't. Apparently, there's some kind of a feedback loop written in the code to stabilize small signals. I didn't get into how it happens, but I just kind of took his word for it. When you have an app the size of Mainstage, bugs can happen down inside. He said they were working on it.


I found out about the faders thing when I discovered that somehow, I'd allowed the levels to get too high on my ongoing Mainstage project, and I was getting distortion on the live recordings. The CPU levels were also quite high. When I lowered the levels throughout Mainstage, the CPU usage dropped, too. (Besides, Mainstage has about 110dBs of headroom to the noise floor. You don't have to run up against 0.0dB to make it sound nice.) Duh, I dunno, but it worked. That one's anecdotal only, and there ain't nuttin' I can do about that. =H^) But hey, if it helps anyone else, Good!


And the wifi thing - that's been around since Mainstage 1, and although MS2 handles it better, I don't mess around. If I've had to use wifi, I shut down and restart. With MS1 at least, that actually made a difference.


I use copies of most of my instruments when I have multiple patches that use them, rather than individual instances. Saves memory. I tend to set up a ton of patches corresponding to the set list. Then I step through the patches during the set. (There's a chord chart pdf included as a background on one side of the display - iReal Book - awesome app. Choose an area and Option/Select to bring up the background picture dialogue.)


The guitar amps apparently use a lot of CPU, even when their patches aren't the ones you're using. I think it's the distortion/level thing again. I'm very careful with them.

On some of the guitar amps, adjusting the drive can make a loud noise if the guitar amp reverb is turned up. (Coders, please fix?)

FWIW, I've found that most of the time, when someone doesn't think the amps sound right, it can be fixed by adjusting the EQ. Guitar amps aren't usually as bright as the model coders think they are. =H^) My friend tells me that there's issues with how some virtual amps respond to a live guitar, but these amps are quite decent when compared with the real things.


Keep the computer cool. If the CPU heats up, it'll clock itself slower. Heap bad juju.


Your license includes use on a desktop and a laptop. I've been toying with running the live audio (I use up to 8 channels) through a Mac Mini, and everything else through the laptop, daisychained on firewire. The MMini is cheap and fast, and the laptop can be used as IO for the mini as well. If anyone has tried this, tell me how well it works.


All of these things taken together tend to control CPU spiking. Just the same dhjdhj, I wouldn't mind getting with the MaxMSP program, if you have some comments.

Feb 22, 2012 11:07 AM in response to lohogan

MaxMSP has been working wonderfully for me.... I spent a lot of time getting up to speed with it, building the first version of what I needed in late 2011. It worked flawlessly for me. Recently I have been doing a significant overhaul to enhance my basic design, even thinking about adding some photorealistic sliders/knobs just for the fun of it.

But I've gone way beyond MS capabilities with it at this point so I can't see my self going back to MS for anything serious, even if it was now completely flawless.

What do you need to know about Max?

Feb 23, 2012 7:01 AM in response to dhjdhj

What do I need to know about Max?


First of all, can it be had for less than $500?


Second, what capabilities have you exceeded?


Third, is there a decent tutorial on how to use Max?


Fourth, are there any components of MS that can't be used in Max? (Audio processors, etc.)


I need a flawless, powerful onstage processor, and I need to get down below 19.8 msec latency. I'd like to see about 7.5 msec or less, if this is possible. (I can feel 10 msec on a piano patch.)


Thanks!

Feb 23, 2012 8:31 AM in response to lohogan

Yep --- go to cycling74.com

First of all, can it be had for less than $500?


I don't understand this question

Second, what capabilities have you exceeded?


Tons of them --- plus a very active world wide community, not to mention numerous conferences and meetup groups. Several books available on how to program with Max these days. Again, go to cycling74.com

Third, is there a decent tutorial on how to use Max?


You can't use any MS stuff with it. Max has always supported VSTs and Max 6 also supports AUs. The proprietary components used by MS are not available. (Someone tell me why they use a proprietary system when they're the main pusher of the AU spec!) Note that you can create your own DSP processes in Max itself!

Fourth, are there any components of MS that can't be used in Max? (Audio processors, etc.)


With my MOTU 828 interface on my 3-year old Macbook Pro, I typically use 256 buffer size. At a sample rate of 44100, that is about 6ms latency

I need a flawless, powerful onstage processor, and I need to get down below 19.8 msec latency. I'd like to see about 7.5 msec or less, if this is possible. (I can feel 10 msec on a piano patch.)

Feb 23, 2012 8:37 AM in response to dhjdhj

The main latency that MainStage reports in the preferences is the roundtrip latency, which is going to be upward of 12 ms at a buffer size of 256. I would guess more like 17ms of total latency, if you include the hardware conversion and safety buffer latency (which MainStage adds in to the calculation). I did an oscilloscope test awhile back for input/output latency, and at least the Ultralite I have under reports its latency to the operating system.

Mar 1, 2012 10:25 PM in response to rc tech

I just upgraded to a Mac Mini Server with quad core i7 running Lion, and decided to give MainStage another chance (2.2.1). I must admit I am impressed enough with this new rig to put together a new setup and give another shot at live performance with it. MS is using all the cores in a decent balanced fashion according to Activity Monitor, and I am getting <10 ms roundtrip at about 25% cpu usage, which is my goal for software instruments and guitar. For vocal and sax, I go straight through my audio i/o for zero latency, and just use MainStage for delay or reverb fx.

Mainstage CPU spikes

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.