Hi guys,
I've discovered that I can only get 47 sine waves on my system (1 ghz
G4 powerbook, 512 megs ram, OSX 10.3.9). I'm curious how other systems
compare -- particularly on linux. If chuck works much better on linux,
I may switch back to it...
Here's the code. I ran it twice (in case there was any caching issue)
and listened to the sound. With 48 waves, I could hear crackling; with
50 waves, it was unrecognizable.
Cheers,
- Graham
48=>int NUMSINS;
sinosc s[NUMSINS];
for (0=>int i; i
Hi Graham!
I've discovered that I can only get 47 sine waves on my system (1 ghz G4 powerbook, 512 megs ram, OSX 10.3.9). I'm curious how other systems compare - particularly on linux. If chuck works much better on linux, I may switch back to it...
We should apologize here for the abysmal performance of chuck. There are many places in the implementation that could be and need to optimized, several of which are in the synthesis engine (i.e. we need to look into the adaptive block processing that was brought up a few times). So far, we are still in the "make it work / make it right" stages, and not quite to the "make it fast" phase yet. Hopefully we will get there soon. Very sorry for this! Best, Ge!
Hi Graham!
I've discovered that I can only get 47 sine waves on my system (1 ghz G4 powerbook, 512 megs ram, OSX 10.3.9). I'm curious how other systems compare -- particularly on linux. If chuck works much better on linux, I may switch back to it...
Quick followup: On my system (1 ghz G4 powerbook, 512 megs ram, 10.3.9), I got up to 62 sine waves without crackles. You might want to make sure that "processor performance" is "highest" under System Preferences -> Energy Saver | Options. On our linux box (2.8 ghz Intel, mucho RAM, RH9), I got up to 130 without crackles. (apologies again for the awful performance) Best, Ge!
On 18-Feb-06, at 9:35 PM, Ge Wang wrote:
I've discovered that I can only get 47 sine waves on my system (1 ghz G4 powerbook, 512 megs ram, OSX 10.3.9). I'm curious how other systems compare -- particularly on linux. If chuck works much better on linux, I may switch back to it...
Quick followup:
On my system (1 ghz G4 powerbook, 512 megs ram, 10.3.9), I got up to 62 sine waves without crackles. You might want to make sure that "processor performance" is "highest" under System Preferences -> Energy Saver | Options.
Wow, you're right! Mine was set to "automatic". I now get the same results as you do. I am utterly shocked that OSX's power saving options are that inefficient. Surely if the OS detects that there's high CPU use, it should kick in to "highest" and leave it there for a while, right? 62 -> 48 is a pretty significant gap in performance.
(apologies again for the awful performance)
No need; sorry if my initial email seemed a bit harsh. I'm very adverse to criticizing open-source projects -- I mean, I haven't paid anything for it, it's a free -- and even better than that, it's Free (speech). It's true that I'm a little disappointed, but that's just because I'm so excited to have an audio programming language. I mean, a _real_, text-based, language. I hate having to use a mouse, so pd or Max/MSP is a non-starter for me. If ChucK wasn't so awesome, I wouldn't be raising this question. :) Cheers, - Graham
Graham Percival;
I am utterly shocked that OSX's power saving options are that inefficient. Surely if the OS detects that there's high CPU use, it should kick in to "highest" and leave it there for a while, right? 62 -> 48 is a pretty significant gap in performance.
Windows does that as well. It's realy anoying. You'd think it could make the call depending on wether net power was present but somehow it doesn't. So; you set it to full performance and your laptop becomes nearly worthless for typing on the train. Oh, well, there's always pen and paper... Ge;
(apologies again for the awful performance)
Graham;
No need; sorry if my initial email seemed a bit harsh. I'm very adverse to criticizing open-source projects -- (snip)
To me at the moment the most interesting thing about ChucK isn't it's performance or even the sound that comes out. To me the bigest selling point is that ChucK's unusual logic forces you to think differently about the link between time and music. In that field it added a lot to my little studio even if I think I have yet to record a single audio file from it... Yours, Kas.
Graham Percival wrote:
I've discovered that I can only get 47 sine waves on my system (1 ghz G4 powerbook, 512 megs ram, OSX 10.3.9). I'm curious how other systems compare -- particularly on linux. If chuck works much better on linux, I may switch back to it...
I have a 2.4Ghz PIV laptop, 512MB ram that runs debian/unstable. Using your test I can get 136 sine waves with no breakup in sound. Did a quick-n-dirty comparison with csound, in which I could get 660 sine waves (actually I had expected more...). -- peace, love & harmony Atte http://www.atte.dk
Time for me to chime in here. No apologies offered for ChucK performance. I have steadfastly insisted that we not take away any development time to optimise. Three reasons for that: 1) Ge's PhD thesis is ChucK, and a PhD should espouse a new, useful, and hopefully brilliant philosophy. ChucK is certainly that, I think you'll agree. 2) Moore's law promised that we'd get a doubling every 12-18 months. Turns out this isn't true any more for the last couple of years, but might kick in sporadically and give us enough doublings to get us to 512 sine waves at a forseeable point in the future. Boulez told Wessel that if he could get 512 real-time sine waves, that's all he'd need. 3) As long as ChucK writes soundfiles without clicks, we can revisit that most magical time in computer music history when everyone used an algorithmic, text-based language, and listened to the result after it was rendered. Real-time is awesome, but expressive code is universally powerful, and the latter will become the former if we just wait a spell. PRC PS: Wonder how many sines Max/MSP will spin?
Perry R Cook wrote:
Time for me to chime in here. No apologies offered for ChucK performance.
None needed. Maybe I wasn't clear enough: I'm not complaining about chuck's performance! -- peace, love & harmony Atte http://www.atte.dk
Le 19 févr. 06 à 16:29, Perry R Cook a écrit :
PS: Wonder how many sines Max/MSP will spin? _______________________________________________
Le 19 févr. 06 à 12:33, Atte André Jensen a écrit :
Did a quick-n-dirty comparison with csound, in which I could get 660 sine waves (actually I had expected more...).
Hi, Just for the record, I reached 430 sines on a recent build of SuperCollider 3 before CPU usage maxed out on a Powerbook G4 800/1GB. I should have stopped earlier, as my system slowed down to a crawl and I couldn't fore quit the app without a full reboot. Anyway, I read that SuperCollider's creator really is an optimization freak :) Axel
Axel Balley wrote:
Just for the record, I reached 430 sines on a recent build of SuperCollider 3 before CPU usage maxed out on a Powerbook G4 800/1GB.
I know I stated this, and I probably shouldn't have :-) Graham had a piece of code that he asked other chuckers to try out on different systems. This is sane and already helped him adjust his os for better performance. If the question was "how many sines can you squeeze out of chuck" it already starts go make less sense. It would largely depend on how clever the programmer is and how well he knows the inner workings of chuck. When we start doing it in other synths it really doesn't make sense to compare. My test for instance was in no way optimized, and I don't know csound internals well enough to say what's the most effecient way, so I'd have to experiment, which I didn't have time to. Besides, sines are close to the most musically un-interresting test in the first place. At least I never composed anything that only involved sines. -- peace, love & harmony Atte http://www.atte.dk
Perry R Cook
PS: Wonder how many sines Max/MSP will spin?
Haha! me too :) just for the record, on my AMD AthlonXP 1.2G I get 100 sines with chuck. Debian testing, 2.6.15 kernel. I get about 505 sines with PD, however, (taking into consideration the very inefficient gui-server communication in pd) it starts crackling at around 250 sines when mousing around the tk window. At 505 sinewaves and minimized windows the sound still crystal clear but the CPU was going at 99.8%. ./MiS
On 19-Feb-06, at 7:29 AM, Perry R Cook wrote:
3) As long as ChucK writes soundfiles without clicks, we can revisit that most magical time in computer music history when everyone used an algorithmic, text-based language, and listened to the result after it was rendered. Real-time is awesome, but expressive code is universally powerful, and the latter will become the former if we just wait a spell.
That's certainly true for certain types of projects, but it means that chuck is locked out of the interactive music area. This whole benchmarking idea was sparked when I was trying to get three shepherd tones whose speed changed in realtime (a human with a KiOm, if you're interested). I was using 7 sine waves per tone, so a total of 21 sine waves. Add in a bit of math (to determine frequencies, set gains, and handle midi input), and my poor 1Ghz CPU was overloaded. In the end I had to make do with only two tones. That's not a terrible thing in and of itself -- this was just a weekly assignment -- but I was disappointed that a modern laptop couldn't handle 21 (interesting) sine waves. I even considered doing all the sound processing in pd -- have chuck send OSC messages to pd to control sine wave generators in pd. For this project it wasn't necessary, but I might revisit this idea.
PS: Wonder how many sines Max/MSP will spin?
I just did some tests on a lab computer. CPU usage was set to "automatic"; I couldn't change that to automatic due to lack of administrator access. G5, 2 ghz, 10.4.something chuck 150 Max/MSP approx 580 Cheers, - Graham
participants (8)
-
Atte André Jensen
-
Axel Balley
-
Ge Wang
-
Graham Percival
-
Kassen Oud
-
Michal Seta
-
Perry R Cook
-
Philip Davidson