# KSP 2.2 "what is fixed and how good is the new stuff" - thread



## Dynamitec (Nov 23, 2006)

Hi everybody!

*Bug: only 36 same UI elements can be declared*

* edit* * - NOT fixed - *

*Bug: editor slowdown*

* - NOT fixed - *

It's seems to be as slow as in k2.1.1.

*New Feature: _get_engine_par_disp + on ui_update*

Very useful here! You don't have to work with lookup tables in some cases, because you can display exactly the values that are shown in the kontakt gui. And you can setup a instrument with the kontakt gui and mirror all values directly into your script (with on ui_update). I use it a lot at moment! Nice feature!


----------



## Big Bob (Nov 23, 2006)

Hi Benjamin,



> Bug: only 36 UI elements can be declared
> 
> - fixed -
> 
> ...



Are these 39 of the SAME elements? I believe the problem was not that you couldn't declare more than 36 elements it was that you couldn't declare more than 36 of the same kind, like say declaring 37 buttons.

Please clarify, has this really been opened up?

Thanks for the report, I've been too buried in other things so I haven't had time yet to assess the 'improvements' *but I can confirm that the editor slowdown problem still seems to be with us*.

God Bless,

Bob


----------



## Thonex (Nov 23, 2006)

Dynamitec @ Thu Nov 23 said:


> *New Feature: _get_engine_par_disp + on ui_update*
> 
> Very useful here! You don't have to work with lookup tables in some cases, because you can display exactly the values that are shown in the kontakt gui. And you can setup a instrument with the kontakt gui and mirror all values directly into your script (with on ui_update). I use it a lot at moment! Nice feature!



Hi Dyn,

Thanks for posting this... I'm still in the middle of projects and I'm affraid to update because I heard that the Instument Options CC7 db has changed... so my mixes would sound different unless I updated every instrument's Instument Options CC7 default.

Anyway... the question I wanted to ask is... do you think the * _get_engine_par_disp + on ui_update* will help with getting Speed% Knob (in the time machine) values in reverse... in other words... if we calculate a ratio (%) would we then be ablle to extract the NI 1-1000000 equivalent?

Thanks for your help..

T


----------



## Nickie Fønshauge (Nov 23, 2006)

Big Bob @ 23rd November 2006 said:


> Are these 39 of the SAME elements? I believe the problem was not that you couldn't declare more than 36 elements it was that you couldn't declare more than 36 of the same kind, like say declaring 37 buttons.
> 
> Please clarify, has this really been opened up?


Nope, not fixed. By the 37th label there are "too many label controls!"


----------



## steff3 (Nov 24, 2006)

Well, I find it nice that Mr. Krieg now states that there will be no multi-scripts soon, perhaps not at all. This is really a major bummer for me. 
Ok, one can pretty much transfer the interface of a script to previous pane, but that is neither elegant nor really helpful.

I really do not like this - what should I care about things I said yesterday-mentality.

on Mac - it seems that the GUI got a little faster though ...

best


----------



## Nickie Fønshauge (Nov 24, 2006)

Wonderful! In 2.1.1 the last script loaded with a "make_perfview" statement would be the performance view, which meant you could override the default performance view selected during loading of the instrument (last script in the chain with "make_perfview") by simply reloading or re-applying a script earlier in the chain. Not so in 2.2. Here the performance view will always be the last script in the chain with "make_perfview", regardless of the loading order.


----------



## kotori (Nov 24, 2006)

[quote:13dbc1282f="Nickie Fønshauge @ Fri Nov 24, 2006 20:34"]Wonderful! In 2.1.1 the last script loaded with a "make_perfview" statement would be the performance view, which meant you could override the default performance view selected during loading of the instrument (last script in the chain with "make_perfview") by simò™Ñ   Jèo™Ò   Jèp™Ò   Jèq™Ò   Jèr™Ò   Jès™Ò   Jèt™Ò   Jèu™Ò   Jèv™Ò   Jèw™Ò   Jèx™Ò   Jèy™Ò   Jèz™Ò   Jè{™Ò   Jè|™Ò   Jè}™Ò   Jè~™Ò   Jè™Ò   Jè€™Ò   Jè™Ò   Jè‚™Ò   Jèƒ™Ò   Jè„™Ò   Jè…™Ò   Jè†™Ò   Jè‡™Ò   Jèˆ™Ò   Jè‰™Ò   JèŠ™Ò   Jè‹™Ó   JèŒ™Ó   Jè™Ó   JèŽ™Ó   Jè™Ó   Jè™Ó   Jè‘™Ó   Jè’™Ó   Jè“™Ó   Jè”™Ó   Jè•™Ó   Jè–™Ó   Jè—™Ó   Jè˜™Ó   Jè™™Ó   Jèš™Ó   Jè›™Ó   Jèœ™Ó   Jè™Ó   Jèž™Ó   JèŸ™Ó   Jè ™Ó   Jè¡™Ó   Jè¢™Ó   Jè£™Ó   Jè¤™Ó   Jè¥™Ó   Jè¦™Ó   Jè§™Ó   Jè¨™Ó   Jè©™Ó   Jèª™Ó   Jè«™Ó   Jè¬™Ó   Jè­™Ó   Jè®™Ó   Jè¯™Ó   Jè°™Ó   Jè±™Ó   Jè²™Ó   Jè³™Ó   Jè´™Ó   Jèµ™Ó   Jè¶™Ó   Jè·™Ó   Jè¸™Ó   Jè¹™Ó   Jèº™Ó   Jè»™Ó   Jè¼™Ó   Jè½™


----------



## Dynamitec (Nov 24, 2006)

Hi again! I discovered some new changes...please confirm if possible!

*Changed?: change_vol *

Anyone noticed a change in sound when using change_vol? I had to rewrite some parts of my new scripts because change_vol seems to react much slower now. It has a "smooth" attack...i can't really describe it. But: it's sounding "smoother" now... and the crackling i discovered with different sampling bit rates (samplerate of the samples and the samplerate the ASIO driver runs with) and change_vol in use - seems - to be gone.


----------



## Dynamitec (Nov 24, 2006)

> Hi Dyn,
> 
> Thanks for posting this... I'm still in the middle of projects and I'm affraid to update because I heard that the Instument Options CC7 db has changed... so my mixes would sound different unless I updated every instrument's Instument Options CC7 default.
> 
> ...



Hi Thonex!

It should be much easier to write a script that runs a loop from 1-10000000 and write the _get_engine_par_disp to a debug window. BUT: since there is no copy and paste possible this isn't much help. I'll look what i can do with this...but i'm afraid the way you want to use this, the new command isn't a break trough.

But: when you - for example - want to do ADHSR knobs directly in performance view, you don't have to care about percents and what ever. You just could do knobs with 0-10000000 and _get_engine_par_disp shows for example "10ms" or "1k ms"... so you don't have to calculated this stuff anymore. It's easier for the end user to work with script knobs this way.


----------



## Big Bob (Nov 24, 2006)

Dynamitec @ Fri Nov 24 said:


> Hi again! I discovered some new changes...please confirm if possible!
> 
> *Changed?: change_vol *
> 
> Anyone noticed a change in sound when using change_vol? I had to rewrite some parts of my new scripts because change_vol seems to react much slower now. It has a "smooth" attack...i can't really describe it. But: it's sounding "smoother" now... and the crackling i discovered with different sampling bit rates (samplerate of the samples and the samplerate the ASIO driver runs with) and change_vol in use - seems - to be gone.



I haven't had a chance to try it yet, in fact I've had very little time with change_vol() since they fixed it. I've been spending all my time getting things ready to start using it. Maybe they decided to 'tinker' with it a little more after we sort of pressured them into hurrying it into the last update. However, I hope they haven't made it too unresponsive with heavy filtering.

BTW I just posted Nils' patch for the NL Editor in the 'other' thread (you know the one you posted the ksp_util update in :wink:


----------



## Nickie Fønshauge (Nov 25, 2006)

Dynamitec @ 25th November 2006 said:


> Performance view UI is much faster than normal view but: the slowdown bug makes it almost impossible to copy and paste scripts with more than 5000 lines.


Hah. I've been up to 16,600+ lines. That was slow!!! And it did eventually crash K2. The latest - and working - version is 8381 compacted lines. Slow, but not painfull. It's doable.


----------



## Big Bob (Nov 25, 2006)

Hey Nickie,



> Hah. I've been up to 16,600+ lines.



I'm curious, what on Earth does your 16.6K line script do? (I mean besides choke K2 :lol: ). Sounds like enough code to teach Kontakt how to sing! :o I have enough trouble trying to keep 2K lines of code in my head at one time :wink: 

Most impressive!

Bob


----------



## steff3 (Nov 25, 2006)

hello,

anyone else experiencing a stability problem with K2.2? la vache just crashed twice on me, taking the whole system down....

not nice .... :-|

best


----------



## Thonex (Nov 25, 2006)

steff3 @ Sat Nov 25 said:


> hello,
> 
> anyone else experiencing a stability problem with K2.2? la vache just crashed twice on me, taking the whole system down....
> 
> ...



Can you give us more details? What did you do?... maybe we can try to repro it.

Thanks,

T


----------



## steff3 (Nov 25, 2006)

if I knew that - .....

I think - I tried one of my scripts in a new file, I may not have initialized it correct, so it might have tried to read from a place that did not exist ..... I know, one should not do that, but ....

I do not remember that I ever had a problem because of that .... not to mention that the whole OSX went to hell ....

best


----------



## Nickie Fønshauge (Nov 25, 2006)

Big Bob @ 25th November 2006 said:


> I'm curious, what on Earth does your 16.6K line script do? (I mean besides choke K2 :lol: ). Sounds like enough code to teach Kontakt how to sing! :o I have enough trouble trying to keep 2K lines of code in my head at one time :wink:
> 
> Most impressive!
> 
> Bob


Hiya Bob.

That particular version of the script is dead as a herring. I shaved a quarter of the lines off and ended up with a version, that crashed K2 and prevented me from ever again loading the new .nki file, it was a part of. And I had no backup of the .nki :cry: This mega monster script is part of a suite, that is intended to turn VSL K2 and Westgate Modular instruments into instruments a la Garritan Stradivari plus something extra. It is this extra, the monster script is responsible for. You could say, it makes K2 sing - it is an expression and vibrato performance tool :wink: It was originaly designed for the Stradivari and Finale, but this has unfortunately proven to be rather troublesome, due to the very closed nature of the Strad.


----------



## Thonex (Nov 25, 2006)

Nickie Fønshauge @ Sat Nov 25 said:


> Big Bob @ 25th November 2006 said:
> 
> 
> > I'm curious, what on Earth does your 16.6K line script do? (I mean besides choke K2 :lol: ). Sounds like enough code to teach Kontakt how to sing! :o I have enough trouble trying to keep 2K lines of code in my head at one time :wink:
> ...



Is this something that is for private use only.. or will you be selling it? I'd love to know more about it if appropriate.

Speaking of selling, here's a question I've been meaning to ask... anyone for that matter.... is there a way to copy protect a script... or have it computer ID savy? I'm not talking about the password protections to protect the source code. I'm talking about being able to let someone install a script on their computer and have it only work on that computer and not another one.

Any ideas?

T


----------



## Big Bob (Nov 25, 2006)

> Speaking of selling, here's a question I've been meaning to ask... anyone for that matter.... is there a way to copy protect a script... or have it computer ID savy? I'm not talking about the password protections to protect the source code. I'm talking about being able to let someone install a script on their computer and have it only work on that computer and not another one.



Oh me oh my :o 

Aren't you getting tired of all the hassle with the new breed of 'hardware-specific' copy protection schemes? I sure am :razz: . Us honest folks sure have to suffer because of all those other kinds out there :lol: 

But, seriously Andrew, unless I'm in fog here, the KSP doesn't give us the means to access basic computer resources like files or the registry, etc. What you could do I suppose is to write your own program that runs outside of K2 and then have that program load K2 with your script conditionally if you qualify and not otherwise. But I think that would be a big job and it would have a lot of holes in it.

Why not just use the password deal and Nils' compact output. I realize it could be cracked, but, it would be enough of a hassle that most people wouldn't bother. I would hate to have to reverse engineer someone's script in compact output mode  (especially a script as long as the ones Nickie or Benjamin write :wink: ).

But I suppose the biggest threat is the kind of guy that just likes to crack things regardless of the economics of the thing. And, then after he does it, he posts instructions for the whole world to see on the WEB. :wink:


----------



## kotori (Nov 25, 2006)

> Speaking of selling, here's a question I've been meaning to ask... anyone for that matter.... is there a way to copy protect a script... or have it computer ID savy? I'm not talking about the password protections to protect the source code. I'm talking about being able to let someone install a script on their computer and have it only work on that computer and not another one.
> 
> Any ideas?
> 
> T



I think it would be possible to write a script that analyses an instrument, computes a checksum, requires the user the enter the checksum as a password on an webpage to get an unlock code and then enter the unlock code to be able to use the script. The webpage backend and the script would use a shared secret function to compute the unlock code and the code entered could be compared with the correct one. This would have to be performed for each instrument the script is loaded on though, and it's still not secure against people hacking the script protection scheme in Kontakt. In any case please don't forget the first rule of copy-protection: first make sure your program/script is worth protecting. :wink: 

An alternative and more practical scheme is to lock the script to a certain instrument: the script stores certain information about the instrument it's allowed to be loaded on and this information is preserved in the script preset file, so the script refuses to load on any other instrument.

Ok, hope I didn't give too many ideas to closed source people now :???: 
Open source is a wonderful thing and should be preferred whenever it's a viable alternative. :smile: 

Cheers,
Nils


----------



## Nickie Fønshauge (Nov 25, 2006)

[quoteòš,   K¶š,   K·š,   K¸š,   K¹š,   Kºš,   K»š,   K¼š,   K½š,   K¾š,   K¿š,   KÀš,   KÁš,   KÂš,   KÃš,   KÄš,   KÅš,   KÆš,   KÇš,   KÈš,   KÉš,   KÊš,   KËš,   KÌš,   KÍš,   KÎš,   KÏš,   KÐš,   KÑš,   KÒš,   KÓš,   KÔš,   KÕš,   KÖš,   K×š,   KØš,   KÙš-   Kš-   Kš-   K"š-   K#š-   K$š-   K%š-   K&š-   K'š-   K(š-   K)š-   K*š-   K+š.   K,š.   K-š.   K.š.   K/š.   K0š.   K1š.   K2š.   K3š.   K4š.   K5š.   K6š.   K7š.   K8š.   K9š.   K:š.   K;š.   K<š.   K=š.   K>š.   K?š.   K@š.   KAš.   KBš.   KCš.   KDš.   KEš.   KFš.   KGš.   KHš.   KIš/   KJš/   KKš/   KLš/   KMš/   KNš/   KOš/   KPš/   KQš/   KRš/   KSš/   KTš/   KUš/   KVš/   KWš/   KXš/   KYš/   KZš/   K[š/   KÚš/   KÛš/   KÜš/   KÝš/   KÞš/   Kßš/   Kàš/   Káš/   Kâš/   Kãš/   Käš/


----------



## Nickie Fønshauge (Nov 25, 2006)

Thonex @ 26th November 2006 said:


> @ Kotori... I think you may be on to somehting. I was thinking that maybe an installer would load a tiny .wav file at a specific location on to the customer's HD and then the script would use the _get_file_whatever_the _code_is for loading impulse reverbs to verify if the .wav file is there. If not... then disable script. But your idea sounds way more high-tec


All very nice, but what prevents people from sharing the whole shabang - wave, unlock code and everything - once they have unlocked/validated the script? 

The way I see it, as long as you cannot connect to an authorization server from within Kontakt - except NI's server - the only really efficient way to copy protect anything, that runs in Kontakt, is not to use Kontakt at all, but rather the Kontakt Player and NI's copy protection scheme. And I highly doubt, this would be profitable for a script developer. I am afraid, we are at the mercy of people's conscience.


----------



## Thonex (Nov 25, 2006)

Nickie Fønshauge @ Sat Nov 25 said:


> All very nice, but what prevents people from sharing the whole shabang - wave, unlock code and everything - once they have unlocked/validated the script?



Nothing can stop the best crackers, but if no one knows what name (or names) and location of the file/s, how are they going to be able to give the whole shabang to anyone. 

This could be sort of a "poor man's" copy protection. If the script has to locate several files in different places unknown to the user... then I can see it would be a big pain to try to share it with someone... and usually that is enough of a deterance.

just thinking out loud... 'cause I've never attempted to write anything copy protected... and as Nils put it....



Nils the wise man said:


> don't forget the first rule of copy-protection: first make sure your program/script is worth protecting. :wink:



which pretty much eliminates me from copy protecting anything. :lol:


----------



## kotori (Nov 26, 2006)

Nickie Fønshauge @ Sun Nov 26 said:


> All very nice, but what prevents people from sharing the whole shabang - wave, unlock code and everything - once they have unlocked/validated the script?



I should have been more clear about my scheme. Once you enter the unlock code the script will lock to the current instrument and refuse to load on any other instrument without a new unlock code. It's of course possible to share the script but only users using the same instrument will be able to use it. Furthermore, once unlocked the script might slightly and randomly change some parameter of the instrument so that it will be unique. I think this idea might work, but I have yet to see a script worth the hazzle (both from the developer's and the user's perspective).



Thonex said:


> Nothing can stop the best crackers, but if no one knows what name (or names) and location of the file/s, how are they going to be able to give the whole shabang to anyone.


Maybe Kontakt writes a friendly error message in the status bar: "File 'C:\secret_copy_protection.wav' could not be found!". :wink: 

Cheers,
Nils


----------



## Thonex (Nov 26, 2006)

kotori @ Sun Nov 26 said:


> Thonex said:
> 
> 
> > Nothing can stop the best crackers, but if no one knows what name (or names) and location of the file/s, how are they going to be able to give the whole shabang to anyone.
> ...



Aha... wouldn't a message("") command take care of that?

Darn.... so close :???:


----------



## Thonex (Nov 26, 2006)

OT...

just for grins I tried this (taken from the manual) and added a message("") before the 'end on'.. and it works... no warning.


```
on init
declare ui_button $Load
end on
on ui_control ($Load)
_load_ir_sample(_get_folder($GET_FOLDER_INSTALL_DIR) ...
& "Top_Secret_hidden_file.wav",0,1)
$Load := 0
message("")
end on
```

The problem is... "file not found" is not a condition that can be used in KSP as far as I know.... so how could we use an un-found file to stop the script from working?

T


----------



## Dynamitec (Nov 27, 2006)

As long as the password protecion is weak every copyprotection can easily be broken...

:roll:


----------

