First,thank you for your time.
I want to make a patch that can analyze a lyric file whose format is same as the .lrc. For example:
[00:01.00]Gimme fuel, gimme fire
[00:02.00]Gimme that which I desire
[00:03.00]Oh
[00:19.00]Yeah
[00:21.00]Turn on, I see red
[00:25.00]Adrenaline crash and crack my head
[00:27.00]Nitro junkie, paint me dead
[00:33.00]And I see red
Then came the question, how to read a text file line by line and index by index so that I can get the initial timecode from the lyric file(.txt, such as the example) and display the lyrics that without timecode?
-
How to read a text file line by line and index by index
-
Here is my attempt (very ugly): reader.pd - Pd-extended needed, because of [s2l] and [l2s] objects. The hardest problems were spaces and commas, maybe this all could be done by splitting the text by characters, and process it using char codes?
After all, Pd is notoriously known as very bad in symbol manipulations, so IMHO the best approach will be to prepare text file externally, before reading it in Pd.
Maybe from your format to something like:
1 Gimme fuel_ gimme fire 2 Gimme that which I desire 3 Oh
...then it will be possible to use [qlist] object.
_xb
-
@Heisenberg you can try
cues-help.pd
from the mtl abstraction (see the link in my signature):Cheers~
-
@xbarbie Thanks for your response! I'll have a try!
-
@EEight Thanks a lot!