Old 12-02-2016, 09:54 AM   #241
joe2
Human being with feelings
 
Join Date: Sep 2008
Location: UK
Posts: 355
Default

Quote:
Originally Posted by spk77 View Post
Grid/Snap settings seems to be stored into rpp files?

My request is - Easier access to the "Grid/Snap settings":
  • get checkbox states (from the "Grid/Snap settings" dialog)
  • get values from the edit boxes and dropdown lists

Thank you.

I'm also interested in this but would like to be able to set values as well.

I'm wondering if a feasible more general approach would be something like set_config_var -- is there any way to do that at the moment? (I'm guessing not.)

e.g. I'm currently doing something involving:

Code:
int *projshowgrid = (int *)get_config_var("projshowgrid", &sz0);

int *maxsnaptrack = (int *)get_config_var("maxsnaptrack", &sz1);
and it seems fine for getting the values (though I need to work out/be told how the bitmask(?) for GRID works, any tips welcome! .

Thanks for any help.


Sorry, it appears I don't know what I'm talking about. <:¬D

But on the PLUS side, it looks like there is a way of playing with things like snap settings. I've got a rudimentary POC plugin on the go which basically does something like this:

Code:
int *projshowgrid = (int *)get_config_var("projshowgrid", &sz);

if (*projshowgrid == 3327)
{

    // snap to nearby is ON: try turning it off

    *projshowgrid = 3199;

}
else if (*projshowgrid == 3199)
{

    // snap to nearby is OFF: try turning it on

    *projshowgrid = 3327;

}
I have no idea if this is safe, and I don't know how the numbers[0] should change depending on the various snap settings. But it seems to work, for now.


[0] That is, the numbers that follow GRID [here] in an RPP. (Is it a "bitmask", or something?)

Last edited by joe2; 12-02-2016 at 10:08 AM. Reason: Chatting rubbish
joe2 is offline   Reply With Quote
Old 01-01-2017, 09:53 PM   #242
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 1,708
Default

SetLastTouchedTrack

Preference: Mouse click/edit changes track selection causes change on mouse button down so it not only changes track selection on click, it also changes it on drags. With this on single click, maybe I could assign paste to a double click and not have to deal with that. Might be useful for other things too.

Maybe something similar could be in media item and track mouse modifier context?
FnA is offline   Reply With Quote
Old 01-01-2017, 09:57 PM   #243
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: The vast, frozen wasteland of western Canadia.
Posts: 4,239
Default

I forgot this thread was here. Whoops. Pasting from my FR thread:

I've got a Lua script going that provides a list of chords and lets you preview them. However, the only way to do that currently is pretty messy:

1. The track has to be armed, monitoring, and set to use the VMK as input, so too bad if the user has their own routing set up.

2. You have to screw around with MIDI messages:
Code:
reaper.StuffMIDIMessage(0, 0x90+note_tbl[i].chan-1, note_tbl[i].pitch, note_tbl[i].vel)
3. You have to keep track of times and note releases manually as part of your reaper.defer loop.

So, dear Cockosgobblers (I promise that's a term of endearment. It's also an Office Space reference within an Office Space reference.), it would be awfully swell if you could add a couple of functions to let us simulate mouse-clicks on the keys in the MIDI editor directly:

Code:
reaper.MIDIEditor_NoteDown( hwnd midieditor , int note , int velocity [, int length ])
reaper.MIDIEditor_NoteUp( hwnd midieditor , int note , int velocity )
(The optional Length parameter would automatically release the note after a specified time, just to make it easy on anyone who doesn't need control of it themselves; PPQ, QN, whatever works)

Cheers.
__________________
Currently working away from home; don't expect timely responses from me.
Default 5.0 Nitpicky Edition / GUI tutorial for Lua / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate / ReaPack
Lokasenna is offline   Reply With Quote
Old 02-24-2017, 08:30 AM   #244
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: The vast, frozen wasteland of western Canadia.
Posts: 4,239
Default

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.
__________________
Currently working away from home; don't expect timely responses from me.
Default 5.0 Nitpicky Edition / GUI tutorial for Lua / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate / ReaPack
Lokasenna is offline   Reply With Quote
Old 03-09-2017, 08:55 PM   #245
Claudiohbsantos
Human being with feelings
 
Join Date: Aug 2014
Location: New York
Posts: 120
Default

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
Claudiohbsantos is offline   Reply With Quote
Old 04-06-2017, 12:35 AM   #246
nikolalkc
Human being with feelings
 
nikolalkc's Avatar
 
Join Date: Feb 2017
Location: Belgrade, Serbia
Posts: 25
Default

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.
nikolalkc is offline   Reply With Quote
Old 04-09-2017, 03:44 PM   #247
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 139
Default

Quote:
Originally Posted by Lokasenna View Post
Does anyone even look at this thread?
Well, they certainly don't let on if they do
__________________
e moon
http://ericmoonmusic.com
__________________________________________

"Evil villians! Stand down from the funk!"
-space ghost
woodslanding is offline   Reply With Quote
Old 04-09-2017, 09:59 PM   #248
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 3,464
Default

Quote:
Originally Posted by nikolalkc View Post
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
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 04-22-2017, 06:16 PM   #249
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Phoenix, AZ
Posts: 2,054
Default

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
Argitoth is offline   Reply With Quote
Old 05-26-2017, 04:01 AM   #250
nikolalkc
Human being with feelings
 
nikolalkc's Avatar
 
Join Date: Feb 2017
Location: Belgrade, Serbia
Posts: 25
Default

Quote:
Originally Posted by mschnell View Post
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
nikolalkc is offline   Reply With Quote
Old 07-08-2017, 06:48 AM   #251
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,204
Default

Quote:
Originally Posted by IXix View Post
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 View Post
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?
IXix is offline   Reply With Quote
Old 07-10-2017, 04:42 PM   #252
snooks
Human being with feelings
 
Join Date: Sep 2015
Posts: 1,460
Default

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.
snooks is offline   Reply With Quote
Old 07-30-2017, 01:13 PM   #253
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 1,063
Default

Code:
bool GetClipboard(#bufOut)
and
Code:
bool SetClipboard(#buf)
Would be extremely useful
amagalma is offline   Reply With Quote
Old 07-30-2017, 02:52 PM   #254
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 1,453
Default

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).
cfillion is online now   Reply With Quote
Old 08-13-2017, 01:28 AM   #255
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 4,245
Default

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
X-Raym is offline   Reply With Quote
Old 10-03-2017, 02:20 AM   #256
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 1,063
Default

CountSelectedAutomationItems and GetSelectedAutomationItem, the equivalent actions to the ones regarding Media Items
amagalma is offline   Reply With Quote
Old 10-21-2017, 08:50 AM   #257
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 7,231
Default

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
nofish is offline   Reply With Quote
Old 10-21-2017, 11:38 AM   #258
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 104
Default

Quote:
Originally Posted by MusoBob View Post
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 View Post
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.
MusoBob is offline   Reply With Quote
Old 10-22-2017, 09:27 AM   #259
mespotine
Human being with feelings
 
Join Date: May 2017
Posts: 36
Default

Quote:
Originally Posted by nikolalkc View Post
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...
mespotine is offline   Reply With Quote
Old 10-22-2017, 09:34 AM   #260
mespotine
Human being with feelings
 
Join Date: May 2017
Posts: 36
Default

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.
mespotine is offline   Reply With Quote
Old 10-22-2017, 09:37 AM   #261
mespotine
Human being with feelings
 
Join Date: May 2017
Posts: 36
Default

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.
mespotine 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 08:29 AM.


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