Old 03-07-2015, 10:25 AM   #1
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default Scripts (LUA): Create Text Items Actions (various)

Hi!

Empty items are the forgotten items in REAPER. They don't even have any mouse modifier to allow creation via click-dragging, and there is no way to "glue" them together.

SWS extensions have the great Note window for empty text editing.
And now we can format text items easily. And thanks to heda, we can import files, such as TXT and SRT, and convert it to text items. We can export them as subtitles SRT as well.
And with the Note Reader, still from HeDa, it is become easier than ever to work on this bad boys.

Will all that power, we needed other ways to create empty items.
Lets me introduce you... my work Text Items Creation scripts! :P

By the way, "empty items with notes", that sounds very bad.
That's why I symply call them Text Items!

Create one text item on first selected track from selected items notes
If you selected only text items, you can use this with the delete selected items action to make it work as a Glue Text Items custom actions!

Create one text item with dialog dash on first selected track from selected items notes

This will be very useful for subtitling!

Create text items on first selected track from selected items notes
The idea of this script is to extract notes from items on put it on other track as text items, preserving source items colors.

Demo of the three above:



Create text items on first selected track from selected takes name

In audio/video, I name all my audio file with the "dialog line" they match. So this script is probably the most useful of all for me! Once again, original color is preserved.




Create text items on first selected track from regions
Last but not least, the ability to create empty items from region names. It may be useful in somes cases!



Update (2015-03-08): X-Raym_Merge overlapping similar text items on selected tracks



Update (2015-03-12): X-Raym_Merge consecutive and short text items on selected tracks by pair && X-Raym_Merge consecutive and short text items on selected tracks by pair with color
Useful for subtitling!


EDIT: 2015-07-08

Two new scripts:
  • X-Raym_Merge selected text items notes.lua
  • X-Raym_Merge selected text items notes with dialog dash.lua





EDIT: 2016-01-14
  • Create text items on first selected track from markers


Download:

EDIT: 2016-04-01
Two brand new scripts for game audio rendering, using Heda's Regions from text Items scripts.
  • Create text items on first selected track from selected items groups

  • Create one text item on first selected track from selected items

and browse for Text Items and Item Notes/Creation !

Last edited by X-Raym; 04-01-2016 at 09:23 AM. Reason: BAD TITLE!
X-Raym is offline   Reply With Quote
Old 03-07-2015, 12:05 PM   #2
nolman
Human being with feelings
 
nolman's Avatar
 
Join Date: Feb 2008
Location: ghent, Belgium
Posts: 311
Default

Great work!
nolman is offline   Reply With Quote
Old 03-08-2015, 03:04 AM   #3
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

@nolman
It was pretty hard to do, so really, thank you a lot for your comment

Check above, I just finished to debug my Merge overlapping similar text items on selected tracks. You will like it, especially if you use Create text items on first selected track from selected takes name with intense dialog audio comping, as I love to do :P
X-Raym is offline   Reply With Quote
Old 03-08-2015, 04:35 AM   #4
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,602
Default

These will be very useful, thanks!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 03-08-2015, 07:59 AM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

@musicbynumbers
Haha! I'm glad to see I will not be the only one to use it

---

Note: I just notice than using empty notes on group track with faint peak activated is very powerful for subtitle editing!!
See screenshot for the Create text items on first selected track from selected takes name script!
X-Raym is offline   Reply With Quote
Old 03-08-2015, 05:33 PM   #6
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,602
Default

awesome!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 03-11-2015, 02:25 PM   #7
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default v1.1.1 updates

All these scripts have been updated so that the item restoration is better (or actually work), and that it works ad supposed (on first selected track, and not on last touched as it was).

Code:
 * Changelog:
 * v1.1.1 (2015-03-11)
    # Better item selection restoration
    # First selected track as last touched
I also added the script Create one text item on first selected track from last selected items notes because I needed it :P
X-Raym is offline   Reply With Quote
Old 03-12-2015, 05:56 AM   #8
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

Update:

Two new scripts for subtitling!
The idea is to merge pair of subtitles defined as consecutive and short (values determine by user inputs).
It adds dialog dash for the non colored version, but not for the color one. It supposed than different characters have different colors.
It works by pair to avoid more than three lines subitles.
  • X-Raym_Merge consecutive and short text items on selected tracks by pair with dialog dash
  • X-Raym_Merge consecutive and short text items on selected tracks by pair with color
Demo in first post.


Advice: Use the color version first, then the non color version.
X-Raym is offline   Reply With Quote
Old 03-24-2015, 12:39 PM   #9
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 760
Default

Hey X-Raym,

as I've seen that you can extract item notes' content with LUA...

Do you think it's possible to get item notes of selected items and convert them to take name? But by using EEL (need it in R4)?
timothys_monster is offline   Reply With Quote
Old 03-24-2015, 12:51 PM   #10
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

It guess yes, but I choose Lua for the ease of strings manipulation and I choose REAPER 5 especially for the functions exported by extensions support.
In SWS for R5, getting the item note is really easy, it is just one function.
In R4 I don't remember exactly, but it was more complicated.
In R5 it would be more easy to code. The functions are already ready :P
X-Raym is offline   Reply With Quote
Old 03-24-2015, 12:58 PM   #11
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 760
Default

Quote:
Originally Posted by X-Raym View Post
It guess yes, but I choose Lua for the ease of strings manipulation and I choose REAPER 5 especially for the functions exported by extensions support.
In SWS for R5, getting the item note is really easy, it is just one function.
In R4 I don't remember exactly, but it was more complicated.
In R5 it would be more easy to code. The functions are already ready :P
Cool! Well, may I request scripting this converter for R5 then?

It would really help me for one project. And I would open that in R5 then, apply the conversion and after that switch back to R4.
timothys_monster is offline   Reply With Quote
Old 03-24-2015, 01:08 PM   #12
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

Yes you can !

It's online :P
look in text items/creation folder!
X-Raym is offline   Reply With Quote
Old 03-24-2015, 01:20 PM   #13
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 760
Default

I see - you already did one.

Maybe there's a misunderstanding though. You were leading me to this script, right?

X-Raym_Create text items on first selected track from selected items notes.lua

I was acutally looking for a script that can convert the item notes to take names.

Is there something like that already in your collection as well?
timothys_monster is offline   Reply With Quote
Old 03-24-2015, 01:42 PM   #14
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

sorry I was in a hurry, I didn't paste the script name :P
the script is called:
  • X-Raym_Convert selected item notes to take name.lua
X-Raym is offline   Reply With Quote
Old 03-24-2015, 01:51 PM   #15
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 760
Default

I get that error:

Code:
...ipts\X-Raym_Convert selected item notes to take name.lua:70: 'reaper.ULT_GetMediaItemNote' is unknown
timothys_monster is offline   Reply With Quote
Old 03-24-2015, 02:02 PM   #16
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

Do you have last SWS extension installed ?
it works for me!


Last edited by X-Raym; 03-24-2015 at 02:09 PM.
X-Raym is offline   Reply With Quote
Old 03-24-2015, 02:11 PM   #17
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 760
Default

Sorry didn't think about installing the latest SWS beta

Thanks a lot for your quick and efficient work, X-Raym.

You, once again, definitely made my day!!!
timothys_monster is offline   Reply With Quote
Old 03-24-2015, 02:28 PM   #18
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 760
Default

Sorry, but here I am again

I notced that your script copied item notes to take name.

What I was initially looking for was "moving" the note's content to the take name.
So now the notes still persist. That wouldn't be a problem if there existed an action called "Item: remove item note" or something like that. But it ain't
timothys_monster is offline   Reply With Quote
Old 03-24-2015, 03:23 PM   #19
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

Actually there is! i know because I made it
Look for 'delete notes of selected items' in ly scripts and make a macro with the two scripts :P

Tomorrow I will make it multiline friendly and create the opposite action.

Last edited by X-Raym; 03-24-2015 at 03:33 PM.
X-Raym is offline   Reply With Quote
Old 03-24-2015, 03:53 PM   #20
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 760
Default

Can't help but I always get that error:

Code:
J:\Reaper 5\Scripts\X-Raym_Delete selected items notes.lua:4: unexpected symbol near '<'
EDIT
Just to make sure: I'm trying to delete single line notes only.

Last edited by timothys_monster; 03-24-2015 at 04:01 PM.
timothys_monster is offline   Reply With Quote
Old 03-24-2015, 04:10 PM   #21
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

Hmmm...
I don't really understand your error cause there is no "<" at line 4 ^^

Please be sure to have last versions of the script, of REAPER pre and SWS.

I just made a try and it works just as in this screenshot.

--
We will succeed to make all work flawlessly :P
X-Raym is offline   Reply With Quote
Old 03-24-2015, 04:29 PM   #22
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 760
Default

I feel so ashamed

I've downloaded the script from your GitHub page and not from the zip-file.

Now everything works as intended and I thank you very much for creating it!!!

Would it not have been so late over here, I thing I would not have cluttered this thread so much...
timothys_monster is offline   Reply With Quote
Old 03-24-2015, 04:44 PM   #23
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

Quote:
I feel so ashamed
Booh!!

Hmm... that's weird because the zip is directly generated from GitHub (there is no different version of my scripts online).

I just updated the note to take name scripts so that it replace break lines by spaces, if you need it.
X-Raym is offline   Reply With Quote
Old 03-25-2015, 02:47 AM   #24
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 760
Default

Thanks for the update!

Don't know what happened there. The lua-file I downloaded directly from GitHub had a size of 54 kB. The original file from the ZIP is only 4 kB...
timothys_monster is offline   Reply With Quote
Old 03-25-2015, 03:54 AM   #25
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

You are welcome !

The good way to download a file from GitHub is to go to the page of the file, click on RAW button and then File -> Save.
X-Raym is offline   Reply With Quote
Old 03-25-2015, 05:52 AM   #26
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

@Timo

Based on the previous script, I just created three other new scripts that you may find useful.
  • X-Raym_Convert selected takes name to item notes.lua
  • X-Raym_Swap selected item notes and take name.lua
  • X-Raym_Swap selected item notes and take name preserving break lines.lua
The last one will allow to use SWS label processor for item notes!


I put these on the thread:
Scripts (LUA): Text Items Formatting Actions (various)
X-Raym is offline   Reply With Quote
Old 04-06-2015, 03:02 AM   #27
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default Select items based on color

Hi !

All my items creation actions output text items on a single track.
This is for two main reason:
  • subtitling is usually one track (to avoid overlapping) (multi tracks subtitles may be more convenient for different version of the subtitles, such as language variation, framerate variation, or non-hearing person variations).
  • I like to work on this on parent track of audio track (if the theme handle item color blending mode with faint peak).
But, you may want to select all items related to one character (the narrator for example) to apply formatting (such as italic) or move it to another track.


So, I made a script for this :
  • X-Raym_Select items with same color as mouse context (or first selected item) on selected tracks.lua
It will allow you to select items on selected tracks based on thing (track mcp, tcp, item, take, region, marker) under mouse (or if any of this, it will consider first selected item active take).

Take a look at this post to see how it works in details


Zog !
X-Raym is offline   Reply With Quote
Old 05-25-2015, 10:46 AM   #28
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default Updates

X-Raym_Merge overlapping similar text items on selected tracks.lua is now X-Raym_Merge overlapping and consecutive similar text items on selected tracks.lua (consecutive is based on user input).

X-Raym_Create one text item on first selected track from selected items notes.lua and X-Raym_Create one text item on first selected track from last selected items notes.lua handle item colors.
X-Raym is offline   Reply With Quote
Old 07-08-2015, 06:34 AM   #29
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

Two new scripts for more handy text items notes editing:

Two new scripts:
  • X-Raym_Merge selected text items notes.lua
  • X-Raym_Merge selected text items notes with dialog dash.lua



I used to make this with a custom action involving X-Raym_Create one text item on first selected track from selected items notes.lua and X-Raym_Create one text item with dialog dash on first selected track from selected items notes.lua but these new actions are for more powerful as their work on multi tracks, and doesn't have downside of the custom actions (edit cursor and view were not restore after the deletion).
X-Raym is offline   Reply With Quote
Old 07-29-2015, 07:13 AM   #30
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

Update on almost all Text items scripts:

Code:
 * v1.x (2015-07-29)
    # Better Set notes
Execution time is multiplied by two or more, according to my measure :P
X-Raym is offline   Reply With Quote
Old 01-14-2016, 04:03 AM   #31
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default New script

  • Create text items on first selected track from markers


Useful for passing from simple items to Heda's Show/Hide Markers using Track's empty items with notes, for example !

default length is customization witin the script. Enjoy !
X-Raym is offline   Reply With Quote
Old 01-22-2016, 08:15 AM   #32
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

All "Create text items" script just get an update !

Item creation should be something between 5-10 time faster.

Now, even using them on full movie long subtitling works in an instant :P

Here is the new function that didn't use Time Selection and Insert Empty Item action (way simpler)
X-Raym is offline   Reply With Quote
Old 01-22-2016, 08:44 AM   #33
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,602
Default

nice!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 01-22-2016, 09:42 AM   #34
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,977
Default

Quote:
Originally Posted by X-Raym View Post
Here is the new function that didn't use Time Selection and Insert Empty Item action (way simpler)
Excellent. I always thought there had to be a better way to create them.
Good job.
Thank you for always linking to my scripts too, here and all over the forum
__________________
HeDaScripts for REAPER
heda is offline   Reply With Quote
Old 01-22-2016, 10:27 AM   #35
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

@musicbynumbers
Thanks :P

@heda
I was in "explorer" mod in the API, I didn't knew at all that it could work,
because if you just use AddMediaItem, it does absolutely nothing.

Also, if you add take and pcm you can import audio,
I didn't find how to create MIDI with this method yet but sure,
it open new possibilities !

Quote:
Thank you for always linking to my scripts too, here and all over the forum
and also by emails for all people who contact me for regions based scripts haha

Seriously, the Regions Manager, the Note Reader and the stunning Loudness Graph... These are masterpieces.
Hope to see you around more often ! Cheers man !
X-Raym is offline   Reply With Quote
Old 04-01-2016, 09:25 AM   #36
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default New Releases

New Scripts !
  • Create text items on first selected track from selected items groups



  • Create one text item on first selected track from selected items

These are meant to be used with Heda's Create Regions from text Items scripts.
They were design for Game Audio, whee you can have a lot of groups of items on a project and have to render them individually thanks to the region manager.

Enjoy !

X-Raym is offline   Reply With Quote
Old 04-02-2016, 02:28 AM   #37
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,602
Default

Very useful thanks!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 06-09-2016, 02:17 PM   #38
cmacsound
Human being with feelings
 
cmacsound's Avatar
 
Join Date: Jan 2012
Location: New York City
Posts: 33
Default

Thank you for the great scripts!

Any chance I could request a script to copy the item notes from a text item to other media items? I've imported some .srt text items with HeDa's .srt scripts and wish to label media items on tracks underneath with the text that I've imported from the .srt file.

Cheers!
cmacsound is offline   Reply With Quote
Old 06-09-2016, 02:39 PM   #39
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,583
Default

@cmacsound

Thanks

So what you need is not just a copy paste item notes, it is an apply selected item notes on source track (this could be first track, or track unders mouse for eg) to selected items notes on the others tracks by columns ?
How many items are you talking about ?
Is that something you will need to do often ?
(a simple copy paste would force you to do copy pasting for every items).
X-Raym is offline   Reply With Quote
Old 06-09-2016, 10:34 PM   #40
cmacsound
Human being with feelings
 
cmacsound's Avatar
 
Join Date: Jan 2012
Location: New York City
Posts: 33
Default

Hey X-Raym, yes!

For example, I have a 2 hour long audio file split into 750+ items based on a newly created .srt text. I now wish all the audio media items have the same embedded text notes as the .srt file's items. From what I've found so far, there appears to be no quick way to copy many notes info from empty text items to other media items of the same length or duration...

So yes, I can see myself using this feature very often indeed: If I can make notes for audio media items from .srt files, then I can convert item notes to take names using your script. THEN, if/when I need to collaborate with others who use other DAWs (which happens frequently), I can easily give them edited media items that have the same embedded info as the item name, and everyone can be on the same page. (And I'd use AATranslator for such a task).
cmacsound 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 11:43 AM.


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