[announce] The sadam Library, version 2011-08-25
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.
your set of externals looks really promising, thanks for sharing, will check it out later, best
Out of curiosity, what is the difference between your networking objects and the ones that already come with max?
@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
[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 0×00, 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,
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…
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.
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"
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
(http://cycling74.com/forums/topic.php?id=40509&replies=2#post-196589 is the reference post)
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,
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 :)
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!