Old 02-15-2016, 02:07 AM   #1
Airal
Banned
 
Join Date: Nov 2015
Posts: 406
Default Get marker names

Pretty easy for everything else but I only get 0 from param 6 in EnumProjectMarkers.

Any ideas?
Airal is offline   Reply With Quote
Old 02-15-2016, 06:32 AM   #2
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,629
Default

Needs to be a string. You using Lua or EEL?


If it's Lua, pull this script apart from this thread, you'll see it read the marker names...



Version 3: "PL9-Project marker goto grid03" added defaults reset and font resizing adjustment by shift-mousewheel...




Sounds like a variable or syntax issue.





>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.
planetnine is online now   Reply With Quote
Old 02-15-2016, 08:34 AM   #3
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,516
Default

I made this Lua template for you :

ReaScripts-Templates/X-Raym_Loop in markers.lua at master · ReaTeam/ReaScripts-Templates

Hope it helps !
X-Raym is offline   Reply With Quote
Old 02-15-2016, 03:11 PM   #4
Airal
Banned
 
Join Date: Nov 2015
Posts: 406
Default

I'm using python. The examples don't work. EnumProjectMarkersN never returns the names.

e.g., simply

num_markers = RPR_EnumProjectMarkers2(0, 0, 0, 0, 0, 0, 0)[7];

for i in range(0, 10):
name = "asdf";
#RPR_EnumProjectMarkers2(0, i, 0, 0, 0, name, 0);
name = RPR_EnumProjectMarkers3(0,i, 0, 0 ,0 ,0,0,0);
msg(name);

name(which is the array returned by EnumProjectMarkers) never shows any of the names of the actual markers.

e.g.,

(1, 0, 0, 0, 24.908339081582906, 0.0, 0, 1, 0)
(2, 0, 1, 0, 58.408478669154846, 0.0, 0, 2, 0)
(3, 0, 2, 0, 77.72032384316691, 0.0, 0, 3, 0)

yet the markers have names. Any ideas why this doesn't work in python?
Airal is offline   Reply With Quote
Old 02-15-2016, 03:20 PM   #5
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,629
Default

I'm not sure as I abandoned Python for ReaScript quite early on (I use EEL and Lua).

There is a vague hint of a memory that it might be a bug, it's giving me a feeling of deja-vu thinking about this.


There are still some guys reasonably versed in Python, maybe someone else can help/confirm...



>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.
planetnine is online now   Reply With Quote
Old 03-15-2017, 03:09 PM   #6
Gmanti
Human being with feelings
 
Join Date: Apr 2016
Posts: 16
Default

*Bump* Did this ever get resolved?

I've came across exactly the same issue..
Gmanti is offline   Reply With Quote
Old 05-19-2020, 05:03 AM   #7
Gass n Klang
Human being with feelings
 
Gass n Klang's Avatar
 
Join Date: Nov 2015
Location: Detmold - Germany
Posts: 651
Default

bump. Any chance to get marker names in python?
__________________
https://gassnklang.de
Gass n Klang is offline   Reply With Quote
Old 05-20-2020, 12:01 AM   #8
sonovice
Human being with feelings
 
Join Date: Oct 2017
Posts: 13
Default

Bug is still there. See https://forum.cockos.com/showpost.ph...40&postcount=9 for more details.
sonovice is offline   Reply With Quote
Old 05-21-2020, 11:05 AM   #9
jkooks
Human being with feelings
 
Join Date: May 2020
Posts: 10
Default

I have been able to get marker name using this fast string trick. Granted I have only done this with the usual EnumProjectMarkers, but it may still work with EnumProjectMarkersN too.

Code:
for i in range(markerNum):
    retval, tempID, isRgn, tempPos, _, _, num = RPR_EnumProjectMarkers(i, 0, 0, 0, 0, 0)

    #gets the marker name
    fs = SNM_CreateFastString("")
    SNM_GetProjectMarkerName(0, num, isRgn, fs)
    tempName = SNM_GetFastString(fs)
    SNM_DeleteFastString(fs)
jkooks 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 07:14 AM.


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