Kineme string with file

yanomano's picture

1. Regarding the file tools, i have several questions : When writing a text file on disk with "kineme Text file writer" all is fine if I set a path without extension but if I try to write a .rtf i can't open it..

2. I'am enable to read a text file with the "kineme string with file" patches, even if it was created with the "kineme Text file writer" without an extension...

I think i have forget something ...

cwright's picture
Re: Kineme string with file

Can you supply some compositions/output files so we can do some tests?

yanomano's picture
Re: Kineme string with file (TestComp)

Here is a comp : It will generate all needed.

PreviewAttachmentSize
Test_KinemeFile.qtz5 KB

cwright's picture
Re: Kineme string with file (TestComp)

Cool, thanks, I'll check it out shortly

yanomano's picture
Re: Kineme string with file (TestComp)

Hi chris do you trash it ?...;)

cwright's picture
Re: Kineme string with file (TestComp)

A little -- I'm still trying to figure it out (slowly -- there's a lot of other things I'm working on at the moment too).

Saving as an RTF is wrong -- it's like saving to a .jpg or a .mov or whatever. Those are specially formed formats, and unless your string follows those formats (not likely for binary formats like jpg, png, mov, etc), it can't work. For example, writing a file with the text "This is some cool text!" produces this "string" in the rtf file:

{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
 
\f0\fs24 \cf0 This is some cool text!}

All that extra junk is what makes it an RTF. You're not providing that, so calling it an RTF is wrong.

For the plain text one, it's a bit more difficult, and I think it's a bug in the plugin -- NSString (the class behind all this loading/saving stuff) is disappointingly picky about actually saving to or loading from a file...

cybero's picture
Re: Kineme string with file (TestComp)

Having gotten bitten by the String to Image problem posted elsewhere by Steve Holmes, I did seek out other similar or related problems as I continued my experiments with the use of Dynamic & Fixed dimensions.

Having found the test composition provided, I did download it and found that if using the tilda ~/ shorthand for my user directory, no file was loaded and thus no text string rendered.

If I used /Users/Desktop/username/directory/textfile.txt type of path, the file loaded and rendered AOK.

Just thought you might like to know. Loading as directly available from within the directory it is placed - that is without full path, but the .qtz is at the same directory root.

I shan't bore you with uploading a working alternative - just try changing that file path and all should be well, I would guess that the same holds true throughout the rest of the example composition, regards the text file writer.

I do sometimes find it to be quite extraordinary that we who contribute to this and other forums and lists of similar interest , effectively are both discovering and documenting the actual working parameters of the application we all find so graphically useful.

Do fully registered Apple Developers actually get more useful documentation upon Quartz Composer than is currently publically available to student and ordinary dev center registrants, I wonder?

cwright's picture
Re: Kineme string with file (TestComp)

cybero wrote:
Having found the test composition provided, I did download it and found that if using the tilda ~/ shorthand for my user directory, no file was loaded and thus no text string rendered.

Ahh, you're right -- it's not doing composition-relative addressing (or even ~-relative addressing)... need to fix that for the next version. Thanks for spotting that :)

cybero wrote:
I shan't bore you with uploading a working alternative - just try changing that file path and all should be well, I would guess that the same holds true throughout the rest of the example composition, regards the text file writer.

er, not quite -- the two patches were written at very different times (String From File is much older than Text File Writer), so the Text File Writer has CRA/TRA in place. go figure :)

cybero wrote:
I do sometimes find it to be quite extraordinary that we who contribute to this and other forums and lists of similar interest , effectively are both discovering and documenting the actual working parameters of the application we all find so graphically useful.

Yeah, given the abysmal lack of documentation elsewhere, there aren't many alternatives sadly :(

cybero wrote:
Do fully registered Apple Developers actually get more useful documentation upon Quartz Composer than is currently publically available to student and ordinary dev center registrants, I wonder?

Nope. We get pre-release versions (smokris and I have QC-Snow Leopard right now, for example), but no additional documentation. All the cool stuff we've figured out has been by trial/error, experimentation, and aggressive reverse engineering (you have no idea how many hours I spend behind a disassembler shouting at my computer when some QC-internal thing doesn't make any sense ;)

gtoledo3's picture
Re: Kineme string with file

hmm, somewhere around here there was a question about using the file writer to write to resource inside of an app. I know that works, fwiw, using whatever the default file type it writes as.

Sorry if my comment is totally useless... I haven't done too much with either utility/plugin. I thought the fact that you can write to a text file and make it a resource inside of an app to be really cool though, with many neat implications.

gtoledo3's picture
Re: Kineme string with file (TestComp)

One thing that is TOTALLY irritating to me (in a mildly amused kinda way), and that I have been spending spare time on, is documenting the hidden patches and functionality.

Some of them are so extensive that it feels like an exercise in futility to sit down with them (BayerReconstruction ... anyone?).

I understand that they are "hidden" so ... why should Apple feel obliged to document them? I have no right to feel put out... but at the same time, I wish they would publish that info, because it would be really useful if they actually have any written, publishable, documentation. The time it takes to sit there and actually go through everything (all settings, every patch, how various render settings effect/don't effect the function of the CI, etc...)... you could end up spending a half day on a single patch. Life is too short!

I also REALLY hope that they don't get rid of any of the hidden patches down the line (Snow Leopard), because they are really ingrained into most people's QC setups at this point. QC is a bit pitiful without them!

cybero's picture
Re: Kineme string with file

In response to both mr wright and mr toledo ,

Thanks for your input.

I am much clearer about the difference 'tween one file tool and 'tother now.

Also feeling oddly comforted that we are all having to cast our lights into the depths of quartz composer to better obtain a working knowledge of the application.

I think, those odd occasions of weirdness shall be posted a little more regularly to quartzdev and this list if applicable.

I think I'd been getting into the habit assuming that much that went weird or wrong resulted from my being ignorant. No doubt a contributory factor, though :-)

Speaking of QC weirdness, what about the javascript editor's tendency to drop into natural code mode, anyone experienced that?

Typically the string to render would show natural code within a tag instead of expected output, happens usually if rendering live whilst editing in the javascript editor.

Wish I'd kept a screen grab :-)

jersmi's picture
Re: Kineme string with file (TestComp)

gtoledo3 wrote:
BayerReconstruction ... anyone?
http://hannemyr.com/photo/defects.html#bayer used, i believe, for raw photo processing.

gtoledo3's picture
Re: Kineme string with file (TestComp)

That's actually a cool page/link... and that's what it amounts to...

...You have to look up info about a given type of filter "in general" and extrapolate that to how it actually works in QC. So, that sheds some light, but definitely still leaves you with plenty of trial and error to determine functionality.

I've had a few (unfortunately, not written down at the time) scenarios where choosing "enable native core image rendering" on a renderer TOTALLY changes the visual result, not just a performance/slight image change issue. All of this adds up to a royal p.i.t.a when attempting to do any kind of useful documentation, or even an representative example pic of the filter in action (since many of them are so "deep" in range of effects).

Actually... I have to start a separate thread about a related issue...

yanomano's picture
Re: Kineme string with file (TestComp)

Sorry for my reply a bit later after the train ;) But THX for the tip cybero !

yanomano's picture
Re: Kineme string with file

THX Christopher, it works now as expected since the 0.3 update :-)