@Lunacy-Audio I just rebuilt HISE and now it works! Thanks so much for your help and effort!
Best posts made by pasmae
-
RE: noteOff() / noteOffByEventId()posted in Scripting
-
noteOff() / noteOffByEventId()posted in Scripting
Hello,
I am working on a script that retriggers all currently pressed keys when another key is pressed. I created an object which stores if a certain keynumber is pressed or not. When I print to the console I get the keynumbers just as I want. Retriggering works fine, but when I let go a key, it doesn't stop the note with the Synth.noteOff() function, it says in the console that I should use Synth.noteOffByEventId() instead. But when I get the EventId in onNoteOff and insert it in the function, it also doesn't work right. It seems to look for the same ID in the onNoteOn. How do I have to treat the Synth.noteOffByEventId() in this case?
//On Init //Storing the current key status for the key range const var a = {} for (i = 53; i < 97; i++) { a[i] = 0; } function onNoteOn() { const var n = Message.getNoteNumber(); a[n] = Synth.isKeyDown(n); for (k in a) { if (a[k] == 1) { Synth.playNote(k, 1); } } } function onNoteOff() { const var n = Message.getNoteNumber(); const var e = Message.getEventId(); a[n] = Synth.isKeyDown(n); for (k in a) { if (a[k] == 0) { Synth.noteOffByEventId(e); } } }
Latest posts made by pasmae
-
RE: noteOff() / noteOffByEventId()posted in Scripting
@Lunacy-Audio I just rebuilt HISE and now it works! Thanks so much for your help and effort!
-
RE: noteOff() / noteOffByEventId()posted in Scripting
@Lunacy-Audio Somehow it doesn't work here. If I press a key it disables all the notes that are higher on the keyboard. On noteOn() it doesn't find the NoteOn with IDxxxx and onNoteOff it says NoteOn with ID-1 wasn't found?
-
RE: noteOff() / noteOffByEventId()posted in Scripting
@Lunacy-Audio I tried something out but I guess I didn't get it right. I referred to the saved EventID in the Synth.noteOffByEventId() but it says it couldn't find a NoteOn with that ID...
const var a = {} for (i = 53; i < 97; i++) { a[i] = [0, e]; } function onNoteOn() { Message.makeArtificial(); const var n = Message.getNoteNumber(); const var e = Message.getEventId(); a[n] = [Synth.isKeyDown(n), e]; for (k in a) { if (a[k] == [1, e > -1]) { Synth.playNote(k, 1); } } } function onNoteOff() { Message.makeArtificial(); const var n = Message.getNoteNumber(); const var e = Message.getEventId(); const var v = a[n][1]; a[n] = [Synth.isKeyDown(n), e]; for (k in a) { if (a[k] == [0, e > 0]) { Synth.noteOffByEventId(v); } } v = -1; } -
noteOff() / noteOffByEventId()posted in Scripting
Hello,
I am working on a script that retriggers all currently pressed keys when another key is pressed. I created an object which stores if a certain keynumber is pressed or not. When I print to the console I get the keynumbers just as I want. Retriggering works fine, but when I let go a key, it doesn't stop the note with the Synth.noteOff() function, it says in the console that I should use Synth.noteOffByEventId() instead. But when I get the EventId in onNoteOff and insert it in the function, it also doesn't work right. It seems to look for the same ID in the onNoteOn. How do I have to treat the Synth.noteOffByEventId() in this case?
//On Init //Storing the current key status for the key range const var a = {} for (i = 53; i < 97; i++) { a[i] = 0; } function onNoteOn() { const var n = Message.getNoteNumber(); a[n] = Synth.isKeyDown(n); for (k in a) { if (a[k] == 1) { Synth.playNote(k, 1); } } } function onNoteOff() { const var n = Message.getNoteNumber(); const var e = Message.getEventId(); a[n] = Synth.isKeyDown(n); for (k in a) { if (a[k] == 0) { Synth.noteOffByEventId(e); } } } -
RE: Legato with Retrigger in 2.1.0posted in Bug Reports
@d-healey It says version 2.0.0 again, so 2.1.0 wasn't a stable release?
-
Legato with Retrigger in 2.1.0posted in Bug Reports
Hey all,
I started a project in HISE version 2.0.0 which included a hardcoded Legato with Retrigger script. But now in version 2.1.0 it indeed retriggers but also keeps holding the notes, even when I let go the keys... Is there a workaround?
-
RE: Acces to Buttons in Preset Browserposted in General Questions
@ustk But I need the function inside the preset browser anyway, when a preset is added or saved...
-
Acces to Buttons in Preset Browserposted in General Questions
Hey,
is it possible to get acces to the buttons in the preset browser to create custom callbacks?
I'm still looking for a solution of this problem... https://forum.hise.audio/topic/2790/preset-label-update/6
