Read text from a file : I wrote a plugin
-
Oh it seems that all 6 errors are related to the _stat function, which is Windows-only. Try to remove the underscores (stat instead of _stat) in faulty lines and see if it compiles.
stat seems to be a C function, not C++, so I don't know if this will work but it's worth a try.Maybe you will also have to change this line:size_t fileSize = -1; // file size (from stat() function)tooff_t fileSize = -1; // file size (from stat() function) -
GREAT! Thank you!!!
It still gives an error but the plugin works anyway!
I managed to read a file (on the old mac I tried with isadora 1.3.0f17).attached you can find the .izzyplug working!
Thanks again
-
Amazing well done @amosdishon!!
-
Great!
Don't know what the error is about, but if the plugin works...
-
Cool pluggin and thank you both. Works on OS X 10.6.8 Isadora 1.3.1f06.
-
great plugin, great work.
i downloaded it to play with and found that (i'm on a mac) the text needed to be written with text wrangler rather than text edit for the plugin to read just the text. i wonder if i've missed something in text edit? -
Mmmmm... My assumption is that the default line endings are different in TextEdit and TextWrangler. Could you please post a sample of each text file, one created with TextEdit and the other one with TextWrangler ? So I could check how they are formatted.
-
sure no problem.
ring.txt is made in text wrangleronce.txt is made in text editalso is attached an image file of what the actor outputs with the text edit filehope this helps. -
Apparently TextEdit wrote the file using the RTF format, not plain text. RTF stores formatting (font, color...) information along with the text. That's why you get {\rtf1\ansi\ansicpg1252....etc. Just make sure you write your file in plain text with no formatting (or use another editor, which you did).
About line-endings : ring.txt has no line endings, but once.txt has LF line-endings in it, which are usually used on Unix OSes. I've read that MacOSX is built upon a Unix system, so if you use this OS (and I suppose you do), you will have to select 'unix' linebreak mode, not 'mac'. -
Oh. It's written in your signature ^^
-
Very useful plugin.. thank-you!
This is my first use of the plugin:
https://www.facebook.com/photo.php?v=10153251586530464
this example only shows one line of text being read, but so far it is working with 30 lines looping.. -
Great video DusX!
-
Thank you everyone. Can someone also do a video about compiling an Isadora Plugin? I think this is a good occasion...
-
+1 I'm with @Armando I'd quite happily do one but I have no idea...
-
"Can someone also do a video about compiling an Isadora Plugin?"
Sounds like a job for me. Will try to make time for this in the coming month.
Best Wishes,
Mark -
That would be super, Mark...
-
Yes. Please do a tutorial video someone
-
Yeah, please!
-
No video here, but if you want to compile or even develop a plugin with the SDK on Windows, here's how to do it: http://troikatronix.com/troikatronixforum/discussion/936/how-to-develop-a-plugin-using-isadora-sdk-on-windows-with-visual-studio-2010-express-13#Item_1
-
Regarding building a plugin in Mac OS X, a PDF Read Me that is part of the SDK explains it. Please see this topic:
http://troikatronix.com/troikatronixforum/discussion/940/building-an-isadora-plugin-with-xcode
Best Wishes,
Mark