Old 04-15-2017, 05:16 AM   #1
jimbobbley
Human being with feelings
 
Join Date: Nov 2011
Posts: 95
Default Modification of MIDI Map To Key v2?

Hi all


I perform with Reaper live with a padkontrol using various scenes on the controller, but I've started to run more than 16 songs and need access to more than the 16 scenes the padkontrol will store at one time.

I wondered if I could create virtual scenes within Reaper by using MIDI Map To Key v2, and indeed this will work, but I wondered how easy it'd be to expand this to allow 16 different note on / note off configurations? As it is I'd have to load 16 different iterations of the plug, which is fine, just seems a bit inefficient in the long run and a bit fiddly.

If anyone can point me in the right direction that'd be amazing!

Many thanks

J
jimbobbley is offline   Reply With Quote
Old 04-15-2017, 08:17 AM   #2
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,679
Default

I do not have that JS FX. What, exactly, is it that you want to do?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 04-16-2017, 10:49 AM   #3
jimbobbley
Human being with feelings
 
Join Date: Nov 2011
Posts: 95
Default

Hey DarkStar

Thanks for the reply.

This is the plug, or just code at end of message (sorry, don't know how others do this and make it neat):

https://drive.google.com/file/d/0B7O...ew?usp=sharing

Basically it allows you to say, for example, when I play C0, make it D#3 instead.

All I really want is another 15 rows of the same thing, so I can leave the padkontrol on the same default scene and have this plug do a 'virtual' scene for each project, allowing me to have more than the 16 it allows on internal memory.

Does that make sense?

Thanks

J





Or just the code:

/************************************************** *****************************
* Copyright 2007 - 2011, Philip S. Considine *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License (http://www.gnu.org/licenses/)for more details. *
************************************************** *****************************/

desc: MIDI Map To Key v2
desc: MIDI Map To Key v2 [IXix]
//tags: MIDI processing mapping
//author: IXix

slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14, 15,16}>Input Channel
slider2:/ix_keymaps:none:Mapping File
slider3:0<0,127,1{0: C0,1: C#0,2: D0,3: Eb0,4: E0,5: F0,6: F#0,7: G0,8: G#0,9: A0,10: Bb0,11: B0,12: C1,13: C#1,14: D1,15: Eb1,16: E1,17: F1,18: F#1,19: G1,20: G#1,21: A1,22: Bb1,23: B1,24: C2,25: C#2,26: D2,27: Eb2,28: E2,29: F2,30: F#2,31: G2,32: G#2,33: A2,34: Bb2,35: B2,36: C3,37: C#3,38: D3,39: Eb3,40: E3,41: F3,42: F#3,43: G3,44: G#3,45: A3,46: Bb3,47: B3,48: C4,49: C#4,50: D4,51: Eb4,52: E4,53: F4,54: F#4,55: G4,56: G#4,57: A4,58: Bb4,59: B4,60: C5,61: C#5,62: D5,63: Eb5,64: E5,65: F5,66: F#5,67: G5,68: G#5,69: A5,70: Bb5,71: B5,72: C6,73: C#6,74: D6,75: Eb6,76: E6,77: F6,78: F#6,79: G6,80: G#6,81: A6,82: Bb6,83: B6,84: C7,85: C#7,86: D7,87: Eb7,88: E7,89: F7,90: F#7,91: G7,92: G#7,93: A7,94: Bb7,95: B7,96: C8,97: C#8,98: D8,99: Eb8,100: E8,101: F8,102: F#8,103: G8,104: G#8,105: A8,106: Bb8,107: B8,108: C9,109: C#9,110: D9,111: Eb9,112: E9,113: F9,114: F#9,115: G9,116: G#9,117: A9,118: Bb9,119: B9,120: C10,121: C#10,122: D10,123: Eb10,124: E10,125: F10,126: F#10,127: G10}>Note In
slider4:0<0,127,1{0: C0,1: C#0,2: D0,3: Eb0,4: E0,5: F0,6: F#0,7: G0,8: G#0,9: A0,10: Bb0,11: B0,12: C1,13: C#1,14: D1,15: Eb1,16: E1,17: F1,18: F#1,19: G1,20: G#1,21: A1,22: Bb1,23: B1,24: C2,25: C#2,26: D2,27: Eb2,28: E2,29: F2,30: F#2,31: G2,32: G#2,33: A2,34: Bb2,35: B2,36: C3,37: C#3,38: D3,39: Eb3,40: E3,41: F3,42: F#3,43: G3,44: G#3,45: A3,46: Bb3,47: B3,48: C4,49: C#4,50: D4,51: Eb4,52: E4,53: F4,54: F#4,55: G4,56: G#4,57: A4,58: Bb4,59: B4,60: C5,61: C#5,62: D5,63: Eb5,64: E5,65: F5,66: F#5,67: G5,68: G#5,69: A5,70: Bb5,71: B5,72: C6,73: C#6,74: D6,75: Eb6,76: E6,77: F6,78: F#6,79: G6,80: G#6,81: A6,82: Bb6,83: B6,84: C7,85: C#7,86: D7,87: Eb7,88: E7,89: F7,90: F#7,91: G7,92: G#7,93: A7,94: Bb7,95: B7,96: C8,97: C#8,98: D8,99: Eb8,100: E8,101: F8,102: F#8,103: G8,104: G#8,105: A8,106: Bb8,107: B8,108: C9,109: C#9,110: D9,111: Eb9,112: E9,113: F9,114: F#9,115: G9,116: G#9,117: A9,118: Bb9,119: B9,120: C10,121: C#10,122: D10,123: Eb10,124: E10,125: F10,126: F#10,127: G10}>Note Out
slider5:0<0,1,1{No,Reload Now}>Reload Mapping

in_pin:none
out_pin:none

////////////////////////////////////////////////////////////////////////////////
@init

//Set default mapping
while
(
map[i] = i;
(i += 1) < 128;
);

mapFile = -1;

statNoteOn = $x90;
statNoteOff = $x80;

////////////////////////////////////////////////////////////////////////////////
@slider
inChannel = slider1;

slider5 == 1 ?
(
reload = 1;
slider5 = 0; sliderchange(slider5);
);

//Load map
mapFile != slider2 | 0 || reload == 1 ?
(
reload = 0;
mapSize = 0;
mapFile = slider2;
fileHandle = file_open(slider2);
fileHandle > 0 && file_text(fileHandle) ?
(
while
(
file_var(fileHandle, map[mapSize]);
file_avail(fileHandle) ? mapSize += 1;
);
file_close(fileHandle);
);
slider4 = map[inputNote];
);

slider3 != inputNote ?
(
inputNote = slider3;
slider4 = map[inputNote];
);

////////////////////////////////////////////////////////////////////////////////
@block

while
(
midirecv(offset, msg1, msg23) ?
(
// Extract message type and channel
status = msg1 & $xF0;
channel = msg1 & $x0F;

// Is it on our channel?
channel == inChannel ?
(
// Is it a note event?
status == statNoteOn || status == statNoteOff ?
(
// Extract note value
note = msg23 & $x7F;

// Update mapping sliders
slider3 = note; sliderchange(slider3);
slider4 = map[note]; sliderchange(slider4);

// Substitute note value and pass on modified message
midisend(offset, msg1, (msg23 & $xFF00) | map[note]);

)
:
(
midisend(offset, msg1, msg23); // Not a note, pass thru
);

)
:
(
midisend(offset, msg1, msg23); // Not on our channel, pass thru
);

1; // Force loop to continue until all messages have been processed
);
);
jimbobbley is offline   Reply With Quote
Old 04-16-2017, 12:06 PM   #4
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

you can use an existing reaper fx for that if I understand your needs correctly

it takes a simple editing of a notes text file to load into it

the JS Fx is "Midi Map to Key V2" MUST BE THE V

so you edit the default text file and save it as your name and then load it into the FX..

and it will change one pressed note to whatever note you tell to output
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 04-17-2017, 01:35 AM   #5
jimbobbley
Human being with feelings
 
Join Date: Nov 2011
Posts: 95
Default

Sorry, I can't have been clear enough. Yes, I know this plug in does that - what I'm trying to do is avoid having to run 16 different simultaneous instances in every project (it's more time consuming and harder to troubleshoot), so I'm asking if anyone knows a way to add another 15 rows to this plug - ie let me say C0=D1, D2=E3, F#5=B2, etc etc
jimbobbley is offline   Reply With Quote
Old 04-17-2017, 02:21 AM   #6
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
Default

Quote:
Originally Posted by jimbobbley View Post
what I'm trying to do is avoid having to run 16 different simultaneous instances in every project (it's more time consuming and harder to troubleshoot), so I'm asking if anyone knows a way to add another 15 rows to this plug - ie let me say C0=D1, D2=E3, F#5=B2, etc etc
It already does that, you just need to set up the text file that describes the mapping. It ships with just one "00 - Default Mapping.txt" but you can add as many different mapping files as you want and they will show up in the Mapping File dropdown.

The mapping files live in <REAPER Resources>\Data\ix_keymaps. The default file maps all 127 notes to themselves (ie. does nothing). To change the mapping you just change the number at the start of each line.

If editing text files is too nerdy for you, I made another version which doesn't use a mapping file. Instead it listens for a note and displays the mapping for that note so you can change it then your mapping can be saved as a preset. That's MIDI_KeyMap II and it's in my ancient MIDI Tools II package...
https://stash.reaper.fm/v/1422/IX%20M...Utils%20II.zip
IXix is offline   Reply With Quote
Old 04-17-2017, 02:34 AM   #7
jimbobbley
Human being with feelings
 
Join Date: Nov 2011
Posts: 95
Default

Amazing! Thanks a lot. That's really really useful. And I'm just enough of a nerd to modify a text file, ha... Anything beyond that and I'm not sure!

Cheers

J
jimbobbley is offline   Reply With Quote
Old 04-17-2017, 02:40 AM   #8
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
Default

Quote:
Originally Posted by jimbobbley View Post
Amazing! Thanks a lot. That's really really useful.
Your welcome. I really ought to update these plugins. JSFX has advanced a lot since they were written. Back then you couldn't do graphics so if you wanted to display a value you had to use a slider, which makes the UI of these key mappers a bit misleading.
IXix is offline   Reply With Quote
Old 12-21-2017, 03:06 PM   #9
Arnar
Human being with feelings
 
Arnar's Avatar
 
Join Date: Jan 2007
Location: Smokie Bay.
Posts: 796
Default

I am a little rusty in Reaper , getting back into it , but I seem to recollect that there was a JS plug that could force any input note to a fixed output note.
As in forcing all notes to one note , anyone familiar with that ?
Feel like I used something like that at some point.
__________________
In Music We Trust.
http://soundcloud.com/hazar
http://soundcloud.com/ifthenrun
Arnar is offline   Reply With Quote
Old 12-21-2017, 03:14 PM   #10
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
Default

Quote:
Originally Posted by Arnar View Post
I am a little rusty in Reaper , getting back into it , but I seem to recollect that there was a JS plug that could force any input note to a fixed output note.
As in forcing all notes to one note , anyone familiar with that ?
Feel like I used something like that at some point.
Yeah, I think maybe someone made that at some point (it'd be pretty easy). You could use this to do it but it would be very inefficient. You could probably write a custom JSFX to do what you want in the time it would take you to set up a suitable mapping file.
IXix 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 05:15 AM.


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