Old 06-24-2022, 12:17 PM   #1
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default [SCRIPT] Copy Paste MIDI

Copy Paste MIDI

What it does?
This script copy and paste parameters of MIDI. For exemple you can get a melody and paste the pitches in another melody, or copy a rhythm and paste over a chord progression. You can copy/paste
  • Rhythm
  • Measure Position
  • Length
  • Velocity
  • Pitch
  • Intervals


How it work?
1) select the notes you want to copy
2) click 'the Copy' button on the script
3) select the notes you want to paste into
4) click one of the 6 paste buttons.

Important things
  1. If you are copying like 3 notes and pasting the pitches into more notes it will loop around your copied source: pitch1, pitch2, pitch3, pitch1, pitch2, pitch3, pitch1.... Serialism!
  2. Rhythm and intervals are calculated between the notes selected if you have N notes selected you are copying (N-1) Rhythms values/Intervals. Rhythms are calculated in PPQ. Intervals are calculated in semitones
  3. You can also Interpolate the values between the copied version and what you are pasting into. This is very useful for exploring microrhythms, works in a similar way of applying grooves with grooves tools. For interpolate right click the desired paste button and move the interpolate slider!
  4. In the 'Gap' Menu you can check if notes close together will be copied as one thing, so if you have a C major chord starting together and paste the pitches into another note it will paste all 3 notes into it. This option affects when you are copying and when you are pasting. E.G copying a {C,D} notes together will copy as one event, pasting that into 4 notes together, lets say {Bb,A,C,B} it will consider these 4 notes one event and put {C,D} over it.

Video Demo


How to install?
YOU NEED REAIMGUI 0.7+ : https://forum.cockos.com/showthread.php?p=2416501
YOU NEED JSEXTENSION : https://forum.cockos.com/showthread.php?t=212174
Download it via Reapack. If haven't done yet import my repository link:
Code:
https://raw.githubusercontent.com/daniellumertz/DanielLumertz-Scripts/master/index.xml
DONATE!
If you like this script and would like to see more, please send a donation !
Here is my donation link:
https://www.paypal.com/donate/?hoste...=RWA58GZTYMZ3N


Last edited by daniellumertz; 06-24-2022 at 01:01 PM.
daniellumertz is online now   Reply With Quote
Old 06-24-2022, 12:51 PM   #2
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,003
Default

Nice!
pcartwright is offline   Reply With Quote
Old 06-24-2022, 12:56 PM   #3
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,003
Default

Though, the second I run the script I get this error:

Code:
GUI Functions.lua:45: attempt to call a nil value (field 'ImGui_ColorConvertDouble4ToU32')
pcartwright is offline   Reply With Quote
Old 06-24-2022, 01:00 PM   #4
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

Check if you are with your Imgui to the latest version 0.7!
daniellumertz is online now   Reply With Quote
Old 06-24-2022, 04:17 PM   #5
Seventh Sam
Human being with feelings
 
Seventh Sam's Avatar
 
Join Date: Jul 2019
Posts: 43
Default

Very, very cool. Will be trying this out in the next few days.
__________________
www.seventhsam.com
Seventh Sam is offline   Reply With Quote
Old 06-26-2022, 09:37 AM   #6
Mavriq
Human being with feelings
 
Mavriq's Avatar
 
Join Date: Aug 2016
Location: Thunder Bay, Canada
Posts: 284
Default

Very nice.
Mavriq is offline   Reply With Quote
Old 06-27-2022, 10:43 PM   #7
Knob Twiddler
Human being with feelings
 
Knob Twiddler's Avatar
 
Join Date: May 2016
Location: Leuven
Posts: 89
Default

Hello,

I downloaded your repository link in Reapack. Can you tell me how I have to run your script afterwards?
I got this far, but how to run it?


Last edited by Knob Twiddler; 06-27-2022 at 10:51 PM.
Knob Twiddler is offline   Reply With Quote
Old 06-27-2022, 10:58 PM   #8
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

This video have a good sum up about scripts and reapack https://www.youtube.com/watch?v=9aQN...=TheREAPERBlog
daniellumertz is online now   Reply With Quote
Old 06-27-2022, 11:02 PM   #9
Knob Twiddler
Human being with feelings
 
Knob Twiddler's Avatar
 
Join Date: May 2016
Location: Leuven
Posts: 89
Default

thanks I just needed the actionlist name got it working.
Knob Twiddler is offline   Reply With Quote
Old 06-28-2022, 10:21 PM   #10
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 18
Default Possible bug?

Daniel,

Lovin' the Copy Paste MIDI script. I think there may be a bug in the "serialism" code, see attached LICEcap.

JackOrez is offline   Reply With Quote
Old 06-29-2022, 07:37 AM   #11
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

Hey Jack canyou explain more about the bug?

I will be on PC just tonight, but in the gif everything seems right. Remember that rhythm and interval are calculated between notes . So in your case you pasting a rhythm 2+2+4(grid values).and it seems about right in the pasted version. Length uses all notes so in your case there are 4 lengths and 3 rhythms valeus being pasted so after 12 notes they will be together
daniellumertz is online now   Reply With Quote
Old 06-29-2022, 10:09 PM   #12
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 18
Default

Hmm, not sure now. In the discription above it says "pasting the pitches into more notes it will loop around your copied source" so I assumed that 4 into 8 would result in 2 sets of 4 that looked identical. You say 2+2+4, what about the last beat, would it not be either 2+2+4+1 or 2+2+4+2? Maybe there could be a option/rule for what to do at the loop junction?
JackOrez is offline   Reply With Quote
Old 06-29-2022, 11:02 PM   #13
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

It results in identical sets. The length of the last note isn't calculated as a rhythm.
daniellumertz is online now   Reply With Quote
Old 06-30-2022, 12:43 AM   #14
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 18
Default

Why the gap of 3 grid places between the 6th and 7th note and then the overlap of the 7th and 8th?
JackOrez is offline   Reply With Quote
Old 06-30-2022, 12:50 AM   #15
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 18
Default

Looking at it now, I see what you mean, but no, I would not say identicle sets.
JackOrez is offline   Reply With Quote
Old 06-30-2022, 04:34 AM   #16
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

everything is right

now that we put the bug report out of the way
I have no idea what you are trying achieve in this exemple but if you are trying to have the same rythm and length per bar you should make two copies one for the rhythm with all 4 notes and then paste. Then copy the length of the first 3 notes and then paste

Last edited by daniellumertz; 06-30-2022 at 04:47 AM.
daniellumertz is online now   Reply With Quote
Old 06-30-2022, 11:10 PM   #17
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

Version 0.3 released
Code:
--    + Correct Measure Position Bug non quantized ppq
--    + Add Rhythm Option Using Measure Position
--    + Rename Measure Position to Groove
--    + Add Pin option
The old Button Measure Position was renamed to groove as it translate better what it does. (Copy measure positions and (when pasting) quantize to nearest position)

The rhythm button now have a option to paste following measure position: In this mode the rhythm isnt calculated between the notes, but by the position in the measure.
The image bellow illustrate both scenarios in red the new paste using measure position show the measure grid position values (for reference internally it uses ppq). In orange the default behavior, calculating between notes.



The Pin option at the menu bar makes the script be over other windows even without focus
daniellumertz is online now   Reply With Quote
Old 07-02-2022, 01:34 AM   #18
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

0.4 Release
Code:
--    + Add Auto Paste. 
--    + Correct BUG with groove interpolate.
The new Auto Paste option if for pasting as the user change the interpolate slider. At 0% it will use the selected items state when user clicked Auto Update. 100% will be the copied version
daniellumertz is online now   Reply With Quote
Old 07-02-2022, 02:49 AM   #19
JackOrez
Human being with feelings
 
Join Date: Jun 2022
Posts: 18
Default

Oh cool, a new version, can't wait to try.

So here is a pic of what I thought the outcome would be. The top one would be what I was refering to as 2+2+4+1 and
the bottom one would be if there was an option to adjust the loop "gap", so that would be what I refered to as 2+2+4+2.

I see where the original way(your illistration) and the two examples in this pic could all have their own uses.



Thank you for the explantion, now I'm off to try the new version.😁
JackOrez is offline   Reply With Quote
Old 07-23-2022, 12:10 PM   #20
todd_r
Human being with feelings
 
todd_r's Avatar
 
Join Date: Nov 2006
Posts: 781
Default

This looks really good

The script doesn't show up in the midi editor actions, just in the 'main' actions? It means I can't add it to the midi toolbar
todd_r is online now   Reply With Quote
Old 07-23-2022, 02:42 PM   #21
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

Thanks for the report I will look into that!
Meanwhile you can load it manually in the MIDI Editor Actions By clicking New Script and selecting Copy Paste MIDI.lua

And dont worry it will still be updated with reapack and all!

I probably forget to tell reapack that it should be loaded in the MIDI actions!
daniellumertz is online now   Reply With Quote
Old 07-26-2022, 05:02 AM   #22
todd_r
Human being with feelings
 
todd_r's Avatar
 
Join Date: Nov 2006
Posts: 781
Default

Quote:
Originally Posted by daniellumertz View Post

And dont worry it will still be updated with reapack and all!
Brilliant, thanks
todd_r is online now   Reply With Quote
Old 07-26-2022, 10:29 AM   #23
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

Quote:
Originally Posted by todd_r View Post
Brilliant, thanks
I pushed an update this weekend it should be on your midi action list now.
daniellumertz is online now   Reply With Quote
Old 08-06-2022, 05:11 PM   #24
MrTsonts
Human being with feelings
 
MrTsonts's Avatar
 
Join Date: Apr 2019
Location: Ukraine, Kyiv
Posts: 144
Default

The script is great, but it doesn't work when applied to an entry made with "MIDI: Insert retroactively recorded MIDI for armed tracks".
MrTsonts is online now   Reply With Quote
Old 08-06-2022, 07:17 PM   #25
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

It does apply! Just tested, can you screen cap what you are trying to say?
daniellumertz is online now   Reply With Quote
Old 08-07-2022, 05:16 AM   #26
MrTsonts
Human being with feelings
 
MrTsonts's Avatar
 
Join Date: Apr 2019
Location: Ukraine, Kyiv
Posts: 144
Default

Quote:
Originally Posted by daniellumertz View Post
It does apply! Just tested, can you screen cap what you are trying to say?
Here.

MrTsonts is online now   Reply With Quote
Old 08-07-2022, 08:45 AM   #27
juan_r
Human being with feelings
 
juan_r's Avatar
 
Join Date: Oct 2019
Posts: 615
Default

What does "Paste Groove" mean? How is it different from "Rhythm"?
juan_r is online now   Reply With Quote
Old 08-07-2022, 09:17 AM   #28
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

Quote:
Originally Posted by MrTsonts View Post
Here.

Can you send me both midi as midi files? I have a guess that your midi items are with different ppq
daniellumertz is online now   Reply With Quote
Old 08-07-2022, 09:20 AM   #29
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

Quote:
Originally Posted by juan_r View Post
What does "Paste Groove" mean? How is it different from "Rhythm"?
When you copy it will save the position on the bar of each note. When pasting it will move the notes to the closest point. It works more like a quantize feature. I explain in the video .
daniellumertz is online now   Reply With Quote
Old 08-07-2022, 09:35 AM   #30
MrTsonts
Human being with feelings
 
MrTsonts's Avatar
 
Join Date: Apr 2019
Location: Ukraine, Kyiv
Posts: 144
Default

Quote:
Originally Posted by daniellumertz View Post
Can you send me both midi as midi files? I have a guess that your midi items are with different ppq
I made two files. main - the one from which I copy, retrorek - which was obtained as a result of a retro recording.
Attached Files
File Type: mid main.mid (62 Bytes, 2 views)
File Type: mid retrorec.mid (62 Bytes, 2 views)
MrTsonts is online now   Reply With Quote
Old 08-07-2022, 09:58 AM   #31
MrTsonts
Human being with feelings
 
MrTsonts's Avatar
 
Join Date: Apr 2019
Location: Ukraine, Kyiv
Posts: 144
Default

I forgot to clarify that this is happening in v6.64+dev0806
MrTsonts is online now   Reply With Quote
Old 08-07-2022, 10:21 AM   #32
juan_r
Human being with feelings
 
juan_r's Avatar
 
Join Date: Oct 2019
Posts: 615
Default

Quote:
Originally Posted by daniellumertz View Post
When you copy it will save the position on the bar of each note. When pasting it will move the notes to the closest point. It works more like a quantize feature. I explain in the video .
So "Groove" means "Position in measure" - right? Your video features a previous version, without the "Groove" button.

However, there's still something I don't understand.

Paste Groove changes the timing:



Paste Rhythm doesn't:

juan_r is online now   Reply With Quote
Old 08-07-2022, 10:38 AM   #33
MrTsonts
Human being with feelings
 
MrTsonts's Avatar
 
Join Date: Apr 2019
Location: Ukraine, Kyiv
Posts: 144
Default

Quote:
Originally Posted by juan_r View Post
So "Groove" means "Position in measure" - right? Your video features a previous version, without the "Groove" button.

However, there's still something I don't understand.

Paste Groove changes the timing:



Paste Rhythm doesn't:

Groove aligns notes that sound at the same time.

MrTsonts is online now   Reply With Quote
Old 08-07-2022, 10:40 AM   #34
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

Paste rhythm will paste the distance between each note. Groove will use the positions in the measure from the source and move to the closest position.
daniellumertz is online now   Reply With Quote
Old 08-07-2022, 12:25 PM   #35
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

Quote:
Originally Posted by MrTsonts View Post
I made two files. main - the one from which I copy, retrorek - which was obtained as a result of a retro recording.
looking into it, I can reproduce with your item, but just with item with your notes, if I use retrospective record it works just fine here.

EDIT: think I got it!

Last edited by daniellumertz; 08-07-2022 at 12:48 PM.
daniellumertz is online now   Reply With Quote
Old 08-07-2022, 12:45 PM   #36
MrTsonts
Human being with feelings
 
MrTsonts's Avatar
 
Join Date: Apr 2019
Location: Ukraine, Kyiv
Posts: 144
Default

Quote:
Originally Posted by daniellumertz View Post
looking into it, I can reproduce with your item, but just with item with your notes, if I use retrospective record it works just fine here.
It might be due to some configuration settings. Such errors happen with your script, not only with my retro recording.
MrTsonts is online now   Reply With Quote
Old 08-07-2022, 01:00 PM   #37
MrTsonts
Human being with feelings
 
MrTsonts's Avatar
 
Join Date: Apr 2019
Location: Ukraine, Kyiv
Posts: 144
Default

Quote:
Originally Posted by daniellumertz View Post
EDIT: think I got it!
All notes are extended to the end of the file, absorbing those repeated at the same pitch.
Attached Images
File Type: png Copy_paste@.png (19.1 KB, 4 views)
MrTsonts is online now   Reply With Quote
Old 08-07-2022, 03:28 PM   #38
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

Quote:
Originally Posted by MrTsonts View Post
All notes are extended to the end of the file, absorbing those repeated at the same pitch.
In which version is that? I just pushed a new version 2 hours ago to try to fix

Can you try at 0.4.2?

Last edited by daniellumertz; 08-07-2022 at 03:42 PM.
daniellumertz is online now   Reply With Quote
Old 08-07-2022, 04:26 PM   #39
MrTsonts
Human being with feelings
 
MrTsonts's Avatar
 
Join Date: Apr 2019
Location: Ukraine, Kyiv
Posts: 144
Default

Quote:
Originally Posted by daniellumertz View Post
In which version is that? I just pushed a new version 2 hours ago to try to fix

Can you try at 0.4.2?
Now everything works great. Thanks!!!
MrTsonts is online now   Reply With Quote
Old 08-07-2022, 05:21 PM   #40
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,693
Default

Thank you for using and reporting
daniellumertz is online now   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 06:04 PM.


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