RedALF ascii to list-of-floats conversion


based on two old Max/MSP externals by Cycling'74 that came with the Pluggo installer.


*atolf(string)

converts a String into an array of Float values.  the floats will be between 0. and 1.

note: there is a maximum string length in supercollider of 8192.

*lftoa(array)

converts an array of Float values into a String.  the floats must be between 0. and 1.

note: you will get unexpected values if you try to create your own array from scratch.

always use an array that first have been converted with the atolf method above.



//--

a= RedALF.atolf("abcdefg");

RedALF.lftoa(a);



//--convert the text in this helpfile into floats

a= RedALF.atolf(Document.current.string);

a.plot


s.boot

b= Buffer.loadCollection(s, a.normalize(-1, 1));

c= b.play(true, 0.1)

c.free

b.free