|
|
|
06-28-2020, 01:18 AM
|
#1
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 816
|
script idea . - Random file replacement .
Hi ,
As my coding abilities are on level "hello world", here is a query/request . Is it possible to do the following via a script and if it is not a crazy code to write if someone would be generous to do the sams ?
1Select multiple items on TCP ( in this case lets assume we select five)
2Run action
3Actions opens up a query to specify an audio
folder
4Now the script randomly selects five files and replaced them randomly in the items we have selected.
if the API allows us to create a function like this it could be a boon to sounf desiging.
|
|
|
06-28-2020, 01:33 AM
|
#2
|
Human being with feelings
Join Date: Mar 2013
Posts: 5,844
|
Maybe have a look at the Switch item source Actions/scripts available in SWS Extensions and in ReaPack ( Archie-ReaScripts and me2beats Scripts repositories: https://reapack.com/repos).
As example: - Xenakios/SWS: Switch item source file to random in folder
- Switch item source file to random in folder <- me2beats Scripts
|
|
|
06-28-2020, 01:47 AM
|
#3
|
Human being with feelings
Join Date: Oct 2017
Location: Russia
Posts: 366
|
@zookthespook
Last edited by Archie; 06-28-2020 at 01:53 AM.
|
|
|
06-28-2020, 02:26 AM
|
#4
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 816
|
Holy smokes !! this is amazing !!
and thank you archie for helping out to setup the custom action .
zook
|
|
|
06-28-2020, 08:19 AM
|
#5
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 816
|
Hi ,
so i made the custom action and it works well, however , i was hoping that there are two things i am missing in this action.
1.Setting a directory path once , instead of the script outputting a query everytime the action is executed. Something like the Rs5k or Reaverbate where once you specify a folder , it allows you to scan thru all the items in the folder unless instructed to change the folder.
For some reason , the script does not remember the last accessed folder.
So for eg the first time i run the script >script requests for the folder and by default it is showing say "G:\xx\yy" and i specify to access the folder "E:\aa\bb"
the next time launch the script it goes back to G:\xx\yy instead of remember E:\aa\bb
2.If it could import with the command use media for selected items(loop\stretch to fit)it would be better in the case scenario i am hoping for.
zook
|
|
|
06-28-2020, 05:25 PM
|
#6
|
Human being with feelings
Join Date: May 2018
Location: Los Angeles
Posts: 1,719
|
Quote:
Originally Posted by zookthespook
Hi ,
so i made the custom action and it works well, however , i was hoping that there are two things i am missing in this action.
1.Setting a directory path once , instead of the script outputting a query everytime the action is executed. Something like the Rs5k or Reaverbate where once you specify a folder , it allows you to scan thru all the items in the folder unless instructed to change the folder.
For some reason , the script does not remember the last accessed folder.
So for eg the first time i run the script >script requests for the folder and by default it is showing say "G:\xx\yy" and i specify to access the folder "E:\aa\bb"
the next time launch the script it goes back to G:\xx\yy instead of remember E:\aa\bb
2.If it could import with the command use media for selected items(loop\stretch to fit)it would be better in the case scenario i am hoping for.
zook
|
To get a folder path with a dialog box, try this:
Code:
function Get_Folder_Path()
retval, folder = reaper.JS_Dialog_BrowseForFolder( "Select your folder path", Folder_Path )
if retval == false then return end
return folder .. "/"
end
Path = Get_Folder_Path()
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
|
|
|
06-29-2020, 03:06 AM
|
#7
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 816
|
Thank you Thonex !
doing that right away
zook
|
|
|
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:25 AM.
|