|
|
|
01-25-2010, 05:23 AM
|
#41
|
Human being with feelings
Join Date: Dec 2006
Location: UK
Posts: 789
|
Andre,
Can you run multiple GUI Python scripts outside of REAPER? (sorry, I'm not a Python person)
__________________
Mike Lacey, Leicestershire, UK
|
|
|
01-25-2010, 09:21 AM
|
#42
|
Human being with feelings
Join Date: Jan 2010
Posts: 6
|
Quote:
Originally Posted by MikeLacey
Andre,
Can you run multiple GUI Python scripts outside of REAPER? (sorry, I'm not a Python person)
|
Of course.
Well, maybe I could work on some kind of workaround where the script that runs in Reaper executes another external script which runs independently of Reaper. That's the only thing I can think of.
Try executing a script with an infinite loop like this one (on an empty project please!):
test.py
Reaper will hang. Although that kind of code should never be written, I think Reaper should have some kind of protection against hanging scripts. As people start writing longer extensions it's possible these kinds of bugs could happen by accident, which cause Reaper hangs and users loosing their unsaved projects. I would feel really awful if someone lost their progress in a project due to a hanging script.
|
|
|
01-25-2010, 09:23 AM
|
#43
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,822
|
FWIW, Reaper will detect the error in this infinite loop and bail out with an error message:
Code:
while True:
RPR_DoSomething()
|
|
|
01-25-2010, 12:59 PM
|
#44
|
Human being with feelings
Join Date: Jan 2010
Posts: 6
|
Quote:
Originally Posted by schwa
FWIW, Reaper will detect the error in this infinite loop and bail out with an error message:
Code:
while True:
RPR_DoSomething()
|
True, just tested it. I guess it would be rather difficult to know if a script is running an infinite loop on purpose or by mistake, except in a case like this when it's constantly calling a Reaper action.
|
|
|
01-27-2010, 03:35 AM
|
#45
|
Human being with feelings
Join Date: Dec 2009
Location: Wellington, NZ
Posts: 300
|
I think RPR_Include fulfills the GetFuncAddress call request. The purpose of the API request was to allow reaper api calls from seperate files, which can now be done.
|
|
|
01-27-2010, 09:12 AM
|
#46
|
Human being with feelings
Join Date: Dec 2006
Location: UK
Posts: 789
|
Quote:
Originally Posted by fingers
I think RPR_Include fulfills the GetFuncAddress call request. The purpose of the API request was to allow reaper api calls from seperate files, which can now be done.
|
Done,
Mike
__________________
Mike Lacey, Leicestershire, UK
|
|
|
04-14-2010, 08:16 PM
|
#47
|
Human being with feelings
Join Date: Nov 2009
Posts: 976
|
Hi
I would like to make a request on behalf of Tim of SWS extension team. I recently requested for better editing actions
similar to "cut/copy/split , obeying time sel" , yet quite different. My idea was prodding the possibility of detecting last selection, if it's an item selection , or a time selection, and then have the editing action applied to it.
For example, if my last action was clicking on an item, cut/copy/split will apply to edit cursor, even if there is a time selection active. But if my last action was creating time selection, cut/copy/split will be applied to time selection. I believe this could be implemented, since the success of obey time selection actions?
Here's Tim's reply
Quote:
Yo lawrs,
Well, there's some technical difficulties in doing exactly what you're asking for.
Reaper doesn't notify when there's any activity with item or time selections, so my
extension would have to continuously poll (ask) reaper "Hey, what's the current item
selection?" "What's the current time selection?". This of course uses CPU, perhaps
a lot, and there's going to be "holes" where if you change selections quickly I won't
know what the actual "last selection" is.
Tim
|
If Tim was given the necessary API , he might be able to come up with a new "smart" cut/copy/split action. Hope this gets passed! Cheers!
|
|
|
05-05-2010, 10:50 AM
|
#48
|
Mortal
Join Date: Dec 2008
Location: France
Posts: 1,969
|
cockos, please can we have something to enumerate the action list, I mean the descs ?
this is to make a multi-language action help extension.
Bonus related Qs: should one go through action_help_t ? If so, why ?
___
hey Mike! long time no see.. hope you're fine!
About the OP: I think at leat 3, 9, 13, 18 (I suck!), 22 (was a bug) can be removed..
Last edited by Jeffos; 05-05-2010 at 11:40 AM.
Reason: Bonus related Qs
|
|
|
05-06-2010, 02:59 AM
|
#49
|
Human being with feelings
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,254
|
Quote:
Originally Posted by Jeffos
cockos, please can we have something to enumerate the action list
|
A great big +1 on that, including the ID's, as the user defined ones will change from run to run !!
|
|
|
05-07-2010, 03:33 AM
|
#50
|
Human being with feelings
Join Date: Dec 2009
Location: Wellington, NZ
Posts: 300
|
Quote:
Originally Posted by Jeffos
cockos, please can we have something to enumerate the action list, I mean the descs ?
this is to make a multi-language action help extension.
Bonus related Qs: should one go through action_help_t ? If so, why ?
___
hey Mike! long time no see.. hope you're fine!
About the OP: I think at leat 3, 9, 13, 18 (I suck!), 22 (was a bug) can be removed..
|
Code:
int i = 0;
const char *cmdName;
int cmdId;
while( 0 != (cmdId = kbd_enumerateActions(NULL, i++, &cmdName))) {
/* Have fun! */
}
|
|
|
05-07-2010, 06:58 AM
|
#51
|
Mortal
Join Date: Dec 2008
Location: France
Posts: 1,969
|
thanks fingers! I somehow do the same with kbd_getTextFromCmd, just a little thing is missing: http://forum.cockos.com/showpost.php...14&postcount=2 (or a kind of reverse func. for NamedCommandLookup())
|
|
|
01-26-2011, 08:39 AM
|
#52
|
Human being with feelings
Join Date: Jan 2011
Posts: 1
|
Quote:
Originally Posted by schwa
what would be handy is a wish list of particular API
|
My love,
I'm not sure of what all these guys are talking about but I personnaly have a single item in my wish list of A.P.I. (A Perfect Intimity) for this new year:
It would be great if you could change your socks more often (it's clear your wearing the same sock for at least 2 years - just look at your avatar, my dear!)
Thanks,
schwouette.
PS: Hey, I did some shoping today.. I have a very special surprise for you don't be too late this evening!
EDIT: oops! I just now realize what this thread is about, I'm sorry.
Well, not to OT too much, here's a random bump:
Quote:
Originally Posted by MikeLacey
main first needs: trigering reaper's preset
|
|
|
|
01-26-2011, 10:58 AM
|
#53
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,798
|
schwa's wife is on board?
EPIC WIN!
|
|
|
08-19-2011, 02:11 PM
|
#54
|
Human being with feelings
Join Date: Sep 2009
Location: Virginia
Posts: 2,068
|
I was wondering if you guys would consider opening, or adding the API needed to create a way to burn a CD? See this thread.
http://forum.cockos.com/showthread.p...515#post797515
Thanks, Wyatt
|
|
|
08-19-2011, 03:31 PM
|
#55
|
Human being with feelings
Join Date: Jul 2009
Posts: 633
|
I would really love to see higher level functions for dealing with midi events.
|
|
|
08-27-2011, 03:03 AM
|
#56
|
Mortal
Join Date: Dec 2008
Location: France
Posts: 1,969
|
With the hope the folowing requests only need slight code hooking, exposition to the API, const updates, etc.. it would be great to have:
- the litteral REAPER version (for debug purpouse)
- GetUserInputs() is limited to 8 fields, may be 16 would still usable on low screen resolutions
- Main_openProject() can open .RPP and .RTrackTemplate files. It would be great if it (or a new function) could also open anything that can be dropped in the arrange: e.g. .ReaperThemeZip files or -for track related drag&drog (say .mid)- add it as a new track like it is done for a .RTrackTemplate file
|
|
|
09-23-2011, 01:21 AM
|
#57
|
Mortal
Join Date: Dec 2008
Location: France
Posts: 1,969
|
With new major versions of REAPER, some users of old, veeerrrryyy old extension plugins can face unexpected issues. We have this problem with the SWS extensions.
Example: with the same plugin, something which was ok in REAPER 3 might crash in REAPER 4.
Unfortunately, we have no mean to manage that from extension code (as it is an "old" version, by definition) so ideally this should be handeled on REAPER side...
It seems to me the SDK's REAPER_PLUGIN_VERSION could help us about that. From the SDK:
Code:
// int ReaperPluginEntry(HINSTANCE hInstance, reaper_plugin_info_t *rec);
// return 1 if you are compatible (anything else will result in plugin being unloaded)
// if rec == NULL, then time to unload
#define REAPER_PLUGIN_VERSION 0x20E
typedef struct reaper_plugin_info_t
{
int caller_version; // REAPER_PLUGIN_VERSION
[...]
So, this is a request to upgrade the SDK for REAPER 4 (and may be for each new major releases?) with a new value for this #define. Of course, REAPER should also use this new value for reaper_plugin_info_t->caller_version. Ideally, when not compatible, REAPER would also display a warning message like "Unloading extension plugin reaper_example.dll: not compatible (please upgrade!)".
[EDIT] impact for 3rd party devs = they will just have to re-compile against the new SDK
Last edited by Jeffos; 09-23-2011 at 01:42 AM.
|
|
|
10-17-2011, 10:31 AM
|
#58
|
Human being with feelings
Join Date: Jul 2009
Posts: 633
|
I'd really like to see hooks into the Project Bay added to the api. As far as i can tell there is currently no API support for the project bay
I'm looking to insert items from a search in the project bay into my composition. This would help my workflow greatly.
|
|
|
10-17-2011, 10:36 AM
|
#59
|
Human being with feelings
Join Date: Jun 2010
Location: canada
Posts: 3,396
|
Quote:
Originally Posted by caseyjames
I'd really like to see hooks into the Project Bay added to the api. As far as i can tell there is currently no API support for the project bay
I'm looking to insert items from a search in the project bay into my composition. This would help my workflow greatly.
|
agreed - access to the project bay would be great, then we could have actions for it right? that would be good
|
|
|
10-17-2011, 10:41 AM
|
#60
|
Human being with feelings
Join Date: Jul 2009
Posts: 633
|
Actions for the Project Bay would be very cool. This is less complicated than that though.
With this specific feature, its more of a script that would run in the main interface with the ability to reference and copy items from the project bay. My guess is that it would be a fairly simple to implement, though maybe there is a complexity to it that I don't see.
|
|
|
08-12-2012, 06:21 PM
|
#61
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Quote:
Originally Posted by Jeffos
- GetUserInputs() is limited to 8 fields, may be 16 would still usable on low screen resolutions
|
I also have some issues with GetUserInputs (from a ReaScript perspective...) - This one is really serious - results are contained in one single string separated by commas.
User case where it becomes a problem:
Some countries use comma (,) instead of a dot (.) as a decimal mark. The list of those countries is not short: http://en.wikipedia.org/wiki/Decimal..._decimal_comma
So for example, if you expect a user to input a float values you can get in a serious trouble because splitting string where the commas are can give you unpredictable results.
Proposed solution would be to output a list instead of a string contained in char* retvals_csv. That way we can work with list and replace commas with a dot where needed - without a fear to also replace the commas that separate the results
- Captions are also inputted as one big string separated by commas - thus you cannot use commas in your captions. Proposed solution is the same as it it for the result - let us use list instead
- It would be nice if the window user sees would automatically stretch depending on the length of the captions. In current implementation you cannot use more then a few words per caption:
Last edited by Breeder; 08-13-2012 at 12:24 AM.
|
|
|
09-15-2012, 05:19 PM
|
#62
|
Human being with feelings
Join Date: Nov 2009
Posts: 2,232
|
haven't looked into this for a while. are there yet any functions for:
get/set media item volume
get/set media item pan
get/set media item rate
get/set media item pitch
would love to be able to get info from one item and paste to multiple.
thanks,
BabaG
|
|
|
09-15-2012, 11:56 PM
|
#63
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
GetType() please!
|
|
|
09-16-2012, 03:44 AM
|
#64
|
-blänk-
Join Date: Jun 2008
Posts: 11,359
|
Quote:
Originally Posted by babag
haven't looked into this for a while. are there yet any functions for:
get/set media item volume
get/set media item pan
get/set media item rate
get/set media item pitch
would love to be able to get info from one item and paste to multiple.
thanks,
BabaG
|
GetMediaItemTakeInfo_Value() and SetMediaItemTakeInfo_Value() gives you those (there is no item pan/pitch/rate, they are all take properties)
Volume depends on whether you're interested in take volume (then use the above function) or the item volume handle(knob), then it's GetMediaItemInfo_Value() and SetMediaItemInfo_Value() you need.
|
|
|
09-16-2012, 10:07 AM
|
#65
|
Human being with feelings
Join Date: Nov 2009
Posts: 2,232
|
thanks, gofer. seems inconsistent or incomplete to me to have some of
these functions available at the item level and others not. sws/xenakios
already has an extension to set volume and pan together. if you want
to make something similar for all four settings, having to call two
functions to do it seems odd. do you know where item fx are stored? i'm
guessing that will add a third function to the mix here.
thanks again,
BabaG
|
|
|
09-16-2012, 11:01 AM
|
#66
|
-blänk-
Join Date: Jun 2008
Posts: 11,359
|
You misunderstood.
All 4 parameters you listed (volume, pan, pitch, rate) are at take level. Reaper doesn't have per item pan/pitch/rate, so there are no functions for that at an item level.
The item volume handle is another thing. Obviously you need a different access to take volume vs item volume. I gave you both, because while you talked about items at least in case of pan/pitch/rate you sure meant takes - but in case of volume I couldn't decide what you meant.
You will have to call SetMediaItemTakeInfo_Value() separately for each parameter you want to set anyway (4 times for 4 parameters).
As this isn't a tutorial thread and I don't know very much about it, I leave the FX question out. Keyword: Item state chunk (or the upcoming SWS ReaScript function SNM_GetSetSourceState).
|
|
|
07-16-2013, 01:13 PM
|
#67
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
This would be nice - set MIDI editor "snap scale": RPR_MIDIEditor_SetSnapScale(root, scalename, scale)
f.ex. Set MIDI editor snap scale to "C major triad":
RPR_MIDIEditor_SetSnapScale("C", "Major Triad", "0, 4, 7") (0 = root, 4 = 4 semitones from root, 7 = 7 semitones from root etc.)
or maybe the "scale" argument should be a list:
RPR_MIDIEditor_SetSnapScale("C", "Major Triad", [0, 4, 7])
or using ReaScale format for the "scale":
RPR_MIDIEditor_SetSnapScale("C", "Major Triad", "100030050000")
Last edited by spk77; 07-17-2013 at 07:43 AM.
|
|
|
09-20-2013, 10:42 AM
|
#68
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
is there anything that will give you a true or false whether the take's waveform is positive or negative at mouse or cursor position? Basically, I'm trying to create a script that does something based on whether the peak value is positive or negative. Reaper can already detect the highest peak or peak values, but can it detect whether it is a negative or positive peak, below or above the zero crossing line?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
10-06-2013, 07:47 PM
|
#69
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
I really am desperately in need of some stretch marker API. I need to be able to move stretch markers. For example, I want to move the stretch marker as if using the default drag. I need to actually snap the stretch marker to the edit cursor, for example, or "snap to nearest project marker". Anyway, I just need to move stretch markers with the API rather than my mouse. Even better would be some more actions for stretch markers.
Right now there's only ONE snapping action, and that is "snap to grid." However, that will not work for my needs.
This is really important.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
10-07-2013, 12:08 PM
|
#70
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
|
Quote:
Originally Posted by Argitoth
is there anything that will give you a true or false whether the take's waveform is positive or negative at mouse or cursor position?
|
You can inspect the audio of a take directly with the audio accessor API. If you're good a scripting, it shouldn't be too hard to just grab the sample at the cursor and test its sign.
Quote:
Originally Posted by Argitoth
I really am desperately in need of some stretch marker API. I need to be able to move stretch markers.
|
I just had a look at how stretch markers are stored in the project and I don't think it would be that hard to manipulate them...
Code:
<ITEM
POSITION 0.00000000000000
SNAPOFFS 0.00000000000000
LENGTH 146.21895691609978
LOOP 1
ALLTAKES 0
SEL 1
FADEIN 1 0.000000 0.000000 1 0 0.000000
FADEOUT 1 0.000000 0.000000 1 0 0.000000
MUTE 0
IGUID {B50CAAED-CB5E-4195-BE04-84FEE3C3A9DF}
IID 1
NAME "GTR B_03.wav"
VOLPAN 1.000000 0.000000 1.000000 -1.000000
SOFFS 0.00000000000000
PLAYRATE 1.00000000000000 1 0.00000000000000 -1 0 0.002500
CHANMODE 0
GUID {54A3267C-3FE3-4C0F-ACDF-031392D7F670}
<SOURCE WAVE
FILE "GTR B_03.wav"
>
SM 0.000000000000 0.0000000000 + 10.000000000000 8.0000000000 + 17.000000000000 16.0000000000 + 146.218956916100 146.2189569161
>
The above shows an item with two manually added markers (in green) and the two item end markers automatically created by REAPER (in red). As you can see a marker definition is just two numbers, the first one the actual location, the second the original location, and the markers are separated by + signs. I don't think it would be very hard for someone familiar with python string manipulation to parse that info, change it and write it back to the item chunk.
|
|
|
10-18-2013, 02:31 PM
|
#71
|
Human being with feelings
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 314
|
MIDI note metadata
This came up in the MusicXML discussion, but also would be really important for other MIDI enhancements, like building a proper articulation mapper that doesn't rely on MIDI channels:
It would be really great to get arbitrary MIDI note metadata support that would be accessible from both ReaScript and JS. Even an extra 8-bit value would be sufficient for a lot of things. Adding new stuff to the MIDI event lines in the chunk would break some scripts' regexes, I wonder if there's another more elegant solution? In any case I think this would be really useful for building more in-depth MIDI features.
|
|
|
12-12-2013, 05:26 AM
|
#72
|
Human being with feelings
Join Date: Sep 2011
Posts: 198
|
Wish List: get arguments from OSC
(cross-post from OSC bug reports and feature requests)
It would be incredibly useful to be able to pass arguments from OSC to Reascript. This would extend the functionality of controllers a lot, and bridge two different excellent parts of reaper.
|
|
|
01-22-2014, 04:31 PM
|
#73
|
Human being with feelings
Join Date: Apr 2011
Posts: 158
|
Hi, I´m currently working on some scripts involving heavy use of folders and I´m really missing flags for the folder compact state in the mixer.
There are some flags inside RPR_GetMediaTrackInfo_Value ("I_FOLDERCOMPACT") but they only indicate the folder compact state in the track control panel and not the mixer.
I´m guessing, since there is an action to show/hide the children of a folder in the mixer, that there must be some flags for that in the code somewhere.
Please make them available via Reascript API.
Thanks and greets
__________________
for auto-loading note names, vote here
for per track predelay, vote here
|
|
|
01-30-2014, 01:19 PM
|
#74
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
Quote:
Originally Posted by IXix
I just had a look at how stretch markers are stored in the project and I don't think it would be that hard to manipulate them...
Code:
SM 0.000000000000 0.0000000000 + 10.000000000000 8.0000000000 + 17.000000000000 16.0000000000 + 146.218956916100 146.2189569161
The above shows an item with two manually added markers (in green) and the two item end markers automatically created by REAPER (in red). As you can see a marker definition is just two numbers, the first one the actual location, the second the original location, and the markers are separated by + signs. I don't think it would be very hard for someone familiar with python string manipulation to parse that info, change it and write it back to the item chunk.
|
Oh I missed this. Cool! Actually, what I need to do is a little more complex. I need to place stretch markers at 0 crossing (which REAPER can already do very well) but then! Here's the scary part: I need to strech the item so that each stretch marker ends up equidistant. Essentially, each cycle of the waveform ends up the same length and therefore the full waveform ends up perfectly at one frequency throughout.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
02-11-2014, 10:13 AM
|
#75
|
Human being with feelings
Join Date: Jan 2012
Posts: 104
|
API to select/unselect a specific Take Envelope
API to get / set the Time Selection start / end
API to get the first track have items in time selection
API that copy / paste the Region
|
|
|
02-11-2014, 02:03 PM
|
#76
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
|
API for manipulating monitor FX
Last edited by IXix; 02-26-2016 at 03:19 AM.
Reason: Coming soon!
|
|
|
02-15-2014, 10:24 AM
|
#77
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
sorely needed: "get mouse position" so we can stop using the edit cursor for everything.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
02-15-2014, 11:12 AM
|
#78
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Quote:
Originally Posted by Argitoth
sorely needed: "get mouse position" so we can stop using the edit cursor for everything.
|
We already have this solved in SWS, I can export it to ReaScript if you want.
|
|
|
02-15-2014, 11:30 AM
|
#79
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
Quote:
Originally Posted by Breeder
We already have this solved in SWS, I can export it to ReaScript if you want.
|
What? "Export to reascript" So are you saying the next build of REAPER SWS extension could have this API? That would be shweets! Edit: Now I need to eat my valentines day candy...
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
02-15-2014, 11:38 AM
|
#80
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Breeder
We already have this solved in SWS, I can export it to ReaScript if you want.
|
That would be great! Is it possible to get "mouse pos" in every control/window?
|
|
|
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:04 AM.
|