Question About ID's In The Audulus File Format
  • I think this question will be for @Taylor specifically.

    Back when I created my Pong patch, I mentioned that manually exposing and arranging all of the lights was a huge pain. But yesterday I learned that Audulus uses a text-based file format. That's awesome, because as a programmer that means that I can write some Java code to automatically do the busy-work for me. So my question is this: Every node seems to have a unique, randomly generated id attached to it. Do I have to follow the format of the id's or can I just call them whatever I want as long as they're unique?
  • Good question! They're UUIDs and the system uses that internally (as opposed to text strings) so they have to be in that format. There are libraries you can use to generate them though so it's quite easy.

    For Java:

    - Taylor
  • Awesome. Thanks for the help!
  • Sure thing!
  • I wrote the code, but I ran into some sort of issue. When you load the file it's empty, but there should be a subpatch with a 64x64 grid of RGB lights. I can tell that Audulus deletes the contents because the file size shrinks from 600+kb to just 4kb. Was it because I didn't indent the output of my code? Are newline characters not delimiters?
    Lights 64x64.audulus
  • Turns out you had the wrong end-quote character for the first ID. That was causing the parser to fail. (JSON ignores whitespace, btw)

    I've attached the fixed patch :)

    Lights 64x64.audulus
  • @Taylor - Oh wow, thank you! No wonder I couldn't find the error. I was doing my editing in Text Edit. At some point I must have deleted that quote and manually typed it back in, which caused Text Edit to automatically reformat it.

    I'm new to Mac. I bought one last so I could do my iOS homework at, well, home. It seems that I erroneously assumed that Text Edit was the Mac equivalent of Windows Text Pad. I won't be making that mistake again, heh.

    Anyway, this is good news, because this also means that my code wasn't broken and I'll be able to continue working on it. Spawning 4096 RGB lights means that I'll need 12288 wires. There's no way I'm doing that by hand, haha.

    The reason I'm doing this is because I'm working on a fractal image generator in Adulus. It'll likely be insanely slow and totally not worth it. XD It'll work on a small scale on the iPad, but I wanted to scale it up for desktop users, which requires automated assistance.
  • @Alexander Download TextWrangler (for free) from the Mac App Store, much better for stuff like this :)
  • @balph - Thanks for the heads up. I'll do that right away. : )