# Load_ir_sample (get_folder ($GET_FOLDER_ FACTORY_DIR)



## Cosmonomad (Feb 8, 2011)

GET_FOLDER_FACTORY_DIR.....instead of PATCH_DIR could save Space, i guess.

*Hi Community!
Again me... hungry for Knowledge!*
Even if i have a little small Sleep in the last weeks since i discovered the KSP...its that thrilling that it don`t bother the headaches too.

*THIS Time* i am a little bit scared to post it... cause i NEED to post the SCRIPT within!!
*So... don`t be angry if this Thread looks long...*

*I have some fine IR-Samples from SonicCouture.* Now i read the following Description in the KSP-Guide this Information:

*EDIT: do not post cracked scripts on VI (admin)*


----------



## EvilDragon (Feb 8, 2011)

*Do not use* $GET_FOLDER_FACTORY_DIR! This is for NI factory library stuff. Always use $GET_FOLDER_PATCH_DIR, and always put your IR files along with your library (preferably in your Samples folder!).

Example: say your library has this structure:

\MyLibrary\Documentation\
\MyLibrary\Instruments\
\MyLibrary\Samples\
\MyLibrary\Samples\IR Samples\

And you have an impulse file, say room.wav in that IR Samples folder. Now let's say you have a NKI located directly in the Instruments folder (no subfolders). Then you should use this line to load it:
*
load_ir_sample(get_folder($GET_FOLDER_PATCH_DIR & "../Samples/IR Samples/room.wav"),0,0)*

This should work if your Convolution effect is loaded in first slot on Send FX.

Note that string concatenation works beautifully. *../* means "one folder up", and that's exactly how it's working: it gets the complete path to the NKI in the Instruments folder, goes one folder up, enters Samples folder, enters IR Samples folder, and finally loads your impulse.

There are some other tricks you can use with string concatenation, especially now that you know that *../* works, which means that all your instruments can indeed load the impulse files loaded in one folder only - you won't need to place the impulses at multiple folders just for them to be loadable by the instrument. You just change the folder depth in that script line: if an NKI is located in, say, _Instruments\Subfolder\testinstrument.nki_, then you just use *../../* to get back to library folder root, and you can use Samples/IR Samples/room.wav thing again!

There's another trick which utilizes string arrays, and with that trick, loading tons of IRs via a dropdown menu is done with MUCH less code lines than what you pasted in here. 


P.S.: In the future if you don't want your posts to be too long, you can post your script code at www.pastebin.com and just copy the link to it over here. Much less hassle


----------



## Cosmonomad (Feb 8, 2011)

*FIRST of all EvilDragon: *
THanks for helping me again. I sure know that its *WORK*...to type that long answers!!!
*2nd:*


> here's another trick which utilizes string arrays, and with that trick, loading tons of IRs via a dropdown menu is done with
> MUCH less code lines than what you pasted in here. Wink


*This*... is ORIGINALLY the Script of *SonicCOUTURE*! *THEY* wrote it!
To work with that Script is a fine thing... but as you read, i can`t get it to work.
*Now your Answer says it 100% clear:*

NEVER EVER use $GET_FOLDER_FACTORY_DIR!
*I will follow this Advice!* This is an example for LEARN-Effects: I learned another Thing which i will not forget.
*Next is:*


> that all your instruments can indeed load the impulse files loaded in one folder only - you won't need to place the
> impulses at multiple folders just for them to be loadable by the instrument.


*I have to exercise this Tip...* to find out HOW THAT WORKS, and most important; how *ME understand THIS*! 
One thing i learned very fast as a Kontakt-Newbie: *Do just ONE single Mistake in a Script... and you`re lost.* :roll:
Also i understood that Tip with www.pastebin.com !
*Now let me ask you a thing to proof that i understand your Tip right:*
I have the Folder:
*E:\NomadSTUDIO\Ambients\GuZHENG\Samples\IR Samples*

Now i want to make *this* IR Samples-Folder available for *ALL my LIBRARIES/Instruments*!! 
As i undestood you, this is possible with a SAcriptline, hm??

*The practical Case... HERE... i can learn NOW from you:*

on the other hand i have the Folder:
*E:\NomadSTUDIO-2\ETHNICS\Spirit FLUTE\Instruments\Basic\SpiritFlute BlueDream.nki*

What Line do i have to type/add (and WHERE in the Script???) that the Spirit-Flute can use the IR-Samples 
from the GuZHENG-Samples-Folder??
*Would you be so kind and type that complete Line for me, so i can exercise with that written Line???*
Cause: If i have a complete Line... that will work *for any other Case*... just by changing the Location-Lines!

*Thank you in Advance... i guess this will be another looong Night tonight.*
Cause this Case with Convolution-Reverb-Location (what a word  ) was always a Mystery for me. 
Now... the Mist is slowly disapearing... its gettin clearer here.
I really can`t thank you enough... cause its Fun to see that my Knowledge evolves little by little.
A.b.s.o.l.u.t.l.y BEST would be, if you type the right thing into that Script i published HERE in this Thread. 
Would be the savest way.....

And: *I can not help you with Scripts* :wink: ... but i studied Graphic-Design. *If i can help you in that way*, 
in any Form... please let me know by Mail or PM. 
*I deeply want to give something BACK for all you did for me.*

*Greetz, Cosmo*


----------



## EvilDragon (Feb 8, 2011)

Just a question - is this only for your personal libraries, you don't intend to sell them?


----------



## polypx (Feb 8, 2011)

I'm also curious which instrument you got the original script from? 

And which version of Kontakt.


----------



## Cosmonomad (Feb 8, 2011)

*Hey ED!*
Even if you kindly wrote "Just a Question", for further Communications and (may be) evolving Fellowship i want to get a bit more into detail:
*I am "ONLY" Musician!*
Neither i am dealing with any kind of Software (If E.G. i created a little Library, like i did from my Friends Upright-Bass,* 
i present it to Buddies as a GIFT*... but never ever would charge Money), nor i do similar things.

As i wrote to you in my private E-Mail: 
I am over 50 Years young.... have 2 lovely Daughters.... i am aways from those "Peccadillos"... one`s sins of youth, 
like Tons of Scriptkiddies might do today.

May be you thought about such... because i wrote i use SonicCouture`s IR-Samples?
Yes indeed...* i USE them*. For my own little Creations.
You know: 
*Dan Powell and James Thompson are really my Rolemodels....not to speak "Idols"!*
What *THEY DO*...with SC is wonderful!
If i was younger i would go to London and would like to become an apprentice with them!!!! *And i mean this SERIOUS!* 
Look at their Catalog... what they`ve DONE!
From all the Etnic-Stuff till the NovaCHORD! *Amaaaaazing!
*
Sure, we (my Friends and me) have a real Band named Cosmonomads TOO... ò t   ÕQ2 t   ÕS t   ÕS? t   ÕWF t   ÕWu t   Õ_c t   Õ`/ t   ÕdÆ t   Õe3 t   Õeº t   Õeø t   Õf’ t   Õg t   Õjñ t   Õk t   ÕoÊ t   Õp t   Õt t   Õt t   Õw_ t   Õwx t   ÕwÃ t   Õx t   ÕxP t   Õx° t   Õzx t   Õz• t   Õ{Q t   Õ{‡ t   Õ` t   Õ€- t   Õ€} t   Õ€¡ t   ÕE t   Õ† t   Õƒb t   Õ„% t   Õ…8 t   Õ…¸ t   Õ‡ t   Õ‡0 t   Õ‰N t   Õ‰u t   ÕŽ t   ÕŽ( t   Õ— t   Õ—T t   Õ—ò t   Õ˜_ t   Õš˜ t   Õšâ t   Õœ¹ t   Õ§ t   Õ ^ t   Õ¡ t   Õ§ t   Õ§w t   Õª t   Õª t   Õ¬Å t   Õ® t   Õ³ t   Õ´Œ t   Õ»õ t   Õ¼) t   Õ¼W t   Õ¼Ý t   Õ½µ t   Õ½é t   Õ¾N t   Õ¾g t   ÕÀs t


----------



## Frederick Russ (Feb 8, 2011)

Cosmonomad: please do not post cracked scripts on VI as we do not support or condone piracy.


----------

