Old 06-19-2015, 09:10 AM   #1
Matt Riley
Human being with feelings
 
Join Date: Jun 2015
Location: Minneapolis, MN
Posts: 50
Default set midi channel to voice number

In logic you can play/record in some chords, select them and "set midi channel to voice number". Then you can split those midi channels to new regions. Is this possible reaper?
Matt Riley is offline   Reply With Quote
Old 06-20-2015, 09:11 AM   #2
Matt Riley
Human being with feelings
 
Join Date: Jun 2015
Location: Minneapolis, MN
Posts: 50
Default

I take that as a no.
Matt Riley is offline   Reply With Quote
Old 06-20-2015, 09:33 AM   #3
micron
Human being with feelings
 
Join Date: Aug 2009
Posts: 178
Default

hi, i don't use it very much, but you could accomplish something of similar by exploding notes(there is some tutorial around), or as alternative you can use some chord splitting tools, such as:

https://stash.reaper.fm/v/1872/MIDI_ChordSplitter

or

http://www.thepiz.org/plugins/?p=pizmidi
micron is offline   Reply With Quote
Old 06-20-2015, 10:29 AM   #4
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

Matt ...we are going to have terminology problems...

what logic calls a region is more like an item in reaper

what reaper calls a region is something entirely diff than what logic calls it

now 'voice number'... I can only assume that points to a vsti that loads diff 'voices' or instruments... such as Kontakt can do...

You can select all the notes of a given pitch in the midi editor and then change their midi channel to whatever... then you can set the send of that midi item so that it sends to a given vsti and then set that vsti to have a given 'voice' or instrument getting the midi data on any given channel.

Reaper and Logic are very diff... not to argue better or worse, but it's going to worth your trouble to get a grasp of how reaper does it, ...how it's routing works, etc. Once you do, I'd expect you'll like it.
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 06-20-2015, 11:04 AM   #5
Matt Riley
Human being with feelings
 
Join Date: Jun 2015
Location: Minneapolis, MN
Posts: 50
Default

Thanks guys! I'm very intrigued by reaper and am considering switching. I'm trying to see if I can get a slick workflow set up in reaper. I love how customizable it is. I'm just finding the midi editing to be lacking. No envelopes in the midi editor for example. There are so many wonder things in Logic but I don't like the work flow. I wish I could Abletonize it. I'm doing that to Reaper while hoping to have some of Logic's functionality too.

Hopi this terminology is sort of based on music theory language. "Voice number" refers to the voice or note of each chord vertically from bottom to top. So let's say I have a C chord in root position. C would be voice one, E would be voice 2, G would be voice 3. An F or G chord would have the same voice numbers but on different notes. In logic you can split those out to different tracks. So if I played a series of four-voiced chords in the violin 1 track, I could then split those down to the tracks underneath them: violin 2, Viola and Cello. In reaper if I split by note, it becomes a huge mess. It's fine if I manually assign each voice to 3 different channels. I'd rather not do that though. I would like for reaper to detect each "voice" in each chord.

Micron I'll check those tools out. I downloaded pizmidi but haven't figured out how to install it yet.
Matt Riley is offline   Reply With Quote
Old 06-20-2015, 12:34 PM   #6
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

ok I see now what you want to do... I think

there maybe a better way than what I'm going to suggest and maybe one of the great script writers could make you a tool to do it faster... [ask spk77 or heda, or others...]

in the midi editor, if you rt clk a piano key, it will select all the notes on that key...

so you could get all the notes of voice 1 for a given chord, copy and paste the to a new emply midi item...

then do the same for all the voice 1 notes of another chord, copy and paste to that other midi item...

reapeat for as many chords as you wish and all the voice 1 notes will be on that other midi item...

do the same for the other voices and you'd have all the voice 1, or 2 or 3 or 4 notes on their own midi item....

another way might be like this:

make as many copies of the midi item as you have note voices..
select via that rt clk, all the notes you want for a given voice
use the action to invert the selection and delete what it does [all the notes execpt the voice you want]

do that for each chord and the voices you want ...

put all the midi items of voice one over eachother on a track and glue them all into one item...

do the same for the others...

Now perhaps you can tell me something about Logic?

I normally work reaper on a PC, but was at a friend's who runs Logic on a Mac [of course].... I could not find, and he did not know, how to have several diff tracks of midi data and route [send] them all to one single instance of a virtual instrument. For example: one midi track of only Kick drums hits and another midi track of only snare hits...

I'd like to know that about Logic. thanks
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 06-20-2015, 01:23 PM   #7
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Stay tuned, I think I've got it scripted . I'm right now testing it a little before uploading


EDIT:
Dang, for now it only works if the notes were channel 1 to begin with, fiddling on...


Actually, it's easily worked around, I could just change all selected notes to channel 1 at the start of the script...
Just to be sure, you always want the lowest note to be channel 1, second lowest channel two etc, right?
What should happen if a selected note is not part of a chord? If you don't mind it also ending up on channel 1, then I think I've got it.



Dang again! Spotted a bug (it's even visible in the licecap at chords 3 and 4 ). Trying to sort it out.

Taking down the download for now, sorry. If you already downloaded, please throw it away - or fix it and tell us.

With the caveat that most MIDI ReaScripts suffer from: it can't work across takes/items. It only works on the current active take in the focused MIDI editor.

Last edited by gofer; 06-20-2015 at 03:14 PM.
gofer is offline   Reply With Quote
Old 06-20-2015, 02:47 PM   #8
Matt Riley
Human being with feelings
 
Join Date: Jun 2015
Location: Minneapolis, MN
Posts: 50
Default

Wow Gofer!!! I'm floored! I'll check it and get back to you!

@ Hopi: There are a few ways to do that in Logic. Here are some tutorial videos.

https://www.youtube.com/results?q=logic+x+multi+timbral
Matt Riley is offline   Reply With Quote
Old 06-20-2015, 02:58 PM   #9
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

I already found an issue where it gets confused with ordering... That's what you get for rushing things.

Sorry for that, needs a different approach. I'll try on.
gofer is offline   Reply With Quote
Old 06-20-2015, 03:17 PM   #10
Matt Riley
Human being with feelings
 
Join Date: Jun 2015
Location: Minneapolis, MN
Posts: 50
Default

Cool. Thanks for your work on this.

Question: Any way to reverse the channel order to start from the top down? I just checked Logic and that's they way they do it. I can make a video of the process if that helps. What version of Reaper will this be compatible with? I'm currently trying out 5 but I could reinstall 4.
Matt Riley is offline   Reply With Quote
Old 06-20-2015, 03:27 PM   #11
whiteaxxxe
Banned
 
Join Date: Jul 2014
Location: United States of Europe, Germany, Mönchengladbach
Posts: 2,047
Default

is that the same thing that in Cubase is called "exploding a midi-track"?

you can do that there notewise or midi-channel-wise.
whiteaxxxe is offline   Reply With Quote
Old 06-20-2015, 03:39 PM   #12
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

As of now it's even more borked than I thought. Embarrassing, that.

If I get it to work it should be possible to do it top-down, but for now I am pretty stumped.

It should work with both 4 and 5 (same bugs for now in either version ). But it might be ending up v5 only, depends on which solution I find.


@ whiteaxxxe, no, not the same. It can be used as preparation for "explode multichannel to single channel items", but you could as well drive a multichannel VSTi from a single item. The idea is to convert chords on a single channel to chords which are nicely spread out over as many channels as they need (and as few as possible).

Explode by pitch is no solution, just try it with a short cadenza... each pitch will get an item which is not the goal here.
gofer is offline   Reply With Quote
Old 06-20-2015, 03:59 PM   #13
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by gofer View Post
With the caveat that most MIDI ReaScripts suffer from: it can't work across takes/items. It only works on the current active take in the focused MIDI editor.
Actually it is possible to manipulate MIDI events across takes/items.


"Do something to MIDI events in selected items / active takes" would look something like this:

Code:
i=0;
loop(CountSelectedMediaItems(0),
  (item = GetSelectedMediaItem(0,i)) ? (
    (take=GetActiveTake(item)) && TakeIsMIDI(take) ? (
      // get/set MIDI events here
      MIDI_CountEvts ...
      MIDI_GetNote ...
      MIDI_SetNote ...
    );
  );
  i=i+1;
);
(Note: TakeIsMIDI is V5 function)



The MIDI editor doesn't have to be opened:

Last edited by spk77; 06-20-2015 at 04:06 PM.
spk77 is offline   Reply With Quote
Old 06-20-2015, 04:17 PM   #14
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Interesting. Have to play with it. I got the hunch that there are caveats when the goal is to do stuff on all selected notes in the MIDI editor, but only when the take is tagged editable.

But that's for later. For now I am still stuck with sorting the list of notes the script generates for the separate selected chords by pitch... for now it's sorted by start time, as that's how it finds them. Can't seem to get my head around it. That's something which was far easier in Python.
gofer is offline   Reply With Quote
Old 06-20-2015, 04:26 PM   #15
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by gofer View Post
For now I am still stuck with sorting the list of notes the script generates for the separate selected chords by pitch... for now it's sorted by start time, as that's how it finds them. Can't seem to get my head around it. That's something which was far easier in Python.
That (and many other things) can be really difficult to do in EEL, I know .
That's why I'm doing my scripts mostly in Lua.
spk77 is offline   Reply With Quote
Old 06-21-2015, 05:25 AM   #16
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Just now that I start to get to grips with EEL... I guess I'll need to make friends with Lua. Right now it's totallly alien to me.

I don't get the sorting done in EEL, might be possible, but convoluted as hell. So just to have something that works I did it in Python for now. Will be slower than EEL or Lua, but at least it passes my testing .

Problem: Cockos introduced an incompatibility in a function I use, so I have to decide in which Reaper version (v4 or v5) I want the script to work without throwing an error.
I'll upload a zip archive with both versions.

https://stash.reaper.fm/v/24355/Set%2...%20scripts.zip

Please test (if you have Python installed) and report back.
gofer is offline   Reply With Quote
Old 06-21-2015, 08:53 AM   #17
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

using the v5 here and your script seems to work fine...

good luck with lua spk is your friend!
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 06-21-2015, 09:18 AM   #18
whiteaxxxe
Banned
 
Join Date: Jul 2014
Location: United States of Europe, Germany, Mönchengladbach
Posts: 2,047
Default

Quote:
Originally Posted by gofer View Post


@ whiteaxxxe, no, not the same. It can be used as preparation for "explode multichannel to single channel items", but you could as well drive a multichannel VSTi from a single item. The idea is to convert chords on a single channel to chords which are nicely spread out over as many channels as they need (and as few as possible).

Explode by pitch is no solution, just try it with a short cadenza... each pitch will get an item which is not the goal here.
thats what I meant. not exploding by pitch. a 3-note chord change will be exploded into 3 midi-items. if there is a 4-note chord amongst them into 4 midi-items respectively to 3 or 4 midi-channles.
whiteaxxxe is offline   Reply With Quote
Old 06-21-2015, 09:59 AM   #19
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

@whiteaxxxe: Yeah, just that "Explode by channel" won't do nothing if all notes are on the same channel to start with, hence this thread/script.

@hopi: Thanks for the encouragement. I think it's a good time to start talking Lua, as lots of fine examples are already out there by now. Hopefully, after the Python-to-EEL step, grasping Lua - at least as much of the basics as I grasp in the other two languages - will be a bit easier

I learned my few bits of Python and eel both right here on the forums. In my experience the whole bunch of scripters/coders around here are very nice, friendly and helpful people, that includes of course spk77 but also anybody else I ever encountered while searching for solutions.
gofer is offline   Reply With Quote
Old 06-22-2015, 07:42 AM   #20
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

gofer... firstly, I am just not hard wired properly to do scripting [believe it or don't] so all you codeheads are gods to me!
Your current py script seems to work really well here and I don't find it to slow at all. Have not tried it on hundreds of chords but it works instantaneously here.

Now I was thinking about it a bit more and wondered these things:

Would it be useful to have it be able to change only certain of the notes in a chord to a given midi channel? Like say only the third notes to channel 5 [or whatever, you see?] I do understand that things like that could be done after running your script and then manually using the Filter to pick notes and set them as desired. Just thought I'd toss the idea out there.
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 06-27-2015, 12:23 PM   #21
Matt Riley
Human being with feelings
 
Join Date: Jun 2015
Location: Minneapolis, MN
Posts: 50
Default

Gofer thanks for your work on this! I programmed it to the V key and it works really well! One small issue though. If adjacent chords share a note, that note in the 2nd chord will be very short. Here's a short video of this:

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

There are two solutions that I can do:
1. make sure the notes don't touch before performing this script or...
2. Run this action after the script: "set note ends to start of next note"

I'm happy to do this but I thought I would check if it was possible to make an adjustment in the script.

Thoughts?
Matt Riley is offline   Reply With Quote
Old 06-27-2015, 01:27 PM   #22
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Yuk!

I can recreate this easily. It seems to be an unwanted side effect of the slight overlap that I allow notes to have without counting as a single chord (eg single notes played legato).

You can easily disable that overlap in the script by editing the line "ovl = 100" to "ovl = 0". Pretty near the top, two lines before the first "if" (I should have put it right at the top anyway, it's the only variable a user might want to tweak). At least in my test scenario that fixes it.

But I need to find a better solution, the overlap is useful to have when you don't program stuff snapped to the grid.


EDIT: Actually, from a logical point of view this shouldn't happen even with the overlap. There must be some rounding error happening behind the scenes when the script stores or retrieves the note positions.

Last edited by gofer; 06-27-2015 at 02:22 PM.
gofer is offline   Reply With Quote
Old 06-27-2015, 05:09 PM   #23
Matt Riley
Human being with feelings
 
Join Date: Jun 2015
Location: Minneapolis, MN
Posts: 50
Default

Well it's not the worst thing in the world to work around. I'm just grateful that you made this possible in the first place!
Matt Riley 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 09:48 PM.


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