text object idiosyncrasies
if I fill a text object with sprintf output, and then query it, it only says it has one line. I'm using carriage returns:
sprintf symout %c%s%c%s%c where the first c is 13 (CR), the second & third c is 9 (HT) and s is strings. This output is triggered a number of times to create a number of lines.
Also when I save the resulting file the tabs do not appear as tabs, but as 4 spaces in a row. I need correct formatting to export into a spread sheet.
Am I doing something wrong or are these behaviours by the text object unintended?
T
i just tested with max 4.
it doesn't work when you try to format messages like you did using
sprintf. cr and tab are specific messages sent to text object. you
can't send ascii codes to it.
also, cr and tab should be separate messages, for example trying to
send message "cr bla bla tab bla bla" reports "extra arguments for
message cr" in max window.
here is a quick and dirty demonstration. saving works.
if you didn't know, you can double click on text object to quickly
check the file. it will be the same when saved.
Hi klif
Here is an example output of the sprintf object via the text object:
Friday 21 November 2008 10:00:01 AM ascending major arpeggio.mid 00:00:06 arpeggiator playlist.txt √
Friday 21 November 2008 10:00:12 AM descending arpeggio.mid 00:00:06 arpeggiator playlist.txt √
as you can see text interprets sprintf correctly with carriage returns, EXCEPT, it seems it doesn't create actual tabs, but a series of spaces. This occurs with your 'tab' message box command in the example you posted.
it looks like its a limitation of the text object.
So this post is a feature request: to actually have tabs (ASCII 009) in the text object, instead of 4 spaces in a row (ASCII 032).
Not really a feature, just to be consistent with its own documentation. Also that the query function actually works.
T
That last post the example text didn't come out properly. it should have more spaces between date, time, filename, duration etc which represent the 'tabs'
instead of real tab, you should use tab delimiter of your choice, for
example "_" . i didn't use comma, to avoid any possible max related
problems.
the resulting row will be:
Friday 21 November 2008_10:00:12 AM_descending
arpeggio.mid_00:00:06_arpeggiator playlist.txt
then, save file with .csv extension
open with spreadsheet program (i use openoffice).
check -> separated by: other :_
you'll get a nice spreadsheet. then you can save it in some other
spreadsheet program
klif