serialosc for linux: call for testers

  • Good afternoon, everyone!

    As has been mentioned in a few other threads, I'm working on the upcoming replacement to monomeserial, serialosc. Progress is steady and I feel that serialosc is now stable enough for day-to-day use. I used it for all of my shows on the Monome tour and, having made a few modifications since returning home, I'd like to get this out to the community for testing and feedback.

    Compared to monomeserial, serialosc is a very different paradigm. Rather than configuring your Monomes manually, the emphasis is now placed on the applications taking care of it for you. As such, these initial testing releases are a sort of "technology preview" (to borrow an ugly Microsoft term) intended primarily for developers to experiment with and develop for.

    Though serialosc is designed to have a unified cross-platform codebase, this initial version only supports Linux. OS X will follow soon, and Windows in the near future.

    You will need the following:
    - [[http://liblo.sourceforge.net/|liblo]] (your distro probably has packages)
    - [[http://illest.net/libmonome/releases/libmonome-0.5.tar.gz|libmonome-0.5.tar.gz]] (or a recent checkout from the [[http://github.com/monome/libmonome|git repository]])
    - [[http://illest.net/serialosc/serialosc-0.5.tar.gz|serialosc-0.5.tar.gz]] (or a checkout from the [[http://github.com/monome/serialosc|git repo]])

    For both libmonome and serialosc, run the following series of commands:

    > $ tar zxvf libmonome-0.5.tar.gz
    > $ cd libmonome-0.5
    > $ ./configure
    > $ make
    > $ sudo make install

    Compile libmonome first, then serialosc.
    Please refer to the [[http://docs.monome.org/doku.php?id=app:serialosc|serialosc wiki page]] for updated documentation on /sys messages. The protocol for updating LEDs is the same.

    Thanks for your patience, everyone. I'll be writing more soon about the design and implementation of serialosc and libmonome themselves to aid in hacking (if anyone wants to dive into the source).

    -w

  • I've had it running for about a week? week and a half?

    I also posted that pdj-based external that includes a pd patch that auto-configures itself with serialosc with a popup. Serialosc seems to work just great! It's minimal, runs from the command line, and supports my monome + avhi config. No bugs so far!

    uname -r: 2.6.32-gentoo-r7
    desktop and laptop

    Also, I've included an implementation of this configuration within a large sampler/sequencer pd patch that I wish to demonstrate in the near future! At the same time of developing this feature, I also switched from OSCx to mrpeach's net and osc externals. Not sure if it's serialosc or mrpeach's externals that is causing a noticeable lag [EDIT: i think it's a lag in processing LED instructions, functions of the patch function normally] in my patch...

    EDIT2:
    I've attached "layer", what I call my pure-data fiddlings. A major set of instructions will need to be written to make it easy to understand, but you can use it to test serialosc's bonjour zeroconf capabilities with the aforementioned pdj external. Major props goes to anyone who can figure it out by way of fiddling...it also has a few "quirks" that need to be ironed out. Ugggh... probably shouldn't be letting this out in the wild without more work... link to the external may be found in the serialosc dev thread.

    in layer,
    click the button to the left under "connect/refresh".
    wait. once the small "network activity" button goes white check the dropdown list for your monome and then select it. lights should happen. 128 format.

  • I've managed to install and build serialosc on ubuntu 10.04.

    I needed to install the following package before it would build: libavahi-compat-libdnssd-dev

    It picked up all three of my devices without issue.

    now to work out how to chat with them with this Bonjour stuff.......

  • indeed. i'll try to work on some bonjour-enabled examples for testing with serialosc.

    now must get my debian system actually working...

  • yo, been tinkering around with this will have some more comments very soon, just sorted out the old tri-boot on my mac so been messing with the monome on new Ubuntu, looks slick!

  • just a shout out for y'all pd users...
    http://github.com/murr/simplebonjour

    only tested on linux! i don't have access to an apple computer or a windows system, so open call for contributions (please!).

  • yowch.. relative filepaths in makefile please!

    edit- - nevermind, i should have read more into the file.. i guess the path of pd will vary from system to system.

  • you are a gentleman and a scholar, thank you.
    (ps: AVAHI_COMPAT_NOWARN doesn't have to be "shut up", but I felt it was appropriate. avahi's native API is god-awful.)

    work on OS X is coming along well. currently trying to wrap my head around IOKitLib.

  • is the path for externals on every system the same? i'm just worried about a user with a bogus pd-externals directory location being confused about why things aren't working. please correct me if i need to be!

    and, yeah. double thumbs down on native avahi.

  • on my system, the pd externals seem to be in $(LIBDIR)/pd-extended/extra, where $LIBDIR = $(PREFIX)/lib, $PREFIX = /usr.

    if you need help with configure scripts or the like, just ask...i wrote all of my own build system stuff (no autoconf, blegh), and the license is such that you're welcome to any of it.

  • thanks for that! i'll just change the make file accordingly for mac os x as well as windows. i appreciate the offer to help too! ill take you up on that if i get stuck.

    also--seems serialosc's LED-message handling can clog up when rapidly being fed instructions from an array in a pure-data patch. for example, recalling the LED states for a page in a monome app. anything i can work on to improve this situation?

    ps. anyone have a windows source directory?

  • define "clog up". do the LEDs stop updating?

  • when LED message traffic is heavy, serialosc begins to pass LED instructions more slowly. (no problem with button presses) it's not critical/doesn't make my patches any less usable, but serial-pyio always handled my instruction speeds without a problem so just inquiring!

  • hm. could be because i had the baud rate down to 9600 and just hadn't turned it back up. i increased it to 115200 (same as serial-pyio). update libmonome, make clean, make, make install. let me know how that works.

  • doesn't seem to be a a change... ill see if i can slow down the messages a little bit in my patch and see if that helps.

  • alright...I think I know what's up. it's a problem that I'd only seen when shuttling off a ridiculous amount of individual LED messages over osc, there ends up being a backup somewhere (i'm presuming either in the serial device buffer or network buffer for OSC). serialosc does no buffering itself, so any overflows just happen transparently.

    I'll dig around in liblo when I get a second and see if anything looks suspicious.

  • gah! okay! just don't want this to end up in a lot of effort for something that affects .001% users, but thanks for checking things out!

  • i'd be curious to see where the bottleneck is, given monomeserial achieved a pretty stable high throughput.

    @murray could you share an example test patch?

  • oops, found it. EDIT: actually i did not. ill continue with the post! imagine that you use 6 rows of the monome to represent a control group. each control group exists as a page within a menu of other control groups/variable affecters. to get this patch to recall and update locations of led states within single quadrants, without disturbing unintended areas, i have to use many loops that cycle through LED messages to turn a row/column's LED on or off. if you're interested, the posted patch is posted above as layer. go through subpatches "deviceBed->sampler->loopPrefs->newLoopConstraint->newLength" to reach the fill algorithms.

    on your monome256 (or 128, but you might have to fiddle with your cable orientation to see both quadrants), open up the pd file "_layer.pd" in pd-extended. make sure simplebonjour is compiled and in your path. the program is spread across the two top quadrants of the monome. to see the bottleneck, press the five-leftest buttons across the navigation menu (right quadrant, bottom row). you'll notice stuttering in the traversing led in the left quadrant. now press the fourth button from the left on the navigation row. play with the top six rows of this page.

  • i was a little hasty in that last post! it's been edited with more info. and tehn i have the patch, but i understand if it's a pain in the ass to look at.

    hopefully it works in os x. and to connect to serialosc, just click refresh and wait a second. the menu should be populated with monome(s).

    i also double-checked and compared the behavior of this patch running through serial-pyio and things appeared a bit smoother.

  • i have a good test case for this too. as i expected, this is due to sluggishness writing to the serial device, resulting in the OSC recv buffer filling up and overrunning. when I increase the OSC buffer size, the issue vanishes, but that's really just glossing over the issue of the serial device being slow. i'll think about how to tackle this.

    it's my suspicion that serial-pyio skirts around this issue by buffering the messages internally.

  • Hi,

    I'm on Ubuntu 10.10

    When trying to build serialosc I get:

    configuring serialosc 1.0a:
    checking platform: linux 2.6.35-22-generic
    checking for gcc: gcc 4.4.5
    checking if poll() works: it's janky
    checking for libudev: no, your system is outdated

    I got the same message when I installed libmonome.
    When I check I do have libudev installed. Do I need libudev-dev installed?

    locate libudev
    /lib/libudev.so.0
    /lib/libudev.so.0.9.1
    /lib32/libudev.so
    /lib32/libudev.so.0
    /lib32/libudev.so.0.9.1
    /usr/lib/vlc/plugins/services_discovery/libudev_plugin.so
    /usr/share/doc/libudev0
    /usr/share/doc/libudev0/changelog.Debian.gz
    /usr/share/doc/libudev0/changelog.gz
    /usr/share/doc/libudev0/copyright
    /var/cache/apt/archives/libudev0_162-2.1_amd64.deb
    /var/lib/dpkg/info/libudev0.list
    /var/lib/dpkg/info/libudev0.md5sums
    /var/lib/dpkg/info/libudev0.postinst
    /var/lib/dpkg/info/libudev0.postrm
    /var/lib/dpkg/info/libudev0.shlibs
    /var/lib/dpkg/info/libudev0.symbols

    When I run make I get:

    Makefile:3: config.mk: No such file or directory

    _
    | |__ ___ _ _
    | _ \ / _ \ | | | you need to run
    | | | | __/ |_| | ./configure first!
    |_| |_|\___|\__, |
    |___/

    make: *** [config.mk] Error 1

    Thanks.

  • did you run

    ./configure

    ?

  • Hi tehn,

    yes, ./configure returned:

    configuring serialosc 1.0a:
    checking platform: linux 2.6.35-22-generic
    checking for gcc: gcc 4.4.5
    checking if poll() works: it's janky
    checking for libudev: no, your system is outdated

    Then when I try make:

    Makefile:3: config.mk: No such file or directory

    _
    | |__ ___ _ _
    | _ \ / _ \ | | | you need to run
    | | | | __/ |_| | ./configure first!
    |_| |_|\___|\__, |
    |___/

    make: *** [config.mk] Error 1

    Thanks

  • it looks like you're missing some headers, because you most certainly have an up-to-date system.

    please install both libudev-dev and libc6-dev, then reconfigure and reinstall libmonome. then, serialosc should build fine.

    when reconfiguring libmonome, "poll works" and "libudev " should come up. please post again if you see either "poll is janky" or "no, using sysfs".

  • Thanks for the quick response.

    I already had libc6-dev installed, and as advised installed libudev-dev.
    I no longer get any warnings when building libmonome, but serialosc still isn't happy.

    marto@martolaptop:~/libmonome$ ./configure

    configuring libmonome 0.5:
    checking platform: linux 2.6.35-22-generic
    checking for gcc: gcc 4.4.5
    checking for poll: poll works
    checking for libudev: libudev 163

    checking for liblo: liblo 0.26

    options:
    installation prefix: /usr/local
    protocols: series 40h osc
    bindings:

    run make to compile libmonome.

    marto@martolaptop:~/libmonome$ make
    CC src/platform/linux_libudev.o
    LD src/libmonome.so
    LD src/monomeserial
    marto@martolaptop:~/libmonome$ sudo make install
    [sudo] password for marto:
    INSTALL /usr/local/include/monome.h
    INSTALL src/proto/protocol_series.so -> /usr/local/lib/monome/protocol_series.so
    INSTALL src/proto/protocol_40h.so -> /usr/local/lib/monome/protocol_40h.so
    INSTALL src/proto/protocol_osc.so -> /usr/local/lib/monome/protocol_osc.so
    INSTALL src/libmonome.so.0.5 -> /usr/local/lib/libmonome.so.0.5
    LDCONFIG
    INSTALL src/monomeserial -> /usr/local/bin/monomeserial
    INSTALL /usr/local/share/man/man1/monomeserial.1
    INSTALL /usr/lib/pkgconfig/libmonome.pc
    marto@martolaptop:~/libmonome$ cd ..
    marto@martolaptop:~$ cd serialosc/
    marto@martolaptop:~/serialosc$ ./configure

    configuring serialosc 1.0a:
    checking platform: linux 2.6.35-22-generic
    checking for gcc: gcc 4.4.5
    checking if poll() works: it's janky
    checking for libudev: no, your system is outdated

    Thanks

  • hm.
    please cd to the serialosc directory and post the output of
    > git log | head -1

  • Thanks visinin,

    I'll do this when I get home from work.

  • visinin

    as requested:

    marto@martolaptop:~/serialosc$ git log | head -1
    commit 5ede8ab22377ea01f3d6207b376fda4d8d1bb1ff

  • something looks wrong with the configure script. i'll take a look at this later on today when i get a minute.

  • Thank you

  • hey, couldn't find anything that looked suspicious. let's try this:

    please download [[http://illest.net/~will/configlog.patch|this patch file]] to your serialosc directory. then, run
    > patch -p1 < configlog.patch

    re-run ./configure and paste me the output of the resulting config.log file.

  • Hi visini, as requested

    patch -p1

  • if i'm not mistaken, it looks like your mdns libraries are not installed correctly (if at all)!

  • oh oh oh!
    please install libavahi-compat-libdnssd-dev.

    edit: ./configure is all fixed up. added a check specifically for libdns_sd. thanks again for catching this!

  • Thanks guys, installing libavahi-compat-libdnssd-dev let me install it. Now to test :)

    Thanks again.

  • These are my experiences (ubuntu 10.04)
    As others, I had to install libavahi-compat-libdnssd-dev and libudev-dev
    I also got the following error running serialosc:
    serialosc: error while loading shared libraries: libmonome.so: cannot open shared object file: No such file or directory
    It was solved typing "sudo ldconfig"

    Now serialosc recognizes my 40h. For testing ... any bonjour app or test suite I could run on linux?

  • Flawless install with Lucid (10.04) :D

    Also bump with regards to a bonjour app.

  • @murray

    I'm using your layer pure data patch.
    When I load it I get:

    prepend open
    ... couldn't create
    prepend open
    ... couldn't create
    prepend open
    ... couldn't create
    prepend open
    ... couldn't create
    prepend open
    ... couldn't create
    prepend open
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    oscNote
    ... couldn't create
    prepend append
    ... couldn't create
    prepend resolve
    ... couldn't create
    udpsend
    ... couldn't create
    packOSC
    ... couldn't create
    unpackOSC
    ... couldn't create
    packOSC
    ... couldn't create
    udpreceive 8099
    ... couldn't create
    simplebonjour
    ... couldn't create
    prepend send /_layer/led
    ... couldn't create
    expr, expr~, fexpr~ version 0.4 under GNU General Public License
    help
    ... couldn't create
    license
    ... couldn't create
    popup 124 25 #ffffff monomes m256-114
    ... couldn't create
    print: options

  • you are missing the externals iem prepend, mr peach's osc and net, my simplebonjour, and bbogart's popup in your path when you startup pd.

    there's a link to simplebonjour's repo above, but the rest are packaged with pure-data extended. expr~ is needed too, but looked like it loaded fine! the 'help', 'license', and 'oscNote" errors aren't important.

    also, unless you're very very curious i would recommend putting off attempting to use this patch until after i've made a video of it in use and create a thread dedicated to it. i'd be happy to answer e-mails, but forum help should wait a bit!

  • _layer.pd seems to start up just fine with the following startup path:

    /usr/lib/pd-extended/extra/iemlib/iem_prepend.pd_linux
    /usr/lib/pd-extended/extra/mrpeach
    /path/to/simplebonjour
    /usr/lib/pd-extended/extra/flatspace
    /usr/lib/pd-extended/extra/expr~

    but whenever I try to hit the refresh button to look for devices, I get the following error message:

    no bonjour services of type '_monome-osc._udp' found

    am I not using serialosc correctly? It's running concurrently, and shows that my device is being serviced at a random port~

    any thoughts?