Old 11-06-2018, 01:56 AM   #1
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default ReaTrak on Linux

It would be interesting to know if ReaTrak works on Linux.
ReaTrak uses colored regions for song sections,
I had to put a section in the script to detect Win or Mac OS as to what colors it uses,
I think it was the r,g,b was a different way around in Mac,
as it needs to match sections of the audio csv to the regions.
https://forum.cockos.com/showthread.php?t=212645


Code:
  local os_type = reaper.GetOS() --Find out whether program is running on a Windows or Mac or Linux

  --Color code table Windows                        B  G  R
  local anywhere_color = 19340004 -----------------27 1A E4 the color to signify use anywhere 0x01271AE4
  local count_in_color = 29393151 -----------------C0 80 FF
  local intro_post_fill_color = 28184951 ----------AE 11 77
  local intro_color = 31987359 --------------------E8 16 9F
  local intro_fill_color = 32342199 ---------------ED 80 B7
  local verse_post_fill_color = 28190481 ----------AE 27 11
  local verse_color = 32208439 --------------------EB 76 37
  local verse_fill_color = 32620145 ---------------F1 BE 71
  local verse_ending_color = 32886935 -------------FE D0 97
  local bridge_post_fill_color = 18115022 ---------14 69 CE
  local bridge_color = 19957226 -------------------30 85 EA
  local bridge_fill_color = 23373039 --------------64 A4 EF
  local pre_chorus_post_fill_color = 18133966 -----14 B3 CE
  local pre_chorus_color = 19976426 ---------------30 D0 EA
  local pre_chorus_fill_color = 26732532 ----------97 E7 F4
  local chorus_post_fill_color = 19362827 ---------27 74 0B
  local chorus_color = 20688401 -------------------3B AE 11
  local chorus_fill_color = 24898896 --------------7B ED 50
  local chorus_ending_color = 28769950 ------------B6 FE 9E
  local drum_riff_color = 17897331 ----------------11 17 73
  local hold_color = 29343679 ---------------------BF BF BF
  local shot_color = 25132927 ---------------------7F 7F 7F
  local rest_color = 16777216 ---------------------00 00 00

  if os_type ~= "Win32" and os_type ~= "Win64" then
    --color code table Mac                          R  G  B
    anywhere_color = 31726119 ---------------------E4 1A 27 the color to signify use anywhere 0x01271AE4
    count_in_color = 33521856 ---------------------FF 80 C0
    intro_post_fill_color = 24580526 --------------77 11 AE
    intro_color = 27203304 ------------------------9F 16 E8
    intro_fill_color = 28803309 -------------------B7 80 ED
    verse_post_fill_color = 17901486 --------------11 27 AE
    verse_color = 20412139 ------------------------37 76 EB
    verse_fill_color = 24231665 -------------------71 BE F1
    verse_ending_color = 26726654 -----------------97 D0 FE
    bridge_post_fill_color = 30304532 -------------CE 69 14
    bridge_color = 32146736 -----------------------EA 85 30
    bridge_fill_color = 32482404 ------------------EF A4 64
    pre_chorus_post_fill_color = 30323476 ---------CE B3 14
    pre_chorus_color = 32165936 -------------------EA D0 30
    pre_chorus_fill_color = 32827287 --------------F4 E7 97
    chorus_post_fill_color = 17527847 -------------0B 74 27
    chorus_color = 17935931 -----------------------11 AE 3B
    chorus_fill_color = 22080891 ------------------50 ED 7B
    chorus_ending_color = 27197110 ----------------9E FE B6
    drum_riff_color = 24319761 --------------------73 17 11
    hold_color = 29343679 -------------------------BF BF BF
    shot_color = 25132927 -------------------------7F 7F 7F
    rest_color = 16777216 -------------------------00 00 00
  end
MusoBob is offline   Reply With Quote
Old 11-06-2018, 06:54 AM   #2
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

It runs and the colors look right, but your font sizes are really big.

I see that you're using a custom version of the GUI library and classes, so you probably didn't get the font sizing fix I added... maybe a couple of months ago?

Is there a particular reason you're using a custom library? I don't see anything actually different, and as we see here it isolates your script from any bug fixes I put out.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 11-06-2018, 05:38 PM   #3
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Thanks for trying, I wasn't sure if the wav section colors would match the region colors when it fits the track.
I was trying to make it self contained without having to install other scripts, easy for new users to Reaper that won't know what to do with "Please run 'Set Lokasenna_GUI v2 library path.lua" it's ok for long term users that are familiar with all this. I don't want have to update the gui script for new changes in the GUI library that may cause errors. Maybe it'll be fine ??
From MIDI Guitar Tool:
Quote:
There are a few minor annoyances in the GUI display that I can fix by upgrading to a newer version of Lokasenna's library. In particular is the caption for the "Use Strings" check boxes. The function calls in the new GUI library have changed, and it would require changing quite a bit of my code to align it with the new library. So at the moment I am just living with the problems.
This is the latest GUI Library & ReaTrak gui.lua:
ReaTrak_Classes.zip



I will try and get a damn small Linux in a virtualbox to test things, I got a hacintosh on an old pc to try the Mac, man they change that all the time, first all the cats then the mountain ranges now it's deserts I think, and each one something don't work anymore and "Sorry you need this week's Mac to run this app" !! you have a Win95 compatibility mode in Win10.





...
MusoBob is offline   Reply With Quote
Old 11-06-2018, 05:53 PM   #4
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Can't get this to embed, but...

https://dl.dropboxusercontent.com/s/...ck%20linux.png

- Using your own older version of the GUI will keep things stable for you and your users, but then you're going to be in charge of fixing any bugs that crop up even if I've already found them on my side of things.

- The whole point of having my GUI on ReaPack is so that scripters can largely forget about it. I try really hard not to make any breaking changes on there specifically for that reason.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 11-06-2018, 08:24 PM   #5
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

This is set to uses the common GUI Library.

ReaTrak gui.lua


So if I get them to install ReaPack along with SWS,

then when ReaTrak gui.lau is run and if the script ask "Please run 'Set Lokasenna_GUI v2 library path.lua"
can I get it to

commandID1 = reaper.NamedCommandLookup("_RS1c6ad1164e1d29bb4b1f 2c1acf82f5853ce77875")
reaper.Main_OnCommand(commandID1, 0) --Script: Set Lokasenna_GUI v2 library

if not found run > ReaPack > get > Lokasenna's GUI library v2 for Lua > install

(open link https://reapack.com/ if no ReaPack found)

commandID1 = reaper.NamedCommandLookup("_RS1c6ad1164e1d29bb4b1f 2c1acf82f5853ce77875")
reaper.Main_OnCommand(commandID1, 0) --Script: Set Lokasenna_GUI v2 library



continue gui script...


????

EDIT: I would have to create an offline installer for the GUI Library if Reaper is on an offline machine. So the default location where ReaPack installs is REAPER\Scripts\ReaTeam Scripts\Development\Lokasenna_GUI v2\Library ??
So if I put it in the Scripts\ReaTrak folder and the ReaTrak gui.lua will install it from there to it's location if not found ??
Is there a Linux SWS pkg ??

Last edited by MusoBob; 11-07-2018 at 02:09 AM.
MusoBob is offline   Reply With Quote
Old 11-07-2018, 09:15 AM   #6
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

- NamedCommandLookup won't work like that AFAIK, because the ID string is generated when you register a script in the action list.

- ReaPack doesn't have a scriptable way to install packages yet.

- For an offline installer, you could just grab the current version of the GUI every time you update the script and bundle it in. In that case, since you'd know the exact path of "Set Lokasenna_GUI v2 path.lua" you could certainly run it from a script.

- There's a Linux SWS file on Landoleet.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 11-07-2018, 12:27 PM   #7
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
- NamedCommandLookup won't work like that AFAIK, because the ID string is generated when you register a script in the action list.

That's assuming it was installed by ReaPack but "Set Lokasenna_GUI v2 path.lua" hadn't been run yet. Does it just generate the ID from the actual name ? I hope so as the scripts I have use that method to run scripts from within scripts.


EDIT:So are the fonts the correct size now using the latest main GUI library ??


...

Last edited by MusoBob; 11-07-2018 at 02:44 PM.
MusoBob is offline   Reply With Quote
Old 11-07-2018, 03:42 PM   #8
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

- As far as I know the script IDs are a just a randomly generated GUID. I wouldn't rely on them.

- Fonts are good, though "ReaTrack Sections" and the "ReaTraK" logo get cut off by the tab bar - make sure they're in front (lower z) of the tabs, and maybe consider pushing all of the window content down maybe 8px.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 11-07-2018, 03:54 PM   #9
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

The command ID is based on the script's path since v5.1. As long as the script is installed at the same location (relative to the resource path if inside) – which ReaPack ensures on all operating systems – the command ID will be the same.

Quote:
v5.1 - November 15 2015
+ ReaScript: use deterministic command ID string when adding scripts as actions
cfillion is offline   Reply With Quote
Old 11-07-2018, 04:10 PM   #10
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

I think if you have more than one of the scripts with the same name it will be different, but these are both installed on different machines:


MusoBob is offline   Reply With Quote
Old 11-07-2018, 04:13 PM   #11
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
Originally Posted by cfillion View Post
The command ID is based on the script's path since v5.1. As long as the script is installed at the same location (relative to the resource path if inside) – which ReaPack ensures on all operating systems – the command ID will be the same.

Thanks for confirming I was getting worried there !
MusoBob is offline   Reply With Quote
Old 11-07-2018, 05:56 PM   #12
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
Originally Posted by Lokasenna View Post
- --- Fonts are good, though "ReaTrack Sections" and the "ReaTraK" logo get cut off by the tab bar - make sure they're in front (lower z) of the tabs, and maybe consider pushing all of the window content down maybe 8px.

Yea the Win one was out also, I remembered you told me about shifting all elements with a

x1 = 0
y1 = 8
so lucky I had that in, and 8 did it lol.



Last edited by MusoBob; 11-07-2018 at 06:07 PM.
MusoBob 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:56 AM.


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