Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 06-13-2018, 10:56 AM   #1
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,629
Default Markers: A unique identifier/guid for markers/regions/time-signature-markers (DONE)

I would love to have unique-identifiers/guids for markers/regions and time-sig-markers.

I'm currently working on a set of functions for ReaScript-Lua-Coders, that helps storing additional metadata for objects with guids, like tracks, items, etc to have something more flexible than ProjectNotes/ItemNotes, etc.
I'm doing it using ProjectExtStates, where extname is the guid of the object, the key the additional "metadata"-tag and the value it's value.
That way, an object can have one or more additional "tags" stored that way.


Now here is my problem: I can't do that for markers/regions/time-sig-markers, as there is no unique identifier for markers/regions/timesig-markers.
When I use the idx of the first marker(of three in my project), it will become obsolete as unique identifier, when I move the first marker past the last one.
When I use the shown number, it will become obsolete, as soon as the user changes the number.
Using the text is impossible, as this text could change every minute.
And checking the markers for changes using a defer-script is also only helpful, when only one marker is changed; as soon as several markers are changed at the same time(using some script or so), it would be a mess to code a defer-checker-script, if possible at all.

So when I want to associate to a marker/region/timesig-marker a ProjExtState, I have no identifier to use as extname, that will stay the same no matter what the user inputs or does to markers.

That's why I would love to have a guid to use for the marker, that can be used in the background by scripts, without having to force the user to not do certain things(like changing several markers at a time).



One usecase for my set of functions would be storing additional metadata-tags to be used as ID3-tags to regions/markers themselves, not inside the marker-text, but rather in the ProjExtStates associated with the region/marker using the guid as extname.
After rendering, I could read out this additional tag-information from a specific region and add them to the rendered file using the SWS-function SNM_TagMediaFile().


PS: the following functions would probably be useful to add to the api,
Code:
GetGuidFromMarker(integer idx)
GetGuidFromRegion(integer idx)
GetGuidFromTimeSigMarker(integer idx)
When storing it into RPP-files without loosing backwards-compatibility, I would suggest something like adding additional entries after the MARKER-entries
Code:
MARKER_GUID idx guid
where idx is the position of the marker in the MARKER-list and guid the guid itself.


PPS: Hope, I didn't write this overspecific

Last edited by Meo-Ada Mespotine; 08-24-2018 at 05:21 AM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-24-2018, 05:20 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,629
Default

Bump.
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-24-2018, 07:19 AM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,108
Default

Not sure if it helps but SWS does something similar ('attaching permanent things to markers / regions') with SWS notes, marker / regions subtitles (SWS/S&M: Open/close Notes window (marker/region subtitles). The notes / subtitles 'stick' to the markers / regions also when rearranged and are saved with the project.

Seems to be done by creating and storing own unique ID's.
https://github.com/reaper-oss/sws/bl...arker.cpp#L136

Surely not as convenient as having API functions for it, but maybe a workaround in the meantime ?
nofish is offline   Reply With Quote
Old 08-29-2018, 07:29 AM   #4
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,629
Default

Is that programmable from within ReaScript? If yes, this could be a real good help...
Meo-Ada Mespotine is offline   Reply With Quote
Old 11-23-2019, 09:55 AM   #5
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,629
Default

Bumpy bumpy.

With the recent additions for additional metadata for tracks, items and envelopes, markers/regions would be a great next goal for additional metadata, either using an identifier as mentioned in the OP or the way, as track, item and envelopes do it.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 11-23-2019, 01:07 PM   #6
bFooz
Human being with feelings
 
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
Default

+ 1
bFooz is offline   Reply With Quote
Old 09-06-2020, 01:02 PM   #7
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,431
Default

Did anything happen with this?

I see we can get GUIDs for the markers/regions:
Code:
retval, GUID = reaper.GetSetProjectInfo_String(CURR_PROJ, "MARKER_GUID:"..idx, "", GET_IT)
but is there any way to actually use those GUIDs?
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 09-06-2020, 02:12 PM   #8
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,629
Default

Yes. You can look through markers by guid. And you can use the guid for project extension states, so you can store additional metadata associated with markers/regions.

My Ultraschall-Api has functions for marketextstates because of that.
Quite handy...

https://mespotin.uber.space/Ultrasch...arkerExtStates
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 09-06-2020, 03:19 PM   #9
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Posts: 3,672
Default

why not use item-markers, ala heda's script? you could then use the guids of the items being used to generate markers...kind of smuggling in the guids in that way.

a modified, headless version of this script is how i manage all of my markers and regions. i toggle the script off when i need to drag regions around.

https://forum.cockos.com/showthread.php?t=155582
__________________
mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
mccrabney is offline   Reply With Quote
Old 09-06-2020, 06:07 PM   #10
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,629
Default

Quote:
Originally Posted by mccrabney View Post
why not use item-markers, ala heda's script? you could then use the guids of the items being used to generate markers...kind of smuggling in the guids in that way.

a modified, headless version of this script is how i manage all of my markers and regions. i toggle the script off when i need to drag regions around.

https://forum.cockos.com/showthread.php?t=155582
Item markers are not convenient for the stuff I need them. I want markers being independent of any messaround I make with items so having them connected shuffles them around in a way I don't want.

And as Fabian pointed out: markers and regions have guids now too, so item's guids are not needed for that anymore.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada 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 11:28 AM.


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