Old 09-05-2016, 04:18 PM   #1
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default JSFX: MIDI (various)

Hi everyone,

I open this thread to share my JSFX related to MIDI. (there is only one for now but other may come eventually).

These JSFX are part of my ReaScripts repo. They can be downloaded thanks to ReaPack. See my
signature for more details.

  • X-Raym_Note to CC.jsfx



Enjoy!
X-Raym is offline   Reply With Quote
Old 09-20-2016, 03:25 PM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

  • X-Raym_MIDI notes sequence from CSV file.jsfx


A way to make melodies from one note input only, based on a CSV file which contains the notes list.

Demo video and info here:
MIDI Notes Sequence with JSFX: Demo on Makey Makey / ExtremRaym
X-Raym is offline   Reply With Quote
Old 11-19-2017, 03:55 AM   #3
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

New script (meant for some MIDI hardware) :
  • Note On under X velocity to Note Off


Simple but can be handy !
X-Raym is offline   Reply With Quote
Old 10-30-2018, 05:46 AM   #4
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

New script:
  • X-Raym_16 pads MIDI Notes Map.jsfx



Useful for quick remapping of finger drumming hardwares (made for Maschine Mikro Mk3 MIDI mode).

Enjoy !
X-Raym is offline   Reply With Quote
Old 10-30-2018, 07:46 AM   #5
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Are you actually making some music now instead of scripting? :P (just kidding)
nofish is offline   Reply With Quote
Old 10-30-2018, 08:17 AM   #6
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@nofish
well, as I just released a script, I'm not sure I can confirm your thought haha ^^
X-Raym is offline   Reply With Quote
Old 11-10-2018, 04:51 PM   #7
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

I needed to router a MIDI note to another, but I didn't find something as minimal as I wanted, so here it is:

  • X-Raym_MIDI single note map.jsfx




Of course, shared for free in my ReaPack repo.

Enjoy !
X-Raym is offline   Reply With Quote
Old 06-25-2019, 04:50 AM   #8
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Big update on my 16 MIDI pads:


Quote:
* v1.5 (2019-06-25)
+ Nice colored pads
+ Hide sliders, now offset with clicks
+ Infos on Pad
+ Pad brightness based on velocity




Next step: custom note names.... and maybe image ? :P
X-Raym is offline   Reply With Quote
Old 06-26-2019, 01:40 AM   #9
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 305
Default

Looks nice
Thank you!
Ivannn Bennnettt is offline   Reply With Quote
Old 06-26-2019, 05:08 PM   #10
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

With Tale help (https://forum.cockos.com/showthread.php?t=181653), and a lot of brainstorming, I came up with this solution:






It use a note to image file CSV in the data folder. User can create some and edit them.



I would prefer that it look for image in data folder but it seems it can only for subfolder of the JSFX file itself. If anyone has more info about that: https://forum.cockos.com/showthread.php?t=222388


What do you think ? Usable ?
X-Raym is offline   Reply With Quote
Old 06-27-2019, 02:52 AM   #11
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Ok I release anupdate, cause I think it is as good as it can be:


Code:
 * v1.7 (2019-06-27)
  + Image support. Image file mapping have to be put in REAPER/Data/MIDINotesImages and should contains note number followed by filename with extension (36 kick.png). Images have to be put in /Images from the effect path.
  # Fixed base note color offset
  # minor UI tweaks

It is very fun to use, you don't even need to watch the pad anymore


I made a MT power drum kit map for those interested,
put it on REAPER/Data/MIDINotesImages


and put Data/track_icons folder into the effect Images subfolder (take the JSFX path, create Images folder, and paste content of track_icons there)


Code:
35 banjo.png
36 kick.png
37 snare_top.png
38 snare_top.png
39 snare_top.png
40 snare_top.png
41 tom.png
42 hihat.png
43 tom.png
44 hihat.png
45 tom.png
46 hihat.png
47 tom.png
48 tom.png
49 cymbal_large.png
50 tom.png
51 ride_rim.png
52 cymbal_small.png
53 ride_bell.png
55 cymbal_small.png
X-Raym is offline   Reply With Quote
Old 07-01-2019, 09:38 AM   #12
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default New release

Minimalist simple new script:


  • MIDI notes octave tranpose shift
More adapted that the usual transpose scripts if you know you want to only shift by octave, and if you need to filter the shift by channel (in case of split keyboards etc).


Thx for your support !
X-Raym is offline   Reply With Quote
Old 07-05-2019, 02:09 PM   #13
zookthespook
Human being with feelings
 
Join Date: Mar 2015
Location: India Mumbai
Posts: 816
Default

Fantastic scripts xraym
Is it possible to have a few scripts like
Continuous control transformer.
For eg. incoming cc#,1 to cc11 output.

the 16 keypad script is going to come super handy for key switching business as most of us have 61 keys midi controller.
Really big thank you to you

Last edited by zookthespook; 07-05-2019 at 02:17 PM.
zookthespook is offline   Reply With Quote
Old 07-05-2019, 05:18 PM   #14
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@zookthespook

THx !


For cc mapping, there is already few JSFX out there to remap CC, like MIDI CCMapper X, they will satisfy your needs :P


Quote:
the 16 keypad script is going to come super handy for key switching business as most of us have 61 keys midi controller.
Apart from being a note mapper, I don't see the advantage of the 4x4 layout in this case compared to other remappers, but sure, if you like it, use it for whatever you need
X-Raym is offline   Reply With Quote
Old 07-06-2019, 12:38 AM   #15
zookthespook
Human being with feelings
 
Join Date: Mar 2015
Location: India Mumbai
Posts: 816
Default

yes will go through them again. .. was just being greedy stupid with just one feature in a plugin it ..hahaha .
zookthespook is offline   Reply With Quote
Old 07-07-2019, 08:21 AM   #16
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default Update

+ Mousewheel support for the 16 pads remapper FX
X-Raym is offline   Reply With Quote
Old 02-19-2020, 06:09 AM   #17
CEART
Human being with feelings
 
CEART's Avatar
 
Join Date: Jul 2018
Location: LAITW
Posts: 176
Default

Quote:
Originally Posted by X-Raym View Post
  • X-Raym_Note to CC.jsfx
Enjoy!
Hi, just recently I discovered 'Note to CC.jsfx', simple (not for my zero prgrming skills BTW) but perfect for my specific need now, thanks!
Well, I want to use it to send a CC64 (sustain pedal off) to some piano and synth pads VSTi which not responding to CC 123 note off, in order to cut stuck notes (sorta of Panic button) which happens once in a while when I use my guitar / GK3 Roland as MIDI controller.

Is it possible in Reaper to create an action or a button on my toolbar that sends the "MIDI in" trigger note to 'Note to CC' instead to send the trigger note in from an external MIDI controller?

I would use it after recording with the guitar midi controller, for editing and cleaning of resulting stucked notes. Panic button.
CEART is offline   Reply With Quote
Old 02-19-2020, 01:47 PM   #18
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@CEART
Hi !
I dont understand the request exactly but if you need MIDI panic button there is already one action for that in REAPER, I think it is Reset all MIDI devices action


Hope it helps !
X-Raym is offline   Reply With Quote
Old 02-24-2020, 01:07 AM   #19
CEART
Human being with feelings
 
CEART's Avatar
 
Join Date: Jul 2018
Location: LAITW
Posts: 176
Default

Quote:
Originally Posted by X-Raym View Post
@CEART
Hi !I dont understand the request exactly but if you need MIDI panic button there is already one action for that in REAPER, I think it is Reset all MIDI devices action
Hope it helps !
Hi @X-Raym

Thanks for your attention, I'm sorry for not being clear. Reset all MIDI devices action didn't work.

I will try to explain better. When occurs stuck midi notes there is a considerable amount of VSTi that not respond to Reaper Panic Button (F3) note-off command, but instead does react perfectly to a MIDI CC64 pedal off message, which reset the instrument note engine and kill the stuck condition.
This action requirement apparently look something simple or newbie asking.
I just want an action (in a toolbar) that generates and sends a specific MIDI single note to your 'JS: Note to Midi' in a instrument track, without using an external controller or sequence.
Quote:
ACTION BUTTON (midi note) -> Track fx -> Note to MIDI (CC64) -> VSTi.
While I have no problem when I use a midi keyboard controller, stuck midi notes happens with some synth guitar systems when dense MIDI data (big chords, inaccurate playing, multi midi ch, continuous CC etc) is sent. After recording, I have to do MIDI post-editing to clean and fix the sequences but without using an external controller. There is where the CC64 pedal will shine! but I have not been able to find out if Reaper can generate MIDI events as action or whatever from itself.

I made an action "simulation" .Obviously the simulation is for action only since your fx works perfectly:


Last edited by CEART; 02-24-2020 at 01:19 AM.
CEART is offline   Reply With Quote
Old 02-24-2020, 04:12 AM   #20
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

I understand the context better but why sending note rather than the right CC directly ?
X-Raym is offline   Reply With Quote
Old 02-24-2020, 05:20 AM   #21
CEART
Human being with feelings
 
CEART's Avatar
 
Join Date: Jul 2018
Location: LAITW
Posts: 176
Default

Thanks. I asked myself that before, but how can I to send a aspecific CC msgs to a VSTi on a track by means of a toolbar button? some plugin, fx or recommended action?
CEART is offline   Reply With Quote
Old 02-24-2020, 06:04 AM   #22
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@CEART
I made a bit of research,



Create a new ReaScript form action list with this line


Code:
reaper.StuffMIDIMessage(0, 11*16, 64, 0)

This will send a MIDI message to virtual keyboarrd (no need to open it), to tracks where MIDI Rec is active (and virtual keyboard selected or at best ALL MIDI INPUT),


64 is for pedal hold on/off (you also have soft pedal in 67)



last 0 is for velocity.


Should be enough for your need

Last edited by X-Raym; 02-24-2020 at 01:53 PM.
X-Raym is offline   Reply With Quote
Old 02-24-2020, 07:54 AM   #23
CEART
Human being with feelings
 
CEART's Avatar
 
Join Date: Jul 2018
Location: LAITW
Posts: 176
Default

@X-Raym

Thanks! as expected it worked perfect! and for a more complete Panic Button I made a custom action combining your script and Send all notes off to all MIDI outputs / plug-ins.

I have some words that may be a bit off topic (maybe I will post soon in a dedicated thread.)
Already I have been very impressed with the meaningful work and community spirit done by people like you and others here to further increase the immense Reaper versatility and configuration possibilities, something never before seen in the DAW market.
With your kind gesture on making "a bit of research" you have decisively inclined the balance with the encouragement I needed to start learning basic scripting and Reascript.
Coding is not a dark or incomprehensible mystery to me since years ago I took small steps learning simple code (C #, html, JavaS. Basic2 Commodore 64.)

Like not so few caught by Reaper magic I find myself in the dilemma of sacrificing time from my work / duties as a composer, performer and music producer to spend it learning scripting languages like EEL, Lua, Python for RS/JSFX. but now I am even more convinced that learning scripting, even if it is basically, is not an expense but an investment in order to maximize the Reaper experience. Which for me is demonstrated with that simple line of code that you created in response to my "newbie" asking.

Thanks, X-Raym.
CEART is offline   Reply With Quote
Old 02-24-2020, 01:55 PM   #24
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@CEART
I'm very this could have inspired you to script. You can jump on my tutorials (linked in signature) not much have change since I made them (apart now the native REAPER IDE is better).
Scripting (and even, just moding others script) can open you some nice things for your workflow.


Cheers !
X-Raym is offline   Reply With Quote
Old 05-13-2020, 04:14 AM   #25
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default Update

Just added Send Midi Notes Offs to my 16 pads scripts and octave transpose shifts : if a slider is change, it wil send all midis note off messages, to be sure no note on are left unclosed.
This happend if you left a key pressed while changing sliders, which happen quite often with the cotave shift script.


A more advanced solution would be to check if the note was playing and send back a note on if it was (to allow earing transposition while changing slider).
I just put the simplest integration for now as a quick fix.



This scripts wasn't meant to be automated so I guess this will not cause backward compatibility issue.
X-Raym is offline   Reply With Quote
Old 05-31-2021, 05:45 PM   #26
tnkumar
Human being with feelings
 
Join Date: May 2021
Posts: 28
Default

Quote:
Originally Posted by X-Raym View Post
  • X-Raym_MIDI notes sequence from CSV file.jsfx


A way to make melodies from one note input only, based on a CSV file which contains the notes list.

Demo video and info here:
MIDI Notes Sequence with JSFX: Demo on Makey Makey / ExtremRaym
@X-Raym -> I got "MIDI notes sequence from csv" as a FX on one of the tracks. Where can I specify the location of the csv file on the interface so that it can be played?
tnkumar is offline   Reply With Quote
Old 06-01-2021, 12:30 AM   #27
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@tnkumar
From the article linked in your quote:


"Export is made on the Data/MIDI sequences subfolder of REAPER resources directory as .txt file."
So the export script should take care of path.

i dont remember if the JSFX have to be reload to see the new file or not.
X-Raym is offline   Reply With Quote
Old 06-01-2021, 02:59 AM   #28
tnkumar
Human being with feelings
 
Join Date: May 2021
Posts: 28
Default

Quote:
Originally Posted by X-Raym View Post
@tnkumar
From the article linked in your quote:


"Export is made on the Data/MIDI sequences subfolder of REAPER resources directory as .txt file."
So the export script should take care of path.

i dont remember if the JSFX have to be reload to see the new file or not.
Thanks @X-RayM for quick feedback.
I do not have a makey makey and intended to use your script to load from a csv that I manually create and then play.

In folder AppData -> Roaming -> REAPER -> Data,
I see folders like ix_sequences and MIDINoteImages. Is there a particular folder where I should store the file and is there a particular name to give to the file?

Also, how do I invoke the playing of the notes in the file?
tnkumar is offline   Reply With Quote
Old 06-01-2021, 03:42 AM   #29
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@tnkumar
You can still read the article and skip all the makey makey parts, the setup will be the same.


If you created the CSV from the "Script: X-Raym_Export active take in MIDI editor as CSV of notes and velocity.lua" it will put it at the right place already.


AppData -> Roaming -> REAPER -> Data -> MIDI Sequences
X-Raym is offline   Reply With Quote
Old 06-01-2021, 06:35 AM   #30
tnkumar
Human being with feelings
 
Join Date: May 2021
Posts: 28
Default

Quote:
Originally Posted by X-Raym View Post
@tnkumar
You can still read the article and skip all the makey makey parts, the setup will be the same.


If you created the CSV from the "Script: X-Raym_Export active take in MIDI editor as CSV of notes and velocity.lua" it will put it at the right place already.


AppData -> Roaming -> REAPER -> Data -> MIDI Sequences
[IMG][/IMG] >>> https://i.imgur.com/jcVR884.png

Thanks @X-Raym. I am now able to create the file and edit it.
It also shows in the UI as in the above image

I now want to be able to press a key and get all the notes played. How can I do that?
tnkumar is offline   Reply With Quote
Old 06-01-2021, 07:30 AM   #31
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@tnkumar
If CSV is valid, then you just have to use your midi controller and map a desired key to the forward slider and one to the backward.
Then you should be able to press this key.
Note this script only run note by note, note the full sequence.
There is other tools for that I think
X-Raym is offline   Reply With Quote
Old 06-01-2021, 08:22 AM   #32
tnkumar
Human being with feelings
 
Join Date: May 2021
Posts: 28
Default

Quote:
Originally Posted by X-Raym View Post
@tnkumar
If CSV is valid, then you just have to use your midi controller and map a desired key to the forward slider and one to the backward.
Then you should be able to press this key.
Note this script only run note by note, note the full sequence.
There is other tools for that I think
Thanks @X-Raym. I was looking for a script to run the full sequence of notes, on pressing one key. Does anyone know of such a script and can point me to it?
tnkumar is offline   Reply With Quote
Old 09-09-2022, 08:41 PM   #33
Rockum
Human being with feelings
 
Join Date: Apr 2009
Location: Nashville
Posts: 177
Default

Quote:
Originally Posted by X-Raym View Post
Minimalist simple new script:


  • MIDI notes octave tranpose shift
More adapted that the usual transpose scripts if you know you want to only shift by octave, and if you need to filter the shift by channel (in case of split keyboards etc).


Thx for your support !
I can see that you have an all notes off function for when the octave shift occurs, but seems like notes still get stuck when changes are made mid-play.

I was also wondering if this fx would block CC's and other non-note on/off events or let them pass through.

Thanks X-Raym
Rockum is offline   Reply With Quote
Old 09-10-2022, 03:42 AM   #34
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Rockum
That means that your VSTi doesn't consider All-notes-off event then, cause one is already sent on every channel at slider change.. This would can only be fix by extending my Send Notes Off function to send a Note Off event to all Notes of Every channel as well (127*16 events) I think. This seems a bit overkill and could be a fix for the VST.... Have you tried with different ones ?


(note, I just made a small update of the script, but it shouldn't change how it behaves)
X-Raym is offline   Reply With Quote
Old 09-10-2022, 08:46 AM   #35
Rockum
Human being with feelings
 
Join Date: Apr 2009
Location: Nashville
Posts: 177
Default

Quote:
Originally Posted by X-Raym View Post
@Rockum
That means that your VSTi doesn't consider All-notes-off event then, cause one is already sent on every channel at slider change.. This would can only be fix by extending my Send Notes Off function to send a Note Off event to all Notes of Every channel as well (127*16 events) I think. This seems a bit overkill and could be a fix for the VST.... Have you tried with different ones ?


(note, I just made a small update of the script, but it shouldn't change how it behaves)
No, I only tried it with Geraint Luff's Pad Synth.

https://github.com/geraintluff/jsfx-pad-synth

I will give it a go with a few others.

Thanks so much for the info. Very helpful! I was using your jsfx as a starting point for a new one. I might just have it have it clear the current MIDI channel.

Thanks for these useful jsfx they also serve as great coding examples.
Rockum is offline   Reply With Quote
Old 09-10-2022, 09:04 AM   #36
Rockum
Human being with feelings
 
Join Date: Apr 2009
Location: Nashville
Posts: 177
Default

Oh and the passthrough question... does it passthrough CC and other MIDI data or does it block them? Thanks again.
Rockum is offline   Reply With Quote
Old 09-10-2022, 09:32 AM   #37
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Rockum
Pleasd try with other VST so we can know. The update may be required to the Pad FX.

You can answer your last question just by trying :P
X-Raym is offline   Reply With Quote
Old 09-10-2022, 10:58 AM   #38
Rockum
Human being with feelings
 
Join Date: Apr 2009
Location: Nashville
Posts: 177
Default

Quote:
Originally Posted by X-Raym View Post
@Rockum
You can answer your last question just by trying :P
Did a factory reset on my old Roland keyboard (dead battery) fired it up and it looks like the script is passing CC, pitch bend etc.



Found something new worth noting. Pad synth gets no sticking on short-note series. Only get stuck notes on long held notes.

I am only working on channel 1, so I took your advise and added

i_note = 0;
loop (128,
midisend(opos, 0x80, ico, 0);
opos +=1;
i_note += 1;
);

and it fixed my issue.
Rockum is offline   Reply With Quote
Old 09-10-2022, 11:28 AM   #39
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Rockum
Ok thanks for feedback, I Ill consider for my scripts which uses the Send Notes Offs functions !
X-Raym is offline   Reply With Quote
Old 12-26-2022, 04:18 AM   #40
Daodan
Human being with feelings
 
Join Date: Jan 2011
Posts: 1,167
Default

Quote:
Originally Posted by X-Raym View Post
  • MIDI notes octave tranpose shift
More adapted that the usual transpose scripts if you know you want to only shift by octave, and if you need to filter the shift by channel (in case of split keyboards etc).
Hi! Thanks you so much for this one. Much easier than type in 12, 24, 32 in stock JS: MIDI Transpose Notes.

I would like to display Octave Shift parameter in TCP and adjust it with the mousewheel, but for some reason the mousewheel does not work. Never seen this before in other effects.

Could you please take a look?

I also could not understand why I do not see this effect when I type in "transpose" in FX browser filter. I just noticed that it's called "tranpose" instead of "tranSpose"
Daodan 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 07:58 AM.


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