Go Back   Cockos Incorporated Forums > REAPER Forums > MIDI Hardware, Control Surfaces, and OSC

Reply
 
Thread Tools Display Modes
Old 06-08-2024, 06:34 PM   #1
fourbigkids
Human being with feelings
 
Join Date: Jul 2023
Posts: 11
Default PC Keyboard Number Keys to send CC msgs via Reaper to Fractal FM9 by USB

Hi all.

Bit of a numpty when it comes to midi, and Reaper if I am being honest :-)

I would like to be able to send cc#34 with values 0-7 to a Fractal FM9 (connected by USB) when triggered as I press computer keyboard numbers 1-8. I am afraid I have no idea where to start. Appreciate your advice. Cheers, Allan
fourbigkids is offline   Reply With Quote
Old 06-09-2024, 09:35 AM   #2
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 2,241
Default

Quote:
Originally Posted by fourbigkids View Post
Hi all.

Bit of a numpty when it comes to midi, and Reaper if I am being honest :-)

I would like to be able to send cc#34 with values 0-7 to a Fractal FM9 (connected by USB) when triggered as I press computer keyboard numbers 1-8. I am afraid I have no idea where to start. Appreciate your advice. Cheers, Allan
There are probably ways to do this via ReaScript, but a quite easy way to do it is via ReaLearn.

- Set input to "Computer keyboard"
- Set output to the MIDI device of your choice
- Probably you want "Let through" both "Matched events" and "Unmatched events", otherwise you can't use the numbers for typing anymore

Copy the following preset code and import via "Import from clipboard":

Code:
local mappings = {}

for i = 0, 7 do
    local m = {
        name = tostring(i + 1),
        source = {
            kind = "Key",
            keystroke = {
                modifiers = 1,
                key = 49 + i,
            },
        },
        glue = {
            button_filter = "PressOnly",
        },
        target = {
            kind = "SendMidi",
            message = "B0 00 0" .. i,
        },
    }
    table.insert(mappings, m)
end

return {
    kind = "MainCompartment",
    value = {
        mappings = mappings,
    }
}
If you want to use this in all projects (not just in specific ones), you can put or copy that ReaLearn instance to the monitoring FX chain (View => Monitoring FX).

**UPDATE:** This example is about CC0. For CC34, you need to replace "B0 00 0" with "B0 22 0" (those are hexadecimal numbers)

Last edited by helgoboss; 06-09-2024 at 09:44 AM.
helgoboss is offline   Reply With Quote
Old 06-09-2024, 12:41 PM   #3
Gryno19
Human being with feelings
 
Join Date: Apr 2024
Posts: 10
Default

You can customize which keys send which values by pressing a different keyboard number each time you enter Learn mode
Gryno19 is offline   Reply With Quote
Old 06-09-2024, 05:10 PM   #4
fourbigkids
Human being with feelings
 
Join Date: Jul 2023
Posts: 11
Default

Hi helgoboss and Gryno19.

Well that was a damn site easier than I was expecting! Works perfectly. Thank you very much. Cheers, Allan

Last edited by fourbigkids; 06-09-2024 at 05:40 PM.
fourbigkids is offline   Reply With Quote
Old 06-09-2024, 07:14 PM   #5
fourbigkids
Human being with feelings
 
Join Date: Jul 2023
Posts: 11
Default

One further query.

As you suggest helgoboss, I have the relearn instance in Monitoring FX and I have used the 'learn' function to change the triggering keys to the numbers in the numeric pad. For some reason when I use my mouse to click to play a track, or press enter to play a track, the FM9 steps up through scenes one at a time with each click/press. Any ideas? Cheers.

Last edited by fourbigkids; 06-09-2024 at 07:41 PM.
fourbigkids is offline   Reply With Quote
Old 06-09-2024, 11:28 PM   #6
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 2,241
Default

Maybe you chose "Send clock to this device" in REAPER's MIDI output device setting? This would cause REAPER to send special messages to your FM9 on play/stop. And maybe the way FM9 interprets those messages is to change scenes?
helgoboss is offline   Reply With Quote
Old 06-10-2024, 05:17 PM   #7
fourbigkids
Human being with feelings
 
Join Date: Jul 2023
Posts: 11
Default

Quote:
Originally Posted by helgoboss View Post
Maybe you chose "Send clock to this device" in REAPER's MIDI output device setting? This would cause REAPER to send special messages to your FM9 on play/stop. And maybe the way FM9 interprets those messages is to change scenes?
Thanks for getting back to this helgoboss. No, "Send clock to this device" is not checked. I have uninstalled ReaLearn, and the errant messages still seem to be sent, so not an issue there. Which is odd as installing ReaPack and ReaLearn were the only things I did on Reaper before noticing the scene change on activating 'play'. Might be something else in my settings/setup. Will explore further.

Thanks.

***update: Ah, this is the first time that I have used the FM9 as a midi output on Reaper, so the errant message may have always been there. Seems to be #cc64 -which is Scene Increment. Change that in the Fractal and the issue goes away. The search continues.

**Further update. Seems to be something to do with reset messages. If I uncheck this in the FM9 midi output configuration in Reaper, the problem does not arise. This will do me for a solution. :-)

Last edited by fourbigkids; 06-10-2024 at 09:30 PM.
fourbigkids is offline   Reply With Quote
Old Yesterday, 03:52 AM   #8
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 2,241
Default

Quote:
Originally Posted by fourbigkids View Post
Thanks for getting back to this helgoboss. No, "Send clock to this device" is not checked. I have uninstalled ReaLearn, and the errant messages still seem to be sent, so not an issue there. Which is odd as installing ReaPack and ReaLearn were the only things I did on Reaper before noticing the scene change on activating 'play'. Might be something else in my settings/setup. Will explore further.

Thanks.

***update: Ah, this is the first time that I have used the FM9 as a midi output on Reaper, so the errant message may have always been there. Seems to be #cc64 -which is Scene Increment. Change that in the Fractal and the issue goes away. The search continues.

**Further update. Seems to be something to do with reset messages. If I uncheck this in the FM9 midi output configuration in Reaper, the problem does not arise. This will do me for a solution. :-)
Ah sure, the reset messages! Forgot about those. Yes, this checkbox should always be off unless you are really dealing with a synthesizer that outputs sound (in this case, the reset messages are helpful because you don't want hanging notes).
helgoboss is offline   Reply With Quote
Old Yesterday, 05:09 AM   #9
fourbigkids
Human being with feelings
 
Join Date: Jul 2023
Posts: 11
Default

All sorted. Thanks for your help helgoboss! Cheers, Allan
fourbigkids 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 03:38 PM.


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