|
|
|
02-24-2017, 08:30 AM
|
#241
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Does anyone even look at this thread?
Another request - it'd be nice if we could get the name, as displayed in the action list, for a given command ID/SWS command ID/script ID:
Code:
string reaper.GetCommandName( string command_id )
That is, calling it with "40364" would return "Options: Toggle metronome", etc.
|
|
|
03-09-2017, 08:55 PM
|
#242
|
Human being with feelings
Join Date: Aug 2014
Location: New York
Posts: 135
|
It would be amazing if the markers had unique ID's that didn't change regardless of position. That would allow scripts to easily know which marker is which even when markers are manually dragged around and multiple markers are edited at once by actions/other scripts. Right now the only way to get close to this kind of feature is to implement a complex chain of checks to try to determine which marker is the odd one out after an edit, and it's not 100% reliable.
This would allow things such as creating marker groups/folders, synchronizing markers with TO-DO list APIs, among others
|
|
|
04-06-2017, 12:35 AM
|
#243
|
Human being with feelings
Join Date: Feb 2017
Location: Belgrade, Serbia
Posts: 338
|
Hello everyone, this is my first post ever
I need RENDER TO FILE dialog window to be exposed as a function in Reascript API so I can customize rendering options (mono/stereo, ogg/wav, destination directory etc.) for each individual file I want to export via script. I couldn't find if function like that currently exists, or if anyone already requested it.
|
|
|
04-09-2017, 03:44 PM
|
#244
|
Human being with feelings
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
|
Quote:
Originally Posted by Lokasenna
Does anyone even look at this thread?
|
Well, they certainly don't let on if they do
|
|
|
04-09-2017, 09:59 PM
|
#245
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,788
|
Quote:
Originally Posted by nikolalkc
Hello everyone, this is my first post ever
I need RENDER TO FILE dialog window to be exposed as a function in Reascript API so I can customize rendering options (mono/stereo, ogg/wav, destination directory etc.) for each individual file I want to export via script. I couldn't find if function like that currently exists, or if anyone already requested it.
|
I don't know how he does it, but I do know that a friend of mine does exactly this via Beyond Python. So at least fr Python scripts such an API already does exist, but AFAIK, the APIs are similar for all scripting languages.
-Michael
|
|
|
04-22-2017, 06:16 PM
|
#246
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
Programmatic way to enable/disable take envelope (volume/pitch/pan) without having to do item chunk manipulation
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
05-26-2017, 04:01 AM
|
#247
|
Human being with feelings
Join Date: Feb 2017
Location: Belgrade, Serbia
Posts: 338
|
Quote:
Originally Posted by mschnell
I don't know how he does it, but I do know that a friend of mine does exactly this via Beyond Python. So at least fr Python scripts such an API already does exist, but AFAIK, the APIs are similar for all scripting languages.
-Michael
|
Can you please give me your friends email or any kind of contact?
Thanks
|
|
|
07-08-2017, 06:48 AM
|
#248
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
|
Quote:
Originally Posted by IXix
Please could we have a version of GetLastTouchedFX() that knows about Take FX? Something like this...
Code:
bool GetLastTouchedFX(int* tracknumberOut, int* itemnumberOut,
int* takenumberOut, int* fxnumberOut, int* paramnumberOut)
|
Quote:
Originally Posted by IXix
Please could we have API to move tracks around? Something like this...
Code:
bool MoveTrack(track, newIndex) // return false if track/index is invalid
|
Pretty please with cocaine on top?
|
|
|
07-10-2017, 04:42 PM
|
#249
|
Banned
Join Date: Sep 2015
Posts: 1,650
|
You could script the MoveTrack one with InsertTrackAtIndex, then copying the track chunk over and deleting the original. I suppose it would break things that relied on storing track pointers though.
|
|
|
07-30-2017, 01:13 PM
|
#250
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,458
|
Code:
bool GetClipboard(#bufOut)
and
Code:
bool SetClipboard(#buf)
Would be extremely useful
|
|
|
07-30-2017, 02:52 PM
|
#251
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
I sent a patch to SWS on GitHub to add these two clipboard APIs a few weeks ago: https://forum.cockos.com/showthread.php?p=1862069 (it hasn't been merged nor refused yet).
|
|
|
08-13-2017, 01:28 AM
|
#252
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Request :
Being able to get possible scale and chord name from a series of notes, aka having an API for the Scale Finder function, would be very helpful especially with a percentage of trust for each scale;P
|
|
|
10-03-2017, 02:20 AM
|
#253
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,458
|
CountSelectedAutomationItems and GetSelectedAutomationItem, the equivalent actions to the ones regarding Media Items
|
|
|
10-21-2017, 08:50 AM
|
#254
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
|
Code:
boolean reaper.TrackFX_GetOffline( track, fx )
TrackFX_SetOffline( track, fx, offline )
boolean reaper.TakeFX_GetOffline( take, fx )
reaper.TakeFX_SetOffline( take, fx, offline )
(similar to ...Get/SetEnabled(), for avoiding chunk parsing)
Last edited by nofish; 10-22-2017 at 09:03 AM.
Reason: copy/paste error
|
|
|
10-21-2017, 11:38 AM
|
#255
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Quote:
Originally Posted by MusoBob
GetMediaSourceCues
there is no available function in ReaScript to get File Cue Points infos.
There is just no way we can from ReaScript know what are the cue points positions, in a file what are the names of the cue points etc...
|
Quote:
Originally Posted by X-Raym
integrer = CountItemCuePoint(item) and time = GetItemCuePointTime(integrer) will be nice.
Currently, we have to use the action "move edit cursor to next cue in items" to try to count how many Cue Points are visible for the selected items.
(it involves unselecting all other items, and a lot of comparison to see if edit cursor has moved or not).
|
Has anything to do this this been implemented yet ?
I save the wav with BWF btext chunk > Markers and need to be able to read the wav cue point infos then import that section/bars of the wav with the particular Marker, eg: Chords.
So I save the wav that is playing through all different chords with Markers @ the chord changes, I then need to create up a song with a chord progression using sections from the source wav's to fit my progression.
|
|
|
10-22-2017, 09:27 AM
|
#256
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Quote:
Originally Posted by nikolalkc
Hello everyone, this is my first post ever
I need RENDER TO FILE dialog window to be exposed as a function in Reascript API so I can customize rendering options (mono/stereo, ogg/wav, destination directory etc.) for each individual file I want to export via script. I couldn't find if function like that currently exists, or if anyone already requested it.
|
I'm currently in the process of working on some helper-functions for Reaper's Lua, that'll include render-functions as well, that don't need the rendering dialog.
It'll take some more time, as I'm still in the middle of bugtesting and don't want to rush things, though and don't have all formats yet...
|
|
|
10-22-2017, 09:34 AM
|
#257
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Didn't know, that this thread existed, so I'll repost my FR here:
When working with GetUserInput, I often stumble over the limitation of the "," used as separator for multiple fields, as this virtually prevents me from inputting a "," into one of the fields, cause I can't separate the values anymore. So, I'd love to suggest the following additions into the pool of API-functions:
>>bool GetUserInputs2("title", int num_inputs, "captions_csv", #retvals_csv[, string separator])
like GetUserInputs, but uses the parameter seperator for seperating the individual fields, instead of the standard "," so parsing the returned value-string would be easier.
Parameter:
- separator - indicates, what seperates the captions/retvals in the csv. Default is a ,
>>array GetUserInputs3("title", int num_inputs, "captions_csv"[, string seperator])
like GetUserInputs3, but returns the input-values as an array and not as a csv-string.
Parameter:
- seperator - indicates, what seperates the entries in the captions_csv. Default is a ,
I also would love to see some more ways of customizing the reaper.MB-function, by giving it's buttons individual labels, as well as having more buttons to use.
Also a checkbox for use-cases like "Do you want this Messagebox to reappear?" would be great:
>>integer choice, integer checkbox = reaper.MB2(string msg, string title, integer numberofbuttons, string "text for button 1", string "text for button 2", string "text for button 3", ... , string "text for button n"[, integer preselection][, string checkbox-title])
Customizable MessageBox, where the buttons can have their own texts.
Parameters:
- number of buttons - how many buttons shall this messagebox have, so Reaper can determine, how many of the parameters are for the button-texts.
- "text for button n" - the text for the buttons.
preselection - which button shall be automatically preselected, when working with keyboard
- checkbox-title - an optional checkbox, that is included between the msg and the buttons. Can be used for "don't ask again"-choices.
|
|
|
10-22-2017, 09:37 AM
|
#258
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
And this small one, but an important one, a filerequester, just like GetUserFileNameForRead, but for saving a file:
boolean retval, string filenameNeed4096 reaper.GetUserFileNameForWrite(string filenameNeed4096, string title, string defext)
The problem with GetUserFilenameForRead is, you can't select a file, that doesn't exist. This could be prevented with GetUserFileNameForWrite.
|
|
|
01-27-2018, 12:34 AM
|
#259
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
MIDI_SetScale
How do I go about setting the root & scale, I can get it MIDI_GetScale but not set it MIDI_SetScale
|
|
|
02-13-2018, 04:15 AM
|
#260
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Hi,
There is
Code:
reaper.Main_SaveProject( proj, forceSaveAsInOptional )
but it doesn't allow to
- Save as but without popup (with a destination path)
- Save as project template (which has the big advantage to NOT open the new project)
- To get the path chosen by the user it is was a popup..
It would be nice to have these options available. thanks !
|
|
|
03-02-2018, 10:54 AM
|
#261
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Here's my request: SetTCPScroll
Code:
MediaTrack reaper.SetTCPScroll(MediaTrack topmosttrack)
|
|
|
03-02-2018, 01:40 PM
|
#262
|
Human being with feelings
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
|
Quote:
Originally Posted by spk77
Here's my request: SetTCPScroll
Code:
MediaTrack reaper.SetTCPScroll(MediaTrack topmosttrack)
|
If this is scroll visible window to X track, then HELL YES, that would be awesome!
And for MCP, too, please.
(There are supposedly 2 solutions for MCP already, but none seem to work.)
|
|
|
03-02-2018, 05:57 PM
|
#263
|
Banned
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
|
Quote:
Originally Posted by spk77
Here's my request: SetTCPScroll
Code:
MediaTrack reaper.SetTCPScroll(MediaTrack topmosttrack)
|
Also btmmosttrack for TCP and rightmosttrack for MCP.
Having those I could've successfully scroll to the control surface's banks of tracks.
|
|
|
03-07-2018, 11:00 AM
|
#264
|
Human being with feelings
Join Date: May 2017
Location: Italy
Posts: 19
|
OSC automap
i have a wish
is it possible to write a script that enables to automap OSC values?
for example (using touchosc)
i am using an eq from GRM tools...
it has 31 bands for each channel....
on my osc interface i have 31 sliders....
they send the values /2/multifader3/1 for example....
the value of the fader is the last one /2/multifader3/(X)...
is there a way to select multiple faders or to enable a automap function where i put
the OSC message /2/multifader3/ and then the values from 1 to 31 an assign them to the corresponding bands on the eq?
that would be interesting to map those values fast and not only for this tool...
it would enable maybe also for live performances and live mixing?
it would be a present of the heaven.... because not only that the vst is in stereo (that means 31*2 faders)
in case if there is already something like that i hope you can tell me where to find it... i was tryng to find it but in the actions list i couldnt find something like that...
__________________
Instrested in everything!! Hit me up!!
|
|
|
03-07-2018, 11:13 AM
|
#265
|
Human being with feelings
Join Date: Aug 2014
Location: New York
Posts: 135
|
I have two requests that I have wished for in a couple scripts now:
1.
reaper.getActionList() - An action to retrieve the entire action list (native+customs+scripts) with their names and command id's. It would be awesome if it returned a table but that's just me being lazy, we can parse it ourselves hhahaha
2.
Modify reaper.TrackCtl_SetToolTip(string fmt, integer xpos, integer ypos, boolean topmost) so we can display more than a single tooltip simultaneously.
|
|
|
03-07-2018, 04:41 PM
|
#266
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
Quote:
Originally Posted by Claudiohbsantos
reaper.getActionList() - An action to retrieve the entire action list (native+customs+scripts) with their names and command id's. It would be awesome if it returned a table but that's just me being lazy, we can parse it ourselves hhahaha
|
There are kbd_enumerateActions and related API functions but they are only available to extensions.
Last edited by cfillion; 03-07-2018 at 04:51 PM.
|
|
|
03-07-2018, 07:57 PM
|
#267
|
Human being with feelings
Join Date: Aug 2014
Location: New York
Posts: 135
|
Quote:
Originally Posted by cfillion
There are kbd_enumerateActions and related API functions but they are only available to extensions.
|
Really? Oh... I've been postponing learning how to work with the extensions for a long while, maybe I'll have to just bite the bullet and finally jump on it.
I have one question about the extensions in general: is it relatively easy for me to create an extension to expose these functions for the scripting API? I see SWS creates quite a few script API functions.
|
|
|
03-07-2018, 08:11 PM
|
#268
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
Yes it's relatively easy (but there is not much documentation). I think it would be a good idea to expose these functions in SWS (I'm interested in kbd_getTextFromCmd, I'll look into doing that later).
Minimal example for adding a custom API function and exposing it to ReaScript:
Code:
static const char *definition = "double\0char*,int\0str,flag\0help text for myfunction";
static double cImpl(char *str, int flag)
{
return 0;
}
static void *reascriptImpl(void **argv, int argc)
{
// argument count check is already done by reaper
return (void *)(intptr_t)cImpl((char *)argv[0], (int)(intptr_t)argv[1]);
}
void registerAPI()
{
// call when initializing the extension
plugin_register("API_functionName", (void *)&cImpl);
plugin_register("APIvararg_functionName", (void *)&reascriptImpl);
plugin_register("APIdef_functionName", (void *)definition);
}
void removeAPI()
{
// call when unloading the extension
plugin_register("-API_functionName", (void *)&cImpl);
plugin_register("-APIvararg_functionName", (void *)&reascriptImpl);
plugin_register("-APIdef_functionName", (void *)definition);
}
(This gets repetitive when adding many functions so I made helper functions and macros to clean this up and have the compiler generate the ugly reascript implementations automatically: https://github.com/cfillion/reapack/...api_helper.hpp. SWS uses a PHP script to generate them.)
Last edited by cfillion; 03-07-2018 at 08:37 PM.
|
|
|
03-19-2018, 11:33 AM
|
#269
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Hi,
It ha sbeen several time someone ask me for being able to script something based arround what regions are selected in the Markers and Regions window.
It would be nice to be able to see that !
A simple function like boolean = IsRegionSelectedInMarkerManager( idx ) would works perfectly.
Thanks for listening !
|
|
|
03-20-2018, 12:55 PM
|
#270
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Two functions that would be nice to have: - reaper.atprojectexit(ReaProject proj, function)
- Similar to reaper.atexit(function), but "function" would be run when the project is closing
- reaper.SetProjExtState(string projectfilename, string extname, string key, string value)
- SetProjExtState for offline project files
|
|
|
03-30-2018, 09:06 AM
|
#271
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Sysex support for reaper.StuffMIDIMessage...and some way to receive sysex data.
I would like to store Kemper Profiling Amp rigs (sysex data) to tracks by using reaper.SetProjExtState.
(and later, when needed, send the data back to Kemper)
Ctrlr can send/receive sysex messages
Github: https://github.com/RomanKubiak/ctrlr...c7/Source/Core
Ctrlr example - this code reads a "kipr" -file (Kemper rig) and sends it to MIDI out -> to Kemper MIDI in
Code:
readFileAsData = function(mod, value)
if panel:getBootstrapState() then
return
end
fileToRead = utils.openFileWindow(
"Open file to read as data",
File.getSpecialLocation(File.userHomeDirectory),
"*.kipr",
true
)
if fileToRead:existsAsFile() then
-- Update the file path
panel:getLabelComponent("lastFileReadPathL"):setText ("> "..fileToRead:getFullPathName())
if fileToRead:getSize() > 8192 then
utils.warnWindow(
"File too big",
"Labels are not designed to show too much data, please choose a file that's smaller then 8kb.\
The file you chose is "..fileToRead:getSize().." bytes"
)
return
end
-- We need a memory block to load our file into, this can be created at some other point in time
-- if we expect the files to be big and the amount of memory we need is higher, it will pre-allocate
-- that memory at the moment that MemoryBlock() is called
-- here we will allocate the amount of memory that is equalt to the size of the file
fileData = MemoryBlock(fileToRead:getSize())
-- This method does not return a new memory block, it operates on the one provided by us
fileToRead:loadFileAsData (fileData)
--panel:getLabelComponent("dataContentL"):setText(
--fileData:toHexString(1)
-- )
size = fileToRead:getSize()-0x17
-- skip header part
datablock = MemoryBlock(fileToRead:getSize()-0x17)
datablock = fileData:getRange(0x17,size)
sysexdata= MemoryBlock()
for i=0,size,1 do
if (datablock:getByte(i)== 240) then
--console(datablock:getByte(i):toHexString(1))
sysexdata:append(datablock:getRange(i,1))
local m= datablock:getByte(i+1)
sysexdata:append(datablock:getRange(i+2,m))
console(sysexdata:toHexString(1))
local midimessage = CtrlrMidiMessage(sysexdata:toHexString(1))
--panel:sendMidiMessageNow(midimessage)
sysexdata= MemoryBlock()
end
end
end
end
|
|
|
05-23-2018, 04:06 PM
|
#272
|
Human being with feelings
Join Date: Dec 2011
Posts: 407
|
Did anyone get ctrl + or alt + keystrokes working in lua? If not I'd like to request that.
|
|
|
05-24-2018, 09:45 AM
|
#273
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Quote:
Originally Posted by Nixon
Did anyone get ctrl + or alt + keystrokes working in lua? If not I'd like to request that.
|
Do you mean with gfx-windows?
|
|
|
05-24-2018, 10:19 AM
|
#274
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Quote:
Originally Posted by Nixon
Did anyone get ctrl + or alt + keystrokes working in lua? If not I'd like to request that.
|
There are a few specific key combinations that won't work, and some foreign keys that aren't read properly, but other than that they've always worked just fine.
Code:
-- Ctrl + Z
if gfx.mouse_cap & 4 == 4 and gfx.getchar(27) > 0 then
|
|
|
05-26-2018, 08:33 AM
|
#275
|
Human being with feelings
Join Date: Feb 2017
Posts: 4,820
|
i would like to be able to apply in script the same time stretch on an audio item already in project as applied by media browser when "match tempo" is ON. Not sure if this should be an APi wish or an action.
|
|
|
05-26-2018, 12:38 PM
|
#276
|
Human being with feelings
Join Date: Dec 2011
Posts: 407
|
|
|
|
06-04-2018, 07:00 AM
|
#277
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
- Being able to change the CSV of retval_csv separator from GetUseInput would be very welcome (imagine you have several lines, and in each of this lines, the user can enter text with commas or csv with comma too. Sure we can tell him to add quotes as prefix and suffix, but this extra info is not very user fiendly, it is easy for the user to mess with a comma, and then all the fields will be shift and it can have very bad consequences on destrcutive processing (like injecting metadata).
|
|
|
06-07-2018, 02:43 PM
|
#278
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Quote:
Originally Posted by X-Raym
- Being able to change the CSV of retval_csv separator from GetUseInput would be very welcome (imagine you have several lines, and in each of this lines, the user can enter text with commas or csv with comma too. Sure we can tell him to add quotes as prefix and suffix, but this extra info is not very user fiendly, it is easy for the user to mess with a comma, and then all the fields will be shift and it can have very bad consequences on destrcutive processing (like injecting metadata).
|
I already wrote a FR on this one long ago, but to no luck, yet...
I would prefer to get an array(maybe reaper-array?), in which every entry is it's own returned user-input-value, or, at least that GetUserInputs escapes commas as input by the user, so I could separate , from GetUserInputs from \, from actual user input .
|
|
|
06-07-2018, 04:17 PM
|
#279
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@mespotine
Oh yes arrays would be nicer, but Im prettty confident that adding an extra parameter for characters would need less rework :P
A comma is a way too many often used character, it should have been default to a | or even more esoteric character.
|
|
|
06-09-2018, 04:05 PM
|
#280
|
Human being with feelings
Join Date: Aug 2009
Location: Sweden
Posts: 70
|
Quote:
Originally Posted by mespotine
I already wrote a FR on this one long ago, but to no luck, yet...
I would prefer to get an array(maybe reaper-array?), in which every entry is it's own returned user-input-value, or, at least that GetUserInputs escapes commas as input by the user, so I could separate , from GetUserInputs from \, from actual user input .
|
Yes, please... Escaped commas for the user input, or selectable delimiter would be a great improvement.
|
|
|
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 04:33 AM.
|