View Single Post
Old 07-22-2021, 10:38 AM   #5
leshachooze
Human being with feelings
 
Join Date: Aug 2015
Posts: 10
Default

There's a bug with sliders in your version: clicking outside the slider after touching it still changes its value
gif:


All you nedeed to do was to create as many gui sliders as you need in this section of code:
Code:
    function draw()
    ( 
    
    gfx_set(182/255,179/255,181/255); // grey knob
    
    eq1.slider_from_slider_H( 48,   // x-position
                              83,   // y-position
                              126,  // slider width (blank)
                              18,   // slider height
                              14,   // id of slider (slider14)
                              -12,  // minval from slider14
                              12,   // maxval from slider 14
                              0,    // default value for slider
                              0.25 // step (comfortable for mouse drag value)
                              );
    eq2.slider_from_slider_H(48,129,126,18,13, -12, 12, 0, 0.25);
    eq3.slider_from_slider_H(48,174,126,18,12, -12, 12, 0, 0.25);
    eq4.slider_from_slider_H(48,218,126,18,11, -12, 12, 0, 0.25);
    // etc........
And link them back in this section:
Code:
@slider

  // link back
    eq1 = slider14;
    eq2 = slider13;
    eq3 = slider12;
    eq4 = slider11;
    eq5 = slider10;
    eq6 = slider8;
    eq7 = slider6;
    eq8 = slider5;
    eq9 = slider4;
    eq10 = slider3;
    out_sld = slider18;
    //etc...
So, here's the working version
Ctrl or shift + drag = fine tune
Alt+Click = default value
Works also with mousewheel

But I recommend not to use pngs for gui
It's better to redraw all the elements by code depending on gfx_w and gfx_h. That will be more user-friendly and will obey resizing



It will be great if you can remake some user presets from other versions of API560. They should be exported as .rpl file and stored in the same directory as the jsfx and should be named the same with .rpl at the end.
I put "vocal 1" preset from waves as an example in attachement
Attached Files
File Type: zip API 560 EQ with GUI.zip (23.3 KB, 38 views)

Last edited by leshachooze; 07-22-2021 at 11:26 AM.
leshachooze is offline   Reply With Quote