Old 06-16-2017, 03:46 PM   #1
Yorkz
Human being with feelings
 
Yorkz's Avatar
 
Join Date: Jan 2007
Location: Canada
Posts: 108
Default Copy/Paste Velocity Data

I can't find a way to copy velocity data (example, a pattern of velocities) and paste it later in the same midi editor track. Is this possible in Reaper?
Apologies if I missed something obvious.
Yorkz is offline   Reply With Quote
Old 06-16-2017, 04:16 PM   #2
grinder
Human being with feelings
 
grinder's Avatar
 
Join Date: Jan 2009
Location: New Zealand
Posts: 1,487
Default

Hi I have not done this for a while but when I did I think I did this

Highlight all the automation dots on the screen view you want / rt click on active file and select "copy" Afterwards click a point in the file where you wish the new automation to be then paste, you will find this at the top left hand side of the page under edit, PASTE .

Hope that makes sense .
Hope I have got it right.

Grinder
grinder is offline   Reply With Quote
Old 06-16-2017, 04:37 PM   #3
Yorkz
Human being with feelings
 
Yorkz's Avatar
 
Join Date: Jan 2007
Location: Canada
Posts: 108
Default

Thanks for the quick reply! Unfortunately, my copy/paste includes all data including notes. I'm looking specifically at copying note velocity from source to destination locations.
Yorkz is offline   Reply With Quote
Old 06-16-2017, 06:07 PM   #4
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 262
Default

Hi.
Velocity isn't exactly automation, is it?

I can think of some kind of (groove? advanced?) quantization that lets you untick all the checkboxes except Velocity and use your pattern as the groove...

Ah,
SWS/FNG: Show groove tool
!
Strength
Position: 0%.
Velocity: 100%.

That's the idea.
AugerJ is offline   Reply With Quote
Old 06-16-2017, 10:30 PM   #5
Yorkz
Human being with feelings
 
Yorkz's Avatar
 
Join Date: Jan 2007
Location: Canada
Posts: 108
Default

Thanks for the workaround but I was hoping for something inside the midi editor. It looks like the functionality is available for cc data but not fpr velocity data. Too bad, I would use it a lot when building ostinato rhythms.
Yorkz is offline   Reply With Quote
Old 06-17-2017, 10:26 AM   #6
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 16,601
Default

'Fraid not; there is no such thing as 'velocity data'.

Velocity is a property of each MIDI note (as are its note number and channel). So you cannot copy the velocities, you can only copy the notes.
__________________
DarkStar ... interesting, if true. Inspired by ...

My top 40 FRs, as voted by you (updated for August 2016)
DarkStar is offline   Reply With Quote
Old 06-17-2017, 06:38 PM   #7
Yorkz
Human being with feelings
 
Yorkz's Avatar
 
Join Date: Jan 2007
Location: Canada
Posts: 108
Default

Presonus Studio One has this functionality with the Studio One X add-on.

http://studioonex.narechk.net/index_en.html
(see halfway down the page)

http://studioonex.narechk.net/content/CopyVelocity.gif

Must be tricky to implement.

Last edited by Yorkz; 06-17-2017 at 07:56 PM.
Yorkz is offline   Reply With Quote
Old 06-17-2017, 10:38 PM   #8
ivansc
Human being with feelings
 
Join Date: Aug 2007
Location: Near Cambridge UK and Near Questembert, France
Posts: 15,667
Default

OK I think the problem lies with how you described what you want. That script isnt copying the velocities really.
What it IS doing (which is rather cool) is applying the *note* velocities from the first section to the *notes* of the later sections. There is a subtle but crucial difference. What the script is really doing is modifying the later velocities to conform to what the earlier section has. In other words it is CHANGING velocities, not pasting them.
__________________
UK and USA: Our leaders MAY be buffoons but they are still dangerous buffoons.
ivansc is offline   Reply With Quote
Old 06-18-2017, 12:05 AM   #9
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 1,448
Default

Code:
  function CopySelectedNotesVelocities()
    local midieditor =  reaper.MIDIEditor_GetActive()
    if not midieditor then return end
    local take =  reaper.MIDIEditor_GetTake( midieditor )
    if not take or not reaper.TakeIsMIDI(take) then return end
    local _, notecnt = reaper.MIDI_CountEvts( take )    
    local t = {}
    local str = ""
    for i = 1, notecnt do
      _, selectedOut, _, _, _, _, _, vel = reaper.MIDI_GetNote( take, i-1 )
      if selectedOut == true then str = str..vel..',' end    
    end    
    reaper.SetExtState('mplCopyVel', 'buf', str, false)    
  end
CopySelectedNotesVelocities()
Code:
  function PasteVelocitiesToSelectedNotes()
    local midieditor =  reaper.MIDIEditor_GetActive()
    if not midieditor then return end
    local take =  reaper.MIDIEditor_GetTake( midieditor )
    if not take or not reaper.TakeIsMIDI(take) then return end
    local _, notecnt = reaper.MIDI_CountEvts( take )    
    str = reaper.GetExtState('mplCopyVel', 'buf')
    t = {}
    for num in str:gmatch('[%d]+') do t[#t+1] = tonumber(num) end    
    for i = 1, notecnt do
      retval, sel, m, s, e, c, p, v = reaper.MIDI_GetNote( take, i-1 )
      if sel == true then reaper.MIDI_SetNote( take, i-1, true, m, s, e, c, p, t[i%#t], true ) end    
    end  
    reaper.MIDI_Sort(take)     
  end  
PasteVelocitiesToSelectedNotes()
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate

Last edited by mpl; 06-18-2017 at 12:51 AM.
mpl is offline   Reply With Quote
Old 06-18-2017, 02:11 AM   #10
ivansc
Human being with feelings
 
Join Date: Aug 2007
Location: Near Cambridge UK and Near Questembert, France
Posts: 15,667
Default

Damn you scripters are smart!
I will probably never have a use for this, but it is still pretty cool that one can write something like this in Lua or similar and just insert it in Reaper.
Wish I had the right sort of brain to do this....
__________________
UK and USA: Our leaders MAY be buffoons but they are still dangerous buffoons.
ivansc is offline   Reply With Quote
Old 06-18-2017, 06:07 AM   #11
Pet
Human being with feelings
 
Pet's Avatar
 
Join Date: Nov 2015
Location: Germany
Posts: 907
Default

Quote:
Originally Posted by ivansc View Post
Damn you scripters are smart!
And mpl is the coolest one ever! No needless descriptions or anything. JUST A SOLUTION. Baaaamm, here you are!

I love it.
__________________
If the v5 Default Theme is too bright for you take a gander at my mod of it: Default v5 Dark Theme
Pet is offline   Reply With Quote
Old 06-18-2017, 07:51 AM   #12
ivansc
Human being with feelings
 
Join Date: Aug 2007
Location: Near Cambridge UK and Near Questembert, France
Posts: 15,667
Default

evidently Mixbus 4 (I didnt update from 3) now has lua scripting so it will be interesting to see what sort of stuff HEIR user come up with.
__________________
UK and USA: Our leaders MAY be buffoons but they are still dangerous buffoons.
ivansc is offline   Reply With Quote
Old 06-18-2017, 10:29 AM   #13
Yorkz
Human being with feelings
 
Yorkz's Avatar
 
Join Date: Jan 2007
Location: Canada
Posts: 108
Default

Wow, the Reaper community is amazing!
Thanks so much mpl! I'll give it a try and hopefully I can get it working.
Yorkz is offline   Reply With Quote
Old 07-06-2017, 12:10 PM   #14
Yorkz
Human being with feelings
 
Yorkz's Avatar
 
Join Date: Jan 2007
Location: Canada
Posts: 108
Default

Yup. Works brilliantly, even better than the Presonus example. Thanks mpl!
Yorkz 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 02:09 AM.


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