Old 04-29-2019, 04:00 PM   #1
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,971
Default Scripts: Web Interface Lyrics

Hi all,

So I just released for free a web remote/Interface lyrics viewer (or any kind of text anyway, lyrics is just the main purpose), based on Lyrics track text items OR based on region SWS subtitles.

You have to run one or the other script assocated with it to push "lyrics" info to the web remote, called X-Raym_Lyrics.html. As it is in Reapack, all should be downloaded at the right place already.
  • X-Raym_Convert Lyrics track items notes for dedicated web browser interface.lua
This works with text items and a track named Lyrics. Case unsensitive.



  • X-Raym_Convert region subtitles for dedicated web browser interface.lua



It is really basic but do the job. It is more a demonstration purpose about how to pass info from REAPER to web interface in "real time" (still limited by reascript rate of course) than a web interface meant to be perfect etc.

But I included a TextFIt JS script to the web interface so the text fit the viewport nicely.

Feel free to mod it to your own needs.

Please consider making a donation if you like it. From start dev to release, it took about 5 hours to make.

Cheers !

EDIT/ and thanks cfillion for assistance about the distribution!

EDIT:

added X-Raym_Convert region names for dedicated web browser interface.lua

Last edited by X-Raym; 04-30-2019 at 05:30 AM.
X-Raym is offline   Reply With Quote
Old 04-29-2019, 11:17 PM   #2
godly
Human being with feelings
 
godly's Avatar
 
Join Date: Sep 2013
Location: Belgium - Gent
Posts: 687
Default

Thank you for this.
It's really helpful.
I will donate my part.
godly is offline   Reply With Quote
Old 04-29-2019, 11:20 PM   #3
godly
Human being with feelings
 
godly's Avatar
 
Join Date: Sep 2013
Location: Belgium - Gent
Posts: 687
Default

So where can we try it?
godly is offline   Reply With Quote
Old 04-30-2019, 12:24 AM   #4
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 5,526
Default

ReaTeam Repo I think
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 04-30-2019, 01:55 AM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,971
Default

It's in my default Reapack repo.


So if you have Reapack installed then you will only need to
Extension-> Reapack -> Synchronize package.


Then you run one of the Lua script listed above,


And you set a Web interface in Options -> Preferences with the X-Raym_Lyrics.html file.


Then it should be good!
X-Raym is offline   Reply With Quote
Old 04-30-2019, 03:21 AM   #6
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,732
Default

It's great!

Any suggestion, maybe the interface should display/calculate the overall latency so we can move item forward in relation to be in sync?
Reno.thestraws is online now   Reply With Quote
Old 04-30-2019, 03:53 AM   #7
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,971
Default

@Reno
Intersting idea,
Calculating real latency seems complex BUT we can apply a fix offset for play cursor pos at about 1/32 seconds which is approx the rate of a background script.


Try this:


replace


Code:
cur_pos = reaper.GetPlayPosition()

by


Code:
cur_pos = reaper.GetPlayPosition() + 1/32

So that if interface is in Play, then it look ahead 1/32 second in front of play cursor instead of directly under it.



It's surely not enough, other factor will influence latency (the interface itself refresh only every 10ms) (it could be set to 1 but that seems complete overkill). So the best way is to manually find the right offset. Need testing, but as this latency isn't fixed it can be a bit tricky.
X-Raym is offline   Reply With Quote
Old 04-30-2019, 05:31 AM   #8
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,971
Default

Just added a region names version,
as this was basically just few variable name to change.
X-Raym is offline   Reply With Quote
Old 05-01-2019, 04:52 AM   #9
lachinhan
Human being with feelings
 
lachinhan's Avatar
 
Join Date: Nov 2014
Location: Can Tho - Viet Nam
Posts: 127
Default

Quote:
Originally Posted by X-Raym View Post
It's in my default Reapack repo.


So if you have Reapack installed then you will only need to
Extension-> Reapack -> Synchronize package.


Then you run one of the Lua script listed above,


And you set a Web interface in Options -> Preferences with the X-Raym_Lyrics.html file.


Then it should be good!
Hi X-Raym!
I still can't find these two useful scripts in the action list
Thank you
__________________
NK Recording Studio
Email: lachinhan@gmail.com or admin@thuamninhkieu.com
Website:nkpro.top
lachinhan is offline   Reply With Quote
Old 05-01-2019, 07:07 AM   #10
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 2,727
Default

Quote:
Originally Posted by lachinhan View Post
I still can't find these two useful scripts in the action list
Did you install them from Extensions > ReaPack > Browse packages?

cfillion is offline   Reply With Quote
Old 05-01-2019, 08:14 PM   #11
lachinhan
Human being with feelings
 
lachinhan's Avatar
 
Join Date: Nov 2014
Location: Can Tho - Viet Nam
Posts: 127
Default

Quote:
Originally Posted by cfillion View Post
Did you install them from Extensions > ReaPack > Browse packages?


Oh thank you. I forgot to choose the option "When Synchornizing", so I updated and didn't see anything
__________________
NK Recording Studio
Email: lachinhan@gmail.com or admin@thuamninhkieu.com
Website:nkpro.top
lachinhan is offline   Reply With Quote
Old 05-01-2019, 08:56 PM   #12
lachinhan
Human being with feelings
 
lachinhan's Avatar
 
Join Date: Nov 2014
Location: Can Tho - Viet Nam
Posts: 127
Default Thank you

Dear X-Raym!

I think we need two more features
- Fullscreen when opening the browser (I'm using iPad Sarafi), Jon's WRB2 is doing this well
- Show the lyrics waiting just like Notes Reader of Heda

Your ideas and sharing about this script are really nice and helpful. Thank you very much again
__________________
NK Recording Studio
Email: lachinhan@gmail.com or admin@thuamninhkieu.com
Website:nkpro.top
lachinhan is offline   Reply With Quote
Old 05-01-2019, 10:49 PM   #13
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,971
Default

@lachinhan
Hi,
-fullscreen: can yous show me a screenshot of that issue ?
Scaling lines of text or even multiline of text is a bit more com complex than 'blocks' especially on vertical axes but maybe I can see what would need to be updated.
-I see. its indeed how its done in karaoke software too. This would require to mod the scripts AND the web interface. I have high priority job to do for now so I invite any moder to take a shot on this. Maybe a progress bar like in heda note could be added too, but it will require even more modding


my contribution was mostly bringing the basis for future modders :P



PS: many thx for your donation



@Reno
Was the offset trick a good one ?
X-Raym 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 05:06 AM.


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