@d-healey Using the txt property seems like a nice idea.
The video was also helpful. Thx!
Posts
-
RE: Laf function triggers twice for each setLocalLookAndFeel ?
-
RE: Laf function triggers twice for each setLocalLookAndFeel ?
@d-healey What if I know that I'll definitely re-use this for other buttons?
One pair might be called "btnPreviousSample" or "btnPreviousFX" etc.
-
RE: Laf function triggers twice for each setLocalLookAndFeel ?
@Christoph-Hart I just caught my own mistake.
The wrong line was...
if (Console.print(obj.text) == "btnPrevious"){
When it should have been...
if (obj.text == "btnPrevious"){
Is there a way to make this more fool proof though?
To not make it dependent on exact button names? -
Laf function triggers twice for each setLocalLookAndFeel ?
I'm trying to draw 2 triangles for "previous" and "next" buttons.
In my Laf I have a condition to check the object.text name to either rotate it to the left or the right.
But it's not working and print returns this when I run itInterface: btnPrevious Interface: btnPrevious Interface: false Interface: btnNext Interface: btnNext Interface: false
Here's my code for it
// Select Buttons const var btnPrevious = Content.addButton("btnPrevious", a[0] + 15, a[1] + 5); const var btnNext = Content.addButton("btnNext", a[0] + 45, a[1] + 5); const LafButton = Content.createLocalLookAndFeel(); LafButton.registerFunction("drawToggleButton", function(g, obj){ //Console.print(trace(obj)); // trace converts contents of object into a string var area = obj.area; // get "area" property from obj and save into a var for quick access var border = 3; g.setColour(Colours.withAlpha(obj.itemColour1, alpha)); Console.print(obj.text); if (Console.print(obj.text) == "btnPrevious"){ g.fillTriangle([0, 0, 20, 20], Math.toRadians(270)); Console.print("true"); } else{ g.fillTriangle([0, 0, 20, 20], Math.toRadians(90)); Console.print("false"); } }); btnPrevious.setLocalLookAndFeel(LafButton); btnNext.setLocalLookAndFeel(LafButton);
-
RE: Mapping samples for a sample selector??
@observantsound
What about automatically setting the root for factory samples though?
It seems like I can either do set root automatically OR use the token parser but not both... : / ?Maybe I do it like this?
Drop everything in, detect root note automatically, export sample map as xml, then process the file to set each sample in its own group? -
RE: Possible to fold all indented code in script editor?
@d-healey Thanks for the tips!
I might need to adjust my workflow then.I was following some of your tutorials for interface design and I quickly lost track of what is where.
This is how I like to structure my code. I use fold on indent level x many times to quickly find what I'm looking for.
I also don't feel comfrotable with using the { } yet.
Sure it might make some things easy to read but it also makes the vertical space code needs very long.Is it possible to have one file for all my Lafs, one file for my PaintRoutines, one file for declarations etc. ?
// ------------------------------------------------ // SET PAINT ROUTINES // ------------------------------------------------ inline function A_PaintRoutine(g){ inline function B_PaintRoutine(g){ inline function C_PaintRoutine(g){
-
RE: Mapping samples for a sample selector??
@d-healey Thx. I'll give it a try
-
RE: Mapping samples for a sample selector??
@d-healey How would I trigger notes via the ID though?
I didn't find any suitable commands in the API list.
there is a sampler.play_note but that only asks for note number and velocity -
RE: Mapping samples for a sample selector??
@d-healey Thanks! I'll have a look at that.
And for factory samples? Should I just treat the RR groups as if they were Kontakt groups?
I was wondering if it's possible to trigger samples via their IDs and have them all inside one group, and then apply velocity and note scaling manually.
Might be way more work now that I think about it though... -
RE: Mapping samples for a sample selector??
@d-healey I'd like to learn how to do both ideally
In Kontakt I had x num of factory samples, and then x num of empty user zones in user groups.
-
Mapping samples for a sample selector??
I would like to build a template sample selector box that lets me choose a single sample that will be played over the entire keyboard range.
How would I map and script that exactly?This is how I would do it in Kontakt.
In Kontakt I make a group for every single sample.
The sample files are named how they should appear in the gui as well and are stored in sample category subfolders.
Using creator tools I create groups called A-01, A_02 etc. B_01, B_02 etc
A is the category of the subfolder (samples/drones, samples/Cellos etc), and _01 is just the number of the sample of that category.
Then Creator Tools places each sample in the correct group, detects the root note, velocity range and keyboard range.Very curious to learn how I would approach this in HISE
-
Possible to fold all indented code in script editor?
I find navigating the HISE code editor a bit messy and I can't rely on the tools I'm used to using in Sublime like fold all code at indent level 1,2,3 etc.
Is there a way to do this in HISE?
Or are there other smart ways to make code navigation a bit easier?
Like connecting it to an IDE or working with several script tabs? -
RE: crash bug - deleting default envelope modulator from sampler leads to crash
Yes it happens in new projects as well.
Just opened a new project, added a container and a sampler to that container.
Delete the default envelope and it crashes -
crash bug - deleting default envelope modulator from sampler leads to crash
Small project. Built on develop branch.
Crash is consistent. -
RE: UI bug - xfade velocity menu appears in wrong spot
@d-healey Oh ok cool.
I was wondering about this actually. In your video you recommended to stay up to date with the develop branch. But isn't that risky?
Wouldn't it make sense to only work on stable releases for a project? -
UI bug - xfade velocity menu appears in wrong spot
This is what I'm seeing when I click "Adds a crossfade to overlapping sounds" in the sample editor.
Pretty self explanatory I think.
On Windows Version 3.6.2 -
RE: What is the "done" bar at the top?
Ok followed Davids instructions and built Hise from source on Windows.
Was honestly much easier to do than on Mac even though David said otherwise in his video.Visual Studio seems clearer than Xcode, and the fact that both SDKs are already in the git folder makes it easier as well I think.