USB pedal program

Discuss anything new and newsworthy! See http://planet.linuxaudio.org and https://libreav.org/news for more Linux Audio News!

Announcements of proprietary software may fit better in the Marketplace.


Moderators: raboof, MattKingUSA, khz

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

USB pedal program

Post by j_e_f_f_g »

My GUI utility to program USB pedals under Linux is coming along nicely. (You can use a pedal to control your DAW and softsynths). It now supports a variety of brands/models as so:

Scythe - http://www.scythe-usa.com/product/input ... etail.html
Stritch - http://www.usbvi.com
PCsensor - http://pcsensor.com/index.php?_a=viewProd&productId=5 http://pcsensor.com/index.php?_a=viewProd&productId=4
DelCom - http://www.delcomproducts.com/products_USBFSW.asp

It may support other pedals too, because a lot of these companies use the same third party USB chip. (ie, The Scythe and Stritch pedals use the same chip.)

Here's a link to a zip file containing my utility. I compiled a 64-bit version (in the linux/64 folder), and a 32-bit version (in the linux/32 folder). Test the one appropriate for your computer. You may need to run it from a root terminal (or copy it to your usr/bin folder).

http://home.roadrunner.com/~jgglatt/mid ... /pedal.zip

I tested with a Scythe (and a Stritch will work). But I need folks to test the PCsensor, DelCom, and any other USB pedals. If the utility works with your pedal, post a reply letting me know the brand/model so it can be added to the supported list. If your pedal doesn't work, leave me a message via this forum, and I'll work on adding support.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

wolftune
Established Member
Posts: 1350
Joined: Fri Feb 24, 2012 7:40 pm
Location: Portland, OR
Been thanked: 2 times
Contact:

Re: USB pedal program

Post by wolftune »

woohoo! Thanks!! will check soon
Aaron Wolf
Music teacher, scholar
http://wolftune.com
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: USB pedal program

Post by j_e_f_f_g »

I made an update. Since the utility supports numerous pedals (including more than one of a particular model), I added a "Find" button to pick which (of several attached pedals) you want to program. So if the utility works, you can buy more of the same pedals to create a multi-pedal setup (although the 3 pedal units are ulimately cheaper and more efficient).

I also updated the Windows version (in win/Release) of my utility to be the same as the linux version. The one version works on both 32 and 64 bit windows.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

wolftune
Established Member
Posts: 1350
Joined: Fri Feb 24, 2012 7:40 pm
Location: Portland, OR
Been thanked: 2 times
Contact:

Re: USB pedal program

Post by wolftune »

Sorry, how do I run this? I get this executable file, but when I double-click it just asks what program to use to open it… I'm still no expert on this stuff. Do I need to compile the program myself?
Aaron Wolf
Music teacher, scholar
http://wolftune.com
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: USB pedal program

Post by j_e_f_f_g »

Hmmm. Probably the executable attribute got reset.

Open a "root terminal" window, and cd to directory where you unzipped pedal, then type:

chmod a+x ./pedal

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

wolftune
Established Member
Posts: 1350
Joined: Fri Feb 24, 2012 7:40 pm
Location: Portland, OR
Been thanked: 2 times
Contact:

Re: USB pedal program

Post by wolftune »

Ok, it works now. First it gave a permissions error, so I ran with sudo, then all the interface things seemed to work but on every step it said "pipe error" and the pedal didn't do what I'd want.
Aaron Wolf
Music teacher, scholar
http://wolftune.com
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: USB pedal program

Post by j_e_f_f_g »

I think I found the error. Download the latest version and try that.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

wolftune
Established Member
Posts: 1350
Joined: Fri Feb 24, 2012 7:40 pm
Location: Portland, OR
Been thanked: 2 times
Contact:

Re: USB pedal program

Post by wolftune »

Nope, same error, plus still had permissions error running it without doing sudo.
Aaron Wolf
Music teacher, scholar
http://wolftune.com
User avatar
linuxdsp
Established Member
Posts: 147
Joined: Sun Mar 01, 2009 12:40 pm
Location: Oxford, England
Contact:

Re: USB pedal program

Post by linuxdsp »

I always thought it was potentially a bad idea to sudo X11 applications?
wolftune
Established Member
Posts: 1350
Joined: Fri Feb 24, 2012 7:40 pm
Location: Portland, OR
Been thanked: 2 times
Contact:

Re: USB pedal program

Post by wolftune »

ok, good to know! :P So anyway, this pedal program is giving me permissions errors and pipe errors. So I can't run it.
Aaron Wolf
Music teacher, scholar
http://wolftune.com
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: USB pedal program

Post by j_e_f_f_g »

Ah the joy of doing hardware support for hardware I don't own. I've had to guess at the size of the output control message for this pedal. The pipe error means I guessed wrong. I think I was off by 1 byte. Let's try one more test with a new version I just uploaded. (It may still give an initial error at startup due to not properly reading the pedal's current programming. That can be fixed later. Right now I just want to get it working at changing the settings).

Yes, the permissions error you're getting has to do with the fact that a normal user account doesn't have permission to run software that directly writes to a usb input device. As falk noted, you have to add your account to a group that allows that. I can investigate the details of that later. For right now, just sudo it.

Pay no attention to the attempted thread hijacking about X11 apps allegedly being a security threat. It has no relevance to any of the issues here. (And one should be able to see from the source that I'm doing nothing even remotely beyond simple drawing, and the most basic input loop. Someone is yelling "fire" when there isn't even smoke).

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
linuxdsp
Established Member
Posts: 147
Joined: Sun Mar 01, 2009 12:40 pm
Location: Oxford, England
Contact:

Re: USB pedal program

Post by linuxdsp »

Pay no attention to the attempted thread hijacking about X11 apps allegedly being a security threat.
My comment had nothing whatever to do with a security threat, real or imagined - I was simply pointing out that, as far as I know, it is considered a bad thing to do. I don't class that as "thread hijacking" either.
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: USB pedal program

Post by j_e_f_f_g »

linuxdsp wrote:nothing whatever to do with a security threat
Ah well, then I'll just inform you that the danger of running an app (any app, not just an X11 app) with sudo is due to giving the app permission/access to do things it couldn't do when not run under a superuser account. Typically, people refer to this as "a security threat". See http://en.wikipedia.org/wiki/Sudo
linuxdsp wrote:as far as I know, it is considered a bad thing to (use sudo to run an X11 app).
Other than a security threat, it's anyone's guess why you've concluded this. Sounds like one of those programmer myths, where someone read something about X11 (ssh forwarding issues???), and interpreted it or took it out of context, and it became "it's a bad thing to run an x11 app with sudo". Whatever it is, it's irrelevant to my pedal utility, and the original thread.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
linuxdsp
Established Member
Posts: 147
Joined: Sun Mar 01, 2009 12:40 pm
Location: Oxford, England
Contact:

Re: USB pedal program

Post by linuxdsp »

Ah well, then I'll just inform...
Thanks, oddly enough, I already know that. My comment was intended to point out that while obviously the same security risks exist as for any app running under sudo, there are some special cases in which X11 apps can cause problems when sudo'd which are not necessarily related to security.
Whatever it is, it's irrelevant to my pedal utility, and the original thread.
No, it's completely relevant, because what I was actually trying to do was to make you aware of some potential problems with the design of your application. It wasn't a personal criticism or attack, it was simply 'here's something I think isn't right..'
therefore, what you could do, is calmly consider whether that is relevant, and if so perhaps improve the design of your application.
wolftune
Established Member
Posts: 1350
Joined: Fri Feb 24, 2012 7:40 pm
Location: Portland, OR
Been thanked: 2 times
Contact:

Re: USB pedal program

Post by wolftune »

Well, it would be nice to know precisely what user permission to change to allow the USB access…
It would be best if I didn't have to bother sudo'ing.

Incidentally, in your original links you included only the more expensive metal pedals from PCsensor. There are also plastic ones:
http://pcsensor.com/index.php?_a=viewProd&productId=2
http://pcsensor.com/index.php?_a=viewProd&productId=3

And they are only $8.50 for one or $21.50 for a three-pedal, so much cheaper than any other option out there. Besides eventually including all these links with the software once it is confirmed working (and ideally contacting the manufacturers to give them the links and suggest they emphasize Linux compatibility even more), these are cheap enough that you might choose to just order them yourself for testing.

But I tried the test myself again and…
First off, you still haven't fixed the issues with the executable. I'm having to run chmod thing every time I download.
And I still get the pipe error with the latest version.
Thanks for working on this though. It'll be quite valuable once it works!
Aaron Wolf
Music teacher, scholar
http://wolftune.com
Post Reply