Page 1 of 1

Unison, cpu high, detune defect

Posted: 19 Jan 2009 18:19
by MadGonzo
Unison, sometimes even when at detune=0, voices 4, the dll will be using 80% cpu (and that crappy FL8 showing 100%)

Re: Unison, cpu high, detune defect

Posted: 19 Jan 2009 18:54
by karmafx
Yeah, I'm working on improving performance, especially with unison...
stay tuned! 8)

Re: Unison, cpu high, detune defect

Posted: 19 Jan 2009 20:05
by MadGonzo
well i think its a bug, because it gradually spends more time calculating :P
not a leak though, resource usage is fine

Re: Unison, cpu high, detune defect

Posted: 19 Jan 2009 22:45
by karmafx
:shock: ok...looking into that...

Re: Unison, cpu high, detune defect

Posted: 19 Jan 2009 23:06
by MadGonzo
actually, i had polyphony set to 4 :) my fault, probably no bug!

edit: is there a way to force it to use more memory instead of cpu?
i have 6GB ram id like to spend from
at least as a global setting :P

Re: Unison, cpu high, detune defect

Posted: 20 Jan 2009 14:25
by karmafx
no, there is no precalc or memory utilization setting.
But, I'm currently investigating the unison behaviour (using your dissent patch as an example), and it is getting interesting..

Out of the box, one instance uses 58% CPU, which isn't really justifiable, so I took it apart:

The arrangment is as follows: one unison voices drives three modules: Lfo->Osc2->Eq8 in stereo, (btw: the stereo is then dropped in the routing to the filter, not sure if this is intentional?).. and runs in 4 x unison and 4 x poly, giving 16 instances of both lfo, osc2 and eq8.

Although this arrangement is not optimal, the interesting thing I found is that if you disable the lfo, the speed improves only a little bit, but if you disconnect the lfo (which soundwise is the same), the Cpu load is cut in half! I would say that this is a bug, but more importantly it gives me reason to believe that there are cycles to be gained here...

Re: Unison, cpu high, detune defect

Posted: 20 Jan 2009 18:11
by MadGonzo
you should check similar situations:
distortion
phaser (although, probably minor performance boost at best)

i also have some concerns regarding reverb, and the difference from your reverb stand-alone VST

and i still miss a good functional chorus :P
with good chorus i couldmake another superb instrument easily
from a square + adsr filter + hit-decaying chorus (1, .5, .45, .3, .3, .2, .1, )

i also wish you could add some varities to the Osc2, such as vintage saw (aka sinesaw), and other basic waveforms, because i suspect v-station was a hardware vst before, and even the digital version uses sines along with its basic waveforms
and i really need osc2 to perform certain wave transmogrifications (insert real word)

i also REALLY miss certain operators such as a module to invert a number
or a module to multiply a range (-1 to 1) -> (-1 to 0.5)
i know thats stretching it, but i have to add an envelope with value -1 for that simple stuff :P

Re: Unison, cpu high, detune defect

Posted: 20 Jan 2009 18:55
by karmafx
I've made some changes just now and got it from 58% CPU to 49% + disabling lfo takes it to 28%. Still too much, but it's a start.
I guess I'll take a look at the modulation code now.

Re: Unison, cpu high, detune defect

Posted: 20 Jan 2009 19:15
by karmafx
Regarding the reverb, the Synth uses the same code as the vst Reverb.
The only differences I can think of is that the vst reverb has stereo and dual modes (synth is mono only), it has more presets, and "diffusion" is named "size" in the synth). Everything else should work the same.

Re: Unison, cpu high, detune defect

Posted: 22 Jan 2009 12:31
by karmafx
still crunching....got it from 49% to 38% now... :P

Re: Unison, cpu high, detune defect

Posted: 22 Jan 2009 16:20
by karmafx
32%

Re: Unison, cpu high, detune defect

Posted: 22 Jan 2009 17:19
by MadGonzo
original version with chorused thingie
http://commandante.fwsnet.net/sosei21.ogg
made this quite a while ago, i think :P

btw really glad you are making progress :P now if only FL8 would have barely "ok" multithreading... it fails miserably at dividing workload

Re: Unison, cpu high, detune defect

Posted: 22 Jan 2009 23:29
by MadGonzo
tried to recreate the old sound, or rather, how it should be
http://commandante.fwsnet.net/salig_3.mp3 (z3ta+ version)
not entirely "good" yet, especially the hf range (eq'd down because it sounded bad)

Image
made from a vintage square

edit: recreated it in poizone this time (fl plugin)
much more like the original version, and uses SIMPLE chorus (+ original arping)
the thing i noticed is it used a voices=2 and detune=20% + unison panning
so its the unison that made the difference, i just hope kfx can make this work
http://commandante.fwsnet.net/salig_3pz.mp3 (poizone version)

Re: Unison, cpu high, detune defect

Posted: 23 Jan 2009 00:24
by karmafx
29% and counting... :P

turns out unison speed could be improved a bit. also found and fixed a unison modulation bug. :roll:

thanks for that chorus info... :mrgreen:

Re: Unison, cpu high, detune defect

Posted: 23 Jan 2009 00:27
by MadGonzo
i posted an update with some critical info :P
turns out unison is definitely part of this sound, especially concerning unison pan, some kind of moving pan apparently
i really dont know if there are different unison pan algos out there
29% !! thats pretty good imo, or you just slacked before :P

although the difference is pretty obvious, the gist is there, all i need is time to make the notation the exact same and tweak the timing of the chorus i guess (arping was slapped on to make it fast just like the original)

Re: Unison, cpu high, detune defect

Posted: 23 Jan 2009 00:35
by karmafx
MadGonzo wrote:29% !! thats pretty good imo, or you just slacked before :P
yeah...the case code path where freq is e.g. lfo modulated wasn't optimized so well. :lol: :oops: I'm just taking one bottleneck at a time (using your patch as an example), crunching cycles whereever possible...without hurting sound quality of course.

Re: Unison, cpu high, detune defect

Posted: 23 Jan 2009 00:47
by karmafx
MadGonzo wrote: edit: recreated it in poizone this time (fl plugin)
much more like the original version, and uses SIMPLE chorus (+ original arping)
the thing i noticed is it used a voices=2 and detune=20% + unison panning
so its the unison that made the difference, i just hope kfx can make this work
http://commandante.fwsnet.net/salig_3pz.mp3 (poizone version)
if possible please pm me the patch or project, or whatever is needed to create the sound.

Re: Unison, cpu high, detune defect

Posted: 24 Jan 2009 02:03
by karmafx
27% now...having trouble getting it lower...:roll: but havn't given up yet :P

Re: Unison, cpu high, detune defect

Posted: 25 Jan 2009 22:26
by MadGonzo
ideally your VST should have all the necessary tools to create any sound etc.
i gave it a shot, and this is my attempt (took 3 hours)
http://commandante.fwsnet.net/sintehest.mp3
admittedly it could have been louder, clearer etc. but i guess either i dont know how, or it cant be done with karmafx alone :P
btw this is what you know as "number 5" modified :P

Re: Unison, cpu high, detune defect

Posted: 27 Jan 2009 00:36
by karmafx
MadGonzo wrote:i also have some concerns regarding reverb, and the difference from your reverb stand-alone VST
hmmm....I see what you mean :P . I must agree that the KarmaFX Reverb sounds warmer to me compared to that in the synth. I'll take a look at the code.... They should sound identical. :roll:

Re: Unison, cpu high, detune defect

Posted: 28 Jan 2009 16:37
by MadGonzo
karmafx wrote:
MadGonzo wrote:i also have some concerns regarding reverb, and the difference from your reverb stand-alone VST
hmmm....I see what you mean :P . I must agree that the KarmaFX Reverb sounds warmer to me compared to that in the synth. I'll take a look at the code.... They should sound identical. :roll:
it also feels like reverb is offset towards right, meaning i have to put on -10 pan to every patch :P
not sure though

Re: Unison, cpu high, detune defect

Posted: 29 Jan 2009 01:17
by audiojunkie
karmafx wrote:27% now...having trouble getting it lower...:roll: but havn't given up yet :P
I continue to be impressed at your dedication to all of us and your wonderful KarmaFX synth! You are awesome! Thank you so much for all that you do!

--Sean

Re: Unison, cpu high, detune defect

Posted: 02 Feb 2009 02:50
by karmafx
Thanks Sean!! My pleasure! :mrgreen:

Re: Unison, cpu high, detune defect

Posted: 02 Feb 2009 02:57
by karmafx
Found a fixed the bug in the reverb. :oops: Thanks for getting me on track, MadG. 8)
Turn out the damping was computed wrong. I believe this fixed the panning problem too...but later I can compile a prerelease version you can test if you want... :?:

Will be in v1.05:
Bugfix: Damping was computed wrong in reverb module causing unwanted ringing. Fixed. (Thanks MadGonzo!)

Re: Unison, cpu high, detune defect

Posted: 02 Feb 2009 17:36
by MadGonzo
http://commandante.fwsnet.net/thefall-realverb.mp3
no wonder my instruments "sucked" so much, i always thought i did something wrong
this is with kfxsynth + your reverb VST, on angrymode

give me your test version :P
i really need to hear the changes, because -12 to panning = annoying

btw does the internal reverb have stereo? i need that, or i might as well use the vst version :P
sorry to say but the difference is nothing short of immense

Re: Unison, cpu high, detune defect

Posted: 02 Feb 2009 20:53
by karmafx
sure!!...I'll try to wrap up what I'm doing to get a RC version 1.05 ready.

Re: Unison, cpu high, detune defect

Posted: 02 Feb 2009 21:01
by MadGonzo
karmafx wrote:sure!!...I'll try to wrap up what I'm doing to get a RC version 1.05 ready.
ok, be sure to hear the new "bank" demo
i made another instru, without internal reverb using vst instead
unique instru if i may say so

Re: Unison, cpu high, detune defect

Posted: 03 Feb 2009 01:44
by karmafx
sounds really good! Looking forward to hearing it in v1.05 :lol:
btw: the tune sounds *really* good too...is it your own?

Re: Unison, cpu high, detune defect

Posted: 03 Feb 2009 07:39
by MadGonzo
karmafx wrote:sounds really good! Looking forward to hearing it in v1.05 :lol:
btw: the tune sounds *really* good too...is it your own?
nope just another midi
btw im talking about "consonance.mp3" not that other thing in this thread :P

Re: Unison, cpu high, detune defect

Posted: 04 Feb 2009 23:10
by karmafx
v1.05 prerelease sent :mrgreen: :wink:

btw: Got it from 27% to 26% now...still havn't given up, although we're taking small steps now :roll:

Re: Unison, cpu high, detune defect

Posted: 10 Feb 2009 17:22
by MadGonzo
might be some extra cycles in the new consonance bank
made some glide supersaws for the bank
#2 especially, which is the good one
voices + ringmod = extreme cpu

you can test the instrument with dj kim - jetlag from the midi page

Re: Unison, cpu high, detune defect

Posted: 10 Feb 2009 20:56
by karmafx
yes, osc2 ringmod is expensive since it implies oversampling.

Re: Unison, cpu high, detune defect

Posted: 12 Feb 2009 19:44
by dj.tuBIG/MaliceX
Whoa, will be looking forward to this! :D