@Christoph-Hart Ahaaaahhh that's the step I was missing, thanks very much!
Posts
-
RE: Convolution Reverb
-
RE: Convolution Reverb
@d-healey They'll be shipped with the plugin, with no option to let the user add more.
@Christoph-Hart I did!
const ConvolutionReverb = Synth.getAudioSampleProcessor("Convolution Reverb"); const reverbSelector = Content.addComboBox("reverbSelctor", 10, 150); reverbSelector.set("items",""); Engine.loadAudioFilesIntoPool(); const impulseFolder = FileSystem.getFolder(FileSystem.AudioFiles); const impulses = FileSystem.findFiles(impulseFolder, "*" , false); for(ir in impulses){ reverbSelector.addItem(ir.toString(ir.Filename).replace(".wav","")); } inline function onreverbSelectorControl(component, value) { local impulse = impulses[value - 1].toString(impulses[value - 1].Filename); ConvolutionReverb.setFile("{PROJECT_FOLDER}" + impulse); }; reverbSelector.setControlCallback(onreverbSelectorControl);
-
RE: Convolution Reverb
I'm still missing something in doing a basic IR loader.
I'm getting the list of audio files with
getFolder(FileSystem.AudioFiles)
as suggested in this thread, and loading the IRs withsetFile("{PROJECT_FOLDER}" + impulseName)
. However in the exported plugin they don't show up in the combobox, I'm guessing because I'm supposed to use{PROJECT_FOLDER}
instead as FileSystem.AudioFiles doesn't resolve.I think I should get a file object for
{PROJECT_FOLDER}
so I can list the files withfindFiles
, but I couldn't find a function to do that in the API.HiseSnippet 2059.3ocuXszaibbDdFIMFVz4wZi8GPCdvfxQQfCeSXDDI9RRYEkXDo0tNAFKZMSSx1ZltI5oGsKggO3a4TNleO4+PNj+F4dNjT87dFNd8tBNgGHl96qqpqtppq9wLA2h34wEZ5UVrcCQS+WXLeKStd3ZLkoc4HM8ekwTrmjHPgPC1tA64Qr0z02+bEf9gGnE76e86GfcvLKRJjl1cbpE4JpKUlhN6zWPcblfsIKntY5cqSuzhyFxc39f8ruQcsMXqGvqHWiUcaOCsKvdq0z+Bi5s6PHcatz1F2rocmNc52qeq9l3k0agu2rS+VMZ0sQutK0z+nw1TIWLWhkDOPoC31amul+FV3.bG0iduCQ0vTaNLxgvZCWScrmE6b7z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yUMmMzU5HZky+9utulCmuABbBYLmBXLyNlWe+eldiNsagRevjaJVJnpg+ZeWnZHb4DH0hwHNdpgbO0EwCaWO1hlSX1AM9OvuHRSUa8HRyXx+uLFtXKA+0VgOQfJS8iCPf4MKHnbnwTUajYgWDP42o1zWaYkWU6HXimpfMepB15oJX6mpfcdpB18oJXueZAUOU8Y9RtaXcWMsoyFG7BN55iYXHKOnjh1+EQKgIp.
-
RE: How to debug control not linking in exported plugin?
It's for keyswitching. In the realtime script, on note, if a note is in the KS range, it updates a knob. That knob is linked to a knob in the deferred UI script, so it can update the key colors on screen. That's it really. The keyswitching is working, because I can hear the articulation change, it's just the linking part that doesn't work.
Two switches that are set up the same way, to mirror something from the realtime script to the UI script, work fine.
It's tricky to debug as it only happens in a compiled vst or standalone. I'll probably try Christoph's logger next: https://forum.hise.audio//post/26752
-
RE: How to debug control not linking in exported plugin?
@d-healey It behaved the same when it was in a constant. Is there another way besides using a global variable or linking controls together with a callback?
-
How to debug control not linking in exported plugin?
When I export my project, a control in my realtime script that should be controlling a knob in the deferred script, isn't. The behavior is the same whether I use the linkedTo field or a callback. I thought maybe the reference to the other script was ending up undefined on init, so I tried getting the reference in the callback, but with the same result.
inline function oncurrentPhraseControl(component, value) { local Interface = Synth.getMidiProcessor("Interface"); Interface.setAttribute(Interface.currentPhraseKnob,value); };
I'll try building a minimal project that replicates the issue but maybe somebody ran into this before? It always works fine in HISE, it is only unlinked in exports on all three OSs.
-
RE: Using external Text Editor
@d-healey I posted that comment because (in my memory anyway) I typed for and nothing happened, which led me to believe it doesn't appear for "for". The delay in autocomplete makes me much less likely to use it, while I use the instant popup in Sublime all the time.
How you fold code is of course user preference. I would quite like to be able to fold each control declaration along with its settings, callback assignment, and callback function, so when I'm looking for a control I can get an overview of all of them, and jump straight to the one I need without ctrl + f or the re-contextualization of bookmarks.
-
RE: Using external Text Editor
@d-healey I actually did not realize HISE had it for loops, would be nice if it appeared without pressing escape and with the same fluidity as in Sublime. The autocomplete in Sublime feels goood, it's instantaneous as you type. I'm not sure if the delay in HISE is intentional, maybe that's something we can tweak.
In Sublime you can code fold any line based on indentation. I use this quite a lot for folding away control declarations under a comment.
-
RE: Using external Text Editor
I didn't want to turn this thread into a wishlist for the HISE code editor, especially as I wanted to contribute fixes for some of these once I finish this library, but since we went there anyway...
For me the main issue is the low contrast, both just the color palette and lack of differentiation between functions, parameters, variables, control statements, and operators. I realize now looking at screenshots that the whole interface is blue tinted as well.
Sublime Text set to Javascript is quite usable, I haven't really compared with this. The bracket and parenthesis highlighting is far more visible in Sublime, and highlights from either side of the character. In HISE you have to put the cursor after the character, and the highlight is barely visible.
When typing
(
, HISE sometimes inserts()
when it's not helpful to do so. Haven't quite figured out the logic, but I run into it a lot.
Sublime includes autocomplete for structures like, if, if else, for, which I use far more often than the API autocomplete and are huge time savers.
Usually if I'm looking in the API for a function I also need to browse the docs anyway. Sublime also autocompletes functions you have used already, the only thing missing is that tab to next parameter, the highlight state for which I find difficult to distinguish from the usual text selection highlight. This makes me not use it much.
In one of these screenshots, typing appends to the end. In the other, it clears and overwrites.
I use ctrl + left and right arrow a lot to jump through functions. In Sublime one press usually takes you to the next token, in HISE it takes you to the next token or separator, which takes longer and usually isn't what I want.
For keybindings, in Sublime I also have bindings for things like go to next sub-token in a string.
For search, in HISE it defaults to case sensitive every time it's run, and pressing ctrl+f sometimes does not highlight the search field if a search is already open (can't quite track this down atm)
I use code folding quite a lot, which makes it much easier to jump between files without losing my place.
In short, I really just prefer using an external editor, especially as I assume a "reload from file" button would be less work to implement than maintaining a code editor and all the edge cases and user preferences that can go along with that.
-
RE: Using external Text Editor
I would really just prefer a way to use an external editor. After several weeks of intense scripting work using only the HISE editor, the low contrast color scheme, lack of syntax highlighting, lack of keyboard shortcuts, slower response time, and many other quirks make me far prefer the (sadly proprietary) Sublime text.
I don't doubt that it will eventually be on par, but for the sake of getting work done I really need to be in Sublime at the moment. If the fastest way to reload the script is to load the xml I'll just keep doing that.
-
RE: Using external Text Editor
I'm trying to use Sublime text as the muscle memory is just too ingrained. Is there a quick way to get HISE to read the changes made by an external editor? I've been going File > Load XML every time.
-
RE: How to pass a string between scripts?
@d-healey Everything else about the two scripts is totally separated, but the sequence is randomly generated, so at some point a few hundred bits of data need to get from one script to the other. You could do RNG with a seed that you keep in sync in both scripts, but that's getting into time sink territory.
The global variable seems to work fine as long as the script that sets the variable comes first so I'll use that for now.
-
RE: How to pass a string between scripts?
I could add "or object" to the title.
When the user clicks a button, a sequence about 100 steps long gets randomly generated in the audio thread, so it's ready even if the user is currently playing. The sequence should be represented on the UI.
At the moment the audio script makes a string, which it puts in a global variable. I suppose the better way to do this is to store the sequence object to a global variable and make the string in the UI script, but the question of how to get an object to another processor remains.
Or to use the setAttribute method, I could encode the sequence as a bunch of integers and put it in a sliderpack. Would that be preferable?
I'm used to PGS in Kontakt, so the added step of going through a UI control for script communication is definitely odd to adapt to.
-
RE: How to pass a string between scripts?
Yes, between MIDI processors. A string needs to get generated in the audio thread, which is passed to the deferred Interface script to be displayed on screen. I know that sounds weird, but I promise it makes sense and is for a good reason :)
-
How to pass a string between scripts?
Using setAttribute on a panel seems to work only with numbers, not strings or objects. I first tried using a global variable, but the order of the scripts appears to influence whether the variable is ready on init. Is there a recommended way to do this?
-
RE: [bug - fixed!] Timestretching + multi mic = instant crash
The CI for the fix seems to have got stuck https://github.com/christophhart/HISE/actions/runs/12342377762/job/34442128570
-
RE: LedButton Patreon
@udalilprofile Look at your debug window. Errors of the type "found x when expecting x" are usually a missing ; ) } somewhere in the script, often just before the line that is highlighted.
-
RE: Hise copy vs compiled
@Robert-Puza You don't have to re-compile, you can just copy the "HISE Standalone" executable. You only need the source when exporting a plugin or compiling HISE itself.
-
Is there already a way to get sample properties by mapping?
The isNoteNumberMapped() function is a bit unique, as it operates on the sample map level which is generally more "ground truth" than getting samples via the createSelection() type functions.
For example, in a legato script, I want to be able to adjust the SampleStart and SampleEnd of each legato sample, and automatically have my script play the sample for just that amount of time before fading in to the sustain, leaving some buffer for the envelope to release of course. I want to get the sample length when the sample is played, without worrying about how things are mapped, so I added a function that accepts rrGroup, velocity, and note, and returns the SampleEnd, which works great.
However, when I tried to expand this to a getSamplePropertyByMapping() function that accepts any Sample parameter, calling it crashes HISE.
I ran into some issues building HISE debug, so in the interest of (my) time I come to you asking if anyone wants to glance at my newbish modification for anything obviously wrong: https://github.com/davidhealey/HISE/compare/development...minosimo:HISE:development
Otherwise, I can just add separate functions for each parameter I need to get and call it a day.
-
RE: Is there a way to peek inside sample objects?
The script watch table only shows the path to the .wav sample though, not all the other attributes.Just had to expand it more lol.Did you try the snippet? trace() for me prints empty when called on a single sample object, not just when they're in an array.