# Jsut some stuff on SIPS



## Leon Willett (Dec 13, 2008)

+1 thanks to Bob for this amazing script! 

KingIdiot, nice to see you after all these years  I remember you from the olden days of NS. 

Anyway, I have the same problem as you -- CPU spikes when kontakt is "calculating" a legato transition. I love SIPS so much that I simply work around this (I have 6 sample servers), and it may be inevitable -- I mean, SIPS is calculating a freakin legato transition out of thin air, and it may take some serious CPU muscle to do it. 

However, if it can be coded more efficiently and someone has the knowledge/willingness to do it, then it would be an improvement to SIPS (and that's saying something!). 

Also, can someone confirm that SIPS also spikes on a mac pro? At some point (64 bit technology permitting), I want to pile my whole template into a single mac pro, and I'm wondering if SIPS cpu spikes also happen on the mac pro. 

Cheers!


----------



## Big Bob (Dec 13, 2008)

Hi Guys,

Thanks for all your kind remarks about SIPS and I'm extremely gratified that you are finding it so useful. :D 

As to the CPU spiking problems you are encountering, I have never run into this but then I'm not much of a 'power user' :lol: I normally run standalone with only one or two instruments at a time, so my personal experiences would not be too applicable.

Some obvious questions would be are you running K2 or K3? I have recently noticed that K3 is not as fast when running compute-bound scripts (it's at least 20% slower than K2). Are you running standalone or as a plug? If you are running as a plugin, could you try to somehow do the equivalent with Kontakt running standalone and then see if the problem persists? Are you both running on a PC or a Mac?, Does this problem occur with all versions of SIPS or only with V2, etc etc :roll: 

Could either of you prepare some kind of instrument setup, using only instruments from the Kontakt library, and running standalone that could be coaxed into exhibiting this problem? If so, I could try to set it up here and if I can reproduce your problem maybe I can try to do something about it. However, I should warn you that tracking down this kind of problem can often be quite difficult and a lot of work so the more you can do on your end, the better. Without a reliable means of reproducing the problem here, the liklihood of nailing it is about nil.

To be continued ..... ?

God Bless,

Bob


----------



## Thonex (Dec 13, 2008)

Hi guys,

I'll chime in here too. 

I have my own custom library of a variety of different instruments, many of which have legato sample transitions. But to save RAM, I will use SIPS and I have found the exact same trade-off/problem as King Idiot. If I have 2 strings and 2 violas playing a unison line with SIPS, I start to get CPU spikes... especially when in unison. I think this is especially the case with formant correct pitch bending (where you actually x-fade over a scaler run).

I might try (on my own) to see if maybe flex envelopes (instead of Equal Power Fades -- using that awesome math library) would greatly reduce the CPU spikes... or even just a simple linear fade_in/out () instead of the equal power calculations.

I'm sure there would be a trade-off but maybe it would be a workable compromise for those who want to layer legato instruments on top of each other.

Just a thought.

Cheers,

T


----------



## Big Bob (Dec 13, 2008)

> I might try (on my own) to see if maybe flex envelopes (instead of Equal Power Fades -- using that awesome math library) would greatly reduce the CPU spikes... or even just a simple linear fade_in/out () instead of the equal power calculations.
> 
> I'm sure there would be a trade-off but maybe it would be a workable compromise for those who want to layer legato instruments on top of each other.



With such inventive stuff going on, I guess I'm off the hook then right? :lol: 

Do I gather from some of the comments about formant-corrected bending that we are having these problems with SIPS2? BTW Andrew it's not possible to do super bending with only the fade_in/fade_out functions unless you will settle for the Glide mode only. Bender mode requires that the crossfading stand-still on occasion. :roll: 

Also, I think Joris is working on some kind of SIPS 2 'front end' script to replace the SAS, maybe he's also ran into some of these problems with Kontakt just no being able to handle the load? Joris if you are reading this thread, why not chime in and tell everyone what you're up to :wink: 

God Bless,

Bob

BTW I'm almost done updating the V210 KSP Math Library Technical Guide.


----------



## Thonex (Dec 13, 2008)

Big Bob @ Sat Dec 13 said:


> With such inventive stuff going on, I guess I'm off the hook then right? :lol:
> 
> Do I gather from some of the comments about formant-corrected bending that we are having these problems with SIPS2?



I don't know about inventive :lol: ... but I'm willing to try alternatives. I don;t know if flex envelopes are less CPU intensive with their volume attenuation than (say) a fade_out () command, but it might be something wot looking into. And I know you did Uber efficient code for equal power calculations, but maybe a linear fade_in () or flex env would tax the CPU less?? Whow knows. Either way, there is no short cut to great expressive patches.

Just for fun Bob, how hard would it be to replace the Equal Power block of code with a simple fade_in/out() live?

Or would that be a really tough thing?

Thanks,

AK


----------



## Big Bob (Dec 13, 2008)

> Just for fun Bob, how hard would it be to replace the Equal Power block of code with a simple fade_in/out() live?



I'm not sure how the word 'live' fits in the above :? But if you are again referring to the simple time-controlled fade_in() fade_out() KSP functions, perhaps you didn't read all of my last response? Here the pertinent part again.



> BTW Andrew it's not possible to do super bending with only the fade_in/fade_out functions unless you will settle for the Glide mode only. Bender mode requires that the crossfading stand-still on occasion.



I suspect the same problem would exist with trying to use flex envelopes or any time-driven fade.

God Bless,

Bob


----------



## Thonex (Dec 13, 2008)

Big Bob @ Sat Dec 13 said:


> > Just for fun Bob, how hard would it be to replace the Equal Power block of code with a simple fade_in/out() live?
> 
> 
> 
> I'm not sure how the word 'live' fits in the above :? .



Ooops, I meant "line"... not live. :oops: 


With regard to the time control, yeah.. I sort of glossed over that the first time around. 

The reality of the situation is that I know you pretty much look at every angle before you release something, so I'm not certain changing anything you did would be any better. 

Anyway... let me mull it over for a while. :lol:


----------



## KingIdiot (Dec 13, 2008)

Thonex @ Sat Dec 13 said:


> BTW KI,
> 
> Just an interesting FYI (from one geek to another) I found out talking to NI, if you use Kontakt's x-fade looper (as opposed to destructive loops in an outside editor) the looping portion will cause the HD to be used 2 times more during the loop x-fade than with destructive x-fades. Now, factor that with a 4 layer patch and you can see another bottleneck. SO now I do all my x-fades destructively.
> 
> ...



I knew that from the get go T. I pretty much never use internal sampler Xfades, unless Its for long pads that i create with different loop points. Or for effect. Its just inefficient for sample playback.

Leon! Hey yah its been a while!

Bob,

I'll try some tests in stand alone, but if I remember correctly I did try some basic tests and noticed spikes there as well. Obviously performance is better, as you have more CPU overhead without the DAW running. If I had the hardware to run everything standalone I would  then again if Ihad the money, I'd be buying better F'ing computers.


----------



## KingIdiot (Dec 14, 2008)

Ok, so far. 

I tested standalone as the same PC that I run the DAW on, and it still spikes. I'm obviously able to get a littl ebit more out of it because the DAW isnt running, but there are definite "jumps" when SIPS has to calculate the transition.

This is a P4 2.6. So its an older system, and yah I need ot upgrade... someone get me an editing or composing gig already

I also tested the same multi on my laptop a Macbook Pro 2.16 core 2 duo

It still has CPU jumps, but I'm obviously able to get ALOT more out of this system. I dont know if that has to do with the fact that its a MAC or the CPU. I'm leaning way more in the CPU direction.

So basically, what I'm finding is that triggering about 8 notes in SIPS simultaneously is about my limit. Thats true unison, perfect and in sync, which never happens if you play live in.

thats 8 instruments at one layer, 4 at 2, etc...

thats my old machine tho

On a core 2 duo, it really looks like I'd be able to get ALOT more out of it

Also, this is an extreme stress tes, doing a fairly fast arpeggio which builds up fade out notes. I'm sure with more basic lines and slower movements I'd get better performance....

but the whole poitn of SIPS for me is to be inspired and not be limited 

I honestly think its jsut the way it is gonna b Bob. Which isnt a bad thing. SIPS is jsut powerful, and while it works on older machines, to be a "power user" with it, you're gonna need better systems

which is ok, since I'm not one thats going for the "all in one computer solution. I already use Kontakt way differently than most people. About 1/3 of my template doesnt run in DFD mode.

-A


----------



## joris1974 (Dec 14, 2008)

Hi all,

I have had similar issues with CPU spikes. With SIPS-enabled instruments, my computer chokes after a few bars, Kontakt being loaded as a VST from Sibelius. This is where it all started, as Big Bob mentioned, for me to think about an alternative. My idea is to eliminate the scripted (equal-power) x-fading altogether and use the Glide modulation, along with fade_in and fade_out to fake the legato. So as Thonex alluded to, the two-stage x-fading as implemented in SIPS would not be possible, but I may be able to reach a decent compromise for orchestral settings with a linear x-fade. The pair of scripts I am working on will handle polyphony detection (including a unison mode) on the front-end side, and a repetition/legato tool on the back-end, where legato will have a polyphonic mode (basically linear x-fading only) and a monophonic mode (x-fading + glide). First part is almost done, second part is in its infancy at this point. And for those who are curious, this is in part why Bob and I worked on a fast cube root function, as Glide mod intensity responds as a cubic power-law to the engine parameter. We will see where this is going... this is my first "big" script, though, so it may take a while :cry: !

Joris


----------



## Thonex (Dec 14, 2008)

Wow Joris!!! :D 

Thanks for doing all this!!!!




joris1974 @ Sun Dec 14 said:


> So as Thonex alluded to, the two-stage x-fading as implemented in SIPS would not be possible, but I may be able to reach a decent compromise for orchestral settings with a linear x-fade.



I'm not fully understanding everything you were talking about in your post, but I think linear x-fades fool the ear quite well especially if the program material on both sides of the x-fade are similar. I remember doing linear x-fade tests with identical sine waves and there was no variant in volume (in other words it was 100 Equal Power). Bob pointed out it was because the 2 sources were identical. I then tried it with other sources and saw he was right... however... in my "non scientific" findings, I found that 2 string samples only a step apart (but pitched to unison) x-fades *very* smoothly.. and while there was a slight "bump" on the VU meter, it was virtually audibly imperceptible.

This whole sampling thing is smoke-and-mirrors. So if there is a way to "fool" the ear and save substantial CPU, then I'm all for exploring that avenue.

Cheers

T


----------



## Big Bob (Dec 14, 2008)

Sounds like the script Joris is working on may be just what you guys are looking for. I can well believe that there are much better ways to do SIPS-like stuff that will be more appropriate for you 'power' users.

Keep in mind that my original objective in developing SIPS was to satisfy my needs and, my needs are probably not at all representative of what you guys are doing or wanting to to do. So, Joris, please keep everyone posted as to how you are progressing with your script. I think you already have an eager group just waiting and hoping that you will share your handiwork (which I'd like to encourage you to do).

Meanwhile, as soon as I finish up the Technical Guide for the V210 KSP Math Library, I'm going to go back to my VI clarinet and trombone so I can start recording some music again. I'm beginning to get the itch to do some more Dixieland stuff and as I have said before, I'm getting kind of tired of all these ones and zeros anyway :lol: 

God Bless,

Bob


----------



## joris1974 (Dec 14, 2008)

> Wow Joris!!!
> 
> Thanks for doing all this!!!!



You're welcome, although I'll be happier to say it when it's done!



> Keep in mind that my original objective in developing SIPS was to satisfy my needs and, my needs are probably not at all representative of what you guys are doing or wanting to to do. So, Joris, please keep everyone posted as to how you are progressing with your script. I think you already have an eager group just waiting and hoping that you will share your handiwork (which I'd like to encourage you to do).



Well, you said it yourself... The idea for a script does start from very personal needs, mine being to do decent demo tracks of my symphonic works. Don't get me wrong, SIPS is wonderful, and if I ever get even close, I might still use it for solo instruments (I still have a trombone concerto "in the shop", and with Gold XP, SLS and SVS, it's like having Lindberg or Alessi rehearsing in my basement!). Oh, and yes, I WILL share whatever I can come up with. The thing I might need some help with at some point, is to figure out how to force legato phrasing when notes don't overlap. I kind-of see how it's done in SLS with CC64, but I'm still pondering the polyphonic aspect of it. Anyway, here's a preview of the frontend script. It's barely commented right now, but if you guys have any advice on the UI or if anything else jumps out, feel free to get on my case. It hasn't had much testing yet, but being a bit of a novice here, I'd rather seek advice early on, before colossal mistakes turn into sneaky bugs... or conversely.

Big Bob, glad to see you're leaving cube roots for your... musical roots :wink:

Best,

Joris


----------



## Leon Willett (Dec 15, 2008)

Hi Joris! Forgive me if I missed something, but what is that attachment you just posted?  Is it an attempt at reducing the cpu spiking of sips? 

Cheers


----------



## joris1974 (Dec 15, 2008)

Sorry, I should have posted the attachment in a new thread. No, it won't reduce CPU spikes with SIPS. Let me clarify : this script started its life as a replacement for SAS to use with SIPS. It is no longer the case, as I have, like many of you in this thread, identified the reason why the load was so high. This script does not address the issue, nor will it try to do so, until its companion script - which will "try" to emulate SIPS using Kontakt's internal glide and x-fading controls only - is written! As you can see, I have some work to do. 

But if you want to play around with the UI and section control in "Maestro", I'd be happy to hear what you think. Sorry again if I gave you false hope :oops: 

Joris


----------



## Big Bob (Jan 5, 2009)

Hey Guys,

It first now dawned on me  that no one answered my question about whether this 'unison CPU spiking' problem is related to SIPS 2 portamento mode or V151 of SIPS or whatever? The reason I'm re-asking is that Andrew at least was asking about alternate crossfade methods that wouldn't be so CPU intensive as EPXF (with realtime calculation of sines, cosines and logs). 

If you guys are having the CPU spiking problem apart from SIPS 2 portamento mode, then there really is no EPXF stuff going on because the legato effect itself still uses simple (or at most 2-segment) linear crossfades using the KSP *fade_in(), fade_out() *functions.

If the problem is related to the new portamento mode (which *does* use EPXF), then I may have a way to reduce the realtime CPU drain. But, I don't think any of you ever answered my question regarding this so I thought I would ask again.

God Bless,

Bob


----------



## KingIdiot (Jan 5, 2009)

Hey Bob,

I had/have the prob in SIPS2 legato mode. The CPU load is a bit more with portamento mode, but I only use that sparingly.


----------



## Big Bob (Jan 5, 2009)

Hey KI,

Have you ever tried the same setup with V151 and does it also cause CPU spiking? If not, it may be some other SIPS 2 newbie like the ISCS. If so, inlining the subroutine calls might help (at the expense of bloating the code).

How about the rest of you that have experienced this problem? Which version of SIPS and which mode?

God Bless,

Bob


----------



## Leon Willett (Jan 6, 2009)

Hi Bob, I also get the CPU spikes in legato mode 

It's actually changed the way I work, and I have an entire server dedicated to just violins now, so that the spikes don't mean notes cut out. 

It doesn't bother me, as I love SIPS so much  Still, if the spikes get reduced somehow then that's great too. 

I haven't tried a different version of SIPS -- I'll get back to you and see if it happens with both v2 and v1.51.


----------

