Go Back   Cockos Incorporated Forums > REAPER Forums > newbieland

Reply
 
Thread Tools Display Modes
Old 01-14-2019, 02:44 AM   #1
SteeplyInclined
Human being with feelings
 
Join Date: Mar 2016
Location: Northern England
Posts: 18
Default Selecting all muted midi notes ?

I have dozens of muted midi notes on a single track that I want to cut and paste into another midi item...unfortunately I can't lasso them as the are interspersed between many other midi notes that I want to retain in the original track..I can't select all and as notes are of many different pitches I can't select next note or all notes with same pitch from drop down menu. Is there a way guys and gals to separate these midi notes out..what am I not seeing ? does Kenny do a vid on this....any help appreciated..
SteeplyInclined is offline   Reply With Quote
Old 01-14-2019, 02:46 AM   #2
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Run the action "Edit: Select all muted notes" in Action List, MIDI Editor section.
cfillion is offline   Reply With Quote
Old 01-14-2019, 03:13 AM   #3
SteeplyInclined
Human being with feelings
 
Join Date: Mar 2016
Location: Northern England
Posts: 18
Default

Big thanks to cfillion, I have located the midi editor in Actions...and will run as advised...gosh that midi editor box is full of useful stuff..thanks for opening that particular door !
SteeplyInclined is offline   Reply With Quote
Old 12-15-2019, 02:14 PM   #4
The Bunker
Human being with feelings
 
Join Date: Nov 2016
Posts: 443
Default

Anyone know if there is a way to select all muted notes only within a certain time selection?
The Bunker is offline   Reply With Quote
Old 12-15-2019, 09:02 PM   #5
dangguidan
Human being with feelings
 
Join Date: Jan 2019
Location: China
Posts: 654
Default

Quote:
Originally Posted by The Bunker View Post
Anyone know if there is a way to select all muted notes only within a certain time selection?
This needs a script to be implemented.
Time range + filter note status.
dangguidan is online now   Reply With Quote
Old 12-16-2019, 12:31 AM   #6
The Bunker
Human being with feelings
 
Join Date: Nov 2016
Posts: 443
Default

Quote:
Originally Posted by dangguidan View Post
This needs a script to be implemented.
Time range + filter note status.
Does such a script exist?
The Bunker is offline   Reply With Quote
Old 12-16-2019, 01:25 AM   #7
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by The Bunker View Post
Anyone know if there is a way to select all muted notes only within a certain time selection?
This is only like my second MIDI script so test carefully!

Code:
-- Select muted notes within time selection
-- v0.03

function Main()
  -- get active midi take
  local take=reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive())
  if take == nil then return end
  
  -- get time selection
  local start_time, end_time = reaper.GetSet_LoopTimeRange(false, false, 0, 0, false)
  if start_time == end_time then return end
  
  -- convert times to ppq
  local start_ppq = reaper.MIDI_GetPPQPosFromProjTime(take, start_time)
  local end_ppq = reaper.MIDI_GetPPQPosFromProjTime(take, end_time)
  
  -- get number of notes in take
  local retval, notecnt = reaper.MIDI_CountEvts(take)
  if retval == nil then return end
 
  -- select muted notes within time selection
  for noteidx = 0, notecnt-1 do
    local retval, selected, muted, startppqpos = reaper.MIDI_GetNote(take, noteidx)
    if muted and not selected then
      if (startppqpos >= start_ppq) and (startppqpos < end_ppq) then
        reaper.MIDI_SetNote(take, noteidx, true)
      end
    end
  end

end
 
Main()
reaper.defer(function () end)

Last edited by Edgemeal; 12-16-2019 at 01:43 AM. Reason: v0.03 - cleanup
Edgemeal is offline   Reply With Quote
Old 12-17-2019, 07:28 PM   #8
The Bunker
Human being with feelings
 
Join Date: Nov 2016
Posts: 443
Default

Quote:
Originally Posted by Edgemeal View Post
This is only like my second MIDI script so test carefully!

Code:
-- Select muted notes within time selection
-- v0.03

function Main()
  -- get active midi take
  local take=reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive())
  if take == nil then return end
  
  -- get time selection
  local start_time, end_time = reaper.GetSet_LoopTimeRange(false, false, 0, 0, false)
  if start_time == end_time then return end
  
  -- convert times to ppq
  local start_ppq = reaper.MIDI_GetPPQPosFromProjTime(take, start_time)
  local end_ppq = reaper.MIDI_GetPPQPosFromProjTime(take, end_time)
  
  -- get number of notes in take
  local retval, notecnt = reaper.MIDI_CountEvts(take)
  if retval == nil then return end
 
  -- select muted notes within time selection
  for noteidx = 0, notecnt-1 do
    local retval, selected, muted, startppqpos = reaper.MIDI_GetNote(take, noteidx)
    if muted and not selected then
      if (startppqpos >= start_ppq) and (startppqpos < end_ppq) then
        reaper.MIDI_SetNote(take, noteidx, true)
      end
    end
  end

end
 
Main()
reaper.defer(function () end)
Thanks heaps, seems to be working fine over here
The Bunker 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 01:02 AM.


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