Old 07-04-2018, 05:37 AM   #281
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,248
Default

For the web-interface
(and possible other usage)
it would be great to read/set number of preroll measures.

I believe it's currently not accessible via the api
__________________
Reaper x64, win 8.1
My music on Bandcamp
G-Sun is offline   Reply With Quote
Old 07-05-2018, 02:53 AM   #282
Flavio
Human being with feelings
 
Flavio's Avatar
 
Join Date: Mar 2013
Location: Italy - Monza
Posts: 139
Default

Quote:
Originally Posted by G-Sun View Post
For the web-interface
(and possible other usage)
it would be great to read/set number of preroll measures.

I believe it's currently not accessible via the api
also for web interface, any possibility to set/change the markers name?

THX!
Flavio is offline   Reply With Quote
Old 07-05-2018, 03:12 AM   #283
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,032
Default

@G-Sun, @Flavio
These are not ReaScript API whishist but Web Interface API Whish list :P


@Flavio
Maybe you can create a script to rename a marker from a PROJEXSTATE which would have been pushed by the Web Interface (there is API for that as far as I remember).
X-Raym is offline   Reply With Quote
Old 07-05-2018, 04:50 AM   #284
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,248
Default

Quote:
Originally Posted by X-Raym View Post
@G-Sun, @Flavio
These are not ReaScript API whishist but Web Interface API Whish list :P
Sorry, not my field of expertise
__________________
Reaper x64, win 8.1
My music on Bandcamp
G-Sun is offline   Reply With Quote
Old 07-05-2018, 09:33 AM   #285
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,557
Default

Quote:
also for web interface, any possibility to set/change the markers name?
You can get/send extstates using the web-interface.
All you need to do is to write a (Lua)-script, that reads this extstate and creates/sets the marker.
Triggering this script using wwr_req() is easy.

It's a workaround, that should work...
mespotine is offline   Reply With Quote
Old 07-05-2018, 09:36 AM   #286
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,557
Default

Quote:
Originally Posted by ThomasE View Post
Yes, please... Escaped commas for the user input, or selectable delimiter would be a great improvement.
As an example for the devs:

An escaped string would be something like:

Quote:
I am the first\, not the last entry,I am the second\, still not the last entry,I am the last one\, believe me.
The , separate the entries(as GetUserInputs already does), the \, only appear in the returned strings from the individual user-input-fields(what we would love to have as new feature).

At least as a GetUserInputs2-function, it should be quite easy to implement...
mespotine is offline   Reply With Quote
Old 07-05-2018, 10:43 AM   #287
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,032
Default

@mespotine
\ is a bad separator if the user input asks for a path.


Better have user defined separator to be sure it works on most scenarios.
X-Raym is offline   Reply With Quote
Old 07-05-2018, 10:55 AM   #288
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,557
Default

The separator is an unescaped comma, like it already is:

entry1
entry2
entry3

results into the following returned string:

Quote:
"entry1,entry2,entry3"

If a user types in a comma, it will be escaped

entry1, has a comma now
entry2
entry3

results in the following returned string:

Quote:
"entry1\, has a comma now,entry2,entry3"
With that, you know, all \, are user input commas, while all , are the separators.

If the user types in \, it will be escaped to \\,


If an entry ends with \ it must be escaped probably as well to \\ to circumvent a possible \, separator-situation.
At least I think, that this would work...

Edit: The more I think about the entry ends with \ problem, the more I get, that this needs more thinking about it on my side...

Maybe having "optional string entryXX"-return values, where XX is the entry in the GetUserInput-box, would be better, at least for Lua...

Last edited by mespotine; 07-05-2018 at 11:20 AM.
mespotine is offline   Reply With Quote
Old 07-13-2018, 06:45 AM   #289
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,557
Default

Sometimes it's too easy:

The separation of the individual GetUserInput-entries should be done by a newline.
As you can only type in one line in each entry-field, no multilines, this should be sufficient.

Example:
UserEntry1: "Tudelu"
UserEntry2: "Reaper is the king of the hill, thats' true"
UserEntry3: "Oh, and it's not killing me, that's a cool thing"

would result in the string:
"Tudelu\nReaper is the king of the hill, thats' true\nOh, and it's not killing me, that's a cool thing"

That should be very easy to parse.
Thanks to XRaym for his GetUserFilenameForRead-FeatureRequest, as this brought me this idea
mespotine is offline   Reply With Quote
Old 07-14-2018, 11:15 AM   #290
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,335
Default

req: would be nice that GetUserFileNameForRead
- could return multiple files
- have a flag for selecting folders
- a flag to create new file

this as been discussed here: https://forum.cockos.com/showthread.php?t=208826

Thank you
deeb is online now   Reply With Quote
Old 09-10-2018, 04:32 AM   #291
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 371
Default

Quote:
Originally Posted by spk77 View Post
One function that would be nice to have:
reaper.atprojectexit(ReaProject proj, function)[LIST]Similar to reaper.atexit(function), but "function" would be run when the project is closing
Yeah! +1
__________________
ToDoList Obliques MusicMath Donation Mark4celeste Frid i ditt hjärta Eve & the Fisherman on Spotify
tompad is offline   Reply With Quote
Old 10-26-2018, 05:22 PM   #292
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Quote:
Originally Posted by doppelganger View Post
...
4. Get parameter's value from effects in monitoring chain...
Do you know 0x1000000 trick? Maybe I don't understand what you want...
Code:
gp = TrackFX_GetParam(GetMastertrack(0), 0x1000000 + 3, 0, minval, maxval);
gpn = TrackFX_GetParamNormalized(GetMastertrack(0), 0x1000000 + 3, 0);
//etc
FnA is offline   Reply With Quote
Old 10-27-2018, 05:41 PM   #293
doppelganger
Human being with feelings
 
Join Date: Feb 2017
Posts: 388
Default

Quote:
Originally Posted by FnA View Post
Do you know 0x1000000 trick?
no, i didn't know about that, thank you!!!
doppelganger is offline   Reply With Quote
Old 11-10-2018, 04:44 AM   #294
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,335
Default

wish: GetLastTouchedFX(int* tracknumberOut, int* fxnumberOut, int* paramnumberOut ) to work on item fx too!
I does not work in items Fx as showed here:




maybe this not possible because of this:
https://forum.cockos.com/showthread.php?t=212983

so it's ok if you full fill the 2 : )

Thank you

edit: by curiosity devs! is this something technically impossible to implement?

Last edited by deeb; 11-10-2018 at 01:00 PM.
deeb is online now   Reply With Quote
Old 01-01-2019, 05:55 PM   #295
tack
Human being with feelings
 
tack's Avatar
 
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 733
Default

Desperately wish for the ability to pause and resume accumulation of undo. Akin to PreventUIRefresh() except for undo.

It's difficult to avoid rampant undo spew for complex scripts, and Undo_BeginBlock() is a pretty costly API call when the ideal UX is not to have any undo at all.
tack is offline   Reply With Quote
Old 01-02-2019, 03:41 PM   #296
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,048
Default

Quote:
Originally Posted by tack View Post
Desperately wish for the ability to pause and resume accumulation of undo. Akin to PreventUIRefresh() except for undo.

It's difficult to avoid rampant undo spew for complex scripts, and Undo_BeginBlock() is a pretty costly API call when the ideal UX is not to have any undo at all.
+1
I once asked about this (though extension and not script related, but similar use case), with no reply sadly.
https://forum.cockos.com/showthread....49#post1947649
nofish is offline   Reply With Quote
Old 03-30-2019, 05:08 PM   #297
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 1,025
Default MIDI_SetScale

You have Get's but you need Set's, you just need some way to set the key and scale ??

reaper.MIDIEditor_GetSetting_int(editor, 'scale_root')
reaper.MIDIEditor_GetSetting_str(editor, 'scale', '')
reaper.MIDI_GetScale(MediaItem_Take take, number root, number scale, string name)


reaper.MIDI_SetScale( take, 9, "102034050607", "User Reascale")
or
reaper.MIDI_SetScale( take, 9, 2741, "User Reascale")



MusoBob is offline   Reply With Quote
Old 03-30-2019, 11:12 PM   #298
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,335
Default

related to req: item based "freezing/ render infinitely without final compromises"

you can read about here:
https://forum.cockos.com/showthread.php?t=218656

It would be useful that:
TrackFX_CopyToTake
TrackFX_CopyToTrack
TakeFX_CopyToTake
TakeFX_CopyToTrack

could accept an argument to include the the envelopes points too.

Or instead:
TrackFX_MoveIncludingEnvelopePointsToTake
TrackFX_MoveIncludingEnvelopePointsToTrack
TakeFX_MoveIncludingEnvelopePointsToTake
TakeFX_MoveIncludingEnvelopePointsToTrack

Any of them, the purpose is So that we could swap/move to an item FX based automation editing and back to track when needed ..

or/and a mode in reaper in which this can happen automatically.

What do you think? imo this as HUGE HUGE potential .. infinite editing history without final compromise ...

Last edited by deeb; 03-30-2019 at 11:31 PM.
deeb is online now   Reply With Quote
Old 04-05-2019, 09:11 PM   #299
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,335
Default

related to:
https://forum.cockos.com/showthread.php?p=2117965

it seems that i am forced to have a plugin in the chain in order to reaper.TrackFX_GetOpen(track, 0) returns true even when FxChain (0) already open (with no fx selected).
How can i solve this?

check this:

Code:
function msg(param)
   reaper.ShowConsoleMsg("\n"..tostring(param));
end

function deleteChain()
   -- SWS/S&M: Remove selected FX for selected tracks
   reaper.Main_OnCommand(reaper.NamedCommandLookup("_S&M_REMOVE_FX",0),0) 
end   

track = reaper.GetSelectedTrack(0, 0) 

deleteChain() -- to make sure the chain is clean

if reaper.TrackFX_GetOpen(track, 0) == false then
   msg ("1 - TrackFX is closed so it opens")
   reaper.TrackFX_SetOpen(track, 0, 1)
else
   msg ("2 - TrackFX is opened so it closes")
   reaper.TrackFX_SetOpen(track, 1, 0) 
end

and based on answer by edgemeal:
Quote:
Originally Posted by Edgemeal View Post
How can fx ui be open/closed when it doesn't even exist? Maybe the function shouldn't do anything when passing an invalid fx index to it?
I would like to ask for a solution for this, or an alternative like using an argument with -1 index, so that reaper.TrackFX_GetOpen(track, -1) would return true if fxbrowser is open with no fx still selected.
deeb is online now   Reply With Quote
Old 04-09-2019, 11:41 AM   #300
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,241
Default

Quote:
Originally Posted by MusoBob View Post
You have Get's but you need Set's, you just need some way to set the key and scale ??

reaper.MIDIEditor_GetSetting_int(editor, 'scale_root')
reaper.MIDIEditor_GetSetting_str(editor, 'scale', '')
reaper.MIDI_GetScale(MediaItem_Take take, number root, number scale, string name)


reaper.MIDI_SetScale( take, 9, "102034050607", "User Reascale")
or
reaper.MIDI_SetScale( take, 9, 2741, "User Reascale")
Came here to request this - reaper.MIDI_SetSetting_int and _str would be really nice to have.
Lokasenna is online now   Reply With Quote
Old 04-10-2019, 07:45 AM   #301
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,557
Default

Quote:
Originally Posted by X-Raym View Post
  • 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).
Solved in the latest Ultraschall-API update, where ultraschall.GetUserInputs doesn't need a separator at all for each entry.

https://forum.cockos.com/showpost.ph...&postcount=153
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 04-13-2019, 09:59 AM   #302
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,877
Default

Wish:

OSCIIBot as a Reaper extension that provides a Midi device towards the Reaper project, and maybe also might allow the OSCIIBot script to directly access the Reaper API.
-Michael
mschnell is online now   Reply With Quote
Old 04-13-2019, 10:13 AM   #303
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,032
Default

@mespotine
Only in Lua though, not Python, or EEL, or C++ extension :P



(but for Lua script, very nice, thx !)
X-Raym is offline   Reply With Quote
Old 04-16-2019, 09:09 AM   #304
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,557
Default

Quote:
Originally Posted by X-Raym View Post
@mespotine
Only in Lua though, not Python, or EEL, or C++ extension :P



(but for Lua script, very nice, thx !)
As it's no crazy stuff, this should be portable to all of them easily. So if someone wants to attempt that, I could assist(though not port it myself..no time for that).
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 05-05-2019, 12:21 AM   #305
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,335
Default req: allow tracks to be supercollapsed not just folders

so maybe API to: supercolapseTrack

something like supercolapseTrack ( track, true or false).

who knows what we can do ! why limit?
deeb is online now   Reply With Quote
Old 05-05-2019, 12:36 PM   #306
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,557
Default

What do you mean exactly by "supercollapse"

Trackheights can be compacted, so maybe that is what you're looking for.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 05-05-2019, 07:49 PM   #307
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,335
Default

Super collapsed height is only available to folder tracks .. in which you can super collapse the child tracks, so they become like 2px height.
deeb is online now   Reply With Quote
Old 05-06-2019, 08:33 AM   #308
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,557
Default

How do I set a folder-track to super-collapse? This is probably available in StateChunks but I haven't documented yet, what triggers it.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 05-09-2019, 06:21 AM   #309
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,335
Default

Quote:
Originally Posted by mespotine View Post
How do I set a folder-track to super-collapse? This is probably available in StateChunks but I haven't documented yet, what triggers it.
It is BUSCOMP 2
(0 -> normal, 1 -> compact , 2 -> super compact)
deeb is online now   Reply With Quote
Old 05-09-2019, 08:14 PM   #310
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,335
Default

So 3 could be for self super compact! :P Justin ?
deeb is online now   Reply With Quote
Old 05-14-2019, 01:10 PM   #311
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,528
Default

reaper.GetMediaTrackInfo_Value( tr, 'I_FOLDERCOMPACT')

Quote:
I_FOLDERCOMPACT : int * : folder compacting (only valid on folders), 0=normal, 1=small, 2=tiny children
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 05-15-2019, 09:33 AM   #312
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,557
Default

Sure, but what deeb wants is super-compacted state for non-foldered tracks as well, afaik.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 05-17-2019, 02:01 AM   #313
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,335
Default

Quote:
Originally Posted by mespotine View Post
Sure, but what deeb wants is super-compacted state for non-foldered tracks as well, afaik.
Yes, and just because we might use this as an visual/organization method for our scripts for whatever reason. Why limiting?
deeb is online now   Reply With Quote
Old 06-18-2019, 02:44 PM   #314
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,335
Default

reaper.BR_GetMouseCursorContex does not distinguish AI's , can anyone update this?

Code:
function msg(param)
     reaper.ShowConsoleMsg("\n"..tostring(param));
end

reaper.ClearConsole()
--============================================================
function run()
   local window, segment, details = reaper.BR_GetMouseCursorContext() -- reaper.GetCursorContext()
   -- string window retval, string segment, string details reaper.BR_GetMouseCursorContext(string window, string segment, string details, integer char_sz)

  msg("window: "..window.." ::" .. "segment: "..segment.." ::" .."details: "..details )
 
  reaper.defer(run)
end

function onexit()
 msg(">script ended\n")
end

reaper.defer(run)
reaper.atexit(onexit)
deeb is online now   Reply With Quote
Old 06-21-2019, 05:46 PM   #315
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,557
Default

I think, SWS-related bugreports should go to the github-issues instead:

https://github.com/reaper-oss/sws/issues
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 06-22-2019, 06:18 AM   #316
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,335
Default

yep yep! thanks!
deeb is online now   Reply With Quote
Old 07-25-2019, 11:48 AM   #317
Nostrap
Human being with feelings
 
Join Date: Dec 2017
Posts: 97
Default

https://forum.cockos.com/showthread.php?t=223271

Didn't know about this thread when I posted this, but a way to wait until a MainOnCommand action finishes before continuing the rest of the script would be super useful. Would solve all kinds of asynchronous code issues
Nostrap is online now   Reply With Quote
Old 08-18-2019, 09:10 PM   #318
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 1,025
Default Set/GetTrackMIDILyrics 1-7:MIDI text event types

With Set/GetTrackMIDILyrics it only gets 5 where as most midi karaoke is on 1 Text
and some maybe saved as 6 markers.
if you could add option 1-7:MIDI text event types

In the lyrics.lua I had to modify it to copy the lyric events from 1 to 5 to get it to work:

Midi file Lyrics Display (Karaoke)


__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
MusoBob is offline   Reply With Quote
Old 10-10-2019, 11:03 AM   #319
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,514
Default

We have...
reaper.GetProjectStateChangeCount(ReaProject proj)

Would be nice to a similar function for tracks, items, takes etc.
spk77 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 04:13 PM.


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