I want to write a VST with which i can load some arrays and update the running VST.
More precise:
Outside of Csound i want to create my arrays as a file, which i used to load to Csound via a #include statement.
With the VST via the texteditor widget i want to realise now what i did before via #include.
Is it possible to load these files into a running csound instr? Or do i have to create multiple instr for different taks? For example one is receiving the String from the texteditor, antoher one is compiling the string?
One big difference here is that the way you used to do it was done at compile time. At run-time you will need to take care your instruments are loaded first. How you go about compiling the files is up to you. You can compile Csound code at run-time using compilestr or some such opcode. Note you can also load the files from disk straight into Csound without the need of a texteditor using one of the file input/output opcodes.
I guess I’m curious as to why you want to load them to the texteditor first?
I guess i wanted to use the texteditor, because i thought i need some of the features of it. But maybe a filebutton would also work?
I didn’t use compilestr yet and i don’t know what syntax must be inside of a file for this.
Also i’m wondering how i need to initialize the arrays in before, because of errors that are related to the instrument handling these arrays.
I don’t get it completely right now how i would handle this, so i do a small sketch:
instr 1
when the value of a filebutton is changed then compilestr (?) it
in the file there is this:
instr 2
when there is already an instance of instr 2 turn it off
gkArray1...
gkArray2...
gkArray3...
endin
endin
instr 3
this instrument is working the arrays
endin