[announce] The sadam Library, version 2011-08-25

    Aug 25 2011 | 3:26 pm
    Dear Maxers,
    I just finished upgrading The sadam Library, which you can now access on my website: http://www.sadam.hu/?q=software. Apart of some small bug fixes and additions, the major new feature is XML processing (parsing, creating, modifying, saving XML data from files or on-the-fly), which is covered by three different externals: [sadam.rapidXML] is an almost 100% W3C compliant super-fast XML processor, while [sadam.dom] and [sadam.sax] are two MXJ-based fully W3C compliant parsers.
    There are tools in the library also for
    • Data compression/encription (compression: LZO, encription: base64)
    • Networking (binary streaming through TCP and UDP)
    • Synthesis (additive, substractive, FOF)
    • Complex sound analysis (Spectral peak detection, Envelope following)
    • And more...
    Sound analysis & synthesis objects can be downloaded separately from the website of the Zentrum für innovative Musik-Technologie, as they are part of KlangPilot (a real time score language for sound synthesis): http://www.mdw.ac.at/zimt (you'll find the link to 'downloads' at the bottom of the page).
    As in the last release, every object (except the ones available from the ZiMT website) is fully documented (help files & reference docs). Objects are supposed to work on Mac OS (both Intel and PPC) and Windows, although I could only deep-test them on my Intel Mac.
    All externals are licensed under the Creative Commons Attribution 3.0 Unported License, except the LZO compressor/decompressor, which is a GPLv2 project.
    Any comment and bug report is highly appreciated.

    • Oct 11 2011 | 7:37 am
      your set of externals looks really promising, thanks for sharing, will check it out later, best
    • Oct 11 2011 | 5:02 pm
      Out of curiosity, what is the difference between your networking objects and the ones that already come with max?
    • Oct 11 2011 | 5:29 pm
      @Timo: thanks for the comment!
      @dhjdhjdhj: The short answer: they realize true binary communication, both with TCP and UDP.
      The long answer: In Max, you have three kinds of networking tools, one is the [udpsend]/[udpreceive] externals, the others are the MXJ-based [net.tcp.send]/[net.tcp.receive] and [net.udp.send]/[net.udp.receive]. The [udpsend]/[udpreceive] externals use the OSC format, therefore on one hand you get some data overhead (not too much, though) with every package, on the other hand (and this is why I actually developed these externals), you can't communicate with a device or a software that wouldn't understand the OSC format. The java-based built-in Max tools, as far as I know, don't use the OSC format, however, you can't use them for pure binary communication, as they translate every incoming message into ASCII (at least this is what I noticed last time I tried to use them). Therefore it is not straightforward to send, for instance, a stream consisting of values like 0x00, 0xFF etc.
      To summarize it, if you are communicating with other Max patches, OSC-capable devices etc, you will want to use the built-in tools. If you need to talk, let's say, to a web server, an SMTP server, a laser beamer whose microcontroller doesn't understand OSC or simply sending commands to your router directly from Max, you might consider using these objects.
      Another scenario when you might want to use these objects is when you use other 'stream-aware' objects from the [sadam] library. For instance, if you want to record a sequence of commands and compress them with [sadam.lzo], you'll have the ability of sending this compressed command sequence directly with these externals without the need of converting them into some Max-friendly format first.
      Hope this helps,
    • Oct 11 2011 | 5:35 pm
      OK, I was a bit wrong. Currently you won't be able to talk to a web server with these tools, as they can't communicate in both directions simultaneously. This is the exact reason why I'm also developing a server/client pair for TCP, however, I can't even guess when I would finish their development, as I'm doing these externals in my spare time...
    • Oct 11 2011 | 5:44 pm
      Good luck! Managed bi-directional communication is the base for your own "browser" like code, and is not trivial, as I am sure you know.
    • Oct 11 2011 | 5:48 pm
      PS: the current group of externals truly rock, I expect to find uses!! (& I have been waiting for a public fof~ not based in gabor...)
      "that grumpy old f**t"
    • Jun 14 2012 | 12:51 pm
      Siska, is it possible to use your lib (via the jar included) in my java code ??
      I especially need to write & read (parse) XML in my project
    • Jun 14 2012 | 2:34 pm
      Hi Bayle,
      I've personally never tried to use a Max Java class in an 'external' Java project, however, I guess it should be possible. Probably you should just include the JAR in your project and then use the 'sadam.dom' or 'sadam.sax' classes (whichever you prefer) just as normal Java classes. However, if you're using Java anyway, it would probably be easier to simply include the legacy Java XML libraries (for DOM, you can use the 'org.w3c.dom' package, while for SAX you can use 'org.xml.sax') and just go with them directly. This will be probably easier and faster than importing my classes in your code, since they are basically acting as wrapper classes to the mentioned two legacy packages anyway.
      Hope this helps,
    • Jun 14 2012 | 2:55 pm
      got it, Adam!
      I'll follow the org.w3c.dom inclusion because the final purpose is : instantiate the class in mxj object.
      thanks a lot for your answer :)
    • Jun 14 2012 | 3:11 pm
      You're welcome! :-)
      Actually, I didn't see this post while I wrote another answer in the other thread: http://cycling74.com/forums/topic.php?id=40509
      well, it seems I was a bit late with that answer, but it might still be useful for you.
      Good luck with XMLs!