• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum
    • Categories
    • Recent
    • Popular
    • Tags
    • Register
    • Login

    Read text from a file : I wrote a plugin

    Troubleshooting and Bug Reports
    text files plugins isadora 2 actors
    20
    69
    30.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SkulptureS
      Skulpture Izzy Guru
      last edited by

      Made a quick How-To:

      http://youtu.be/hdYzN3W6ZMQ

      Graham Thorne | www.grahamthorne.co.uk
      RIG 1: Windows 11, AMD 7 Ryzen, RTX3070, 16gig RAM. 2 x M.2 SSD. HD. Lenovo Legion 5 gaming laptop.
      RIG 2: Windows 11, Intel i19 12th Gen. RTX3070ti, 16gig RAM (ddr5), 1x M.2 SSD. UHD DELL G15 Gaming laptop.
      RIG 3: Apple rMBP i7, 8gig RAM 256 SSD, HD, OS X 10.12.12

      1 Reply Last reply Reply Quote 0
      • A
        amosdishon
        last edited by

        Hi,

        Thanx for the answer but as I downloaded the file from djinoui, there is no ".izzyplug".

        The files included in his zip are ".h", ".cpp" and ".dll".

        How do I deal with them?

        Thanx Amos 422f5c-capture-decran-2013-09-24-a-10.32.16.png

        MBP Retina, OSX 10.7.4, i7 2.3 GHz, 16Gb RAM

        1 Reply Last reply Reply Quote 0
        • SkulptureS
          Skulpture Izzy Guru
          last edited by

          Ah it's Windows.... thats the .dll

          I believe you do the exact the same as I have done in my video but replace the ReadTextFromFile.izzyplug with ReadTextFromFile.dll
          Hope this helps.

          Graham Thorne | www.grahamthorne.co.uk
          RIG 1: Windows 11, AMD 7 Ryzen, RTX3070, 16gig RAM. 2 x M.2 SSD. HD. Lenovo Legion 5 gaming laptop.
          RIG 2: Windows 11, Intel i19 12th Gen. RTX3070ti, 16gig RAM (ddr5), 1x M.2 SSD. UHD DELL G15 Gaming laptop.
          RIG 3: Apple rMBP i7, 8gig RAM 256 SSD, HD, OS X 10.12.12

          1 Reply Last reply Reply Quote 0
          • A
            amosdishon
            last edited by

            No it's the opposite!

            The files included in this post are .dll but I need to install it on a Mac

            Thanks

            Amos

            MBP Retina, OSX 10.7.4, i7 2.3 GHz, 16Gb RAM

            1 Reply Last reply Reply Quote 0
            • SkulptureS
              Skulpture Izzy Guru
              last edited by

              In that case you need to convert it to xCode and export it as an .izzyplug

              I'm afraid I have no idea how to do that... it would be great of someone made a tutorial - any takers?

              Graham Thorne | www.grahamthorne.co.uk
              RIG 1: Windows 11, AMD 7 Ryzen, RTX3070, 16gig RAM. 2 x M.2 SSD. HD. Lenovo Legion 5 gaming laptop.
              RIG 2: Windows 11, Intel i19 12th Gen. RTX3070ti, 16gig RAM (ddr5), 1x M.2 SSD. UHD DELL G15 Gaming laptop.
              RIG 3: Apple rMBP i7, 8gig RAM 256 SSD, HD, OS X 10.12.12

              1 Reply Last reply Reply Quote 0
              • SkulptureS
                Skulpture Izzy Guru
                last edited by

                Once you have downloaded the SDk you get this info in the installer, which can be saved as a PDF:

                Using the SDK

                Once the SDK is installed, open the IsadoraSDK folder. Within it you will find the "Isadora Plugin Wizard" application which will assist you in creating a basic plugin project that you can customize for your own use. To use the wizard, do the following:

                1. Double click the Isadora Plugin Wizard application and click "Continue" from the startup dialog.

                2. Enter your developer ID. This text string used to generate the bundle identifier that will uniquely identify your plugin to the Apple operating system, e.g., TroikaTronix's ID is "troikatronix". Do not use any special characters or spaces within this text. Once you've entered your ID, click "OK". (Note: the ID will be remembered the next time you run the wizard.)

                3. Enter the name of your new plugin. This text will be used to name the folder containing the new project, the XCode project itself, and the plugin name as seen by Isadora. This text may contain spaces, but it is generally a bad idea to include special characters. Once you've entered the plugin name, click "OK".

                4. The wizard will now copy and configure a new XCode project according to your specifications, and then automatically open it in XCode.

                Compiling

                The plugin references the IsadoraLib folder which is installed, by default, at /Developer/IsadoraSDK. This folder contains the "IsadoraLib.a" static library that provides useful functionality to the plugin as well as the include files necessary to interface the plugin with the library and with Isadora itself.

                After a successful compile, the plugin will be copied to the folder at /Library/Application Support/ TroikaTronix/Isadora Plugins or /Library/Application Support/TroikaTronix/Isadora Controls as appropriate. This ensures that Isadora will "see" the plugin when you debug it. (Note, support for these new plugin folders was added with Isadora v1.3.0f13; previous versions do not recognize these folders.)

                Graham Thorne | www.grahamthorne.co.uk
                RIG 1: Windows 11, AMD 7 Ryzen, RTX3070, 16gig RAM. 2 x M.2 SSD. HD. Lenovo Legion 5 gaming laptop.
                RIG 2: Windows 11, Intel i19 12th Gen. RTX3070ti, 16gig RAM (ddr5), 1x M.2 SSD. UHD DELL G15 Gaming laptop.
                RIG 3: Apple rMBP i7, 8gig RAM 256 SSD, HD, OS X 10.12.12

                1 Reply Last reply Reply Quote 0
                • djinouiD
                  djinoui
                  last edited by

                  I think Graham is right. I don't know xCode but I assume you have to start a new project using the Isadora Wizard. Make sure you call it ReadTextFromFile for simplicity.

                  Once you have done this (and your blank .cpp file is created), you'll have to integrate my changes into your project (.cpp/.h files). Try copying both files into the source folder of your blank project, thus replacing your .cpp (back it up first, just in case). Compile. If it doesn't work, you'll have to restore your backup .cpp and integrate my code manually.

                  Once again, I didn't try this myself. If it works, don't hesitate to post it in this forum, I'm sure the community would be thankful!

                  Computer: Asus N76VZ PC, Windows 7x64, Intel I7, 6G RAM, Isadora v1.3.1f06
                  Isadora SDK dev computer: VirtualBox PC, Windows XPx32, 2G RAM, Isadora v1.3.1f06

                  1 Reply Last reply Reply Quote 0
                  • SkulptureS
                    Skulpture Izzy Guru
                    last edited by

                    Thanks djinoui. I have just reinstalled xCode and I downloaded IsadoraSDK so I might have a go and see what I can do 😉 No promises - this is well out of my comfort zone! haha.

                    Graham Thorne | www.grahamthorne.co.uk
                    RIG 1: Windows 11, AMD 7 Ryzen, RTX3070, 16gig RAM. 2 x M.2 SSD. HD. Lenovo Legion 5 gaming laptop.
                    RIG 2: Windows 11, Intel i19 12th Gen. RTX3070ti, 16gig RAM (ddr5), 1x M.2 SSD. UHD DELL G15 Gaming laptop.
                    RIG 3: Apple rMBP i7, 8gig RAM 256 SSD, HD, OS X 10.12.12

                    1 Reply Last reply Reply Quote 0
                    • djinouiD
                      djinoui
                      last edited by

                      Don't hesitate to ask if you have a doubt about the code (although I don't understand it 100% myself ^^).

                      And for those who wonder how to install the compiled plugin under Windows : just copy the .dll file into 'IsadoraInstallationFolder\Isadora Plugins', e.g. C:\Program Files\Isadora\Isadora Plugins. Don't forget to restart Isadora. The plugin should then show up in the list.

                      Computer: Asus N76VZ PC, Windows 7x64, Intel I7, 6G RAM, Isadora v1.3.1f06
                      Isadora SDK dev computer: VirtualBox PC, Windows XPx32, 2G RAM, Isadora v1.3.1f06

                      1 Reply Last reply Reply Quote 0
                      • SkulptureS
                        Skulpture Izzy Guru
                        last edited by

                        Thanks @djinoui will give it a try at some point. 

                        Graham Thorne | www.grahamthorne.co.uk
                        RIG 1: Windows 11, AMD 7 Ryzen, RTX3070, 16gig RAM. 2 x M.2 SSD. HD. Lenovo Legion 5 gaming laptop.
                        RIG 2: Windows 11, Intel i19 12th Gen. RTX3070ti, 16gig RAM (ddr5), 1x M.2 SSD. UHD DELL G15 Gaming laptop.
                        RIG 3: Apple rMBP i7, 8gig RAM 256 SSD, HD, OS X 10.12.12

                        1 Reply Last reply Reply Quote 0
                        • A
                          amosdishon
                          last edited by

                          Hello,

                          I also tried to open it on Xcode  and tried to reproduce what djinoui wrote but as Grahm it's far out of my comfort zone!!! 🙂

                          So I'm getting 6 errors wich I understand about the same as if it were Chinese!

                          Any Ideas?

                          Thanks guys for helping
                          Amos
                          52e079-capture-decran-2013-09-25-a-25.09-10.29.png

                          MBP Retina, OSX 10.7.4, i7 2.3 GHz, 16Gb RAM

                          1 Reply Last reply Reply Quote 0
                          • djinouiD
                            djinoui
                            last edited by

                            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)
                            to
                            off_t fileSize = -1; // file size (from stat() function)

                            Computer: Asus N76VZ PC, Windows 7x64, Intel I7, 6G RAM, Isadora v1.3.1f06
                            Isadora SDK dev computer: VirtualBox PC, Windows XPx32, 2G RAM, Isadora v1.3.1f06

                            1 Reply Last reply Reply Quote 0
                            • A
                              amosdishon
                              last edited by

                              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

                              Amos
                              3bcb0d-capture-decran-2013-09-25-a-25.09-12.26.png 2bc1ac-readtextfromfile.izzyplug.zip

                              MBP Retina, OSX 10.7.4, i7 2.3 GHz, 16Gb RAM

                              1 Reply Last reply Reply Quote 0
                              • SkulptureS
                                Skulpture Izzy Guru
                                last edited by

                                Amazing well done @amosdishon!!

                                Graham Thorne | www.grahamthorne.co.uk
                                RIG 1: Windows 11, AMD 7 Ryzen, RTX3070, 16gig RAM. 2 x M.2 SSD. HD. Lenovo Legion 5 gaming laptop.
                                RIG 2: Windows 11, Intel i19 12th Gen. RTX3070ti, 16gig RAM (ddr5), 1x M.2 SSD. UHD DELL G15 Gaming laptop.
                                RIG 3: Apple rMBP i7, 8gig RAM 256 SSD, HD, OS X 10.12.12

                                1 Reply Last reply Reply Quote 0
                                • djinouiD
                                  djinoui
                                  last edited by

                                  Great!

                                  Don't know what the error is about, but if the plugin works...

                                  Computer: Asus N76VZ PC, Windows 7x64, Intel I7, 6G RAM, Isadora v1.3.1f06
                                  Isadora SDK dev computer: VirtualBox PC, Windows XPx32, 2G RAM, Isadora v1.3.1f06

                                  1 Reply Last reply Reply Quote 0
                                  • vanakaruV
                                    vanakaru
                                    last edited by

                                    Cool pluggin and thank you both. Works on OS X 10.6.8 Isadora 1.3.1f06.

                                    MBP 4.1 & MBP (Retina, Mid 2012) MBP Retina 2017

                                    1 Reply Last reply Reply Quote 0
                                    • particlepP
                                      particlep
                                      last edited by

                                      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?

                                      isadora v3.0.7
                                      mbp 2.6ghz i7
                                      mac osx 10.12.6
                                      dyslexic.

                                      1 Reply Last reply Reply Quote 0
                                      • djinouiD
                                        djinoui
                                        last edited by

                                        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.

                                        Computer: Asus N76VZ PC, Windows 7x64, Intel I7, 6G RAM, Isadora v1.3.1f06
                                        Isadora SDK dev computer: VirtualBox PC, Windows XPx32, 2G RAM, Isadora v1.3.1f06

                                        1 Reply Last reply Reply Quote 0
                                        • particlepP
                                          particlep
                                          last edited by admin

                                          sure no problem.

                                          ring.txt is made in text wrangler
                                          once.txt is made in text edit
                                          also is attached an image file of what the actor outputs with the text edit file
                                          hope this helps.

                                          90e614-text_edit.tiff 5f1599-ring.txt bb9daf-once.txt

                                          isadora v3.0.7
                                          mbp 2.6ghz i7
                                          mac osx 10.12.6
                                          dyslexic.

                                          1 Reply Last reply Reply Quote 0
                                          • djinouiD
                                            djinoui
                                            last edited by

                                            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'.

                                            Computer: Asus N76VZ PC, Windows 7x64, Intel I7, 6G RAM, Isadora v1.3.1f06
                                            Isadora SDK dev computer: VirtualBox PC, Windows XPx32, 2G RAM, Isadora v1.3.1f06

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post