Welcome to %s forums

BrainModular Users Forum

Login Register

Hold Button knob

I need help on a Patch
Post Reply
Ariajazz
Member
Posts: 353
Contact:

Unread post by Ariajazz » 19 Jun 2016, 04:45

Is there any way to create a button (touch screen) that will increase or decrease values of a knob or fader by pressing and hold on it?

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 19 Jun 2016, 12:15

Something like this work, play with the width parameter of the ramp to adjust sensibility
Image

Ariajazz
Member
Posts: 353
Contact:

Unread post by Ariajazz » 20 Jun 2016, 05:16

Thanks Nay... it works perfectly.

Ariajazz
Member
Posts: 353
Contact:

Unread post by Ariajazz » 25 Jun 2016, 07:41

One little problem: when I press and hold the button and reaches the top it does not stop, instead it jumps to the minimum value (0). The same happens when decreasing, it jumps to the max value. How can this be fixed?

Thanks in advance.

Ariajazz
Member
Posts: 353
Contact:

Unread post by Ariajazz » 01 Jul 2016, 05:11

Does anybody know?

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 01 Jul 2016, 06:17

You gotta think these things thru logically...

The first step is to figure out the rule. You ONLY want the button to increment the fader if the fader value < the max, correct? That's the rule.

So there are probably many ways to do this, but here is one way:
Add an AND logical module between the button & the Pass module above
Add a 'not equal' (<>) logical module after the Fader

Fader value => Not Equal A inlet
Fader max => Not Equal B inlet
Button mouse down => AND A inlet
Not Equal out => AND B inlet
AND out => Pass Flow pass inlet

and, of course, remove the existing Button mouse down connection to the Pass Flow pass inlet

As long as the fader value <> max, there will be a '1', or TRUE coming from the Not Equal <> module.
The AND between the button & the fader will thus only work when this is so. When the fader value = max, the Not Equal will return FALSE, or 0, and the Pass will withhold the flow.

Hope this helps,
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

User avatar
oli_lab
Member
Posts: 1263
Location: Brittany, France
Contact:

Unread post by oli_lab » 01 Jul 2016, 10:11

you can use the "incrementor stop" module I made

check the Oli_Lab module pack on the addon page

cheers.
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

Ariajazz
Member
Posts: 353
Contact:

Unread post by Ariajazz » 22 Jul 2016, 05:49

shawnb wrote:You gotta think these things thru logically...

The first step is to figure out the rule. You ONLY want the button to increment the fader if the fader value < the max, correct? That's the rule.

So there are probably many ways to do this, but here is one way:
Add an AND logical module between the button & the Pass module above
Add a 'not equal' (<>) logical module after the Fader

Fader value => Not Equal A inlet
Fader max => Not Equal B inlet
Button mouse down => AND A inlet
Not Equal out => AND B inlet
AND out => Pass Flow pass inlet

and, of course, remove the existing Button mouse down connection to the Pass Flow pass inlet

As long as the fader value <> max, there will be a '1', or TRUE coming from the Not Equal <> module.
The AND between the button & the fader will thus only work when this is so. When the fader value = max, the Not Equal will return FALSE, or 0, and the Pass will withhold the flow.

Hope this helps,
I tried this several times and checked if i was doing something wrong but did not work. Could you please show a diagram with the modules involved in the patch?

User avatar
oli_lab
Member
Posts: 1263
Location: Brittany, France
Contact:

Unread post by oli_lab » 22 Jul 2016, 20:09

Use my module !
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

Ariajazz
Member
Posts: 353
Contact:

Unread post by Ariajazz » 25 Jul 2016, 03:41

oli_lab wrote:Use my module !
I'm using USINE STAGE. I downloaded your modules pack but I cannot get them seen by USINE STAGE. 5.80. OK with Hollyhock but don't know how to use it

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 25 Jul 2016, 03:57

Image

The above shows the technique I described above.

A couple of notes:
- The clock was a little more versatile, you can adjust the speed by changing the interval
- Note that since it will keep incrementing whenever the curr value <> the max value, you do have to pay careful attention to some of the fader values. I set the Fader "inc/dec val" to 1 and the Fader "precision" to integer. That way you know you won't get a value of 127.35 or smoething like that, which will just cause another cycle thru from min to max.

Hope this makes sense...
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

Ariajazz
Member
Posts: 353
Contact:

Unread post by Ariajazz » 25 Jul 2016, 04:37

Thanks Shawnb. I'll try it right away.

Ariajazz
Member
Posts: 353
Contact:

Unread post by Ariajazz » 25 Jul 2016, 05:38

shawnb wrote:Image
OK this is what's happening. The fader (-50/12 dB) has two controls INC and DEC. it works perfectly when set to integer and inc/dec val=1 but I need to have with at least one decimal, which I did ( X.X and 0.1 inc dec val). In this case it stops at 12 but it does not at -50. I'm checking out what could be wrong but I don't find anything

Image

http://www.sensomusic.com/forums/upload ... tled-2.jpg

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 25 Jul 2016, 07:15

If you need one decimal value, then your inc/dec must be 0.1 and your fader precision must be x.x.

If this doesn't work, we may need to do the math & range check completely outside of the fader control. Then we can clip it & provide full control PRIOR to setting the fader value.
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

Ariajazz
Member
Posts: 353
Contact:

Unread post by Ariajazz » 25 Jul 2016, 15:30

shawnb wrote:If you need one decimal value, then your inc/dec must be 0.1 and your fader precision must be x.x.

If this doesn't work, we may need to do the math & range check completely outside of the fader control. Then we can clip it & provide full control PRIOR to setting the fader value.
It is exactly what I did but I wonder why it does not work for DECREASING. It does the job for INCREASING the values as it stops at the maximum value.

Here is the patch

http://www.sensomusic.com/forums/upload ... ontrol.pat

Ariajazz
Member
Posts: 353
Contact:

Unread post by Ariajazz » 25 Jul 2016, 22:09

Fader INC/DEC value does not alow to be set at 0.1 instead it appears as 0.100000001490116. weirdly it allows to be set at 0.5 all other decimals appear with a long series of digits. Is there any way to solve this?

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 26 Jul 2016, 04:18

Image
http://www.sensomusic.com/forums/uploads.php?file=GAINCONTROL2.pat

Attached is an image & an example of a slightly different approach. I didn't like the "feel" of the increments/decrements, it felt like the speed was out of control.

So... On this patch...
- a click on the left half of the button increments or decrements by your inc/dec value
- a double-click on the left half of the button increments or decrements by a bunch of your inc/dec values
- holding the right half of the button scrolls smoothly

Try it out!
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

Ariajazz
Member
Posts: 353
Contact:

Unread post by Ariajazz » 10 Aug 2016, 04:11

shawnb wrote:[img align=c]http://www.sensomusic.com/forums/upload ... trol-2.JPG[/url]
http://www.sensomusic.com/forums/uploads.php?file=GAINCONTROL2.pat

Attached is an image & an example of a slightly different approach. I didn't like the "feel" of the increments/decrements, it felt like the speed was out of control.

So... On this patch...
- a click on the left half of the button increments or decrements by your inc/dec value
- a double-click on the left half of the button increments or decrements by a bunch of your inc/dec values
- holding the right half of the button scrolls smoothly

Try it out!
Very helpfull, thanks a lot. Although y created a similar patch that suites my needs.

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests