I HAVE MY VST DONE COMPILED ALL EXPANSIONS MADE HOW DO I ADD INSTALL EXP BUT ON MY INTERFACE
-
i have tried thr arps note repeat etc but i could not achieve what i was trying to accomplish
// === Note Repeat Functionality === const var NOTE_REPEAT_MIN = 36; // C1 const var NOTE_REPEAT_MAX = 51; // D#2 const var RATE_CONTROL_MIN = 60; // C3 const var RATE_CONTROL_MAX = 70; // A#3 // Note repeat state const var heldNotes = []; // Track which repeat notes are held // Musical time divisions (in relation to quarter notes) // Index 0-10 maps to notes 60-70 const var noteDivisions = [ 4.0, // 0: 1/1 (whole note) 2.0, // 1: 1/2 (half note) 1.0, // 2: 1/4 (quarter note) 0.6667, // 3: 1/4t (quarter triplet) 0.5, // 4: 1/8 (eighth note) 0.3333, // 5: 1/8t (eighth triplet) 0.25, // 6: 1/16 (sixteenth note) 0.1667, // 7: 1/16t (sixteenth triplet) 0.125, // 8: 1/32 (thirty-second note) 0.0833, // 9: 1/32t (thirty-second triplet) 0.0625 // 10: 1/64 (sixty-fourth note) ]; const var divisionNames = [ "1/1", "1/2", "1/4", "1/4t", "1/8", "1/8t", "1/16", "1/16t", "1/32", "1/32t", "1/64" ]; reg currentRateIndex = 2; // Start at 1/4 (quarter note) reg repeatTimerRunning = false; reg repeatCounter = 0; reg noteRepeatEnabled = false; // Note repeat is OFF by default // Note repeat button callback inline function onNoteRepeatButtonControl(component, value) { noteRepeatEnabled = value; if (!noteRepeatEnabled) { // Stop repeat and clear held notes when disabled stopRepeatTimer(); heldNotes.clear(); Console.print("Note Repeat: OFF"); } else { Console.print("Note Repeat: ON"); } } // Set the callback for the note repeat button btnNoteRepeat.setControlCallback(onNoteRepeatButtonControl); // Calculate tempo-synced interval in milliseconds inline function getTempoSyncedInterval() { local bpm = Engine.getHostBpm(); if (bpm <= 0) bpm = 120; // Default to 120 BPM if not available // Calculate milliseconds per quarter note local msPerQuarter = 60000.0 / bpm; // Multiply by the division to get the interval local interval = msPerQuarter * noteDivisions[currentRateIndex]; return interval; } // Start the note repeat timer inline function startRepeatTimer() { if (!repeatTimerRunning) { local interval = getTempoSyncedInterval(); Synth.startTimer(1.0 / interval); repeatTimerRunning = true; Console.print("Note repeat started at " + divisionNames[currentRateIndex] + " (" + Math.round(interval) + "ms @ " + Engine.getHostBpm() + " BPM)"); } } // Stop the note repeat timer inline function stopRepeatTimer() { if (repeatTimerRunning) { Synth.stopTimer(); repeatTimerRunning = false; Console.print("Note repeat stopped"); } } // Update the repeat rate inline function updateRepeatRate(newRateIndex) { currentRateIndex = Math.range(newRateIndex, 0, noteDivisions.length - 1); if (repeatTimerRunning) { Synth.stopTimer(); local interval = getTempoSyncedInterval(); Synth.startTimer(1.0 / interval); } local interval = getTempoSyncedInterval(); Console.print("Repeat rate changed to " + divisionNames[currentRateIndex] + " (" + Math.round(interval) + "ms @ " + Engine.getHostBpm() + " BPM)"); } // Define the color for the black keys. You can use RGB values or a predefined color. const var BLACK_KEY_COLOR = Colours.black; const var WHITE_KEY_COLOR = Colours.white; // Iterate through all possible MIDI notes. for (var i = 0; i < 128; i++) { // Check if the note is a black key. if (i % 12 == 1 || i % 12 == 3 || i % 12 == 6 || i % 12 == 8 || i % 12 == 10) { Engine.setKeyColour(i, BLACK_KEY_COLOR); } else { Engine.setKeyColour(i, WHITE_KEY_COLOR); } } -
What was the problem with the arp?
stopRepeatTimer()This function is not needed, just callSynth.stopTimer()You don't need therepeatTimerRunningvariable.You don't need to stop and start the timer to update the rate, you can just call startTimer with the new rate while it's still running.
I also think the transportHandler might be useful here.
All this stuff should be a separate MIDI processor, not in your UI script which should be deferred.
for (var i = 0; i < 128; i++) // Smells like AI?There was a coding puzzle on my Patreon page last year (or maybe the year before) to find the simplest way to determine if a note number was a black or white key, you might find that useful.
-
the midi note repeat was just just an idea i dont want to get lost i mostly care about having an install expansion button on my interface that will open a browser for the user to locate hr1 file and it installs from there you said some thing about showing me how to do to do this when would you avilabilty be ?
-
@Jaytove said in I HAVE MY VST DONE COMPILED ALL EXPANSIONS MADE HOW DO I ADD INSTALL EXP BUT ON MY INTERFACE:
you said some thing about showing me how to do to do this when would you avilabilty be ?
I'll post it next month on Patreon.
-
@David-Healey I have 20 plus expansions exported to hr1 files should i be using getExpansionforInstallpackage to make these load through a button on my interface, I cant figure out how to make an install expansion button on my interface and have the user point to hr1 file and my vst load it
-
@Jaytove said in I HAVE MY VST DONE COMPILED ALL EXPANSIONS MADE HOW DO I ADD INSTALL EXP BUT ON MY INTERFACE:
should i be using getExpansionforInstallpackage
Nope, check the post above where I give you the steps.
You'll need to use the file and file system APIs too, I have videos about these on YouTube.
-
D David Healey referenced this topic
-
@David-Healey i seen your videos about expansions but it dosent really get into hr1 files and how to install them into your vst
-
@Jaytove True, but the videos I mentioned are about file and file system APIs, combined with the steps I gave you above should point you in the right direction
-
@Jaytove said in I HAVE MY VST DONE COMPILED ALL EXPANSIONS MADE HOW DO I ADD INSTALL EXP BUT ON MY INTERFACE:
@David-Healey i seen your videos about expansions but it dosent really get into hr1 files and how to install them into your vst
The Expansions Installer video is now available at Patreon: https://www.patreon.com/posts/150234838
-
@David-Healey Thanks for sharing this one! I've been hoping for an expansion video!
I love that you are showing lambdas as I didn't know this was supported in HISE, but as soon as I introduce it I get an error.
inline function showSampleFolderBrowser(file) { Engine.showYesNoWindow("Select Folder", "Choose", function[file](response)default:! Line 37, column 102: Accessing parameter reference outside the function call {{SW50ZXJmYWNlfG9uSW5pdCgpfDgzMnwzN3wxMDI=}}Is there some type of modification you made to the HISE source code to support this? I get the same error if I load the snippet you shared for this one as well...
Using this version of HISE from last week: https://github.com/christophhart/HISE/commit/535630df2ad8c83c84c47b24b2de906b9ed4c6d1
-
@HISEnberg said in I HAVE MY VST DONE COMPILED ALL EXPANSIONS MADE HOW DO I ADD INSTALL EXP BUT ON MY INTERFACE:
Is there some type of modification you made to the HISE source code to support this?
Not as far as I'm aware. I posted a video a couple of weeks ago all about lambdas, do they examples in that one also have the same issue for you?
-
@David-Healey Ah that video flew under my radar!
Indeed I do have the same issue, same with the examples in the HISE docs. I've mainly gotten around this just sticking to the old school method of
reg variables. I haven't seen many HISE scripts using Lambdas.Something must be off with my HISE setup in XCode so I'll dig around a bit.