Hello,
short story: I need a way to take a .txt that has a float per line, like this:
1.45
1.23
5.67
4.23
...
and arrange it so they increase in value, like this:
1.23
1.45
4.23
5.67
How can I do this automagically and with ease?
thank you very much
long story:
I am building a patch to create and show subtitles for audio files.
I devised a simple system to help me manually log the exact time in s.ms when a /show next subtitle/ event should happen.
I do this with a simple timer abstraction; I start it, time runs, and then I keep pressing bang when I want to log a /show next subtitle/ event. I log the time in s.ms into a textfile object.
This way I obtain a .txt with floats that represent the /next sub/ events in s.ms
1.23
1.45
4.23
5.67
BUT if I miss an event, and I try to add that one without deleting the rest, I get something like this
1.23
1.45
4.23
5.67
2.34 <---- shouldn't be here but before 4.23
And this is why I am looking for a way to arrange the floats automagically, so I can easily go on adding forgotten /next sub/ events, and I only have to edit the file directly to delete them.
Thank you very much