Can't control bus volumes by custom sliders
Hi! junior here!) I am writing a library in which 3 parallel channels should be played. I assigned groups of samples to different buses manually. The volume should be controlled by custom sliders, but when I try to change the volume it drops to a minus infinite value and is not adjustable.
Thanks for any help! Here's the code!
on init
set_ui_height_px(600)
set_ui_width_px(1000)
{create the control - must be a slider}
declare ui_slider $cleanVolumeSlider (-100, 100)
set_control_par(get_ui_id($cleanVolumeSlider),$CONTROL_PAR_DEFAULT_VALUE,50)
$cleanVolumeSlider := 50
declare ui_slider $distortionVolumeSlider (-100, 100)
declare ui_slider $subVolumeSlider (-100, 100)
make_perfview
{hide the slider parts}
hide_part($cleanVolumeSlider, $HIDE_PART_BG .or. $HIDE_PART_MOD_LIGHT .or. $HIDE_PART_TITLE .or. $HIDE_PART_VALUE)
{hide the slider parts}
hide_part($DistortionVolumeSlider, $HIDE_PART_BG .or. $HIDE_PART_MOD_LIGHT .or. $HIDE_PART_TITLE .or. $HIDE_PART_VALUE)
{hide the slider parts}
hide_part($subVolumeSlider, $HIDE_PART_BG .or. $HIDE_PART_MOD_LIGHT .or. $HIDE_PART_TITLE .or. $HIDE_PART_VALUE)
{assign the image file}
set_control_par_str(get_ui_id($cleanVolumeSlider), $CONTROL_PAR_PICTURE, "fader")
{assign the image file}
set_control_par_str(get_ui_id($distortionVolumeSlider), $CONTROL_PAR_PICTURE, "fader")
{assign the image file}
set_control_par_str(get_ui_id($subVolumeSlider), $CONTROL_PAR_PICTURE, "fader")
{place it on the performance view}
move_control_px($cleanVolumeSlider, 365, 356)
{place it on the performance view}
move_control_px($distortionVolumeSlider, 490, 415)
{place it on the performance view}
move_control_px($subVolumeSlider, 608, 356)
{control how mouse movements should affect the control}
set_control_par(get_ui_id($cleanVolumeSlider), $CONTROL_PAR_MOUSE_BEHAVIOUR, -500)
{control how mouse movements should affect the control}
set_control_par(get_ui_id($distortionVolumeSlider), $CONTROL_PAR_MOUSE_BEHAVIOUR, -500)
{control how mouse movements should affect the control}
set_control_par(get_ui_id($subVolumeSlider), $CONTROL_PAR_MOUSE_BEHAVIOUR, -500)
end on
Comments
-
Try this value for all sliders: declare ui_slider $cleanVolumeSlider(0, 1000000)
1 -
Thanks you! It works!)
0
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 60 NI News
- 771 Tech Talks
- 4K Native Access
- 16.3K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.6K Kontakt
- 1.6K Reaktor
- 376 Battery 4
- 834 Guitar Rig & FX
- 425 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.7K Maschine
- 7.2K Traktor
- 7.2K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators