minor DSP question

DSP related issues, mathematics, processing and techniques
Post Reply
Rocko
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

minor DSP question

Post by Rocko »

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
Exo
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK
Contact:

Re: minor DSP question

Post by Exo »

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.
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
Rocko
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

Re: minor DSP question

Post by Rocko »

Thanks.

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

Post by Rocko »

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.
Post Reply