|
|
|
01-02-2018, 07:51 PM
|
#1
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Lua: Convert MIDI notes to items
Convert MIDI notes to items
* bfut_MIDI notes to items (explode note rows to subtracks).lua
* bfut_MIDI notes to items (notes to subtrack, note pitch as item pitch).lua
* bfut_MIDI notes to items (notes to subtrack, note pitch as item rate).lua
* bfut_MIDI notes to empty items (explode note rows to subtracks).lua
* bfut_MIDI notes to empty items (notes to subtrack, note pitch as item pitch).lua
* bfut_MIDI notes to empty items (notes to subtrack, note pitch as item rate).lua
Converts MIDI notes to media items in one go.
Multiple users had been requesting this over the years.
How to set up item/sample loader:
1) Select MIDI item(s) on one track.
2) Select another track with various media items.
3) Script maps each used note row to successive media items on selected track.
4) If there are not enough media items, script inserts empty items.
How to use:
1) Select MIDI item(s).
2) Select a track. (optional)
3) Run the script.
Installation
Directly from https://github.com/bfut/ReaScripts or
Copy and paste this URL in Extensions > ReaPack > Import repositories:
Code:
https://github.com/bfut/ReaScripts/raw/main/index.xml
Then install individual scripts in Extensions > ReaPack > Browse packages.
Screencaptures & Pictures
bfut_MIDI notes to items (explode note rows to subtracks).lua
videoclip: https://streamable.com/5blt0 (900 KB)
Note row mode: New subtrack for every used note row. Note row names become subtrack names.
bfut_MIDI notes to items (notes to subtrack, note pitch as item pitch).lua
Note pitch mode: Creates one subtrack. Note pitch is translated to item pitch. (Default reference pitch is 60 (C4); can be changed easily in the script.)
bfut_MIDI notes to items (notes to subtrack, note pitch as item rate).lua
videoclip: https://streamable.com/y7cz4 (600 KB)
Note pitch mode: Creates one subtrack. Note pitch is translated to item playrate. (Default reference pitch is 60 (C4); can be changed easily in the script.)
Last edited by tufb; 12-22-2020 at 07:33 AM.
|
|
|
01-02-2018, 08:30 PM
|
#2
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Intersting concept, thanks ! Just curious, do you plan to have an Implode version of the first script ?
|
|
|
01-02-2018, 10:06 PM
|
#3
|
Human being with feelings
Join Date: Jun 2008
Posts: 4,923
|
usefull! thx
|
|
|
01-03-2018, 06:00 AM
|
#4
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
Empty items? How to use them further?
|
|
|
01-03-2018, 02:46 PM
|
#5
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Quote:
Originally Posted by mpl
Empty items? How to use them further?
|
They are MediaItems containing empty takes. Either define a "Take media source" via item properties, or paste additional takes into them, respectively.
There's certainly a possibilty to implement some kind of item loader within the script.
Quote:
Originally Posted by X-Raym
Intersting concept, thanks ! Just curious, do you plan to have an Implode version of the first script ?
|
Please explain.
Quote:
Originally Posted by semiquaver
usefull! thx
|
You're welcome.
Last edited by tufb; 02-27-2020 at 01:00 PM.
|
|
|
01-03-2018, 06:07 PM
|
#6
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
not on a new reaper ini... but when run I get this error:
Quote:
...MIDI notes to items (explode note rows to subtracks).lua:7: unexpected symbol near '<'
|
I see there is one ! there, but even if I edit that away I get the same error
|
|
|
01-04-2018, 05:13 AM
|
#7
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
|
Did not test yet, but can be useful, thanks. I had a similar request somewhere in this forum. The idea was having a 1:1 conversion technique from midi notes to items, and the way back from midi items to midi notes.
Then you could apply techniques from midi editor to arrange view for example. Or just as a flexible arrangement organization tool. My suggestion was using midi note pitch values as take names, example a note 36, should get a midi item with item/take name '36'. Then conversion in both directions should be possible.
Having a ghost copy version would be useful. So all '36' takes would be ghost items.
|
|
|
01-04-2018, 08:13 AM
|
#8
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Quote:
Originally Posted by hopi
not on a new reaper ini... but when run I get this error:
Quote:
...MIDI notes to items (explode note rows to subtracks).lua:7: unexpected symbol near '<'
|
I see there is one ! there, but even if I edit that away I get the same error
|
The script is devoid of exclamation marks. Something may have gone wrong on your end.
Re-download recommended.
Thx for the feedback!
Last edited by tufb; 02-27-2020 at 01:02 PM.
|
|
|
01-04-2018, 08:53 AM
|
#9
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
|
Ghost copy is the term old cubase was using, what was it again in Reaper? It means, if you change one copy all other copies change in same form. Thus it is enough to edit just one, even if you have 1000 copies.
Ok, ghost copy is called pooled copy in Reaper.
|
|
|
01-04-2018, 09:00 AM
|
#10
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
|
Quote:
Originally Posted by tufb
MIDI note attributes, channel, pitch, muted, velocity, and
reference pitch (where applicable), are now dumped to corresponding item notes.
|
Not sure yet what to do with the other parameters, except pitch.
One more simple use case idea: Take any step sequencer, e.g. with 16 steps, using 1bar for each step, for creating some arrangement block which you can fill up step by step.
Having replacement actions would allow infinite quick arrangement experiments by changing patterns.
|
|
|
01-04-2018, 03:19 PM
|
#11
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Quote:
Originally Posted by TonE
Ghost copy is the term old cubase was using, what was it again in Reaper? It means, if you change one copy all other copies change in same form. Thus it is enough to edit just one, even if you have 1000 copies.
Ok, ghost copy is called pooled copy in Reaper.
|
Do you mean item groups? "Pooling" is a concept in MIDI items, whereas this scripts deals with media items.
Quote:
Originally Posted by TonE
One more simple use case idea: Take any step sequencer, e.g. with 16 steps, using 1bar for each step, for creating some arrangement block which you can fill up step by step.
Having replacement actions would allow infinite quick arrangement experiments by changing patterns.
|
Not sure if I follow. Editing MIDI takes is not really any of the scripts business.
As far as converting MIDI takes as you edit them goes (is this what you're saying?), that's a whole new script. That would mean implementing a step sequencer
much like in FL Studio. Nothing I could handle in my spare time - and to be honest, I'd only involve myself in such a project, once Reaper dev's confirm that they won't
ever implement such a module themselves.
Here, the whole idea is to use Reaper's excellent MIDI piano roll as interface, in order to arrange media items, thus eliminating the need
for instrument plugins (which is relevant for a certain OS). Or at least that's one thinkable application of the script.
|
|
|
01-05-2018, 10:02 AM
|
#12
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
please see post #6 and tell me what to do about that error... thanks
|
|
|
01-06-2018, 06:19 AM
|
#13
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
My recommendation is to re-download the script, don't edit anything. Thx for your feedback.
My code is devoid of exclamation marks.
Quote:
Originally Posted by hopi
I see there is one ! there, but even if I edit that away I get the same error
|
|
|
|
01-07-2018, 11:19 AM
|
#14
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
edited
Last edited by tufb; 02-27-2020 at 01:03 PM.
|
|
|
01-07-2018, 01:54 PM
|
#15
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
edited
Last edited by tufb; 02-27-2020 at 01:03 PM.
|
|
|
01-09-2018, 04:35 PM
|
#16
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Quote:
Originally Posted by TonE
The idea was having a 1:1 conversion technique from midi notes to items, and the way back from midi items to midi notes.
Then you could apply techniques from midi editor to arrange view for example. Or just as a flexible arrangement organization tool. My suggestion was using midi note pitch values as take names, example a note 36, should get a midi item with item/take name '36'. Then conversion in both directions should be possible.
|
I've given this some more thought. The main problem I see is, that Media Items
are objects with an unique ID, MIDI notes are not. MIDI notes are only
distinguished by their properties. Making certain mouse modifiers from the MIDI
editor, available for Reapers main timeline might be an easier approach.
|
|
|
01-10-2018, 11:07 AM
|
#17
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
thanks for your help... I did get it to run without errors... but I must not understand something:
what I was expecting to be able to do is this:
have a drum midi track loaded from the beats of Addictive Drums
set the note map in reaper to be correct for that so kick notes are named kick, snare named snare, etc.
then run this script and get the exploded notes as items on new tracks, each track with only the notes
for each drum hit...
what I get when exploded is each of the note rows, correctly named as in note map [that is good!!]
but the items do not contain any notes....
Am I doing something wrong or do I not understand the lua's intent correctly???
Last edited by hopi; 01-10-2018 at 11:53 AM.
|
|
|
01-10-2018, 04:24 PM
|
#18
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Quote:
Originally Posted by hopi
thanks for your help... I did get it to run without errors... but I must not understand something:
what I was expecting to be able to do is this:
have a drum midi track loaded from the beats of Addictive Drums
set the note map in reaper to be correct for that so kick notes are named kick, snare named snare, etc.
then run this script and get the exploded notes as items on new tracks, each track with only the notes
for each drum hit...
what I get when exploded is each of the note rows, correctly named as in note map [that is good!!]
but the items do not contain any notes....
Am I doing something wrong or do I not understand the lua's intent correctly???
|
What you are describing there, is basically exploding one MIDI item to new MIDI items,
where each contains one note row from the original item. There is already a
default action for that (search for "MIDI explode" in the action list menu).
These scripts will "convert" each MIDI note to a new Media Item, containing an empty take.
These new items can hold whatever you want them to.
Actually, I thought about implementing a take/sample loader within this script,
not sure if there's enough interest?
|
|
|
01-12-2018, 11:11 AM
|
#19
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
Ah thank you ... you are so correct about their being that existing action...
and now I better understand your script as well, but I'd be curious to know
what YOU do with these new media items after you run the script...?
Last edited by hopi; 01-12-2018 at 11:30 AM.
|
|
|
01-12-2018, 11:42 AM
|
#20
|
Human being with feelings
Join Date: Jan 2007
Location: Smokie Bay.
Posts: 796
|
I would love to use something like this if I could start with a Midi file and an audio file below , and then lock the pitch of of the audio file to the midi , as in jumping to the same pitch values , assuming base value is either C which could be offset on audio file or being able to set the base pitch in a dialog.
Or something like audio to midi which after analyzing the audio is locked to the created midi file , changing midi note changes audio item pitch.
Take this a bit further and have a ADSR and even polyphony.
Just an idea , thought I would throw it out there.
|
|
|
01-12-2018, 04:10 PM
|
#21
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Quote:
Originally Posted by hopi
Ah thank you ... you are so correct about their being that existing action...
and now I better understand your script as well, but I'd be curious to know
what YOU do with these new media items after you run the script...?
|
Quote:
Originally Posted by Arnar
I would love to use something like this if I could start with a Midi file and an audio file below , and then lock the pitch of of the audio file to the midi , as in jumping to the same pitch values , assuming base value is either C which could be offset on audio file or being able to set the base pitch in a dialog.
|
I've been working on an item loader somewhat like this. So far, without GUI, and config options within the script (I prefer hitting
a hotkey combo and be done with it). Will drop once some more bug-fixing is done. I shall look at GUIs onwards.
Last edited by tufb; 01-12-2018 at 04:19 PM.
|
|
|
01-13-2018, 02:19 PM
|
#22
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
News:
13 Jan 2018: New item loader.
HOW TO USE:
1) Select MIDI item(s), all on the same track.
2) Select a track. (optional)
3) Run the script.
HOW TO USE ITEM LOADER:
1) For K newly, by the script, created subtracks, the first K media items from the initially selected track are inherited.
2) If the initially selected track contains fewer than K media items, fall back to empty takes.
HOW TO TOGGLE ITEM LOADER:
1) In the code, set script_config["item loader"] to either true or false.
New screenshots in OP.
Last edited by tufb; 01-13-2018 at 02:27 PM.
|
|
|
01-15-2018, 05:52 PM
|
#23
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
[edit:redundant]
Last edited by tufb; 01-19-2018 at 12:16 AM.
|
|
|
01-15-2018, 08:06 PM
|
#24
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Quote:
Originally Posted by Arnar
I would love to use something like this if I could start with a Midi file and an audio file below , and then lock the pitch of of the audio file to the midi , as in jumping to the same pitch values , assuming base value is either C which could be offset on audio file or being able to set the base pitch in a dialog.
|
bfut_MIDI note row controls items pitch.lua now available on my github.
videoclip: https://streamable.com/hjpx8 (~1 MB / 1080p)
reference_pitch (AKA base value, AKA base pitch) is set in the script code.
HOW TO USE:
1) Open MIDI editor.
2) Select media item(s).
3) Click any note row. (click around on the piano keys to the left, that is)
4) Run the script.
Last edited by tufb; 01-22-2018 at 06:02 PM.
|
|
|
01-16-2018, 12:32 PM
|
#25
|
Human being with feelings
Join Date: Jan 2007
Location: Smokie Bay.
Posts: 796
|
This looks great , will test !
|
|
|
01-20-2018, 01:38 PM
|
#26
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
wow... now THAT is amazing! gotta wait for some blu ray copy to finish before I go get it and try it, but I am excited!
thanks for all you do!!!
PS...ok just tested and it is really kewl ...
do you have a way to add your stuff to reapack? so we can get it with reapack?
Last edited by hopi; 01-20-2018 at 02:32 PM.
|
|
|
01-22-2018, 06:01 PM
|
#27
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Quote:
Originally Posted by hopi
do you have a way to add your stuff to reapack? so we can get it with reapack?
|
... I've certainly been meaning to offer this.
You're welcome.
|
|
|
01-23-2018, 08:49 PM
|
#28
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
oh good... it is such a nicer way than github...
and it looks like you are heading toward quite a few interesting scripts so it would be nice for users to just filter to your name in reapack and keep up with your work.... nice for updated and special case versions too
Last edited by hopi; 01-23-2018 at 10:18 PM.
|
|
|
01-24-2018, 07:12 PM
|
#29
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
News:
25 Jan 2018: New script: bfut_MIDI notes to items (notes to subtrack, note pitch as item pitch).lua
bfut_MIDI notes to items (notes to subtrack, note pitch as item pitch).lua
Note pitch mode: Creates one subtrack. Note pitch is translated to item pitch. (Default reference pitch is 60 (C4); can be changed easily in the script.)
|
|
|
01-25-2018, 03:52 PM
|
#30
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
ReaPack support: XML available NOW on github.
Last edited by tufb; 01-25-2018 at 04:04 PM.
|
|
|
01-28-2018, 09:44 PM
|
#31
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
great now the reapack is working fine.... thanks
|
|
|
02-23-2020, 11:32 AM
|
#32
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
|
Quote:
Originally Posted by hopi
oh good... it is such a nicer way than github...
and it looks like you are heading toward quite a few interesting scripts so it would be nice for users to just filter to your name in reapack and keep up with your work.... nice for updated and special case versions too
|
Why filtering, I am always downloading everything.
Thanks tufb, for all your scripts, still did not try anything yet, but those look interesting. Having direct youtube video examples would be great, with sound. This allows something like turbo arranging, nowhere else available, by 'saving your arrangement structure in midi form'. Now one needs to come up with interesting strategies how to finetune this concept further. Like midi channel could have their own meaning, certain octave ranges could have their meaning. Notes in midi channel 10 could have again their certain meaning. I actually did something similar long time ago, but all working purely with midi, the arranging concept was saved as midi, the exploded midi was also midi. Longer midi notes were replaced by some other midi patterns. This can give you a very quick mute structure arrangement. When which notes or components of the arrangement should be muted for example. When there should be a bassline, harmony or melody, or kick, or snare and the other drums... Now converting those midi structures with one hit into an almost finished arrangement would be funny. At least an interesting starting point for sure.
Forgot to write, greetings to Berlin!
Last edited by TonE; 02-23-2020 at 11:42 AM.
|
|
|
02-27-2020, 01:09 PM
|
#33
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Much like my entire repo: All three scripts have been updated. I've also updated the documentation in the original post.
This pack does not require any extensions. Thank you so much for your feedback.
bfut_MIDI notes to items (explode note rows to subtracks).lua
bfut_MIDI notes to items (notes to subtrack, note pitch as item pitch).lua
bfut_MIDI notes to items (notes to subtrack, note pitch as item rate).lua
@version 1.1
@changelog
+ convert note velocity to item volume
+ obey MIDI item start/end
+ improved performance
Installation
Directly from https://github.com/bfut/ReaScripts or
Copy and paste this URL in Extensions > ReaPack > Import repositories:
Code:
https://github.com/bfut/ReaScripts/raw/main/index.xml
Last edited by tufb; 11-18-2020 at 11:45 AM.
|
|
|
05-22-2020, 05:05 AM
|
#34
|
Human being with feelings
Join Date: Feb 2017
Location: Kiel
Posts: 974
|
Hello tufb
Is it possible to change your script "bfut_MIDI note row controls items pitch.lua" that you can get item pitch values using a midi keyboard step by step.
For example:
You select 10 items, execute the script and change the pitch values one after the other by entering the midi keyboard.
Thanks a lot
Dragonetti
https://forum.cockos.com/showthread.php?t=236857
|
|
|
05-23-2020, 01:12 PM
|
#35
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
I replied in your thread. Thanks
|
|
|
06-30-2020, 10:19 AM
|
#36
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Updated:
bfut_MIDI notes to items (explode note rows to subtracks).lua
bfut_MIDI notes to items (notes to subtrack, note pitch as item pitch).lua
bfut_MIDI notes to items (notes to subtrack, note pitch as item rate).lua
@version 1.2
@changelog
+ convert note multiples from looped items, obeying take playrate (When a MIDI item is looped, all notes will be converted.)
This change is inspired by a recent adaption of my scripts by developer, ePi. ( source). Unlike their version at this time, my script takes into account the MIDI take playrate.
New Scripts:
bfut_MIDI notes to empty items (explode note rows to subtracks).lua
bfut_MIDI notes to empty items (notes to subtrack, note pitch as item pitch).lua
bfut_MIDI notes to empty items (notes to subtrack, note pitch as item rate).lua
The item/sample loader is switched off in these.
Last edited by tufb; 06-30-2020 at 05:23 PM.
|
|
|
07-01-2020, 11:14 AM
|
#37
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
The scripts were updated again under the same version number. If you downloaded any versions 1.2 within the last 24 hours, you may want to synchronize packages in ReaPack, then reinstall the scripts. Enjoy.
|
|
|
12-13-2020, 09:00 PM
|
#38
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
New versions of these scripts now support time signature markers.
(ahem, in fact they have been sitting there since July )
https://github.com/bfut/ReaScripts
Any feedback is helpful!
Here's a screencap highlighting use of the item loader,
and the new time signature marker support:
What happens here?
1) A MIDI take is stretched along different time sigs.
2) The item loader maps items from the track where
the source MIDI item sits to the MIDI channels. Items
are mapped from below to above: i.e. clap has the
smallest channel number, so it is positioned first.
Kickdrum has the highest channel number, so it has to
be positioned last, etc.
3) The script is executed.
NB: note velocity is mapped to item volume (I might/might not remove that behavior -> feedback?)
Last edited by tufb; 09-24-2022 at 02:39 PM.
|
|
|
12-17-2020, 11:04 PM
|
#39
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Updated:
bfut_MIDI notes to empty items (explode note rows to subtracks).lua
bfut_MIDI notes to empty items (notes to subtrack, note pitch as item pitch).lua
bfut_MIDI notes to empty items (notes to subtrack, note pitch as item rate).lua
bfut_MIDI notes to items (explode note rows to subtracks).lua
bfut_MIDI notes to items (notes to subtrack, note pitch as item pitch).lua
bfut_MIDI notes to items (notes to subtrack, note pitch as item rate).lua
@version 1.3
@changelog
+ support time signature markers
# Fix: no more side-effects due to arrange view zoom-level
# 'note velocity to item volume' off by default
The "note velocity to item volume" behavior can be re-enabled by changing the script itself, which is documented but unsupported.
Older versions of the script might give unexpected results based on the arrange view zoom-level. This should no longer happen with the update.
Installation as usual.
|
|
|
08-30-2022, 01:04 AM
|
#40
|
Human being with feelings
Join Date: Dec 2017
Posts: 152
|
Heads up for users that have challenges connecting directly to github.com. Developer, GT-610 contributed an index.xml with alternative URLs to my scripts.
Find index_fastgit.xml in my repo: https://github.com/bfut/ReaScripts
Thanks for the interest.
Last edited by tufb; 08-30-2022 at 01:27 AM.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:30 PM.
|