|
|
|
01-20-2015, 02:34 PM
|
#1
|
Human being with feelings
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
|
JSFX Sliders Issues
I am a great fan of JSFX because it allows fast dev and experimentation and most of the time the built in sliders are just what we need.
I also tried to build some @gfx stuff (see some of my synths) but it is time consuming and i prefer to spend time on audio processing.
So here is some issues and enhancement for them...
JS slider order PITA
JSFX sliders on two columns
JSFX sliders in technicolor
would you use this enhancements ?
Do you have other ideas ?
|
|
|
01-21-2015, 09:39 AM
|
#2
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
|
Quote:
Originally Posted by Smashed Transistors
|
Yes. This should be helped somewhat by improvements in the upcoming version though, so it will be less of a PITA.
Quote:
Originally Posted by Smashed Transistors
|
Not sure about that one. In an ideal world it would let us define positions for sliders and offer vertical sliders and buttons in addition to the current horizontal sliders and dropdowns. That'll probably never happen though.
Quote:
Originally Posted by Smashed Transistors
|
I like that idea. Simple and effective. Stands a reasonable chance of being implemented too as it probably wouldn't take long for Justin to code it.
|
|
|
01-27-2015, 04:43 AM
|
#3
|
Human being with feelings
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
|
That's true that Two Column Sliders are not ideal, but i think that it is possible.
BTW when you shrink the window of a JSFX the sliders already transform into knobs...
So maybe it is not so far away.
|
|
|
01-27-2015, 05:50 AM
|
#4
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
|
Quote:
Originally Posted by Smashed Transistors
That's true that Two Column Sliders are not ideal, but i think that it is possible.
BTW when you shrink the window of a JSFX the sliders already transform into knobs...
So maybe it is not so far away.
|
Hey! When did that happen? Not super useful though since by the time the sliders become knobs most of the param labels are obscured.
|
|
|
02-08-2015, 03:15 AM
|
#5
|
Human being with feelings
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
|
The latest reaper adds slider naming variables. I think it s a nice way to cover the ordering issue as the code do not have to rely on the slider numbers.
|
|
|
02-08-2015, 04:18 AM
|
#6
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,790
|
I believe if you're going to use more than 30 sliders, it's probably nigh time to utilize some @gfx and actually do a custom skin for your plugin...
|
|
|
02-08-2015, 05:01 AM
|
#7
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
Quote:
Originally Posted by Smashed Transistors
The latest reaper adds slider naming variables. I think it s a nice way to cover the ordering issue as the code do not have to rely on the slider numbers.
|
Actually I think you still do because of automation, not?
|
|
|
02-08-2015, 05:05 AM
|
#8
|
Human being with feelings
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
|
@EvilDragon
I've done gfx GUIs more than once with some of my synths, for example with the Sheppard synth. But it can get really tricky (for example if you want selectors/lists).
I can spend about 1 hour a day for jsfx programming... and i prefer to spend this time on samples rather than pixels.
Sliders have many advantages:
- It takes one line of code to add a slider/selector
- They are automatically saved with the presets
- They are automated
From my point of view the @gfx is the ideal place for oscilloscopes and other additional information.
@Tale
Arrg, I didn't think about automation.
For example if you switch slider1 and slider2, you can manage the variable renaming so that the plugin works correctly... but the automation lanes won't be aware of the switch.
Last edited by Smashed Transistors; 02-08-2015 at 05:12 AM.
|
|
|
02-10-2015, 03:01 PM
|
#9
|
Human being with feelings
Join Date: Sep 2007
Posts: 642
|
in my opinion it would be optimal you could render reapers built in sliders or knobs into JS graphics area using simple command (eg. gfx_slider(params...,..,..) ).
|
|
|
02-18-2015, 12:54 PM
|
#10
|
Human being with feelings
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
|
That would be so easy to use and very versatile
|
|
|
04-19-2017, 08:50 AM
|
#11
|
Human being with feelings
Join Date: Dec 2012
Location: Germany
Posts: 3,015
|
Quote:
Originally Posted by Smashed Transistors
|
is it possible in the meantime to easily rearrange the order of sliders?
|
|
|
04-19-2017, 09:24 AM
|
#12
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
Nope, you have to renumber them throughout the code then put them in ascending order.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
04-19-2017, 12:22 PM
|
#13
|
Human being with feelings
Join Date: Dec 2012
Location: Germany
Posts: 3,015
|
so sad, this is an annoying flaw.
|
|
|
04-19-2017, 12:37 PM
|
#14
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
|
Quote:
Originally Posted by SonicAxiom
is it possible in the meantime to easily rearrange the order of sliders?
|
Quote:
Originally Posted by DarkStar
Nope, you have to renumber them throughout the code then put them in ascending order.
|
Quote:
Originally Posted by SonicAxiom
so sad, this is an annoying flaw.
|
It's only an issue if you refer to the sliders directly.
Previously the best method was to copy slider values into variables in @slider and then refer to the variables rather than sliders. That way, if you decided to reorder sliders then you only needed to change a minimal amount of code.
These days JSFX will associate variables with sliders for you so you never* need to worry about it...
Code:
slider1:myVar=1<1,512,1>Some Param
*well almost never
|
|
|
04-19-2017, 04:42 PM
|
#15
|
Human being with feelings
Join Date: Dec 2012
Location: Germany
Posts: 3,015
|
Quote:
Originally Posted by IXix
It's only an issue if you refer to the sliders directly.
|
That's exactly what I've always done so far
I don't know much about coding and have just begun to look into JSFX.
I'd really appreciate it if you could give me a little hint how to add a new slider at position 2 in a following list of 4 sliders so that former slider no. 2 becomes no. 3 etc. and all the following code (@slider, @sample) continues functioning as before.
Code:
slider1:4<0,100,1>parameter1
slider2:50<0,100,1>parameter2
slider3:50<0,100,1>parameter3
slider4:100<0,100,1>parameter4
slider5:10<0,100,1>parameter5
Last edited by SonicAxiom; 04-19-2017 at 04:50 PM.
|
|
|
04-20-2017, 12:57 PM
|
#16
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
|
Quote:
Originally Posted by SonicAxiom
add a new slider at position 2 in a following list of 4 sliders so that former slider no. 2 becomes no. 3 etc. and all the following code (@slider, @sample) continues functioning as before...
|
If you're modifying an existing effect, I would proceed as follows:
1. Decide variable names for your sliders.
2. Use find/replace in your preferred text editor to replace the slider references with the appropriate variable names eg.
Code:
something = slider1; // this
something = myVarA; // becomes this
3. Change your slider definitions to use the new format which attaches the sliders to the variable names you chose...
Code:
slider1:myVarA=4<0,100,1>parameter1
slider2:myVarB=50<0,100,1>parameter2
slider3:myVarC=50<0,100,1>parameter3
slider4:myVarD=100<0,100,1>parameter4
slider5:myVarE=10<0,100,1>parameter5
4. Reorder your sliders as you see fit. All you have to do is change the number.
5. Insert your new slider where you want it using the same syntax.
Hope that helps
|
|
|
04-20-2017, 06:37 PM
|
#17
|
Human being with feelings
Join Date: Dec 2012
Location: Germany
Posts: 3,015
|
Quote:
Originally Posted by IXix
If you're modifying an existing effect, I would proceed as follows:
1. Decide variable names for your sliders.
2. Use find/replace in your preferred text editor to replace the slider references with the appropriate variable names eg.
Code:
something = slider1; // this
something = myVarA; // becomes this
3. Change your slider definitions to use the new format which attaches the sliders to the variable names you chose...
Code:
slider1:myVarA=4<0,100,1>parameter1
slider2:myVarB=50<0,100,1>parameter2
slider3:myVarC=50<0,100,1>parameter3
slider4:myVarD=100<0,100,1>parameter4
slider5:myVarE=10<0,100,1>parameter5
4. Reorder your sliders as you see fit. All you have to do is change the number.
5. Insert your new slider where you want it using the same syntax.
Hope that helps
|
yeah, finally got it
thanks a lot, IXix, nice "workaround", great help, much appreciated!
|
|
|
04-20-2017, 09:33 PM
|
#18
|
Human being with feelings
Join Date: Oct 2013
Location: Seattle, WA
Posts: 876
|
It's probably worth mentioning that you can always skip numbers. If I don't know what I'm going to put in for features at that exact moment I'll skip a few and leave them open for later in development. E.g.
slider1:blah
slider2:blah
slider5:blah
slider10:blah
slider11:blah
etc
It does put a little extra graphic space, so you can use missing sliders artistically to group/separate them as desired (e.g. a break before and after the hi- and lo-pass filter controls).
|
|
|
06-21-2018, 03:36 PM
|
#19
|
Human being with feelings
Join Date: Apr 2010
Posts: 34
|
As a beginner, I wasn't able to implement the myVarA trick correctly so far.
Right now, I just wish to be able to see and grab the parameters beyond those who fit within my screen size.
For example, my plugin window would cutoff at slider #34 which is the last slider shown at the bottom of my screen. Am I missing something obvious?
Which would you say will be an easier solution, esp for beginners?
-A vertical scroll bar
-a simple GUI script that can rearrange orders or build columns, or
-possibly re-ordering often-used sliders to the top, with the variable names method (can this work)?
I am hoping to apply this to CCenv.
Appreciate it as always!
Last edited by tksense; 06-21-2018 at 04:48 PM.
|
|
|
06-21-2018, 09:15 PM
|
#20
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
|
JSFX is a great tool for Audio and Midi handling, but it's not focused on GUI. If you have dedicated GUI requirements, you need to do the GUI yourself in code, and this is not a task beginners are supposed to do.
-Michael
|
|
|
06-22-2018, 02:02 PM
|
#21
|
Human being with feelings
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 346
|
Experimental UI Generator
So, this might be useful or it might be pointless, but I have an experimental UI generator based on my UI library.
The idea is that you put a few simple annotations next to the sliders, to tell it how to organise the controls into rows and groups. Here's some annotations added to the built-in "Auto Wideness" effect:
Code:
// ui:row
// ui:group name=Envelope
slider1:-18<-60,0,1>-0% Wideness @ (dB)
slider2:-6<-30,24,1>-100% Wideness @ (dB)
slider3:1<0,50,1>-Attack (ms)
slider4:250<20,2000,10>-Release (ms)
// ui:row
// ui:group name=Width
slider5:0<0,50,1>-Min Width (%)
slider6:100<50,500,10>-Max Width (%)
slider7:0<0,2,1{Left+Right,Left,Right}>-0% Signal
slider8:0<0,1,1{No,Yes}>-Reverse Mode
// ui:group name=Output
slider14:0<0,100,1>-Current Wideness (%)
// ui:row
// ui:group name=Director
slider9:0<0,5,1{Left+Right,Left,Right,Sidechain Left+Right,Sidechain Left,Sidechain Right}>-Director
slider10:20<20,20000,10>-Director HP (Hz)
slider11:20000<20,20000,10>-Director LP (Hz)
slider12:0<0,1,1{No,Yes}>-Preview Director
It then generates a big mess of code to put in @gfx, using various controls depending on the slider parameters:
If you have lots of controls, there's a "compact" mode which tries to squish things up a bit:
You need to change your effect so it imports the UI library, and sets it up in @init (it needs some memory buffer). If there are already some things being drawn in @gfx, you can incorporate that with some pretty simple refactoring. You may also need to tweak the @slider code as well, depending what you're using it for.
That stuff is hopefully explained in the documentation included in the tool. If anyone gives it a try I'd be interested in any bumps you hit or bugs you find.
Geraint
Last edited by geraintluff; 06-22-2018 at 02:24 PM.
|
|
|
06-22-2018, 02:51 PM
|
#22
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
|
Nice !!!!
-Michael
|
|
|
06-26-2018, 01:39 PM
|
#23
|
Human being with feelings
Join Date: Apr 2010
Posts: 34
|
Hi Geraint,
So far, I am able to import ui-lib, copy freemem @init, generate and paste @gfx code in the end, and hide JS sliders.
The GUI shows up, but the knob in the GUI would not respond to any click. Instead, moving the original JS slider will turn the GUI into a blank white screen with a message "Unknown screen: (65.000000)".
I suspect this can be solved by a "needs_slider_update" definition. However, I haven't figured out how to implement the function (in @init) yet.
Can you show us a before & after example in how to do this?
I am hoping it will work with sysex editors like below and with CCenv by Panu Aaltio and P.M. Crockett.
A generator like this for us less technical users is a godsend.
Thank you so much for sharing!
Pat
Geraint's main JSFX UI thread with more details:
https://forum.cockos.com/showthread.php?t=181055
Code:
desc:V-Synth COSM1 DTVF
slider1:64<0,127,1>cutoff DTVF
slider2:64<0,127,1>Reso DTVF
////////////////////////////////////////////////////////////////////////////
in_pin:none
out_pin:none
import ui-lib.jsfx-inc
@init
freemem = 0;
freemem = ui_setup(freemem);
////////////////////////////////////////////////////////////////////////////
@slider
slider1 = floor(slider1);
Slider2 = floor(slider2);
////////////////////////////////////////////////////////////////////////////
@block
//COSM1 DTVF Cutoff
(slider1 != oldslider1) ?
(
msgbuf[0] = $x41;
msgbuf[1] = $x10;
msgbuf[2] = $x00;
msgbuf[3] = $x53;
msgbuf[4] = $x12;
msgbuf[5] = $x10;
msgbuf[6] = $x00;
msgbuf[7] = $x50;
msgbuf[8] = $x16;
msgbuf[9] = $x08;
msgbuf[10] = $x00;
msgbuf[11] = floor(slider1/16);
msgbuf[12] = floor(slider1 % $x10);
msgbuf[13] = floor(slider1);
midisyx(0,msgbuf,14);
oldslider1 = slider1;
);
//COSM1 DTVF Reso
(slider2 != oldslider2) ?
(
msgbuf[0] = $x41;
msgbuf[1] = $x10;
msgbuf[2] = $x00;
msgbuf[3] = $x53;
msgbuf[4] = $x12;
msgbuf[5] = $x10;
msgbuf[6] = $x00;
msgbuf[7] = $x50;
msgbuf[8] = $x06;
msgbuf[9] = $x08;
msgbuf[10] = $x00;
msgbuf[11] = floor(slider2/16);
msgbuf[12] = floor(slider2 % $x10);
msgbuf[13] = floor(slider2);
midisyx(0,msgbuf,14);
oldslider2 = slider2;
);
Last edited by tksense; 06-27-2018 at 12:58 PM.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 03:18 AM.
|