Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 10-12-2019, 07:43 AM   #1
capn slugo
Human being with feelings
 
Join Date: Sep 2010
Location: NYCishness
Posts: 200
Default "Debounce" a soft potentiometer/pitch ribbon

Does anyone know if there's a way to use JSFX or some other MIDI CC utilities to digitally "Debounce" a soft potentiometer?

I'm using a pitch ribbon type /soft potentiometer via a usb midi control interface to automate various exclusive Reaper functions (transpose- midi channel and program change)

WORKS GREAT!! If only I could keep it from reverting to zero when released...I (or YOU) could rule the world?

The pot sends out a cc value of zero when you take your finger off.

If this value could be filtered out and work reliably, countless real time/exclusive/space saving controls could be at your fingertips using various CC mappings by placing a long 500 millimeter in close proximity (above) a keyboard or other controller and breaking it length into specific marked /mapped segments.

If only it held the value held in place when released.

There's countless discussions in spark fun and other electronics forums on the web how to do this with specific code and hardware but I suspect someone has already done it with JSFX or another MIDI VST.

I've had limited success using PIZ and other midi utilities to filter out zero but I can't get it to work consistently.

Any ideas would be great. Thanks
capn slugo is offline   Reply With Quote
Old 10-12-2019, 08:03 AM   #2
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Quote:
Originally Posted by capn slugo View Post
I've had limited success using PIZ and other midi utilities to filter out zero but I can't get it to work consistently.
This would have been my first suggestion. What is it doing (or not doing)?
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 10-12-2019, 08:51 AM   #3
capn slugo
Human being with feelings
 
Join Date: Sep 2010
Location: NYCishness
Posts: 200
Default

Quote:
Originally Posted by Lokasenna View Post
This would have been my first suggestion. What is it doing (or not doing)?
For now,I'm using MIDI cc values to automate Transpose functions across 2 full octaves (NOT pitchbend)

If I keep my finger on the pot it works reliably to a predictable and repeatable value.

When I release the pot it value will go to seemingly random values - I suspect those values are actually intervals in the function reverting to zero.

I spent an entire day experimenting endlessly with every PIZ & JSFX in the arsenal.


I even trying to convert the CCs to notes, pitch change (mapping unwanted values into oblivion)and back to CCs


I'm waiting on a spark fun kit to try this code someone is using for an entirely different function.

https://forum.sparkfun.com/viewtopic.php?t=38321

I keep thinking there has to be a way to do this with Reaper and I'm not the only one that could really use it.

I've not yet tried editing JS code but could use a tip as to where to start for this task if it's possible.
capn slugo is offline   Reply With Quote
Old 10-12-2019, 08:57 AM   #4
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Throw JS: Midi Logger on a track and have a look at the output when you take your finger off. The last value is the CC value of the event in hexadecimal.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 10-12-2019, 09:20 AM   #5
capn slugo
Human being with feelings
 
Join Date: Sep 2010
Location: NYCishness
Posts: 200
Default

Quote:
Originally Posted by Lokasenna View Post
Throw JS: Midi Logger on a track and have a look at the output when you take your finger off. The last value is the CC value of the event in hexadecimal.
Thanks/will do. I just started noticing that util.

I'm out of town but that sounds like a great starting place when I get back to work on this on Tues.
capn slugo is offline   Reply With Quote
Old 10-15-2019, 05:01 AM   #6
capn slugo
Human being with feelings
 
Join Date: Sep 2010
Location: NYCishness
Posts: 200
Default

Quote:
Originally Posted by Lokasenna View Post
Throw JS: Midi Logger on a track and have a look at the output when you take your finger off. The last value is the CC value of the event in hexadecimal.

I see several columns of numbers and letters with values that change (some seemingly randomly) as I touch and release the pot. The far right column(s)are the only one that consistently repeat when touched in and reset when the pot is released to a value of "b0 15 00"

For what it's worth: I have the transpose automation I'm using set up to CC 21 chan 16

An example of he numbers I'm monitoring on the JS logger is ("b0 15 2b)that corresponds with a value of "43" (between 0-127) from the pot/interface setup.

Another example is that a value of "58" from the pot/ interface will give me a reading of "b0 15 3a"


Something I'm noticing that when the pot is released a lines of data are generated in rapid succession. Higher values ( say a a 118 between 0-127) will generate 12 lines of data while lower ones (say a "17" will only generate 2 lines of data)
capn slugo is offline   Reply With Quote
Old 10-15-2019, 06:09 AM   #7
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

- As I said, the numbers are hexadecimal; everything looks good there:
Code:
Hex   Dec
15    21
2b    43
3a    58
- It sounds like your knob has some sort of aftertouch or "smooth" reset behavior, which might be something you could turn off in the device's settings. What device are you using?
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 10-15-2019, 07:24 AM   #8
capn slugo
Human being with feelings
 
Join Date: Sep 2010
Location: NYCishness
Posts: 200
Default

Thanks
Hope you don't mind if I restate it's not a conventional "knob" but a soft potentiometer , similar to a pitch change ribbon so it's behavior is inherently different in some ways but I still believe there's a way to filter out values when it is released.

I'm using an audiofront quarto.

https://www.audiofront.net/MIDIExpre...ction=features

It has a smoothing option but it's not engaged.

When I do turn it on it adds more lines of code visible in the JS logger.
capn slugo is offline   Reply With Quote
Old 10-15-2019, 11:55 AM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by capn slugo View Post
This seems to be an A/D converter, not a ribbon.
A "ribbon" connected to that should cover two inputs (e.g. one for position and one for pressure). With that the "pressure" could be used to "gate" the "position" to accomplish what you are trying to do.

-Michael
mschnell is offline   Reply With Quote
Old 10-15-2019, 12:59 PM   #10
capn slugo
Human being with feelings
 
Join Date: Sep 2010
Location: NYCishness
Posts: 200
Default

Quote:
Originally Posted by mschnell View Post
This seems to be an A/D converter, not a ribbon.
A "ribbon" connected to that should cover two inputs (e.g. one for position and one for pressure). With that the "pressure" could be used to "gate" the "position" to accomplish what you are trying to do.

-Michael
Thanks Michael. That's a great Idea.

What you're suggesting may well be much simpler and more elegant than trying to filter out unwanted cc values.

I just wish it didn't take another input in my interface. I'll stacking a pressure sensor under the pot.
capn slugo is offline   Reply With Quote
Old 10-15-2019, 10:47 PM   #11
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

In fact I have no idea what "ribbon" hardware you intend to use.,,.,
-Michael
mschnell is offline   Reply With Quote
Old 10-16-2019, 01:55 AM   #12
cyrano
Human being with feelings
 
cyrano's Avatar
 
Join Date: Jun 2011
Location: Belgium
Posts: 5,246
Default

I can't shed the feeling you're trying to solve a hardware problem with software...

If it works as long as you keep your finger on it and stops when you lift that finger, you might have a noise problem. In my mind, you need to fix that first. Shielding, proper grounding etc,

If you're working on a breadboard. try some grounded alu foil around it?
__________________
In a time of deceit telling the truth is a revolutionary act.
George Orwell
cyrano is offline   Reply With Quote
Old 10-16-2019, 04:22 AM   #13
capn slugo
Human being with feelings
 
Join Date: Sep 2010
Location: NYCishness
Posts: 200
Default

Quote:
Originally Posted by cyrano View Post
I can't shed the feeling you're trying to solve a hardware problem with software...

If it works as long as you keep your finger on it and stops when you lift that finger, you might have a noise problem. In my mind, you need to fix that first. Shielding, proper grounding etc,

If you're working on a breadboard. try some grounded alu foil around it?
IT IS a hardware problem in that the soft potentiometer resets to zero each time exactly as it is designed to do. The function I'm asking for:the ability to release the potentiometer and have the value retained: is not a function that exists in the physicality of the pot or the usb interface settings. I do speculate that the unwanted (post finger release) MIDI CCs generated could be at least crudely filtered out...

but ...

....perhaps gating this: (The potentiometer that I'm using)
https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

...with this:
https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

is the answer

Last edited by capn slugo; 10-16-2019 at 05:23 AM.
capn slugo is offline   Reply With Quote
Old 10-16-2019, 04:28 AM   #14
capn slugo
Human being with feelings
 
Join Date: Sep 2010
Location: NYCishness
Posts: 200
Default

Quote:
Originally Posted by mschnell View Post
In fact I have no idea what "ribbon" hardware you intend to use.,,.,
-Michael
I intend on using this pot
https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

physically stacked on top of this pressure sensor

https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

using two specified imputs in this interface

https://www.audiofront.net/MIDIExpre...ction=features




I took this as being your idea.
capn slugo is offline   Reply With Quote
Old 10-16-2019, 05:26 AM   #15
cyrano
Human being with feelings
 
cyrano's Avatar
 
Join Date: Jun 2011
Location: Belgium
Posts: 5,246
Default

With the aid of MIDI Expression, I presume?

On first look, it seems MIDI Expression should be able to to do it. But I haven't tried that, of course.

Again, without thinking about it much, I'd go for an Arduino or ESP32 in between your hardware and MIDI out. IIRC, that's what Karbo has done.

Still, I'd put a grounded metal plate under your experimental setup. I've wasted far too much of my life on noise already

Maybe a pic or two would inspire the greater minds on this forum?
__________________
In a time of deceit telling the truth is a revolutionary act.
George Orwell
cyrano is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.