Unison, cpu high, detune defect

Bug Reporting
Post Reply
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Unison, cpu high, detune defect

Post by MadGonzo »

Unison, sometimes even when at detune=0, voices 4, the dll will be using 80% cpu (and that crappy FL8 showing 100%)
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post by karmafx »

Yeah, I'm working on improving performance, especially with unison...
stay tuned! 8)
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post by MadGonzo »

well i think its a bug, because it gradually spends more time calculating :P
not a leak though, resource usage is fine
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post by karmafx »

:shock: ok...looking into that...
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post 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
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post 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...
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post 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
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post 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.
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post 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.
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post by karmafx »

still crunching....got it from 49% to 38% now... :P
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post by karmafx »

32%
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post 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
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post 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)
Last edited by MadGonzo on 23 Jan 2009 00:26, edited 1 time in total.
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post 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:
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post 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)
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post 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.
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post 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.
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post by karmafx »

27% now...having trouble getting it lower...:roll: but havn't given up yet :P
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post 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
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post 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:
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post 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
audiojunkie
Posts: 49
Joined: 25 Nov 2006 07:43

Re: Unison, cpu high, detune defect

Post 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
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post by karmafx »

Thanks Sean!! My pleasure! :mrgreen:
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post 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!)
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post 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
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post by karmafx »

sure!!...I'll try to wrap up what I'm doing to get a RC version 1.05 ready.
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post 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
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post 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?
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post 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
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post 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:
MadGonzo
Posts: 296
Joined: 07 Jun 2008 23:14

Re: Unison, cpu high, detune defect

Post 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
karmafx
Site Admin
Posts: 1194
Joined: 07 Mar 2005 16:37

Re: Unison, cpu high, detune defect

Post by karmafx »

yes, osc2 ringmod is expensive since it implies oversampling.
dj.tuBIG/MaliceX
Posts: 61
Joined: 02 Oct 2007 08:18

Re: Unison, cpu high, detune defect

Post by dj.tuBIG/MaliceX »

Whoa, will be looking forward to this! :D
Post Reply