Some basic questions
-
The persistent data is not available in the onInit callback. This happens behind the scenes:
- The persistent widget values are stored.
- The script gets compiled.
- The persistent widget values are restored.
- For all persistent widgets, the
onControl
callback gets executed.
In your case, you need to move the
Globals.MW = modwheel.getValue();
line in the
onControl
callback. -
why Event is not been ignored?
reg note = 0; reg vel = 0; reg newnote = 0; reg lastnote = 0; var i = 0; Globals.pos_interval = 0; Globals.neg_interval; Globals.Attack_length = 600; Globals.Attack_fade = 150; Globals.Release_fade = 200; Globals.Attack = 0; Globals.Legato = 0; Globals.Glissando = 0; function onNoteOn() { if (lastnote == 0) { Globals.Attack = 1; } if (lastnote != 0) { if (Message.getVelocity() < 80) { Globals.Legato = 1; interval = lastnote - Message.getNoteNumber(); Globals.pos_interval = Message.getNoteNumber() - lastnote; Globals.neg_interval = lastnote - Message.getNoteNumber(); if (Globals.pos_interval >0) { Message.setVelocity(Globals.pos_interval); } if (Globals.neg_interval >0) { Message.setVelocity(Globals.neg_interval); } } else { Globals.Glissando = 1; interval = lastnote - Message.getNoteNumber(); Globals.pos_interval = Message.getNoteNumber() - lastnote; Globals.neg_interval = lastnote - Message.getNoteNumber(); if (Globals.pos_interval >0) { Message.setVelocity(Globals.pos_interval); } if (Globals.neg_interval >0) { Message.setVelocity(Globals.neg_interval); } } } lastnote = Message.getNoteNumber(); } function onNoteOff() { Globals.Attack = 0; Globals.Leg = 0; Globals.Glissando = 0; if (Message.getNoteNumber() == lastnote) { lastnote = 0; } } //script perocessor 2 Sampler.enableRoundRobin(false); reg leg_grp = 0; reg vel = 0; reg note= 0; if (Globals.MW > 64) { leg_grp = 1; }else { leg_grp = 2; } function onNoteOn() { note = Message.getNoteNumber(); vel = Message.getVelocity(); Message.ignoreEvent(true); if (Globals.Glissando = 1) { Synth.playNote(note,vel); } }
The problems are:
Globals.Legato and Globals.Glissando are set with every event.
And even with setting them to 0 leg and gliss samplers are played. But shouldn't because of ignoreEvent -
I might be too tired to be thinking striaght but I think you need to ignore the event in your first script too
-
Yes. Events have a natural signal flow so if it gets ignored in the second script, the first script is long gone waiting for the next event...
-
Well, in HISE all works pretty fine. Just couldn't add CC gain modulator to the master container.
But with compilled VST trash: https://www.dropbox.com/s/oa8xbrnxhqx0k7r/Hise Hello World by Levitanus.rar?dl=0Problem A: engine settings button is visible and crushes the host.
Problem B: nothing is sounding, but voices are triggered.Playable keys G3,A3,E4. And CC1
-
CC Modulators can't be added to the master container but you can add them as a global modulator :)
-
but you can add them as a global modulator :)
wah! of course!
-
And what is with compiled VST? Where have I mistaken?
-
I'll need to take a look. The engine settings button is definetily a bug and if HISE makes sound but the compiled plugin doesnt then theres something wrong too.
-
Can you upload the project folder (without the samples)? It's hard to check what's wrong with only the binaries...
-
Can you upload the project folder (without the samples)?
It's alreasy there.. The folder "testhise"
And the first is the binaries
Will be glad if you take a look :) -
Ah sorry I downloaded the file but somehow overlooked the testhise folder. I'll take a look whats going on.
-
Alright, there were a few issues:
-
you haven't specified a company name and code. This is important, because the compiled file uses a directory in the OS specific app data folder (~/Library/Application Support/Company Name/Project Name/ on OS X and User/App Data/Roaming/Company Name/Project Name on Windows) to store its settings. If this is left blank, it can't resolve the folder correctly.
-
I used the Preset.hip file, the other ones were too complicated. It also complained about the missing "Simple Gain" and "Simple Gain 2" modules, but I simply removed those lines.
-
somehow your sample references got messed up. If you copy the Main Container in the clipboard and paste it in Sublime Text or another text editor, you'll see that the file references in the samplers look like this:
"O:\пример вокал\выровненные\sus_side_mf_G3.wav"
It looks like an absolute path (using cyrillic characters in UTF16 notation). What you want is this:
"{PROJECT_FOLDER}sus_side_mf_G3.wav"
The wildcard
{PROJECT_FOLDER}
will be replaced with the folder where the samples reside.I did a search and replace and fixed the sample references. Please try to compile this preset (after specifying the company name):
HiseSnippet 2599.3oc6b8zbaabEGfTPwh1N0woyzoSufgosQt1gFjRV1IpsVRT+IxlRhinhR5zzQFBbgzNB.KBvBIq3wS+Dz1y4dmIGaO1aMS5z9AnW6k9QvSuzomZ2G9CwBJPJQHZQRWxYrM22t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iLV.umlFbIwePYAgzQTomQLSOiX1dFwC5YDy0yHdXOi3QcAATZtE8nDyfRFHH7+.SwpWjA
The compiled plugin works on OS X - the stupid settings button is still there, but I'll hide it soon :)
-
-
FYI, I just pushed a few changes to the HISE repository which adds more safe checks (trying to build your current project should spit out error messages for each issue I listed above). The dreaded setting button is now also gone :)
You'll need to build a new HISE version for this of course, but luckily there is the fabulous tutorial from David...
-
Huge Thanks for You! I've got couple of very hard days, and the night should br also very busy, but tomorow I will try everything.
By the way, i tried to fix it before the first compilation:somehow your sample references got messed up. If you copy the Main Container in the clipboard and paste it in Sublime Text or another text editor, you'll see that the file references in the samplers look like this:
But couldn't. The matter is, I think, there was wrong sample and i just deleted it from the map.
You'll need to build a new HISE
Scares only the first time, then everything just a cup of tea)