|
|
|
03-04-2015, 03:21 PM
|
#41
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Very very nice work !!
I will be able to propose my scripts related to this tomorrow
|
|
|
03-04-2015, 03:24 PM
|
#42
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Quote:
Originally Posted by X-Raym
Very very nice work !!
I will be able to propose my scripts related to this tomorrow
|
thank you X-Raym... This once is a new rewrite with a new engine to read the lines and display them and it was more complicated than I thought at first. Certainly I am spending more time on this than I anticipated. But I'm excited about the new subtitling framework we are going to have
|
|
|
03-06-2015, 04:08 AM
|
#43
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Bug report:
<i><u><b>Subtitles</b></u></i> doesn't work ^^ (the final italic doesn't work, but it usually works).
----
You had the idea of a multiple line Reader. can I suggest that it would understand what track to consider simply with the parent child relation ?
We only click on the parent and it consider the child as well.
This way, we could host all of our subtitles/notes in a parent group track That would be soooo handy!
Cheers!
|
|
|
03-06-2015, 04:12 AM
|
#44
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Quote:
Originally Posted by X-Raym
Bug report:
<i><u><b>Subtitles</b></u></i> doesn't work ^^ (the final italic doesn't work, but it usually works).
----
You had the idea of a multiple line Reader. can I suggest that it would understand what track to consider simply with the parent child relation ?
We only click on the parent and it consider the child as well.
This way, we could host all of our subtitles/notes in a parent group track That would be soooo handy!
Cheers!
|
Yes probably I forgot some combinations of formats.
I was trying to figure out how to specify multiple track ids.. your idea of specifying only the parent one is great
|
|
|
03-06-2015, 04:17 AM
|
#45
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Yeaah
I'm finishing to build my formatting text script, wich are not able to find if the formatting style is already applied, and update it for the font-color markup. I also made a "delete all formating" script!
What is nice is that it auto updates with your note reader even if it not playing!
EDIT: you work with format combinaison? but... there is a lot! ^^
<u><i><b> is also broken :P
|
|
|
03-06-2015, 04:32 AM
|
#46
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
I don't have any luck with font-color... does
Code:
<font-color="#CF72FD">Hello</font-color>
works for you with REAPER v5 version of the script ?
(note I will make a background color set/reset script based on item color :P)
EDIT: a suggestion for background tag,
as it is an auto-closing tag, it should be written as <background="#AAAAAA" />. So we will know it is not meant to enclose text.
|
|
|
03-06-2015, 04:44 AM
|
#47
|
Human being with feelings
Join Date: Sep 2013
Location: Belgium - Gent
Posts: 709
|
I think the right syntax is
Code:
<font color="#CF72FD">Hello</font>
/font in the end
Last edited by godly; 03-06-2015 at 04:49 AM.
|
|
|
03-06-2015, 04:48 AM
|
#48
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
the background color syntax is not standard
the font color syntax is HTML standard.
as indicated in the wikipedia https://en.wikipedia.org/wiki/SubRip
it should be <font color="color name or #code"> ... </font>
Notes reader only works with #code right now.
it also says format could be inside the line, but some implementations prefer whole-line formatting.. Notes Reader is whole-line formatting for now.
|
|
|
03-06-2015, 04:56 AM
|
#49
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Oh I see small mistakes!
It works. You will like it
not bad for not inline markup. It is way overkill for now. We can't script all process :P
--
I know for background markup, but it is stanrd in XHTML/HTML than non enclosing tags used "/". It visually indicates that we don't have to look for its matching pair
--
Can you please copy paste a working example of your actual background properties?
|
|
|
03-06-2015, 05:22 AM
|
#50
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
it's in the instructions...
just the last line should be <background="#000000"> but, ok it can be <background="#000000" /> in next version.
|
|
|
03-06-2015, 05:26 AM
|
#51
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Quote:
Originally Posted by godly
I think the right syntax is
Code:
<font color="#CF72FD">Hello</font>
/font in the end
|
Thanks godly, I didn't want to reply in the other thread since it is off topic. I'm glad you could use Notes Reader live! But please test it before using it hehe
|
|
|
03-06-2015, 05:47 AM
|
#52
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Hehe, almost the final steps!
I have a problem with HeDaSetNote function.
How do add a line to a item note ?
if i just add \n, it broke
Tell me if it works for you. For me it just broke the note.
Code:
function HeDaSetNote(item,newnote) -- HeDa - SetNote v1.0
--ref: Lua: boolean retval, string str reaper.GetSetItemState(MediaItem item, string str)
retval, s = reaper.GetSetItemState(item, "") -- get the current item's chunk
--dbug("\nChunk=" .. s .. "\n")
has_notes = s:find("<NOTES") -- has notes?
if has_notes then
-- there are notes already
chunk, note, chunk2 = s:match("(.*<NOTES\n)(.*)(\n>\nIMGRESOURCEFLAGS.*)")
newchunk = chunk .. newnote .. chunk2
--dbug(newchunk .. "\n")
else
--there are still no notes
chunk,chunk2 = s:match("(.*IID%s%d+)(.*)")
newchunk = chunk .. "\n<NOTES\n" .. newnote .. "\n>\nIMGRESOURCEFLAGS 0" .. chunk2
--dbug(newchunk .. "\n")
end
reaper.GetSetItemState(item, newchunk) -- set the new chunk with the note
end
note = reaper.ULT_GetMediaItemNote(item)
reaper.ShowConsoleMsg(note)
note = "|" .. note .. "\n<background="blabla"/>"
reaper.ShowConsoleMsg(note)
HeDaSetNote(item, note)
edit: updated with "|", but still broke at \n
EDIT: OH ok I understand. There must be a way to tell HeDaSetNote to add "|" for every break line. Any idea ? It is needed on all my text formatting script For the moment, if there is multiple line in original text item, it breaks. (or a way to format the text before going to heda set note)
EDIT/ I did it
Code:
function HeDaSetNote(item,newnote) -- HeDa - SetNote v1.0
newnote = newnote:gsub("\n", "\n|")
Last edited by X-Raym; 03-06-2015 at 06:01 AM.
|
|
|
03-06-2015, 06:03 AM
|
#53
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
sorry .. too busy this morning with other things too
yes I don't know why they add that ugly | after the \n for each line.. but it has to be done like that
Nice that you did it
|
|
|
03-06-2015, 06:24 AM
|
#54
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Don't worry, I know you have some other things to do
I succeed to add a function inside HeDaSetNote, not it check if there is no traling empty line, and it is able to rease it if any.
This means than... My scripts are finally ready, if I'm not wrong
Need to make a lot of screen capture now.
Can't wait for your Multiple Tracks Note Reader !!
|
|
|
03-06-2015, 07:49 AM
|
#55
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Notes Reader 0.7 ready for download
* v0.7 (2015-03-06)
+ multiple tracks reader, specify the parent track.
# more format combinations
# background format can be <background="#rrggbb"> or <background="#rrggbb" />
# bug note was not displayed if cursor stopped exactly at item start.
To use multiple tracks, you must group them in a folder, and specify the parent folder track as the track to read in Notes Reader
|
|
|
03-06-2015, 07:55 AM
|
#56
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Yeaaah awesome
There is one problem: markup doesn't seem to work if there is a line break...
|
|
|
03-06-2015, 07:58 AM
|
#57
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Quote:
Originally Posted by X-Raym
Yeaaah awesome
There is one problem: markup doesn't seem to work if there is a line break...
|
I don't understand. can you give an example?
|
|
|
03-06-2015, 08:08 AM
|
#58
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
I was making a screen capture
Here it is.
|
|
|
03-06-2015, 08:21 AM
|
#59
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Quote:
Originally Posted by X-Raym
|
ohh I see.
Yes. there is that limitation that format tags should be per line :/
edit: mmmmm I think I know how to solve it without too much trouble
Last edited by heda; 03-06-2015 at 08:29 AM.
|
|
|
03-06-2015, 08:29 AM
|
#60
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@heda
Yeh, manipulating string can be complicated... I can see in your code that it has be hard to do.
I hope you will find a way, or than someone could help you on this...
Cause it could really be a killer feature for your already brilliant note reader!!
Maybe LUA ? It has a lot of nice string related native function.
Well, that would be 500 lines to rewrite.
An EEL solution would be far better :P
EDIT: HAHA ! Don't tease me like that! :P
|
|
|
03-06-2015, 08:34 AM
|
#61
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
yes. Don't modify your scripts. I will find a way
hehe.. yes I'm not planning to translate this to Lua. And I use it in production in REAPER 4 so EEL is good for now. Maybe when REAPER 5 is officially released I will see...
|
|
|
03-06-2015, 08:39 AM
|
#62
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@heda
Don't, if it works in EEL, there is no reason to change!
So I'll be patient until you find a way, and then I would be able to make a nice demo of my 16 formating text scripts :P
Last edited by X-Raym; 03-06-2015 at 09:04 AM.
|
|
|
03-06-2015, 11:06 AM
|
#63
|
Human being with feelings
Join Date: Sep 2013
Location: Belgium - Gent
Posts: 709
|
HeDa, looks great,
Only thing is, everytime I want to move or resize the window, I get the Track ID prompt. What's wrong?
Can I dock the window? I'm on Reaper 4.77, propably not?
Where do I get the buttons or what actions?
Last edited by godly; 03-06-2015 at 11:27 AM.
|
|
|
03-06-2015, 02:33 PM
|
#64
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Quote:
Originally Posted by godly
HeDa, looks great,
Only thing is, everytime I want to move or resize the window, I get the Track ID prompt. What's wrong?
Can I dock the window? I'm on Reaper 4.77, propably not?
Where do I get the buttons or what actions?
|
there is a bug in REAPER 4 when moving the window will trigger mouse click. I did a trick in the code to avoid it to some extent, but only works if you move the window slowly. In REAPER 5 it doesn't happen. YOu cannot dock it in REAPER 4 either. Docking is only for the REAPER 5 version.
which buttons?
|
|
|
03-06-2015, 02:38 PM
|
#65
|
Human being with feelings
Join Date: Jan 2012
Location: Germany
Posts: 1,130
|
Quote:
Originally Posted by heda
which buttons?
|
godly is probably referring to the buttons (scripts or actions?) that X-Raym used in his GIF for formatting the text.
|
|
|
03-06-2015, 04:25 PM
|
#66
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@timothys_monster
Coming soon!
Waiting for multiline formatting support first
This gonna be great.
(good luck for heda on this!)
|
|
|
03-06-2015, 05:24 PM
|
#67
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Quote:
Originally Posted by heda
edit: mmmmm I think I know how to solve it without too much trouble
|
^^
not it is not that simple...
I have a problem with the formatting parameter of gfx_setfont
it seems it accepts a parameter as a string with ' ' but strcat doesn't seem to work with those, only with " "
I don't know what's going on. I may have to rethink all the display engine again. or leave it like that and you adapt the scripts to work by line
|
|
|
03-06-2015, 05:34 PM
|
#68
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@heda
I made a LOT of string operations with all my text items scripts. Concatenation, trim, find, character pos, replacement etc...
I already made some of these in EEL.
Verdict: it is way more easier in LUA. with have access to a lot of functions, and more, to whole documentation online about it.
So, if you think about a rewrite... go for LUA :P
But of course, don't rush into it. You may find a solution after a good night sleep!
EDIT: You can still tell us precisely (with line number) what you are trying to do and why. You may find help here
Last edited by X-Raym; 03-06-2015 at 05:42 PM.
|
|
|
03-06-2015, 05:45 PM
|
#69
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
yes I'm frustrated because I can see how I would do it in Lua
Maybe we could leave a better formatting support, including inside line formatting, for a Lua REAPER 5 version in the future and leave this one as it is for now.
Unless I get a new idea tomorrow after a good sleep
|
|
|
03-07-2015, 02:03 AM
|
#70
|
Human being with feelings
Join Date: Sep 2013
Location: Belgium - Gent
Posts: 709
|
Quote:
Originally Posted by heda
there is a bug in REAPER 4 when moving the window will trigger mouse click. I did a trick in the code to avoid it to some extent, but only works if you move the window slowly. In REAPER 5 it doesn't happen. YOu cannot dock it in REAPER 4 either. Docking is only for the REAPER 5 version.
which buttons?
|
Thx, i thought so.
The bug is only once you open a note.
Indeed the buttons from the gif in the toolbar.
|
|
|
03-07-2015, 05:48 AM
|
#71
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@heda
If you know how to do it in Lua, and if it will allows multiple lines and inline formatting... It's probably the way to go!
You may take less time rewritting it than finding a native solution. Or/and probably avoid a lot of frustration and have much more satisfaction! When I transcribe my eel emplate script to lua, the key was to work in block, and then go deeper and deeper inside the loops. It allows to avoid more bugs than rewritting it in line order, cause you can verify if the loops work at every steps.
You have all my support, whatever solution you find/choose!
|
|
|
03-07-2015, 07:21 AM
|
#72
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@godly
You can find it here:
Scripts (LUA): Text Items Formatting Actions (vavrious)
@heda
So, I release my scripts today, so can use start to use it
All the scripts have been updated. You may find them very useful for testing the Note Reader!
|
|
|
03-07-2015, 12:41 PM
|
#73
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Cool!
I don't know how to import the toolbar reapermenu file
It says the file doesn't have menu for toolbar
|
|
|
03-07-2015, 01:24 PM
|
#74
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@heda
You have to be on the right toolbar number first. It is number 15.
I don't know if the button will be linked to the script. Sure they have to been imported before the menu importation, but this may not be enough. You will tell me :P
|
|
|
03-07-2015, 01:31 PM
|
#75
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Quote:
Originally Posted by X-Raym
@heda
You have to be on the right toolbar number first. It is number 15.
I don't know if the button will be linked to the script. Sure they have to been imported before the menu importation, but this may not be enough. You will tell me :P
|
It doesn't import the toolbar even being in the toolbar 15
But you are right, the actions command id's won't match because they are scripts. so there is no way to import the toolbar. We have to create the buttons 1 by one.
|
|
|
03-07-2015, 06:29 PM
|
#76
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@heda
That is sad really. Sharing toolbars must be simpler.
I should write a feature request, but I donlt even what the trick would be to make it works with action scripts. It is not
thought for script support.
Any news from note reader rewritting ?
|
|
|
03-08-2015, 02:07 AM
|
#77
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Sleeping is good
Try 0.8
* v0.8 (2015-03-08)
+ SHIFT+click: Enable/Disable reading from parent track
# better multiline formatting
at least it will work better, but I think it is all a mess. But if it works for most cases then I will leave it for now until REAPER 5 is released and we can have a better Lua version.
|
|
|
03-08-2015, 03:00 AM
|
#78
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
That's
better, obviously, I hope it was not too much pain!
As you said, there is still some things to improve. (screenshot with bold, then u, then font-color). (I didn't test all the combination)
Anyway, this has been an incredible work so far, thank you for this great tool!
Ah REAPER 5... I can't wait for an official release, and starting to make my script work on my main REAPER.
We can't export our toolbars with scripts, it is really long to import what we have done in another version of REAPER. I will definitely write a feature request for this.
|
|
|
03-08-2015, 03:10 AM
|
#79
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
the way I have coded it for the font color is that it should be always the outer tag. and all the italic, bold and underline should be inside the font tags.
anyway I didn't want to end up coding a full HTML browser inside REAPER. And not in EEL for sure
I'll vote for that FR. However I don't know how they could do it if the actions get that random ID each time you add them. I don't know why they do that but it doesn't make sense to me to assign a random string to each script. At least the string should be always the same for each script file name. Like a hash of the filename string.
|
|
|
03-08-2015, 03:51 AM
|
#80
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@heda
Don't worry, there is just <u>, <i>, <b>, <font color> and <background> to care about
and the last one is not SRt standards, it is from you haha
I write my feature request here:
Better Scripts Management: Importation, Folders, ID, Deletion
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 11:30 PM.
|