Again no sound after compilation :)
-
I'm trying to make a MVP for my sample library, and I have read through the forum on related topic but still couldn't figure out how to fix the issue.
So basically sample playback is fine when debugging in the HiSE standalone (triggered with MIDI keyboard), I even added a keyboard in the gui (with no other component) and made sure that it plays audio in HiSE standalone, however the compiled plugin, standalone or vsti, plays no sound.
I suspect it might be a problem with sample location or sample format.
I have all my samples in WAV files residing in the Samples folder in my project folder, and all links in the SampleMaps are relative ones using the {PROJECT_FOLDER} wildcard. And the path in the LinkWindows file points to the Samples folder of the project.
What am I missing?
-
@rcjach Add a custom settings panel to your project to make sure it's using the correct sound card (although this shouldn't be required in the plugin version).
Do you see the keyboard on the UI animate when you play on your MIDI keyboard?
-
@d-healey I do see the UI keyboard animate when playing on MIDI keyboard
-
Okay I created a mini project with a sampler under Master Chain using a single sample (then later on with a samplemap from the real project), with no script, and the samples are playing in the vsti. So I can conclude it's not a problem with sample location or sample format.
Could be the scripts.
How can I debug them in the DAW though? They work fine using HiSE standalone.
-
@rcjach said in Again no sound after compilation :):
Okay I created a mini project with a sampler under Master Chain using a single sample (then later on with a samplemap from the real project), with no script, and the samples are playing in the vsti. So I can conclude it's not a problem with sample location or sample format.
Could be the scripts.
How can I debug them in the DAW though? They work fine using HiSE standalone.
post your project here...substitute your sampler with a synth voice.
-
@lindon The project might be a little too messy to look at, although I do have it on github https://github.com/RCJacH/hummingbird-in-hise.
I just found out why it's not making any sound.
When I first load the preset in HiSE, key triggers do not play any sound, but they do after I recompile all scripts. And since I normally do not reload HiSE preset while writing scripts, I did not notice this bug at all.Now the problem is to find out why scripts don't work initially, only after recompilation.
-
I found the error.
It's caused by the order of module importation with include.
My guess is that because I'm using many global objects (with arrays), when compiling namespaces, HiSE replaces the variable with the pointer of those global objects during the copying and paste during the "include" process. So if the global object was not created before including a namespace that uses it, the pointer will return undefined objects.
The problem is that, when recompiling scripts in HiSE, the "include" process does return the correct pointer to the arrays or whatever.
Is that some kind of memory leak with variables?
-
@rcjach I usually declare global variable in a separate script above my main interface script - but I avoid using global variables at all if I can.
-
@d-healey How do you have different script communicate with each other without global variables?
-
@rcjach I try to make my scripts independent so they don't need to communicate with each other. Sometimes I'll have scripts that control components on other scripts using setAttribute