Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 08-21-2009, 05:56 PM   #1
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default Using a simple USB gamepad as an expression controller (with script!)

Hello everyone!

I use a fairly unique keyboard as my primary playing surface because I love its ability to help me see patterns in music. Unfortunately the KB doesn't have pitch bend, modwheel, aftertouch, or any CC controllers.

For a while now I've been using a cheap 25 key keyboard along with the Axis just for the PB/MW and 16 rotary encoders. This wasn't ideal because the Xboard is much larger than the Axis and hindered my musical portability.

Two days ago I was at Fry's electronics and saw this little controller for $15. I remembered seeing Reaper 3 had joystick support so I figured I'd give it a go...

Two days layer I have a very usable, small, inexpensive controller I place next to my Axis and I get all the expression I need.



>>> DOWNLOAD GAMEPAD SCRIPT HERE <<<



To Install:
1. Download the file, unzip it and place gamepad_expression.txt into (REAPER ROOT)\joystick_midi
2. Load Reaper with your joystick connected and go to Options -> Preferences... (Ctrl+P)
3. Select in the left hand frame Audio->MIDI Devices then click on the button [ Add Joystick MIDI... ] on the right hand side of the box in the middle.
4. In the popup dialog box titled "Joystick->MIDI" select your joystick in the Device: pulldown, then select "gamepad_expression.txt" in the "Processing Script:" pulldown. You can optionally select what midi channel you want messages sent on via the "Script mode:" pulldown.

At this point you should be ready to go! If you move the analog sticks you should see numbers changing on the "axis=" line in the Joystick->MIDI box. If you don't there might be a problem with Windows seeing your joystick.

How the script configures the joystick:

Since I'm a lefty (sorry!) I configured this script to place the joystick on the right side of my keyboard in the following way:


Please note the directions I use in the instructions below are in relation to this diagram! UP in the directions is normally "left" when holding the joystick if you were playing a game with it.

The script has 10 joystick presets and starts at preset 1 by default. The different presets only change how the analog joysticks work, the buttons and D-PAD (POV) are always the same. The presets configure the gamepad in the following way:

Preset 1:
Joy 0 up = pitchbend up
Joy 0 dn = pitchbend down
Joy 1 up = modwheel 0-127
Joy 1 dn = aftertouch (channel pressure) 0-127

Presets 2-10:
Joy 0 is now an XY controller with two CCs mapped to the XY axis. When centered the CCs transmit 63 for both. This is great for synths like Zebra and Alchemy that have XY expression controllers.
Joy 1 up is the same as Joy 0's X-axis.
Joy 1 down is the same as Joy 0's Y-axis.
The CCs for presets 2-10 go from 102 to 119 with even CCs being the Y-axis and odd CCs being the X-axis.

This is useful as some people map 0,0 to be the default sound and others map 63,63 as the default.

The buttons
Buttons 1-4 can be used to quickly change to any of the 10 joystick presets. Subsequent button presses are added up until the same button is pressed twice. That value is then used to switch to that preset. The second button preset is not summed with the value.

It sounds a bit weird but is really simple once you start using it.

examples:
switch to preset 1: 1, 1
switch to preset 2: 2, 2
switch to preset 3: 2, 1, 1 or 3, 3
switch to preset 4: 4, 4 or 3, 1, 1
switch to preset 10: 3, 2, 3, 2, 2 (one of many)

Button 5 switches the D-PAD (POV) from joystick preset mode to midi preset mode (more on this when I talk about the D-pad). This is a momentary button, you have to hold down button 5 to keep the pad in midi mode. As soon as it's released the pad goes back into joystick preset mode.

Button 6 (bottom shoulder button, closest to top) is akin to a panic reset. It puts the joystick back in preset 1, sends all notes off, and resets pitchbend, modwheel, and channel pressure. It also resets your midi bank select to 0, 0, 0. So use this button with care!

The bottom shoulder buttons (7,8) and the joystick depression buttons (11, 12) are unmapped. I may think of something for 7,8 in the future but I find 11 and 12 are just too hard to use w/o causing the joystick to wiggle.

Buttons 9 and 10 (in the select and start spots in PS2/PS3 controller configs) are the freeze/unfreeze buttons for each joystick.

Button 9 works as you expect. Move Joystick 0, press button 9, and the pitchbend/midi CC doesn't change if you keep moving it. Press button 9 again and you can move the joystick again.

Button 10 works a bit differently. It only freezes the active direction. This is really useful if you want to freeze the modwheel position (up) and then adjust channel pressure (down). Centering the joystick and pressing button 10 will unfreeze it.

The D-Pad (aka POV)
When button 5 is not depressed (see above) the D-Pad operates as follows:
UP = unfreezes and resets Joy 0's parameters
DN = unfreezes and resets Joy 1's parameters
LEFT = selects the previous joystick preset (wraps around at 0 back to 10)
RIGHT = selects the next joystick preset (wraps around at 10 back to 0).

When Button 5 is held down the pad changes to sending MIDI bank select messages:
UP = the previous BANK (note this wraps at 0 to very large bank configs (MSB 127, LSB 127, PC 127). If you're not at the beginning of a bank, it takes you back to the beginning of the current bank. If you are at the beginning of a bank then it will take you to the previous bank.

Example. You're on preset 260. You press 5+UP. You're now at preset 256. You press 5+UP. You're now at Preset 128. You press 5+UP. You're now at Preset 0.

DN = the next BANK (will wrap around to 0). This always goes to the next bank in the series.

Example. You're on preset 260. You press 5+DN. You're now at preset 384 (256+128). You press 5+DN. You're now at preset 512.

LEFT = the previous midi preset (wraps at 0)
RIGHT = the next midi preset (wraps at 2+ million -- 21 bits)

Joystick thresholds
These joysticks are cheap, dirt cheap. This means they're not super-fine precision instruments. On my specific gamepad Joy 0 has a bigger dead spot for center than Joy 1 does. I'd imagine every joystick has slightly different dead spots.

The script initializes during init what are considered the dead spots for the positive and negative directions of the joystick. These can't be detected and have to be entered by the user.

In the Joystick->MIDI menu there is status about the joystick under the "Running:" title.

Look for the line like "axis=-0.008000 0.008000 0.000000 0.000000"
These are the current axis readings for your 4 joystick axes. If you see numbers like above that are non-zero when you're not touching the joystick you need to modify the following lines in the script:
Code:
       // Axis thresholds are based on the particular joystick when it is centered
        // but the read value isn't true zero.  Any joystick value falling within this
        // range will be treated as true zero.
        //   offset + 0 == the negative direction threshold
        //   offset + 1 == the positive direction threshold

        mem[axis_thresh + (AXIS_IDX_0 * 2)]     = -0.032;
        mem[axis_thresh + (AXIS_IDX_0 * 2) + 1] =  0.001;

        mem[axis_thresh + (AXIS_IDX_1 * 2)]     = -0.047;
        mem[axis_thresh + (AXIS_IDX_1 * 2) + 1] =  0.001;

        mem[axis_thresh + (AXIS_IDX_2 * 2)]     = -0.024;
        mem[axis_thresh + (AXIS_IDX_2 * 2) + 1] =  0.001;

        mem[axis_thresh + (AXIS_IDX_3 * 2)]     = -0.001;
        mem[axis_thresh + (AXIS_IDX_3 * 2) + 1] =  0.001;
These lines are important to get true zero readings for values, especially pitchbend.

I wanted to add these as options to the menu but I couldn't see how to get a different submode dialog box. For now you'll have to edit it by hand. Considering you get this for free I think that's a fair trade-off.

Final thoughts
If something gets out of whack, just remember to press button 6 to reset everything.

If that doesn't work, the Joystick->MIDI menu for your gamepad has a [Reload Script] button on it. That will reset the script as well.

If anyone has any suggestions let me know. I couldn't get Reaper to see the up/down axis on joystick 1 for some reason (I submitted a bug) so for now that axis is unusable.

I hope someone out there finds this useful. I sure as heck do, it's made playing my softsynths a ton more fun!

A biiiiiig thanks to the Reaper devs for adding joystick support + scripting!!


UPDATE:

I've added a second script to use the Saitek P3200. It required a few tweaks because the axes are enumerated differently. I also updated the P3200's reset button to require hitting LB then RB. I found I got less accidental resets this way.

Last edited by zenmonkey; 09-19-2009 at 06:11 PM. Reason: Updated new Download URL
zenmonkey is offline   Reply With Quote
Old 08-21-2009, 06:08 PM   #2
BenK-msx
Human being with feelings
 
BenK-msx's Avatar
 
Join Date: Jun 2008
Location: Whales, UK
Posts: 6,009
Default

ooh nice one zenmonkey,
when joystick support came up i tried it but had much trouble getting the analog sticks to work in a usable way, and the scripting was beyond my non-programmer status, so was waiting for a good script or an update or something - so I will try this out for sure - looks like you covered most aspects - v. thorough!

am lefty too so thats all good..

the more cc controllers i have the better i'd say - got foot controllers going and some little hand ones are welcome - also for live applications.


cheers for the efforts

Last edited by BenK-msx; 08-21-2009 at 06:17 PM.
BenK-msx is offline   Reply With Quote
Old 08-24-2009, 05:36 AM   #3
politcat
Human being with feelings
 
politcat's Avatar
 
Join Date: Jul 2006
Location: stuck in transition
Posts: 1,870
Default

Quote:
Originally Posted by zenmonkey View Post
Two days ago I was at Fry's electronics and saw this little controller for $15. I remembered seeing Reaper 3 had joystick support so I figured I'd give it a go...
i'm assuming the sticks don't spring back to the center on that little controller, correct?
politcat is offline   Reply With Quote
Old 08-24-2009, 07:27 AM   #4
Reverbio
Human being with feelings
 
Reverbio's Avatar
 
Join Date: Mar 2008
Posts: 168
Default

that's cool
Reverbio is offline   Reply With Quote
Old 08-24-2009, 07:47 AM   #5
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by politcat View Post
i'm assuming the sticks don't spring back to the center on that little controller, correct?
They do. That's why I made buttons 9 and 10 freeze/unfreeze. It allows you to move the joystick, hit the button and the value you were holding remain unchanged.

It's very difficult to find compact joysticks that aren't self-centering. The only ones I know of are the doepfer ones and they're very expensive (about $70 for just the joystick, another 12 for the rod, and that doesn't include the circuit to send midi).

At first I thought the self-centering would be limiting too but now that I've used it with freeze/unfreeze I actually like it. Especially having modwheel and channel pressure on the same joystick adds a lot of variability under my right thumb.
zenmonkey is offline   Reply With Quote
Old 08-24-2009, 08:18 AM   #6
politcat
Human being with feelings
 
politcat's Avatar
 
Join Date: Jul 2006
Location: stuck in transition
Posts: 1,870
Default

ah ha. I see

nice job and thx!
politcat is offline   Reply With Quote
Old 08-30-2009, 07:40 AM   #7
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by politcat View Post
ah ha. I see

nice job and thx!
Glad you like it, I hope you and others find it useful.
zenmonkey is offline   Reply With Quote
Old 09-03-2009, 08:35 AM   #8
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

I purchased a much better quality controller, a Saitek P3200 Rumble for the ridiculously low price of $6.20 from Amazon.com.

This controller is different in how it maps its axes.

Reaper sees 5 axes now:

0,1 are Joy 0
2 is linked to the two analog triggers on the side (left is mid -> max, right is mid -> zero), seen as Z
3,4 are Joy 1, seen as R and U

I'll update the script in the zip to fix the layout with this controller.

This controller's joysticks are *much* more reliable than the Logitech and need no threshold adjustments. Highly recommended.
zenmonkey is offline   Reply With Quote
Old 09-27-2009, 09:14 AM   #9
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Update for the P3200 Saitek version:

I've added a new preset #11 with the following mapping:

Joy 0's Y-AXIS is modwheel in both directions
Joy 1's Y-AXIS is aftertouch in both directions
LT + RT are pitch bend

This mode is nice if you are using a preset that you don't really plan on using PB with but really want to use MW and AT.

Preset 0 is also updated:
LT sends CC breath
RT sends CC expression


The zipfile now contains 3 files:
Logitech_expression_v10.txt -> the original
P3200_expression_v20.txt -> Logitech v1.0 script updated for the Saitek P3200
P3200_expression_v21.txt -> version 2.1 Saitek with all the updates

Last edited by zenmonkey; 09-27-2009 at 03:19 PM. Reason: clarifications.
zenmonkey is offline   Reply With Quote
Old 09-27-2009, 02:54 PM   #10
corazon
Human being with feelings
 
Join Date: Jan 2008
Posts: 125
Default

This will be a great October project for me. Thanks for sharing
your knowlege and skill! Reaper community is always innovating and cool.
corazon is offline   Reply With Quote
Old 09-27-2009, 03:20 PM   #11
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by corazon View Post
This will be a great October project for me. Thanks for sharing
your knowlege and skill! Reaper community is always innovating and cool.
Thanks for posting, I hope you like it! Feedback is always appreciated too.
zenmonkey is offline   Reply With Quote
Old 10-14-2009, 12:19 PM   #12
raintalk
Human being with feelings
 
Join Date: Oct 2007
Posts: 4
Default I just ran across this thread = Amazing!

Zenmonkey you are Amazing
I was looking at the Axis-49 and now it looks like you've got a complete solution for me.

I'm going to squeeze out some funds and try to get this going for me. It will be a while before I have the cash, but at least now I know I'm heading in the right direction.

I'm left handed and this will work beautifully.

Thank You!
raintalk is offline   Reply With Quote
Old 10-14-2009, 12:52 PM   #13
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by raintalk View Post
Zenmonkey you are Amazing
I was looking at the Axis-49 and now it looks like you've got a complete solution for me.

I'm going to squeeze out some funds and try to get this going for me. It will be a while before I have the cash, but at least now I know I'm heading in the right direction.

I'm left handed and this will work beautifully.

Thank You!
Thank you for the kind words my friend.

If you have any suggestions I'd like to hear them. I love the combination of the Axis-49 and the P3200. Now if I could just find the time to practice more so my playing wasn't so poor...
zenmonkey is offline   Reply With Quote
Old 12-19-2009, 05:03 AM   #14
cygnus
Human being with feelings
 
cygnus's Avatar
 
Join Date: Dec 2009
Posts: 12
Default

hey, zenmonkey! Your custom script has much more incomprehensible jargon in it than the generic one, and I'm even more confused having looked through it(plus it makes my generic controllers do wierd stuff). Any chance you could point me in the right direction as to how I might go about separating my two gamepads to individual midi channels? My needs regarding gamepad control are relatively unsophisticated, and the basic functionality enabled by the generic script does the job for me, but for being able to assign a separate midi channel for each controller(each one with its own instrument). I don't need to be able to change channels on the fly, just have each one assigned to its own channel. This one's got me stumped, and any help/info' would be greatly appreciated. Cygnus....
cygnus is offline   Reply With Quote
Old 12-19-2009, 05:08 AM   #15
cygnus
Human being with feelings
 
cygnus's Avatar
 
Join Date: Dec 2009
Posts: 12
Default

Quote:
Originally Posted by zenmonkey View Post
They do. That's why I made buttons 9 and 10 freeze/unfreeze. It allows you to move the joystick, hit the button and the value you were holding remain unchanged.

It's very difficult to find compact joysticks that aren't self-centering. The only ones I know of are the doepfer ones and they're very expensive (about $70 for just the joystick, another 12 for the rod, and that doesn't include the circuit to send midi).

At first I thought the self-centering would be limiting too but now that I've used it with freeze/unfreeze I actually like it. Especially having modwheel and channel pressure on the same joystick adds a lot of variability under my right thumb.
Just a thought - couldn't you just pull your controllers apart, and remove the offending springs?
cygnus is offline   Reply With Quote
Old 12-19-2009, 10:25 AM   #16
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by cygnus View Post
hey, zenmonkey! Your custom script has much more incomprehensible jargon in it than the generic one, and I'm even more confused having looked through it(plus it makes my generic controllers do wierd stuff). Any chance you could point me in the right direction as to how I might go about separating my two gamepads to individual midi channels? My needs regarding gamepad control are relatively unsophisticated, and the basic functionality enabled by the generic script does the job for me, but for being able to assign a separate midi channel for each controller(each one with its own instrument). I don't need to be able to change channels on the fly, just have each one assigned to its own channel. This one's got me stumped, and any help/info' would be greatly appreciated. Cygnus....
Hi cygnus, sorry my script was incomprehensible to you. I'm a programmer first and a hobbyist musician second. My script is very complicated because it does so much and has several different preset modes. If only the JS scripting for gamepads supports functions or macros I'd be able to greatly streamline it.

With that said, I've never tried to do what you are asking but I think it should be possible. I modified generic.txt for you and added the script mode to change the midi channel for all outbound midi events. With this you should just be able to load 1 gamepad, set it to midi channel 1, and then load the second gampade and set the midi channel to 2.

I hope this works.
Attached Files
File Type: zip generic_cygnus.zip (712 Bytes, 613 views)
zenmonkey is offline   Reply With Quote
Old 12-19-2009, 10:29 AM   #17
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by cygnus View Post
Just a thought - couldn't you just pull your controllers apart, and remove the offending springs?
Belive me, I tried and I'm fairly decent with a soldering iron. The problem is with how these small joysticks are constructed. They have a large metal flashing on the exterior of the joystick that's been wave-soldered down. I ruined 2 gamepads trying to carefully de-solder this flashing and removing the bent metal strip that acts as the spring.

The first one didn't work when I re-soldered it and the second one the joystick wouldn't stay still, it just flopped to one corner. I came to the conclusion these cheap sticks were never meant to be springless.

I'd really love a joystick option like that though, both spring and springless have their uses.
zenmonkey is offline   Reply With Quote
Old 12-19-2009, 12:40 PM   #18
socrates112
Human being with feelings
 
socrates112's Avatar
 
Join Date: Dec 2009
Posts: 170
Default

what is an expression controller?
socrates112 is offline   Reply With Quote
Old 12-19-2009, 12:48 PM   #19
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by socrates112 View Post
what is an expression controller?
Traditionally on a keyboard they are the pitch and mod wheels. But there's also pedals and breath controllers. It's anything that lets you control changes in a sound real-time to add expression to a sound.
zenmonkey is offline   Reply With Quote
Old 12-20-2009, 01:46 AM   #20
cygnus
Human being with feelings
 
cygnus's Avatar
 
Join Date: Dec 2009
Posts: 12
Default

Quote:
Originally Posted by zenmonkey View Post
Hi cygnus, sorry my script was incomprehensible to you. I'm a programmer first and a hobbyist musician second. My script is very complicated because it does so much and has several different preset modes. If only the JS scripting for gamepads supports functions or macros I'd be able to greatly streamline it.

With that said, I've never tried to do what you are asking but I think it should be possible. I modified generic.txt for you and added the script mode to change the midi channel for all outbound midi events. With this you should just be able to load 1 gamepad, set it to midi channel 1, and then load the second gampade and set the midi channel to 2.

I hope this works.
Zenmonkey, you are a LEGEND!!! Whether it works or not(on my way to test it out in a few minutes), I can't thank you enough for taking the time, or making the effort - My Mum thanks you too. Ought to make electronica jam a load more fun. Will let you know how it goes. Thanking you again, cygnus...
cygnus is offline   Reply With Quote
Old 12-20-2009, 01:50 AM   #21
cygnus
Human being with feelings
 
cygnus's Avatar
 
Join Date: Dec 2009
Posts: 12
Default

Quote:
Originally Posted by zenmonkey View Post
Belive me, I tried and I'm fairly decent with a soldering iron. The problem is with how these small joysticks are constructed. They have a large metal flashing on the exterior of the joystick that's been wave-soldered down. I ruined 2 gamepads trying to carefully de-solder this flashing and removing the bent metal strip that acts as the spring.

The first one didn't work when I re-soldered it and the second one the joystick wouldn't stay still, it just flopped to one corner. I came to the conclusion these cheap sticks were never meant to be springless.

I'd really love a joystick option like that though, both spring and springless have their uses.
I see - hadn't got that far myself, but I don't got a plethora of spare gear 'round the place, and I ain't so flash with a soldering iron. I've only pulled apart much older, simpler, and more forgiving gear, and that was a long time ago...
cygnus is offline   Reply With Quote
Old 12-20-2009, 08:25 AM   #22
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by cygnus View Post
Zenmonkey, you are a LEGEND!!! Whether it works or not(on my way to test it out in a few minutes), I can't thank you enough for taking the time, or making the effort - My Mum thanks you too. Ought to make electronica jam a load more fun. Will let you know how it goes. Thanking you again, cygnus...
No problem my friend. I hope it worked for you.
zenmonkey is offline   Reply With Quote
Old 12-20-2009, 08:45 AM   #23
socrates112
Human being with feelings
 
socrates112's Avatar
 
Join Date: Dec 2009
Posts: 170
Default

nvm...

Last edited by socrates112; 12-20-2009 at 08:56 AM.
socrates112 is offline   Reply With Quote
Old 12-20-2009, 03:44 PM   #24
cygnus
Human being with feelings
 
cygnus's Avatar
 
Join Date: Dec 2009
Posts: 12
Default

Quote:
Originally Posted by socrates112 View Post
nvm...
NVM?????
cygnus is offline   Reply With Quote
Old 12-20-2009, 04:29 PM   #25
socrates112
Human being with feelings
 
socrates112's Avatar
 
Join Date: Dec 2009
Posts: 170
Default

lol.

I'm getting used to this "expression controller" thing.

i'm a sampled based *beat maker* and am trying to figure out what i can use this for being I use a playstation 2 joystick connected to my computer for gaming.
socrates112 is offline   Reply With Quote
Old 12-20-2009, 08:47 PM   #26
cygnus
Human being with feelings
 
cygnus's Avatar
 
Join Date: Dec 2009
Posts: 12
Default

Quote:
Originally Posted by zenmonkey View Post
No problem my friend. I hope it worked for you.
works beautifully, and selectable channels is a very nice touch(gonna experiment with a 3rd controller now) - thanks again Zenmonkey, you are a champion; cygnus....
cygnus is offline   Reply With Quote
Old 04-27-2010, 01:09 PM   #27
merdave
Human being with feelings
 
Join Date: Oct 2008
Posts: 708
Default

Reaper x64 doesn't see your txt files in REAPER (x64)\InstallData\Data\joystick_midi after I added them and restarted Reaper; just 3 other files that were already there are listed in the dialog.

What do I need to do to fix this?
merdave is offline   Reply With Quote
Old 04-27-2010, 05:51 PM   #28
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by merdave View Post
Reaper x64 doesn't see your txt files in REAPER (x64)\InstallData\Data\joystick_midi after I added them and restarted Reaper; just 3 other files that were already there are listed in the dialog.

What do I need to do to fix this?
Sorry merdave, I haven't used Reaper 64-bit yet. You might want to search elsewhere on your HD for those three joystick definition files. They may be sourced from somewhere else. I think I saw a line in the release notes for 3.45 that mentioned a local repository for Reaper JS scripts etc. Maybe they're in C:\[user name]\ somewhere?

Good luck and let us know what you find.
zenmonkey is offline   Reply With Quote
Old 04-27-2010, 09:52 PM   #29
merdave
Human being with feelings
 
Join Date: Oct 2008
Posts: 708
Default

Let me restate the problem: I put your files in the same folder as those that were already being listed in the dialog but Reaper didn't list your files even after reloading Reaper. So your files are in the proper folder but they just are not being shown in the dialog list.

Could this be a bug in Reaperx64?

Last edited by merdave; 04-28-2010 at 07:28 AM.
merdave is offline   Reply With Quote
Old 04-27-2010, 09:56 PM   #30
PAPT
Human being with feelings
 
Join Date: Jun 2006
Posts: 1,082
Default

I like the X-Y pads.

Are there any foot controllers that could be used for X-Y control?

That way I could use both hands for playing and feet for controlling.
PAPT is offline   Reply With Quote
Old 04-28-2010, 03:34 PM   #31
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by merdave View Post
Let me restate the problem: I put your files in the same folder as those that were already being listed in the dialog but Reaper didn't list your files even after reloading Reaper. So your files are in the proper folder but they just are not being shown in the dialog list.

Could this be a bug in Reaperx64?
I think you didn't understand me.

Take a look at the newest release notes for 3.451:
Quote:
Originally Posted by Reaper 3.451 Changelog
Windows:
* better Windows 7/Vista UAC support for user customizable content (JS, ColorThemes, etc)
* installer file type registrations separate for x64 and x86
* user-editable content (themes, JS, etc) are now installed to user profile directory automatically
As you can see Reaper is changing where user-content JS scripts, Color Themes, etc are being installed. There may be a new Reaper or Cockos directory in your User directory that you're supposed to install user content.

With that said, I don't know why it's not seeing the script if you place it where the other default ones are. I'll try to see if I can figure it out when I have the time.

One thing you can try, just for the sake of testing is the following:

1. go to where the default joystick scripts are installed
2. copy and paste in the same Folder one of the scripts; it doesn't matter which one.
3. accept the UAC dialogs if any pop up
4. rename the copied script to something like joystick_test
5. re-load (or start) reaper and see if "joystick_test" is available in the joystick list.
zenmonkey is offline   Reply With Quote
Old 04-28-2010, 03:40 PM   #32
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by PAPT View Post
I like the X-Y pads. Are there any foot controllers that could be used for X-Y control? That way I could use both hands for playing and feet for controlling.
There are flight simulator rudder pedals that transmit joystick data. Unfortunately most of the one's I found are prohibitively expensive at around $100: http://www.buy.com/prod/saitek-pro-f...202973287.html.

For that price you can practically get a "real" midi pedal system like the the FCB1010: http://keyboards-midi.musiciansfrien...ELAID=26019233

There is one other alternative. If you have a midi keyboard and that keyboard has an expression pedal input you can just use one of those to send midi CC data. They're pretty inexpensive: http://www.amazon.com/M-Audio-us6502.../dp/B0007KQOHQ

Those pedals are simply potentiometers so if you have more time (and technical expertise) than money you can hack up a cheap $10 gamepad and connect the wires from the pedal to the wires of one of the Joystick Axes.
zenmonkey is offline   Reply With Quote
Old 04-29-2010, 08:01 AM   #33
merdave
Human being with feelings
 
Join Date: Oct 2008
Posts: 708
Default

After testing I found that the 'Joystick->MIDI' dialog in Reaperx64 in Vistax64 does not scan the 'joystick_midi' folder for any new .txt files that have been added manually.

However, I could open the 'Edit script' option in the dialog, save the 'generic.txt' as 'generic_original.txt' (or whatever name), restart Reaper and the new 'generic_original.txt' has been added to the 'Processing script' list.

So I can add your scripts by saving 'generic.txt' with each of your file names and delete the file contents and cut-and-paste your file's contents.

I will list this as a Reaper bug.

Thanks again for your help.
merdave is offline   Reply With Quote
Old 05-01-2010, 09:36 PM   #34
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by merdave View Post
After testing I found that the 'Joystick->MIDI' dialog in Reaperx64 in Vistax64 does not scan the 'joystick_midi' folder for any new .txt files that have been added manually. ... Thanks again for your help.
You're quite welcome and I hope you enjoy the joystick map I made.

I did some searching and discovered the following directory on my Windows 7 PC:
C:\Users\[USERNAME]\AppData\Roaming\REAPER\Data\joystick_midi\

Where [USERNAME] is my logged in user name.


I added a joystick definition to this directory, restarted Reaper, and was able to load this definition in the preferences. This is with 32-bit Reaper though as a lot of my plugins are still 32-bit and I don't like bridging.
zenmonkey is offline   Reply With Quote
Old 04-11-2011, 10:02 PM   #35
Fael
Human being with feelings
 
Join Date: Apr 2011
Posts: 4
Default

What programming language is that script in? And how can I make my own? (please check my thread)
Fael is offline   Reply With Quote
Old 04-12-2011, 05:38 PM   #36
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by Fael View Post
What programming language is that script in? And how can I make my own? (please check my thread)
It's written in Cockos' own Jesuonic scripting language (JS). Actually the joysticks are a subset of JS, it has a few of its own quirks.

There's zero documentation on the joystick programming language. I learned it as a trial and error and reading the JS programming guides.

You can download my script, it's just a text file. Open it in your favorite editor and you can see the code.

I also recommend you look at the default one, it's a lot smaller and simpler than my script which may get you where you need to go.

Good luck.
zenmonkey is offline   Reply With Quote
Old 10-16-2011, 07:19 PM   #37
cygnus
Human being with feelings
 
cygnus's Avatar
 
Join Date: Dec 2009
Posts: 12
Default Woe is me...

The custom script for midi channel selection doesn't work anymore. Anyone out there got any ideas?
cygnus is offline   Reply With Quote
Old 10-16-2011, 08:00 PM   #38
zenmonkey
Human being with feelings
 
zenmonkey's Avatar
 
Join Date: Jun 2007
Location: Texas
Posts: 109
Default

Quote:
Originally Posted by cygnus View Post
The custom script for midi channel selection doesn't work anymore. Anyone out there got any ideas?
Not sure what you mean. My script is correctly changing midi channels Windows Reaper x64/4.10.

Set to Midi Channel 1, the least significant byte of the message is 0:


Set to Midi Channel 2, the least significant byte of the mesage is 1:


Can you explain in more detail what's wrong?
zenmonkey is offline   Reply With Quote
Old 10-17-2011, 06:53 AM   #39
cygnus
Human being with feelings
 
cygnus's Avatar
 
Join Date: Dec 2009
Posts: 12
Default

Quote:
Originally Posted by zenmonkey View Post
Not sure what you mean. My script is correctly changing midi channels Windows Reaper x64/4.10.

Set to Midi Channel 1, the least significant byte of the message is 0:


Set to Midi Channel 2, the least significant byte of the mesage is 1:


Can you explain in more detail what's wrong?
Apologies - I hadn't been doing so much in the studio
'til more recently, and when I updated Reaper, I found that the "generic_cygnus.txt" file you'd helped me out with before doesn't allow for selection of MIDI channels. It worked beautifully before(hadn't fiddled with them since about 3.xx). When it worked before, the custom-named script came up in the little list of scripts, whereas now it doesn't come up at all, so I renamed it "generic.txt" & tagged the original "backupscript.txt". Still no joy. I was hoping there was some minor change which might be specific to that stuff between version 3 & 4?

Last edited by cygnus; 10-17-2011 at 06:56 AM. Reason: FOrgot to specify I am running 32bit reaper install, winXP SP3...
cygnus is offline   Reply With Quote
Old 04-12-2013, 09:40 AM   #40
cygnus
Human being with feelings
 
cygnus's Avatar
 
Join Date: Dec 2009
Posts: 12
Default

Quote:
Originally Posted by cygnus View Post
Apologies - I hadn't been doing so much in the studio
'til more recently, and when I updated Reaper, I found that the "generic_cygnus.txt" file you'd helped me out with before doesn't allow for selection of MIDI channels. It worked beautifully before(hadn't fiddled with them since about 3.xx). When it worked before, the custom-named script came up in the little list of scripts, whereas now it doesn't come up at all, so I renamed it "generic.txt" & tagged the original "backupscript.txt". Still no joy. I was hoping there was some minor change which might be specific to that stuff between version 3 & 4?
Heya Zenmonkey. Finally got my studio organised to the point of mucking about with virtual instruments again(I'm more about guitars & bass than bits & bytes). Turned out the issue I had with the custom script required me to simply cut & paste the text from the one you helped me out with over the script in the "generic.txt", save & reload. Once I did that, the channel assignments were available, and all's well in computer-land again. Thanks again.

Last edited by cygnus; 04-12-2013 at 09:41 AM. Reason: type-o
cygnus 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 02:20 PM.


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