Ok, I got it to work somewhat. I got the fx icon in the midi editor tool bar,so far so good, but on the midi items that have their own fx assigned it will not open that fx.Problem is it opens up the track´s FX and not the midi item´s FX. I have some tracks with fx that control the midi items within, and that´s when it works, but I have tracks that only have the fx chosen in each midi item within other tracks, and in those midi editor toolbars the fx icon does nothing.
Holy moly I hope I am explaining myself correctly.
Can I upload a video showing what I mean? Is there a size limit that the video can be?
my script exploring closer FX marked as instrument up to the tree. Sorry, I didn't get what you are trying to do and which fx specifically don't float for you you supposed to be floating.
my script exploring closer FX marked as instrument up to the tree. Sorry, I didn't get what you are trying to do and which fx specifically don't float for you you supposed to be floating.
No fx will float from midi editor if fx is marked in midi item, if fx is marked in main track header then it will float that fx
Do I get you right? You want the script start tree searching from take FX, then search track FX and upper (parent tracks in the structure)?
I just need to open fx in midi editor, yes
if I can make video I will show you, but I am having problems making video, will not recognize mic in sharex
Is it possible to get this data (Archies counter timer) into the Media Explorer?
Perhaps someone knows a trick, such as how to temporarily overwrite the Project Notes.
or with a user column
Thanks
I just need to open fx in midi editor, yes
if I can make video I will show you, but I am having problems making video, will not recognize mic in sharex
I have made a very short video but when I try to upload it I get this message..
(Your submission could not be processed because a security token was missing.
If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.)
Lets see if the administrator can help
I have made a very short video but when I try to upload it I get this message..
(Your submission could not be processed because a security token was missing.
If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.)
Lets see if the administrator can help
Ableton Live users have access to a m4l-plugin called "Group Humanizer"(https://www.maxforlive.com/library/d...roup-humanizer). It allows for MIDI notes to be dynamically humanized in relation to each other, thereby approximating the timing negotitioan that happens when humans are playing together.
I think such a plugin is massively useful, but unfortunately I do not use Live in my workflow. Luckily someone has made a puredata port of the original project: https://github.com/enricguso/group_humanizer
This is great! But unlikely the m4l device which would work as a MIDI effect, the pd version is designed to be connected to the DAW via virtual MIDI cables such as loopmidi or loop2be. This works but is quite cumbersome to use, and it can cause issues with MIDI jitter.
Could it be made relatively easy as a JSFX? The m4l and pd patches are there to use as inspiration, and in the repo of the pd version, there is a document that describes the math behind the algorithm.
If this would be an easy and/or interesting task for one of you talented people - oh my, it would be a boon!
I was trying to write a script that takes a focused floating FX and pushes it up or down (two separate actions) in the pin connectors. So, say, I have a ReaEQ that has Inputs on 1 and 2, Outputs on 3 and 4. I'd like to have an action that would move Inputs to 3 and 4, and Outputs to 5 and 6. And the opposite action.
If you'd run "Channels up" from the original position, it'd keep the inputs on 1 and 2, and move outputs to 1 and 2 as well.
I've kinda figured out the necessary API calls and stuff, but I'm very confused with the bitmasks, I've never worked with those. Combine that with the fact that I'm not too positive on how lua data types work, and there's no surprise I'm asking you for help with this :c
I'd greatly appreciate this! It would fit really well with kawa's TrackFX routing matrix, that, as is, requires you to click all 4 channels through manually (and not get confused midway).
I was trying to write a script that takes a focused floating FX and pushes it up or down (two separate actions) in the pin connectors. So, say, I have a ReaEQ that has Inputs on 1 and 2, Outputs on 3 and 4. I'd like to have an action that would move Inputs to 3 and 4, and Outputs to 5 and 6. And the opposite action.
If you'd run "Channels up" from the original position, it'd keep the inputs on 1 and 2, and move outputs to 1 and 2 as well.
I've kinda figured out the necessary API calls and stuff, but I'm very confused with the bitmasks, I've never worked with those. Combine that with the fact that I'm not too positive on how lua data types work, and there's no surprise I'm asking you for help with this :c
I'd greatly appreciate this! It would fit really well with kawa's TrackFX routing matrix, that, as is, requires you to click all 4 channels through manually (and not get confused midway).
Very rough example of lua Shift focused FX IO pins 2 channel further:
Code:
function main()
retval, tracknumber, itemnumber, fxnumber = reaper.GetFocusedFX()
if not retval then return end
track = reaper.CSurf_TrackFromID( tracknumber, false )
retval, inputPins, outputPins = reaper.TrackFX_GetIOSize( track, fxnumber )
for pin = 0, inputPins do
local low32bits, hi32bits = reaper.TrackFX_GetPinMappings( track, fxnumber, 0, pin )
reaper.TrackFX_SetPinMappings( track, fxnumber, 0, pin, low32bits<<2, hi32bits<<2 )
end
for pin = 0, outputPins do
local low32bits, hi32bits = reaper.TrackFX_GetPinMappings( track, fxnumber, 1, pin )
reaper.TrackFX_SetPinMappings( track, fxnumber, 1, pin, low32bits<<2, hi32bits<<2 )
end
end
main()
Very rough example of lua Shift focused FX IO pins 2 channel further:
Code:
function main()
retval, tracknumber, itemnumber, fxnumber = reaper.GetFocusedFX()
if not retval then return end
track = reaper.CSurf_TrackFromID( tracknumber, false )
retval, inputPins, outputPins = reaper.TrackFX_GetIOSize( track, fxnumber )
for pin = 0, inputPins do
local low32bits, hi32bits = reaper.TrackFX_GetPinMappings( track, fxnumber, 0, pin )
reaper.TrackFX_SetPinMappings( track, fxnumber, 0, pin, low32bits<<2, hi32bits<<2 )
end
for pin = 0, outputPins do
local low32bits, hi32bits = reaper.TrackFX_GetPinMappings( track, fxnumber, 1, pin )
reaper.TrackFX_SetPinMappings( track, fxnumber, 1, pin, low32bits<<2, hi32bits<<2 )
end
end
main()
Omg thank you so much! Haha, I have almost worked out how bitwise & and shifts work, but I didn't know how to make sure the shift stays in bounds!
Why is it that you used CSurf_TrackFromID, and not GetTrack? My (not finished) code used GetTrack(0, tracknumber-1) and it appeared to be effective..
Now I'm going to try and code the "Up by 2 pins" myself, and deepen my understanding of bitwise stuff in the process! Thank you so much!
EDIT: Ok, I've completed the "FXPinsDown" action, added the loopback code that resets the pins in case they are lost. (it only works up to 32 bits, I've found your code from https://forum.cockos.com/showthread.php?t=219958 here, but I probably won't implement it because TrackFX's script supports up to 32 channels anyway (and I don't know how lmao).
Code:
--only works up to 32 bits for now because so does TrackFX, also kinda hard to shift stuff from low to high
function main()
retval, tracknumber, itemnumber, fxnumber = reaper.GetFocusedFX()
if not retval then return end
track = reaper.CSurf_TrackFromID( tracknumber, false )
--Let's check if we have enough channels and add some?
numOfChannels = math.min( reaper.GetMediaTrackInfo_Value(track, "I_NCHAN"), 32 )
--
retval, inputPins, outputPins = reaper.TrackFX_GetIOSize( track, fxnumber )
for pin = 0, inputPins-1 do
local low32bits, hi32bits = reaper.TrackFX_GetPinMappings( track, fxnumber, 0, pin )
if low32bits+hi32bits==0 then
--Spawning typical ladder thing (idk how to send "reset I/O")
reaper.TrackFX_SetPinMappings( track, fxnumber, 0, pin, 2^pin, 0 )
else
reaper.TrackFX_SetPinMappings( track, fxnumber, 0, pin, low32bits<<2, hi32bits<<2 )
--calc minimum needed channels to perform this to update UI
local numNeeded = math.floor(math.log(low32bits<<2,2))
--if numNeeded % 2 ~= 0 then numNeeded=numNeeded+1 end
if numNeeded >numOfChannels then
reaper.SetMediaTrackInfo_Value(track, "I_NCHAN", numOfChannels+2)
numOfChannels=numOfChannels+2
end
end
end
for pin = 0, outputPins-1 do
local low32bits, hi32bits = reaper.TrackFX_GetPinMappings( track, fxnumber, 1, pin )
--reaper.ShowMessageBox(tostring(low32bits)+tostring(hi32bits), "test", 0)
if low32bits+hi32bits==0 then
--Spawning typical ladder thing (idk how to send "reset I/O")
reaper.TrackFX_SetPinMappings( track, fxnumber, 1, pin, 2^pin, 0 )
else
reaper.TrackFX_SetPinMappings( track, fxnumber, 1, pin, low32bits<<2, hi32bits<<2 )
--calc minimum needed channels to perform this to update UI
local numNeeded = math.floor(math.log(low32bits<<2,2))
--if numNeeded % 2 ~= 0 then numNeeded=numNeeded+1 end
if numNeeded >numOfChannels then
reaper.SetMediaTrackInfo_Value(track, "I_NCHAN", numOfChannels+2)
numOfChannels=numOfChannels+2
end
end
end
end
main()
Decided not to add loopback to code for "FXPinsUP" because no matter the settings, the channel amount stays at 64 and they would loop outside of view in most cases. I rarely even use it anyway. But I am going to make it so that when you spam "FXPinsUP" when there are no pins, it will reduce the amount of channels by 2 each time. I'd find it handy.
EDIT 2:
Here I have it just in case anyone else finds it useful! I LOVE being able to control my FX chain with simple WASD + modifiers. I have also made a version of these scripts that move only the output (to have absolute control!!) and now I'm going to make a script that moves focused FX up or down the chain itself..
Code:
function main()
retval, tracknumber, itemnumber, fxnumber = reaper.GetFocusedFX()
if not retval then return end
track = reaper.CSurf_TrackFromID( tracknumber, false )
--We'll use this number to reduce channel amount in case no other change necessary
numOfChannels = math.min( reaper.GetMediaTrackInfo_Value(track, "I_NCHAN"), 32 )
isGridEmpty = true
retval, inputPins, outputPins = reaper.TrackFX_GetIOSize( track, fxnumber )
for pin = 0, inputPins-1 do
local low32bits, hi32bits = reaper.TrackFX_GetPinMappings( track, fxnumber, 0, pin )
if low32bits+hi32bits ~= 0 then
reaper.TrackFX_SetPinMappings( track, fxnumber, 0, pin, low32bits>>2, hi32bits>>2 )
isGridEmpty = false
end
end
for pin = 0, outputPins-1 do
local low32bits, hi32bits = reaper.TrackFX_GetPinMappings( track, fxnumber, 1, pin )
if low32bits+hi32bits ~= 0 then
reaper.TrackFX_SetPinMappings( track, fxnumber, 1, pin, low32bits>>2, hi32bits>>2 )
isGridEmpty = false
end
end
--if the grid was empty all along - let's reduce channel amount - it's what He wanted (the cow)
if isGridEmpty then reaper.SetMediaTrackInfo_Value(track, "I_NCHAN", math.max(2, numOfChannels-2)) end
end
main()
EDIT3: and yes, I've made it and I'm stopping my spamming spree. Here's the code for the Focused Floating FX moving down the chain.
Code:
function main()
retval, tracknumber, itemnumber, fxnumber = reaper.GetFocusedFX()
if not retval then return end
track = reaper.CSurf_TrackFromID( tracknumber, false )
target = fxnumber
target = target + 1
reaper.TrackFX_CopyToTrack(track, fxnumber, track, target, true)
end
main()
cut / paste selected track sends and associated automation items
Hello
I'm looking for a pair of script that work together :
-cut selected track sends and its sends envelope content if any (automation items)
-paste saved sends and envelope content to the selected track
I'm pretty sure it's not possible to do with action or already existing script right now...
It would be useful for me to quickly cleanly transfer sends from one track to another track, transfering also every automation item (volume and mute mainly) that are related to the sends. It seems trivial I know, but right now, to do it manually it takes me 3-5 minutes each time. You have to do lots of actions to get a proper "send transfer" from one track to another. It can be very tedious if I'm a t the end of a mix and I have lots of automation and sends to transfer manually.
Hopefully that is do-able via script ?
Have a nice day !
xxxxxxxxx
I want to hit space bar, have transport stop, and have the cursor stay where it is.
I'm aware of play/pause, and that's what I use all the time, but pausing has some plugin-related ramifications that I don't like, so I'd like a "true" stop-and-keep-position method.
If transport is stopped, space bar just starts playback.
If transport is active, space bar stops the cursor at the current location and keeps it there.
Seems like it'd be pretty easy to do?
I thought to do it with a custom action, e.g. pause, store cursor location using Xenakios' SWS action, stop, return cursor to stored location... but I don't know how to toggle that based on transport state (i.e. what happens when starting playback.)
I thought to do it with a custom action, e.g. pause, store cursor location using Xenakios' SWS action, stop, return cursor to stored location... but I don't know how to toggle that based on transport state (i.e. what happens when starting playback.)
That bit of logic can be done with a SWS Cycle Action:
Thanks! Out of curiosity, I tried to make this myself... any obvious mistake? It's not working:
Code:
function playstop()
if (reaper.GetPlayState()&1) then
reaper.Main_OnCommand(1008, 0) --Transport: Pause
cur_pos = reaper.GetPlayPosition()
reaper.Main_OnCommand(1016, 0) --Transport: Stop
reaper.MoveEditCursor(cur_pos, false)
else
reaper.Main_OnCommand(1007, 0) --Transport: Play
end
end
reaper.defer(playstop())
When I run via IDE it just moves the cursor forward a regular distance every time. When I run via action menu nothing happens.
In Lua everything except nil and false is truthy, so reaper.GetPlayState()&1 is always true even if it's 0. The condition should explicitly check for a non-zero value:
Code:
reaper.GetPlayState() & 1 ~= 0
Running from the action list is disabled when it's being edited in the IDE. Also that defer call does nothing as playstop is called immediately rather than given as an argument to reaper.defer.
Code:
if reaper.GetPlayState() & 1 ~= 0 then
local cur_pos = reaper.GetPlayPosition()
reaper.Main_OnCommand(1016, 0) -- Transport: Stop
reaper.SetEditCurPos(cur_pos, false, false)
else
reaper.Main_OnCommand(1007, 0) -- Transport: Play
end
D'oh of course, thanks, and thanks for SetEditCursorPos which I confused with MoveEditCursor.
Quote:
Also that defer call does nothing as playstop is called immediately rather than given as an argument to reaper.defer.
Ah right. But don't I want to "prevent an undo point", at least as done in many examples I've seen? This is what I have now:
Code:
function playstop()
if (reaper.GetPlayState()&1 == 1) then
reaper.Main_OnCommand(1008, 0) --Transport: Pause
cur_pos = reaper.GetPlayPosition()
reaper.Main_OnCommand(1016, 0) --Transport: Stop
reaper.SetEditCurPos(cur_pos, false, false)
else
reaper.Main_OnCommand(1007, 0) --Transport: Play
end
end
reaper.defer(playstop)
But don't I want to "prevent an undo point", at least as done in many examples I've seen?
The old trick to disable the implicit non-descript "ReaScript: Run" undo point usually is deferring an empty function:
Code:
doSomething() -- do the work immediately
-- then defer an empty function to be run ~33ms later
-- disabling the implicit undo point as a side effect
reaper.defer(function() end)
A better solution is using Undo_BeginBlock/Undo_EndBlock. The undo point is created only if the project changed and following the user's undo preferences.
reaper.Undo_BeginBlock()
if reaper.GetPlayState() & 1 ~= 0 then
local cur_pos = reaper.GetPlayPosition()
reaper.Main_OnCommand(1016, 0) -- Transport: Stop
reaper.SetEditCurPos(cur_pos, false, false)
else
reaper.Main_OnCommand(1007, 0) -- Transport: Play
end
reaper.Undo_EndBlock("Play/stop (move edit cursor to play position)", 0)
Hello ! I would like a JS for my drum sample bank with Reasamplomatic that could mute the eDrum cymbals by their aftertouch pressure. Like the hihat JS or the choke JS but with the cymbal mute control triggered by the aftertouch.
Forum user Twenty9 posted this fx in 2008 in the forum. It's a tool that enables a crossfade between two sends. Now I wondered if there exists a tool to crossfade between more sends. I'd need a tool that allow an equal power crossfade betwwen 5 sends.
Maybe someone could mod the Twenty9 FX to have more sends to crossfade to ?
Add receives of selected track(s) to the current track selection
Hello !
I'd like to request a script that adds the receives of the selected track(s) to the track selection.
So basically when you have one track (or several tracks) selected & you launch this script, it would add to the current track selection, all the tracks (if any) that are sending something (audio or midi) to the currently selected tracks.
I'm pretty sure there is nothing in the action list right now to do this.
Would be very useful for a cycle action I'm working on.
I'd like to request a script that adds the receives of the selected track(s) to the track selection.
So basically when you have one track (or several tracks) selected & you launch this script, it would add to the current track selection, all the tracks (if any) that are sending something (audio or midi) to the currently selected tracks.
I'm pretty sure there is nothing in the action list right now to do this.
Would be very useful for a cycle action I'm working on.
Thanks
xxxxxxxx
Louis
Need more technical specifications, I think. To describe more precisely:
1) If one or more tracks are selected, create sends (or reсeives, depending on which side you look at) from all the remaining tracks. Did I understand correctly?
2) If I understand correctly, what exactly parameters should contain these sends or receives? There are many parameters among them - stereo and mono channels, etc. for audio sends, channel number for midi sends. If different parameters are needed, then how to implement their choice?
3) It is not clear which track should send a signal to which
Thanks!
I'd like to request a script that adds the receives of the selected track(s) to the track selection.
So basically when you have one track (or several tracks) selected & you launch this script, it would add to the current track selection, all the tracks (if any) that are sending something (audio or midi) to the currently selected tracks.
I'm pretty sure there is nothing in the action list right now to do this.
Would be very useful for a cycle action I'm working on.
Thanks
xxxxxxxx
Louis
Or should the script not create any sends? But should select all tracks that have any receives while not deselecting any other tracks that have been selected
Or should the script not create any sends? But should select all tracks that have any receives while not deselecting any other tracks that have been selected
Ok sorry, my explanation is wonky. so actually the script would consider the currently selected track(s). It would look if these track(s) have receives. If it finds receives, the script would find the tracks from where these receives are from, and select them, along with the track selection that was here before the script was used.
It's just a script that goes in the project to find the tracks that are sending something to the selected track(s).
But actually now that I think about it, it should not look for parent send / child receive and rather only look for sends and receives configured manually in the IO window of the track. Because if the script also consider the "parent send" (the tick box top left of routing window) this script would end up selecting the children of the currently selected tracks, and it's not really what I'm after. I mean, that could be a very interesting option to get in the script, as it could serve a purpose in another situation than the one I'm in. But if possible, I'd like to target all receives BUT children ones.
Ok sorry, my explanation is wonky. so actually the script would consider the currently selected track(s). It would look if these track(s) have receives. If it finds receives, the script would find the tracks from where these receives are from, and select them, along with the track selection that was here before the script was used.
It's just a script that goes in the project to find the tracks that are sending something to the selected track(s).
But actually now that I think about it, it should not look for parent send / child receive and rather only look for sends and receives configured manually in the IO window of the track. Because if the script also consider the "parent send" (the tick box top left of routing window) this script would end up selecting the children of the currently selected tracks, and it's not really what I'm after. I mean, that could be a very interesting option to get in the script, as it could serve a purpose in another situation than the one I'm in. But if possible, I'd like to target all receives BUT children ones.
Try this
Code:
function bla() end function nothing() reaper.defer(bla) end
local test_SWS = reaper.CF_EnumerateActions
if not test_SWS then
reaper.MB('Please install or update SWS extension', 'Error', 0) nothing() return
end
if reaper.CountSelectedTracks(0) == 0 then
nothing() return
end
reaper.Undo_BeginBlock()
reaper.PreventUIRefresh(1)
for i=0, reaper.CountSelectedTracks(0)-1 do
local track = reaper.GetSelectedTrack(0,i)
if reaper.GetTrackNumSends(track, -1) > 0 then
for i2=0, reaper.GetTrackNumSends(track, -1)-1 do
local receive_track = reaper.BR_GetMediaTrackSendInfo_Track( track, -1, i2, 0)
if reaper.IsTrackSelected(receive_track) == false then
reaper.SetTrackSelected(receive_track, true)
end
end
end
end
reaper.PreventUIRefresh(-1)
reaper.Undo_EndBlock("Select all tracks with receives to selected tracks", -1)
Ok sorry, my explanation is wonky. so actually the script would consider the currently selected track(s). It would look if these track(s) have receives. If it finds receives, the script would find the tracks from where these receives are from, and select them, along with the track selection that was here before the script was used.
It's just a script that goes in the project to find the tracks that are sending something to the selected track(s).
But actually now that I think about it, it should not look for parent send / child receive and rather only look for sends and receives configured manually in the IO window of the track. Because if the script also consider the "parent send" (the tick box top left of routing window) this script would end up selecting the children of the currently selected tracks, and it's not really what I'm after. I mean, that could be a very interesting option to get in the script, as it could serve a purpose in another situation than the one I'm in. But if possible, I'd like to target all receives BUT children ones.
Although it looks like this script will be more correct
Code:
function bla() end function nothing() reaper.defer(bla) end
local test_SWS = reaper.CF_EnumerateActions
if not test_SWS then
reaper.MB('Please install or update SWS extension', 'Error', 0) nothing() return
end
if reaper.CountSelectedTracks(0) == 0 then
nothing() return
end
reaper.Undo_BeginBlock()
reaper.PreventUIRefresh(1)
local t_tracks = {}
for i=0, reaper.CountSelectedTracks(0)-1 do
t_tracks[#t_tracks+1] = reaper.GetSelectedTrack(0,i)
end
for i=1, #t_tracks do
if reaper.GetTrackNumSends(t_tracks[i], -1) > 0 then
for i2=0, reaper.GetTrackNumSends(t_tracks[i], -1)-1 do
local receive_track = reaper.BR_GetMediaTrackSendInfo_Track(t_tracks[i], -1, i2, 0)
if reaper.IsTrackSelected(receive_track) == false then
reaper.SetTrackSelected(receive_track, true)
end
end
end
end
reaper.PreventUIRefresh(-1)
reaper.Undo_EndBlock("Select all tracks with receives to selected tracks", -1)
Although it looks like this script will be more correct
Code:
function bla() end function nothing() reaper.defer(bla) end
local test_SWS = reaper.CF_EnumerateActions
if not test_SWS then
reaper.MB('Please install or update SWS extension', 'Error', 0) nothing() return
end
if reaper.CountSelectedTracks(0) == 0 then
nothing() return
end
reaper.Undo_BeginBlock()
reaper.PreventUIRefresh(1)
local t_tracks = {}
for i=0, reaper.CountSelectedTracks(0)-1 do
t_tracks[#t_tracks+1] = reaper.GetSelectedTrack(0,i)
end
for i=1, #t_tracks do
if reaper.GetTrackNumSends(t_tracks[i], -1) > 0 then
for i2=0, reaper.GetTrackNumSends(t_tracks[i], -1)-1 do
local receive_track = reaper.BR_GetMediaTrackSendInfo_Track(t_tracks[i], -1, i2, 0)
if reaper.IsTrackSelected(receive_track) == false then
reaper.SetTrackSelected(receive_track, true)
end
end
end
end
reaper.PreventUIRefresh(-1)
reaper.Undo_EndBlock("Select all tracks with receives to selected tracks", -1)
So I tried the second version of the script and it is perfect. Thank you so much ! May I ask for an alternative version that unselect the initial track selection, and ends up with only the receives selected (or no track selected if no receives are detected) ?
So I tried the second version of the script and it is perfect. Thank you so much ! May I ask for an alternative version that unselect the initial track selection, and ends up with only the receives selected (or no track selected if no receives are detected) ?
So I tried the second version of the script and it is perfect. Thank you so much ! May I ask for an alternative version that unselect the initial track selection, and ends up with only the receives selected (or no track selected if no receives are detected) ?
Try this
Code:
function bla() end function nothing() reaper.defer(bla) end
local test_SWS = reaper.CF_EnumerateActions
if not test_SWS then
reaper.MB('Please install or update SWS extension', 'Error', 0) nothing() return
end
if reaper.CountSelectedTracks(0) == 0 then
nothing() return
end
reaper.Undo_BeginBlock()
reaper.PreventUIRefresh(1)
local t_tracks = {}
for i=0, reaper.CountSelectedTracks(0)-1 do
t_tracks[#t_tracks+1] = reaper.GetSelectedTrack(0,i)
end
for i=1, #t_tracks do
if reaper.GetTrackNumSends(t_tracks[i], -1) > 0 then
for i2=0, reaper.GetTrackNumSends(t_tracks[i], -1)-1 do
reaper.SetTrackSelected(t_tracks[i], false)
local receive_track = reaper.BR_GetMediaTrackSendInfo_Track(t_tracks[i], -1, i2, 0)
if reaper.IsTrackSelected(receive_track) == false then
reaper.SetTrackSelected(receive_track, true)
end
end
end
end
reaper.PreventUIRefresh(-1)
reaper.Undo_EndBlock("Select all tracks with receives to selected tracks (unselect original tracks)", -1)
function bla() end function nothing() reaper.defer(bla) end
local test_SWS = reaper.CF_EnumerateActions
if not test_SWS then
reaper.MB('Please install or update SWS extension', 'Error', 0) nothing() return
end
if reaper.CountSelectedTracks(0) == 0 then
nothing() return
end
reaper.Undo_BeginBlock()
reaper.PreventUIRefresh(1)
local t_tracks = {}
for i=0, reaper.CountSelectedTracks(0)-1 do
t_tracks[#t_tracks+1] = reaper.GetSelectedTrack(0,i)
end
for i=1, #t_tracks do
if reaper.GetTrackNumSends(t_tracks[i], -1) > 0 then
for i2=0, reaper.GetTrackNumSends(t_tracks[i], -1)-1 do
reaper.SetTrackSelected(t_tracks[i], false)
local receive_track = reaper.BR_GetMediaTrackSendInfo_Track(t_tracks[i], -1, i2, 0)
if reaper.IsTrackSelected(receive_track) == false then
reaper.SetTrackSelected(receive_track, true)
end
end
end
end
reaper.PreventUIRefresh(-1)
reaper.Undo_EndBlock("Select all tracks with receives to selected tracks (unselect original tracks)", -1)
Yes, it's perfect. Thanks again for taking the time. I'll donate asap.
xxxxxxxxxxx
Louis
Behind the scene, Yanick also designed a duo of script :
Script: Yanick_Offline all FX from selected tracks - save previous_slot_n.lua
Script: Yanick_Offline all FX from selected tracks - restore previous_slot_n.lua
you can't break the behavior of the script, even if you try hard
datas are saved within the .rpp
you have infinite slots
this is a *killer script* for CPU mgmt. If you don't know, now you know ! Expect it to drop in Reapack soon. Donate to Yanick.
Behind the scene, Yanick also designed a duo of script :
Script: Yanick_Offline all FX from selected tracks - save previous_slot_n.lua
Script: Yanick_Offline all FX from selected tracks - restore previous_slot_n.lua
you can't break the behavior of the script, even if you try hard
datas are saved within the .rpp
you have infinite slots
this is a *killer script* for CPU mgmt. If you don't know, now you know ! Expect it to drop in Reapack soon. Donate to Yanick.
xxxxxxxxx
Already in Repack
But I decided to add another script
Code:
Yannick_Offline all FX from selected tracks - Clear all saves (slot n)
The fact is that for convenience, all track and FX data remains, but if you delete tracks and effects without returning and save new tracks and effects, then the old data may accumulate too much (theoretically), so you can completely clear this cache. Although I doubt that this cache will give any problems, and that this will significantly increaze the size of the project, but let there be such an opportunity
I had an idea for a drum management script, but it is way out of my programming league. Made a video to explain it. The goal is to be able to reuse your favorite pads and keys for the same drums regardless the kit, find your favorite drums quickly, manage your kits, etc.
Mistakes
3:40 Should have said MIDI Note (Not MIDI channel)
Hi! I'm looking for a script that would save a snapshot automatically whenever something is changed in the FXChain. I already asked here but was wondering if anyone here could do it as it's way too complicated for me...
Could anyone please make me a script to alter the midi send source on the selected track's sends to channel 'x', with 'x' being a channel number I can edit within the script. I need it for a custom action. If 'x' is a pain, then just setting it to channel 5 would be fine too.
Cfillion has made them to select the midi bus number on sends, but not to select a midi channel number.
Ideally it would effect only the last added send, but it would also be fine if it effects all sends on the selected track like cfillion's script.
EDIT: if it can target the most recent send, then if it could also disable audio that would be even better.
Hello
Can someone modify this script so that it works reliably.
I think the midichord detection doesn't recognize overlapping chord tones.
Anyone know of another script? I've already searched the whole forum.
In this simple case, midi chord detection works worse than the same chords in audio (chordino). Definitely Am C
Thank you
Code:
-- Notation Events Chords to Regions
-- juliansader https://forum.cockos.com/member.php?u=14710
reaper.Undo_BeginBlock2(0)
--reaper.Main_OnCommand(40421,0) --Item: Select all items in track 40421
reaper.Main_OnCommand(40153,0) --Item: Open in built-in MIDI editor (set default behavior in preferences) 40153
hwnd = reaper.MIDIEditor_GetActive()
--reaper.MIDIEditor_OnCommand( hwnd, 40954 ) --Mode: Notation3
reaper.MIDIEditor_OnCommand( hwnd, 41281 ) --Notation: Identify chords on editor grid
reaper.SN_FocusMIDIEditor()
reaper.MIDIEditor_OnCommand(40954,0) --Mode: Notation3
reaper.MIDIEditor_OnCommand(41281,0) --Notation: Identify chords on editor grid
take = reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive())
reaper.MIDI_Sort(take)
MIDIOK, MIDI = reaper.MIDI_GetAllEvts(take, "")
tChords = {}
stringPos, ticks = 1, 0
while stringPos < MIDI:len() do
offset, flags, msg, stringPos = string.unpack("i4Bs4", MIDI, stringPos)
ticks = ticks + offset
if msg:byte(1) == 0xFF then
chord = msg:match("text (.+)")
if chord then
tChords[#tChords+1] = {chord = chord, ticks = ticks}
end
end
end
tChords[#tChords+1] = {ticks = ticks}
for i = 1, #tChords do
tChords[i].time = reaper.MIDI_GetProjTimeFromPPQPos(take, tChords[i].ticks)
end
for i = 1, #tChords-1 do
-- Set Region Color RGB > reaper.ColorToNative(55,118,235)
if tChords[i].chord ~= last_chord then
reaper.AddProjectMarker2(0, false, tChords[i].time, tChords[i+1].time, tChords[i].chord, 1, reaper.ColorToNative(89, 107, 95)|0x1000000)
last_chord = tChords[i].chord
end
end
commandID2 = reaper.NamedCommandLookup("_SWSMARKERLIST13")
reaper.Main_OnCommand(commandID2, 0) -- SWS: Convert markers to regions
reaper.Undo_EndBlock2(0, "Chords from midi item", -1)
reaper.MIDIEditor_OnCommand( hwnd, 2 ) --File: Close window
And what kind of custom action is needed? Sometimes it's better to make a script right away
Try this
Pay attention to the parameters at the beginning of the scripts