Old 02-25-2015, 10:40 AM   #1
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,099
Default EEL script: Txt file to empty items with notes

as requested
it can be a time saver if you have the lyrics in a txt file
you must manually do the timing after importing the txt but it can be quick if you already have the items created.
tip: Using ripple edit to move items.



Download from: HeDaScripts Manager

Code:
 * Description: Creates empty items with notes from the lines in a txt file.
 * Instructions: 
 Create and select a track where the items will be created. 
 Set the cursor position to where you want to insert the items
 Run the script
 Select a txt file containing lyrics 
 Set the time in seconds per character and separator lines if any.
 If you define a time selection, you won't be prompted for timing settings, and the text items will fit the time selection. 
/**
 * Change log:
 * v0.2 (2015-03-07)
	+ if there is a time selection it fits the import length to time selection
 
 * v0.1 (2015-02-25)
	+ configurable time length per character and separator lines

 */
__________________
HeDaScripts for REAPER | VIP Donations

Last edited by heda; 11-27-2016 at 02:23 PM. Reason: link update
heda is offline   Reply With Quote
Old 02-25-2015, 10:45 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 4,039
Default

There is definitely a good idea here.

The timecode may not fit with the actual timecode of the recorded voice but all items are already created, just need to adjust.

Yes, it's a good idea, and a powerful one with your display script note !

Recording while the lyrics are displayed.

Wait. The more I think about it, the more I find it awesome
X-Raym is offline   Reply With Quote
Old 02-25-2015, 01:39 PM   #3
NextLevel
Human being with feelings
 
Join Date: Dec 2014
Posts: 357
Default

Thanks heda.., this is a pretty cool script.

Here is an idea, how about something similar, but for MIDI items?

For example a person has a .txt file with this:
60,,,63,,,67,,,
60---63---67---
(,)would be empty steps/cells while (-) would extend the note length.

A user dialog could have 2 fields; one that sets the step length for (,) and another that sets the step length for (-). In attached pic. the lengths for both would be 1/16. If a person wanted to, they could do stuff like 60--,63,,,67-,,

NextLevel is offline   Reply With Quote
Old 02-25-2015, 01:56 PM   #4
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 4,039
Default

@NextLevel
Is that some kind of standard notation you use in your project ?

I have to admit there is an idea here.

If we transcribe that (inserting items width lenght) for creating empty midi items, it could be a killer way to write long and complex tempo map, using my EEL : Insert Time Signature From Selected Items script after importation :P

Anyway, I don't plan to use that soon, it is just a pure theoretical concept.
X-Raym is offline   Reply With Quote
Old 02-25-2015, 02:23 PM   #5
NextLevel
Human being with feelings
 
Join Date: Dec 2014
Posts: 357
Default

Quote:
Originally Posted by X-Raym View Post
@NextLevel
Is that some kind of standard notation you use in your project ?
Not quite sure what you mean by standard notation?

The concept with this is for quickly generating little riff ideas or even rhythmical ideas. A person might be somewhere without access to their DAW, but they do have access to a .txt file, so they could jot down their idea and when they get back to their DAW, just run the script. Or you could even use something like a spreadsheet that has functions for things like permutations. Generate a bunch of permutations then export to a .txt file with each on it's own line then run the script and listen through to find the ones you like.
Could be allot of fun!
NextLevel is offline   Reply With Quote
Old 02-25-2015, 02:45 PM   #6
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 4,039
Default

Indeed :P By standard notation I thiught about notation writting conventiens you will already see else where.

Wait it gave me an idea. TXT guitar tab convertor !
X-Raym is offline   Reply With Quote
Old 02-25-2015, 05:31 PM   #7
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,099
Default

That is certainly possible NextLevel
then one day you become famous with one song and they ask you in an interview, how did you compose the song? Well... with a program called notepad.exe

so many scripting ideas.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 02-25-2015, 06:18 PM   #8
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 1,592
Default

Speaking of notepad... How are you writing your scripts? They are not showing up well for me in notepad. No new lines, just one thing after another.

Some more spam...In your dealings with notes, have you come across API to set the background picture? Other than trying to rewrite the chunk?
FnA is offline   Reply With Quote
Old 02-25-2015, 06:29 PM   #9
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,099
Default

Quote:
Originally Posted by FnA View Post
Speaking of notepad... How are you writing your scripts? They are not showing up well for me in notepad. No new lines, just one thing after another.

Some more spam...In your dealings with notes, have you come across API to set the background picture? Other than trying to rewrite the chunk?
Use Notepad++ with EEL language here http://forum.cockos.com/showthread.php?t=142641

If I had to make functions to just add a text note to the item manipulating the chunk, I guess there is no way to add picture without manipulating the chunk manually.

how is your transpose script going? Create a thread for it! It's amazing. I already have used it several times and it is working very well.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 02-25-2015, 06:41 PM   #10
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 1,592
Default

I took them down because I don't think they will work if the chunk is too big. spk77 said something to someone recently about Reaper 5 EEL having capability to handle bigger strings. We'll see, I guess. Otherwise, it might have to be in LUA, which I have not gotten into yet.

The version that you and according to the "views" note, two others have will not work on multi-take pooled items. Design oversight that was sorted, but I don't know how to handle the chunk other than writing it for python, which I'm not too excited about.
FnA is offline   Reply With Quote
Old 02-25-2015, 06:48 PM   #11
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,099
Default

Quote:
Originally Posted by FnA View Post
I took them down because I don't think they will work if the chunk is too big. spk77 said something to someone recently about Reaper 5 EEL having capability to handle bigger strings. We'll see, I guess. Otherwise, it might have to be in LUA, which I have not gotten into yet.

The version that you and according to the "views" note, two others have will not work on multi-take pooled items. Design oversight that was sorted, but I don't know how to handle the chunk other than writing it for python, which I'm not too excited about.
ah.. I guess it is always more complicated than one thinks...
For me it is working for now. I will remember about multitake pooled items just in case.

if I can help you with the chunk things, let me know any particular chunk need
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 02-25-2015, 06:56 PM   #12
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 4,039
Default

Is it possible to scan entire directory, searching for EEL and LUA files ?
This could be an other step in building an automatic script updater based on what we have on our computer, if the scripts in it used the template header I proposed.
X-Raym is offline   Reply With Quote
Old 02-26-2015, 03:55 AM   #13
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: on the road
Posts: 644
Default

Wow, heda, you are awesome! Thanks, will go and test today!
timothys_monster is offline   Reply With Quote
Old 02-26-2015, 06:14 AM   #14
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,285
Default

Another great one! 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 online now   Reply With Quote
Old 02-26-2015, 06:44 AM   #15
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: on the road
Posts: 644
Default

Works like a charm!
timothys_monster is offline   Reply With Quote
Old 02-26-2015, 02:17 PM   #16
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,285
Default

Hi Heda.

Was wondering if it's possible to make a script that allows me to enter some text (into a window) and then apply that to all selected items notes all at once? (it should overwrite any current text in the item's note)

Currently (even with SWS) you only seem to be able to add text one item at a time and I like using the SWS "find window" to be able to select multiple items for rendering based on what's written in the item notes.

As a side "note"

It's quite useful for batches of sounds for games as I can call one set of sounds "render1" (in the item notes) and then a different set "render2" and so forth.

This allows me to quickly use SWS find to select any group of items then for a item render or if I search just "render", it selects all items for rendering.

Is something like that quick to do?

(or make any sense in the first place?) lol
__________________
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 online now   Reply With Quote
Old 02-26-2015, 02:37 PM   #17
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,099
Default

it makes sense. Another good use for notes.
give me a minute
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 02-26-2015, 02:54 PM   #18
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,099
Default

here you go.. sorry it was more than a minute. :P
HeDa_Set Note to selected items.eel
It should work. Try it.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 02-26-2015, 03:15 PM   #19
J Reverb
Human being with feelings
 
J Reverb's Avatar
 
Join Date: Jul 2009
Posts: 445
Default

brilliant !
__________________
I've been imitated so well I've heard people copy my mistakes. - Jimi Hendrix
J Reverb is offline   Reply With Quote
Old 02-26-2015, 04:06 PM   #20
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,099
Default

To do next is to support import and export .srt subtitles files based on the empty items.
X-Raym is already looking into it
We have been talking that it makes more sense for subtitles to work with empty items than with regions. But it may take some time and maybe only for REAPER 5.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 02-26-2015, 05:17 PM   #21
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,285
Default

Quote:
Originally Posted by heda View Post
here you go.. sorry it was more than a minute. :P
HeDa_Set Note to selected items.eel
It should work. Try it.
Awesome! thanks!

Is it for reaper 5 only? if so, I'll try it on the weekend! much appreciated though!
__________________
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 online now   Reply With Quote
Old 02-26-2015, 05:38 PM   #22
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,099
Default

Quote:
Originally Posted by musicbynumbers View Post
Awesome! thanks!

Is it for reaper 5 only? if so, I'll try it on the weekend! much appreciated though!
you're welcome
it works also in REAPER 4

In general, I'll try to put (R5) suffix to the name of the scripts if it is only for REAPER 5.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 02-27-2015, 08:08 PM   #23
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,099
Default

Teaser, SRT subtitle import support almost done.
It has multiline support and timing relative to cursor position.


dedicated thread for SRT Import/export http://forum.cockos.com/showthread.php?t=156423
__________________
HeDaScripts for REAPER | VIP Donations

Last edited by heda; 03-07-2015 at 03:38 AM. Reason: dedicated thread for SRT
heda is offline   Reply With Quote
Old 02-28-2015, 04:04 AM   #24
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 4,039
Default

This definitly deserve a dedicated thread
Import/Export SRT subtitles as/from text items on selected track

This is so huge!
X-Raym is offline   Reply With Quote
Old 03-07-2015, 03:37 AM   #25
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,099
Default

Updated script to v0.2

Renamed to TXT import

* v0.2 (2015-03-07)
+ If you define a time selection, you won't be prompted for timing settings, and the text items will fit the time selection.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 11-27-2016, 04:11 AM   #26
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 4,039
Default

@TonE
All you need is here :
HeDaScripts for REAPER ··· |

You can become aVIP user to have access to heda's advanced script, and to support his scripting activities !
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 04:09 PM.


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