Oscintillate: a command-line OSC sequencer
I did a google search for " 'command line' 'osc sequencer' ", and got absolutely no results. Same with the search "oscintillate". So I thought I'd write one and call it that. Currently what I've done so far, using C++ STL, liblo, libxml++, and lots of caffeine:
- a program that dumps all OSC input to the console (but not in a useable format yet);
- a valid XML schema for stored OSC data (basically a translation of the specification plus some extra <time> tags);
- a tiny hand-written example XML file that validates against the schema;
- startings of an XML file parser that loads OSC XML data;
- startings of a player to play OSC data;
- a C++ class that lets me write out well-formed XML data using "<<" - the well-formedness isn't 100% guaranteed, but I think I will be able to achieve that with some work, but for now it is good enough;
I'll release the code under GPL once I get it working to the state where it can:
- reliably record incoming OSC data to an XML file in real time;
- reliably play back OSC data from an XML file in real time;
Meanwhile, here's a usage example for my XMLOutputStream class:
#include <iostream>
#include "XMLOutputStream.hh"
using namespace oscintillate;
int main() {
XMLOutputStream xmlos(std::cout);
xmlos <<
xml::tag("html") <<
xml::tag("head") <<
xml::attr("lang") << "en" <<
xml::attr("encoding") << "UTF-8" <<
xml::tag("title") <<
xml::text() << "XMLOutputStream test" <<
xml::end() <<
xml::end() <<
xml::tag("body") <<
xml::tag("p") <<
xml::text() << "test<>&\"'test" <<
xml::tag("br") << xml::end() <<
xml::tag("a") <<
xml::attr("href") << "http://example.com?a=1&b=2" <<
xml::text() << "test<>&\"'test" <<
xml::end() <<
xml::tag("hr") << xml::attr("width") << "100%" << xml::end() <<
xml::text() << "test<>&\"'test" <<
xml::end() <<
xml::end() <<
xml::end();
return (0);
}