Help a newbie, i need a solution that a knob (slider) shows both values/modes Frequency and TempoSync
-
@Lindon and Steve
Wow, thats much easier to integrate
How do i set the max and min values, the middle position and possibly the step size?
It`s one knob/slider ? -
@Xearox73 You can use the
.set
function to set the properties of components. -
@d-healey
thanks, solved -
@d-healey
uhhps, the defaultValue function runs only with one
the second will be ignored:inline function onbtnTempoSyncControl(component, value)
{
local lfo = Synth.getModulator("LFO Modulator1");
lfo.setAttribute(lfo.TempoSync, value);if(value == 0) { Content.getComponent("knbLFOFrequency").set("mode", "Frequency"); Content.getComponent("knbLFOFrequency").set("defaultValue", "10.0"); //OK } else { Content.getComponent("knbLFOFrequency").set("mode", "TempoSync"); Content.getComponent("knbLFOFrequency").set("defaultValue", "1.0"); //Ignored }
};
Content.getComponent("btnTempoSync").setControlCallback(onbtnTempoSyncControl);
-
@Xearox73 said in Help a newbie, i need a solution that a knob (slider) shows both values/modes Frequency and TempoSync:
local lfo = Synth.getModulator("LFO Modulator1");
Content.getComponent("knbLFOFrequency")
Store your references as
const
inon init
instead of getting them within the function.If I remember correctly the
defaultValue
can only be changed after you change either the min or max. Here's a thread about it - https://forum.hise.audio/topic/8354/is-it-possible-to-change-default-value-after-on-init -
@d-healey
Thanks !!!
Another question, how can i set the start size of the "ZoomHandler.js"
a bit crazy ... HISE shows only in 75% the Original 2800x1500px
At 100% its to big ... zooomed ????namespace ZoomHandler
{
const var MIN_ZOOM = 0.25;
const var MAX_ZOOM = 1.0; //should be 2800x1500 or not ??
const var ZOOM_STEP = 0.10;
const var INTERFACE_WIDTH = 2800;
const var INTERFACE_HEIGHT = 1500;Correction - HISE shows never the exact ZOOM, is it not possible to set the interface at 100% Original ??
-
Option 1: Design your UI to look the way you want on a 1920x1080 screen at 100%.
Option 2: The size setting is stored in the project's GeneralSettings.xml file, so you would need to modify that to change the default value on a user's system. - Search the forum, this has been discussed before.
-
@d-healey
Ok, i read many postings, but this has to do with the zoom level of your interface.
The Interface Designer himself never shows a pixel by pixel pictore/preview
I checked all possibility and make screenshots
then imported them into my graphics software and no shot has 100% 2800x1500px ??A 75% in HISE has to be scaled up to 104,56% to show the exact 100% of the Original GUI px by px
-
@d-healey
Best Solution for all LFO controlled modulators - solved:inline function onOSC12LFOPitchSyncControl(component, value)
{
local lfo = Synth.getModulator("LFO Modulator3");
lfo.setAttribute(lfo.TempoSync, value);// if needed you can set a defaultValue for the Frequency if(value == 0) { Content.getComponent("pitchLFO12").set("mode", "Frequency"); Content.getComponent("pitchLFO12").set("min", "0.5"); Content.getComponent("pitchLFO12").set("max", "40.0"); } else { Content.getComponent("pitchLFO12").set("mode", "TempoSync"); Content.getComponent("pitchLFO12").set("defaultValue", "5.0"); Content.getComponent("pitchLFO12").set("min", "0.0"); Content.getComponent("pitchLFO12").set("max", "18.0"); }
};
Content.getComponent("OSC12LFOPitchSync").setControlCallback(onOSC12LFOPitchSyncControl);
-
@Xearox73 said in Help a newbie, i need a solution that a knob (slider) shows both values/modes Frequency and TempoSync:
Content.getComponent("pitchLFO12").set("mode", "Frequency");
Grab your component references within
on init
and store them in a const instead of getting them in the callback function. -