Search found 45 matches

by bigboss97
Sat Feb 29, 2020 12:31 pm
Forum: Windows
Topic: Convert Label text to LRC file
Replies: 81
Views: 7833

Re: Convert Label text to LRC file

Does it work for you with just a single label: No, it shows one path. Basically it shows a path whenever it's unicode. For instance: 0.359909 0.359909 Hello 2.159456 2.159456 回頭我也 4.040272 4.040272 world 6.315828 6.315828 不要你 I read line:[ [ 0.359909, 0.359909, "Hello" ], ] I read line:[ c:\wxwidge...
by bigboss97
Sat Feb 29, 2020 3:08 am
Forum: Windows
Topic: Convert Label text to LRC file
Replies: 81
Views: 7833

Re: Convert Label text to LRC file

With my limited Python skill and Google's help :lol: , I tested the UTF-8 read/write: import io encoding = 'utf8' with io.open('utf-8.txt', 'r', encoding=encoding, newline='\n') as fin: text= fin.read() print( text) with io.open('utf-8_out.txt', 'w', encoding=encoding, newline='\n') as fout: fout.wr...
by bigboss97
Fri Feb 28, 2020 12:40 pm
Forum: Windows
Topic: Convert Label text to LRC file
Replies: 81
Views: 7833

Re: Convert Label text to LRC file

(try it from Audacity's "Extra menu > Scriptables II > Get Info"). I "assume" that Python3 is capable of accessing that data, but you would need to write your own Unicode compatible functions to read and write Unicode data to/from Audacity. It took a while until I found where to activate the Extra-...
by bigboss97
Fri Feb 28, 2020 6:55 am
Forum: Windows
Topic: Convert Label text to LRC file
Replies: 81
Views: 7833

Re: Convert Label text to LRC file

You can get multi-byte characters from labels using "GetInfo: Type=Labels Format=JSON" via Python. Thank you for your time. This is my current results: A) ASCII only (all good!) C:\tmp>python pipe_test.py pipe-test.py, running on windows Write to "\\.\pipe\ToSrvPipe" Read from "\\.\pipe\FromSrvPipe...
by bigboss97
Mon Feb 24, 2020 11:53 am
Forum: Windows
Topic: Convert Label text to LRC file
Replies: 81
Views: 7833

Re: Convert Label text to LRC file

The "aud-get-info" command returns ASCII characters. Audacity converts multi-byte character to underscore ("_") before sending the data to Nyquist. Yes, I got underscores in my files. That means I've no chance of building an unicode plug-in. Okay, then I need a plan B... :D I can write a separate p...
by bigboss97
Mon Feb 24, 2020 4:13 am
Forum: Windows
Topic: Convert Label text to LRC file
Replies: 81
Views: 7833

Re: Convert Label text to LRC file

steve wrote:
Sun Feb 23, 2020 10:32 am
Nyquist doesn't support Unicode, only ASCII.
Does that mean when I retrieve the label (using Nyquist) the dual-byte information already lost? Which means I have no chance to write the unicode to a binary file. Is that correct?
by bigboss97
Sun Feb 23, 2020 2:50 am
Forum: Windows
Topic: Convert Label text to LRC file
Replies: 81
Views: 7833

Re: Convert Label text to LRC file

Sorry, I have to come back and ask for help again :-) I did try to google and couldn't find any usable results. My plug-in is now working, but it can't handle Unicode. How can I make it write Unicode file? (setq f (open fName :direction :output :if-exists :supersede)) *snip* (format f (if (string= (...
by bigboss97
Fri Feb 14, 2020 12:06 am
Forum: Windows
Topic: Convert Label text to LRC file
Replies: 81
Views: 7833

Re: Convert Label text to LRC file

Thank you so much, Steve.
I've bookmarked this thread. I'm sure I'll revisit all these information.
by bigboss97
Wed Feb 12, 2020 10:48 pm
Forum: Windows
Topic: Convert Label text to LRC file
Replies: 81
Views: 7833

Re: Convert Label text to LRC file

All good now. Thank you so much for your time.
steve wrote:
Wed Feb 12, 2020 9:17 am
bigboss97 wrote:
Wed Feb 12, 2020 6:20 am
(with-open-file ...
Where did that come from?
This is a macro in Lisp because I googled for Lisp commands :D
by bigboss97
Wed Feb 12, 2020 6:20 am
Forum: Windows
Topic: Convert Label text to LRC file
Replies: 81
Views: 7833

Re: Convert Label text to LRC file

I got stuck. I tried to google a solution without success :( I added following piece of code: ;control fName "Select file" file "" "*default*/karaoke.lrc" "LyRiCs|*.lrc;*.LRC|All files|*.*;*" "save,overwrite" (format nil "Export LRC to ~s" fName) (with-open-file(str fName :direction :output :if-exis...