Old 05-12-2023, 04:53 AM   #1
krizz
Human being with feelings
 
krizz's Avatar
 
Join Date: Dec 2012
Location: Rhein-Main Germany
Posts: 31
Default Set the color of a take marker

Hi,

I bet someone in here can tell me, what value I can enter to choose the color of a take marker (p.e. “red”). Tried everything from 0 – 255 but the marker allways is yellow.

reaper.SetTakeMarker( take, idx, nameIn, srcposIn, colorIn )

Thank you guys

krizz
krizz is offline   Reply With Quote
Old 05-12-2023, 05:18 AM   #2
jrk
Human being with feelings
 
Join Date: Aug 2015
Posts: 2,969
Default

ColorToNative ?
__________________
it's meant to sound like that...
jrk is offline   Reply With Quote
Old 05-12-2023, 02:07 PM   #3
krizz
Human being with feelings
 
krizz's Avatar
 
Join Date: Dec 2012
Location: Rhein-Main Germany
Posts: 31
Default

That was my thougt too, but this code gets me a yellow take marker:

Code:
reaper.SetTakeMarker( take, i, tostring(math.floor(timing_err)), srcpos, reaper.ColorToNative( 255, 18, 0 ) )
What am I doing wrong?

Thank's

krizz
krizz is offline   Reply With Quote
Old 05-12-2023, 02:37 PM   #4
jrk
Human being with feelings
 
Join Date: Aug 2015
Posts: 2,969
Default

Ah, this.

colorIn = reaper.ColorToNative( 255, 18, 0 ) | 0x1000000
__________________
it's meant to sound like that...
jrk is offline   Reply With Quote
Old 05-13-2023, 11:37 PM   #5
krizz
Human being with feelings
 
krizz's Avatar
 
Join Date: Dec 2012
Location: Rhein-Main Germany
Posts: 31
Default

Thank's jrk,

this works fine now. But what is that "| 0x1000000" for?
krizz is offline   Reply With Quote
Old 05-14-2023, 02:00 AM   #6
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Quote:
Originally Posted by krizz View Post
Thank's jrk,

this works fine now. But what is that "| 0x1000000" for?
Open ReaScript documentation and search for this number. You'll find plenty of examples describing what it is.
vitalker is online now   Reply With Quote
Old 05-14-2023, 04:35 AM   #7
jrk
Human being with feelings
 
Join Date: Aug 2015
Posts: 2,969
Default

It's magic. It sets a bit. Without it, the color doesn't change.
__________________
it's meant to sound like that...
jrk is offline   Reply With Quote
Old 05-14-2023, 11:29 PM   #8
krizz
Human being with feelings
 
krizz's Avatar
 
Join Date: Dec 2012
Location: Rhein-Main Germany
Posts: 31
Default

Thanks, learned something again! I'm just wondering why this crucial setting of the bit isn't given as syntax in the documentation for 'reaper.SetTakeMarker'. ;-)
krizz is offline   Reply With Quote
Old 05-14-2023, 11:47 PM   #9
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Quote:
Originally Posted by krizz View Post
Thanks, learned something again! I'm just wondering why this crucial setting of the bit isn't given as syntax in the documentation for 'reaper.SetTakeMarker'. ;-)
The documentation has many flaws and even some API functions have no any description.
vitalker is online now   Reply With Quote
Old 05-14-2023, 11:50 PM   #10
jrk
Human being with feelings
 
Join Date: Aug 2015
Posts: 2,969
Default

Indeed. The API documentation is a bit patchy.
__________________
it's meant to sound like that...
jrk 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:20 AM.


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