Robin's Latest Site

rgrma.jpg
Robin's expertise is in A/V technology and related hardware/software research and development.

Currently Robin works as contractor for Harrison, Manufacturer of the World's Finest Consoles. He develops the Digital Audio Workstation Ardour and produces a line of professional Audio Plugins.

You can find him as x42 on github and mastodon.

roB.log

· 05.06.2012 14:05 · Robin Gareus

JACKdbus - Desktop integration - backend-switching

Prototype of automatic backend-switching for JACK2 using dbus.

You may know this Mac/OSX feature: one plugs or unplugs an external audio-interfaces and the system automatically switches the sound to the new device. - It may not always be what you want, but it is an very handy feature especially for mobile systems. and here's how to set this up for JACK on GNU/Linux..

Overview

First, we need a mechanism to switch the “JACK backend” in order to switch between audio-interfaces. The task includes taking care of re-connecting physical I/O ports in case they're different on each device.

Second, said mechanism needs to be triggered automatically when a new device is connected or if a device goes away. Here's a short annotated demo-video:

(If Flash is installed JavaScript is activated, you can watch a video inside this web page.)

(well yes, I should have ripped out that USB cord more visibly.. sorry, next time. I might use a real camera too, then.)

Prerequisites

Download:

Note: dbus-triggerd and a jack2 debian packages (source and i386) are available from

deb http://rg42.org/deb/ sid main

Installation and testing

  1. get jack2, patch, compile and install (or get the debian package).
  2. compile and install dbus-triggerd (or get the debian package).
  3. download and install myjackctl.sh to PATH (~/bin or /usr/local/bin), chmod +x.
  4. open a window to watch tail -f ~/.log/jack/jackdbus.log
killall -9 jackd jackdbus # clean start
jack_control eps verbose true        # tell jackdbus to be verbose
myjackctl.sh alsa hw:0 1024  48000 3 # launch jackd on first ALSA interface -p1024 -r48000 -n3
myjackctl.sh alsa hw:1               # switch to second ALSA interface

Launch some jack clients, players etc and repeat testing with myjackctl.sh.

Automating it with dbus-triggerd

dbus-triggerd is a tool to trigger shell-commands upon receiving a given dbus-signal.

It can be used to invoke myjackctl.sh in order to change the JACK-backend if

  • a new audio-interface is connected (system-dbus org.freedesktop.Hal.Manager,member=DeviceAdded) → use the newly connected device.
  • an audio-interface is disconnected (system-dbus org.freedesktop.Hal.Manager,member=DeviceRemoved) → switch to a fallback audio-interface.
  • JACK daemon signals device-error (session-dbus org.jackaudio.JackControl,member=DeviceError) → switch to a fallback audio-interface.

The two last are redundant and exclusive. JACKd still needs a patch to send a DeviceError. Using HAL's DeviceRemoved may be problematic for setups with more than two sound-cards if the removed device was not currently the one used by JACK.

Example to launch dbus-triggerd:

#!/bin/sh
make || exit
killall dbus-triggerd

### switch to sound 'hw:0' on any DeviceError
# This requires a patched JACK2, that sends a DeviceError
./dbus-triggerd $@ "type='signal',path=/org/jackaudio/Controller,interface=org.jackaudio.JackControl,member=DeviceError" --shell "myjackctl.sh alsa hw:0" &

# This an alternative to the above, using the HAL message
#dbus-triggerd $@ --system "type='signal',path=/org/freedesktop/Hal/Manager,interface=org.freedesktop.Hal.Manager,member=DeviceRemoved,arg0=/org/freedesktop/Hal/devices/usb_device_582_74_noserial_if0_sound_card_2" --shell "myjackctl.sh alsa hw:0" &

### switch to external USB sound device 'hw:2' when it's connected
./dbus-triggerd $@ --system "type='signal',path=/org/freedesktop/Hal/Manager,interface=org.freedesktop.Hal.Manager,member=DeviceAdded,arg0=/org/freedesktop/Hal/devices/usb_device_582_74_noserial_if0_sound_card_2" --shell "myjackctl.sh alsa hw:2" &

Implementation

Here be dragons…

The mechanism for backend-switching is implemented by a shell-script myjackctl.sh (which call dbus-send) that controls jack2d by exchanging dbus-messages.

myjackctl.sh is started with different command-line parameters on-demand by dbus-triggerd.

  • org.freedesktop.Hal.Manager,member=DeviceAdded
  • org.jackaudio.JackControl,member=DeviceError (requires patch to jack2)
  • (or) org.freedesktop.Hal.Manager,member=DeviceRemoved

Note that myjackctl.sh uses the org.jackaudio.PatchBay dbus-API which is broken in jack2-r4120 (see ticket below) and fixed by Nedko in jack2-r4366.

Future: Instead of patching jack2 to send additional messages (here: org.jackaudio.JackControl,member=DeviceError), the trigger functionality should be built into jackd, but requires a callback to the control API to be added to JACK.

The shell hook-script (myjackctl.sh) could be implemented easier and more flexible using python (jack-control API bindings) or similar language more suitable to parse and provide audio-port mapping and configuration.

References

German influence on the French Election

Taking a leaf out of Merkel's book, another German is trying to influence the French elections..

Last week I received a phone call by my collaborating artist and previous supervisor Maurice_Benayoun that there is interest to show a customized version of our project Emotion-Forecast during the final stages of the presidential election campaign for François_Hollande.

My first reply was: “I'm not interested in political statements. Yet the project is free-software, everyone can use and customize it for their needs.”

As citizen of the European-Internet, I am not allowed to vote in France - so here's my change to take some influence nonetheless. While I can't say that I'd vote for Mr. Hollande, I am certain that I don't want to continue living in a country ruled by Sarkozy. Decision-making by exclusion, fine.

So I spent a few hours hacking - which is fun anyway - and a few hours carefully translating English into French.. et voila. La prévisualisation est disponible en ligne.

I'm still undecided what I'd actually vote on next Sunday. Pretty much both options seem like dead-ends to me. Still, I'm happy that people's emotional-concerns are included in an election campaign, which otherwise is pretty much focused on the economic situation: jobs, taxes, dept-crisis,.. sprinkled of immigration and security concerns.

Even though this “emotional weather forecast” will likely be presented out of context of our initial intention, I very much welcome the opportunity that it may inspire some people at least.

Update: it is going to be presented on Sunday, May/6 at Place de la Bastille.

Update: article in huffingtonpost about the project[ion].

Die Luft der Freiheit weht

There could not be a better motto for the Linux Audio Conference 2012 than the one Stanford already chose: “videtis illam spirare libertatis auram”1). The 10 year anniversary of LAC marks the first time that LAC takes place outside of Europe, and the conference is packed with exciting and interesting presentations, concerts and installations. There's a good amount of sessions on Ambisonics, FAUST, Pure Data, and - although LAC unfortunately takes place parallel to the SuperCollider symposium - SC presentations as well as many other interesting projects.

The Conference Schedule has just been published and I'm eager to visit CCRMA which has been a supporting institution of Linux Audio ever since there has been any sound on GNU/Linux.

Besides reuniting with fellow LADs and meeting creative people from various fields, I'm looking forward to experience the 3D 22 channel sound system with speakers above, around and below the audience level in the CCRMA Listening Room.

Big Screen Plaza, NYC

E-forecast

Streaming Museum, an international public art and online museum, will celebrate its fourth anniversary on January 31 with the US premiere of ”Emotion Forecast” and ”Occupy Wall Screens”, real-time artworks by the renowned French artist Maurice Benayoun. The exhibition will be on view for one month at Big Screen Plaza in New York City and through 2012 at StreamingMuseum.org.

“Emotion Forecast” and “Occupy Wall Screens” are part of Maurice Benayoun's ongoing series on the “Mechanics of Emotions” which translate emotions into maps, performances, the Emotion Vending Machine, and sculpture relics of the world.

The artworks have been developed by Robin Gareus, at the CiTu-Paragraphe Lab of the University Paris 8, in the frame of The Art Collider project as a part of the PUF program of the FACE Foundation in collaboration with the SFAI (San Francisco Art Institute).

Streaming Museum is the first global public space and online hybrid museum with collaborating locations and cultural centers on 7 continents. The 30 x 16.5 ft. HD format screen of Big Screen Plaza is located at 29th Street and 6th Avenue, adjacent to the Eventi Hotel.

More information: http://www.streamingmuseum.org/featured/maurice-benayoun/

· 26.01.2012 21:06

Protest SOPA, PIPA et al.

As you may have noticed various sites and domains that I manage went black - or rather redirected to http://protestsopa.org/ or to the Electronic Frontier Foundation.

It probably does not wag the tail of anyone, but I felt that is incumbant upon me to express my support for freedom of speech and that I am prepared to defend it.

SOPA, PIPA - What is that?

The Stop Online Piracy Act is H.R.3261, and the Protect-IP Act is S.968 both are propsed laws in the US of A.

Why is bad?

The intent of both pieces of legislation is to combat online piracy. The problem is that the legislation, as written, is vague and overly-broad. The intention may be good and justified, but the implementation would be nothing short of legal censorship and discrimination.

It'd grant the executive the power to simply shut down information sources. In fact, if the law passes, it would not even require a court order to ban a service! A simple note would suffices to censor information, unless the provider of the content can prove and assure (monitor) that his/her site does not facilitate the commission of criminal violations.

There are times that everyday reasonable activities can be construed as piracy, but the actual problematic word is facilitating, as it opens the door to condemning sites that simply link to other sites.

Since the USA directly or indirectly controls most of the internet's infrastructure, and the proposed legislation has been written in a manner in which they specifically take into account “foreign rogue sites”, the legislation will, should it pass, have an impact upon the world as a whole.

These acts could have a significant impact on the way in which we currently use the internet: Free Speech is only as strong as the weakest link.

What to do about it?

Thanks to many activist sites (see links above and below) this is easy. If you are US resident, complain at your senator(s). If you are elsewhere, there are local efforts: e.g. join contacting the German minister of foreign-affairs who is supporting the law in the US!

Note that, Europe with the upcoming ACTA law is not too far behind. Act now!

References

For more information about SOPA/PIPA, please see:

sndfile-waveform

Celebrating the inclusion of sndfile-waveform into libsndfile-tools sounds like this:

· 15.01.2012 07:05 · Robin Gareus

back from Finland

nordkapp_jump.jpg After some creative interlude we eventually completed Carolina's trip from Ushuaia all the way down south to NordKapp, spending two weeks in Finland's Lappland on the way. - gorgeous and relaxing.

Besides an unbelievable ammount of unripe berries we did encounter too many mosquitoes (not bugs and luckily no sand-flies), yet found free-wifi in the most unexpected spots under the midnight sun.

Starting off with the night train from Helsinki to the midnight-sun film-festival in Sodankylä..

small picture gallery

· 23.12.2011 19:44

Ecology of Ardour

a3_videotimeline.jpg

Dave Phillips has written a nice article featuring my recent work on the Ardour3 video-timeline for the Linux Journal.

It is titled An Ecology Of Ardour.

· 23.12.2011 18:13

e-forecast @ FIAC

Snapshots of the emotion-forecast as presented during FIAC at the Showoff festival in Paris.

View Image Gallery (images by M. Benayoun)

showoff_small.jpg

· 23.12.2011 04:47
 
start.txt · Last modified: 19.07.2024 22:31 (external edit)