If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
minor DSP question
4 posts
• Page 1 of 1
minor DSP question
Hi,
I'm trying to convert some SYSEX data which originates from an old synthesizer and saved on PC as txt file.
This is like a backup system for vintage synths, instead of magnetic cassettes which were popular at the eighties...
The data on PC appears like this (txt):
F0xxxxxxxxxF7zz
F0xxxxxxxxxF7zz
F0xxxxxxxxxF7zz
F0xxxxxxxxxF7zz
F0xxxxxxxxxF7zz
Each line starts with F0, then data, then F7 and a unique 'zz' followed by '/n' (next line) as text document.
F0 and F7 are not unique but must appear at start and end of line.
Is there a way I can convert this file from 'string' to 'string array' in fast mode?
I thought of building a 'logic module' which will find the 'zz' at each line, push it into a stack (or array) and go for the next line, but I might be missing something a bit more basic.
Is there a more elegant way to break such a file from 'string' to 'string array'? Using green math? Using RUBY? using code? Maybe a 'string to string array' module based on new lines ('/n') ??
Thanks,
Rocko
I'm trying to convert some SYSEX data which originates from an old synthesizer and saved on PC as txt file.
This is like a backup system for vintage synths, instead of magnetic cassettes which were popular at the eighties...
The data on PC appears like this (txt):
F0xxxxxxxxxF7zz
F0xxxxxxxxxF7zz
F0xxxxxxxxxF7zz
F0xxxxxxxxxF7zz
F0xxxxxxxxxF7zz
Each line starts with F0, then data, then F7 and a unique 'zz' followed by '/n' (next line) as text document.
F0 and F7 are not unique but must appear at start and end of line.
Is there a way I can convert this file from 'string' to 'string array' in fast mode?
I thought of building a 'logic module' which will find the 'zz' at each line, push it into a stack (or array) and go for the next line, but I might be missing something a bit more basic.
Is there a more elegant way to break such a file from 'string' to 'string array'? Using green math? Using RUBY? using code? Maybe a 'string to string array' module based on new lines ('/n') ??
Thanks,
Rocko
- Rocko
- Posts: 186
- Joined: Tue May 15, 2012 12:42 pm
Re: minor DSP question
Hey Rocko,
Load the text file with the load text primitive and connect to its output a "Text" Component, now connected this text component to the array input on the String array, now it should contain each line as an index in the array.
Load the text file with the load text primitive and connect to its output a "Text" Component, now connected this text component to the array input on the String array, now it should contain each line as an index in the array.
- Exo
- Posts: 426
- Joined: Wed Aug 04, 2010 8:58 pm
- Location: UK
Re: minor DSP question
Thanks.
I simply sent the output of the text file into an input of "string array append" and then sorted it.
Thank you !
Rocko
I simply sent the output of the text file into an input of "string array append" and then sorted it.
Thank you !
Rocko
- Rocko
- Posts: 186
- Joined: Tue May 15, 2012 12:42 pm
Re: minor DSP question
Hi,
Is there a way to determine the array size, i.e. the number of lines in the txt file?
Edit:
Founjd a way, just connect the output of 'text' to input of 'string array append' (nothing appended).
Then connect the output to 'string array append' to 'int' to see the size.
Is there a way to determine the array size, i.e. the number of lines in the txt file?
Edit:
Founjd a way, just connect the output of 'text' to input of 'string array append' (nothing appended).
Then connect the output to 'string array append' to 'int' to see the size.
- Rocko
- Posts: 186
- Joined: Tue May 15, 2012 12:42 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 49 guests