Tag Archives: music

Lost in the flood #1: programming, Japanese gardens, music, machine learning

The problem: an ever expanding set of Chrome tabs of read/study/watch/respond-to later material. I’m trying a new solution: put the links in a blog post, write why I haven’t closed the tabs, close the tabs. (And come back to them later. Maybe.)

Let’s go.

What is embodied programming? blog post by Alex McLean (@yaxu). Alex is trying to give a name to something he’s calling embodied programming. From a quick skim I think it’s related to programming in a cyber-physical loop with the machine. But I need to read Alex’s post properly to be sure.

I first encountered the term cyber-physical in a paper by Andrew Sorensen (@digego). Programming With Time – Cyber-physical programming with Impromptu (Sorensen and Gardner 2010). Andrew Sorensen recently posted a video of his latest work: Physics Playroom at QUT’s new Science & Technology precinct, and gave a detailed technical description on the extempore mailing list. Physics Playroom is an impressive piece of interactive programming making use of a huge aggregated video wall, a cluster of computers, and bank of multi-touch screens capable of simultaneously interacting with a hoard of school kids. Playroom is developed in Andrew’s latest live coding system extempore. (If you’re reading this Andrew, thanks very much for answering my question in such detail!)

Emotional responses to music: The need to consider underlying mechanisms (Juslin and Västfjäll 2008). Related to my recent emotional response on the music-dsp mailing list.

One thing I did find time to watch was Dream Window: Reflections on the Japanese Garden (1992) a stunning documentary. IMDb describes it as “Exquisite exploration of landscape and Toru Takemitsu’s music for a Japanese moss garden.” Highly recommended.

My interest in Japanese gardens arose from an ongoing reflective process concerning software design. I was thinking about the concept of negative space — the space around things — the “anti-object”. This lead me to the related (but I don’t think synonymous) Japanese word “ma(here’s another definition of “ma”, and an interesting discussion about Ma at Metafilter). In the process I found MA: Space/Time in the Garden of Ryoan-Ji a video artwork by Takahiko Iimura. The artist’s notes about the work provide an interesting insight into the compositional process. I would like to know more about ma.

Generic programming with C++ concepts and Haskell type classes—a comparison (J.F. Bernardy et al 2010). Lately I’ve been writing C++ code that is better expressed using compile-time polymorphism (templates) than C++’s good old runtime polymorphism (virtual functions). I’ve been thinking about the not-yet-extant C++ concept specifications, which lead me to the linked paper. My knowledge of Haskell is limited. The relation between C++ templates and Haskell type classes has been on my radar since I encountered Bartosz Milewski’s Monads in C++ blog post a couple of years back.

The Fast Cauchy Transform and Faster Robust Linear Regression (K.L. Clarkson et al 2012) paper at arXiv.org and summary at Nuit Blanche (via @IgorCarron). Fast, Robust, Randomised, what more could you want? Fast L1 regression is a hobby of mine. If nothing else this paper will give me a chance to practice my Linear Algebra.

Machine learning – Random forests video of lecture by Nando de Freitas. Random forests, aka decision forests, and ensemble methods. Seems like something I should know more about.

NI have released Traktor DJ for iPad. I am intrigued by the UI design.

Striking it Richer: The Evolution of Top Incomes in the United States (Updated with 2011 estimates) by Emmanuel Saez (via @accessjames). My version of following the movie stars.

Internet audio streaming apps for music performance — some options

A couple of weeks ago bP/555 asked me to recommend a solution for streaming high quality audio from a music performance in Barcelona to the  DIALECTIC night at Horse Bazaar here in Melbourne. The venues at either end were connected to the Internet using domestic-grade ADSL2 modems. This certainly wasn’t a super-high-bandwidth Internet 2 academic network scenario. bP wanted high quality audio (“320 kbps mp3” was the way he put it), video was optional. It wasn’t a collaborative performance, the audio only had to travel in one direction.

I’ve been working with streaming real-time audio over LANs a bit lately, but streaming from Barcelona to Melbourne is quite a different proposition — not something I have any personal experience with. I do have an interest in network music peformance and I’ve been following development of the CELT low latency codec for a while, which is designed for low-latency distributed music performance. So I was interested to find some answers. I figured the best thing to do was to ask around and see what solutions people are using. I asked on ACMA-L and the celt-dev list and pinged a few friends privately too. This post shares the responses I received and a few of my thoughts on different approaches. If you know of something else I havn’t mentioned here please post it in the comments.

A few preliminaries

Before I get on to the alternatives people suggested I want to note a couple of points I made to bP:

  • The computers at either end need to be connected to the network using cables — you don’t want WiFi packet loss layered on top of the already high demands of real-time streaming media.
  • Since the computers will likely be behind NAT routers at either end, you either need a plug-and-play solution that can deal with NAT traversal  (possibly using intermediate servers) or have access to configure the routers to forward traffic on to your computers.

Another thing that became apparent, and that was reinforced to me by a number of people, was that you need to be sure your internet link can sustain the bandwidth needed for the performance. It’s all good and well to ask for 320kbps audio streaming, but if your Internet link can’t reliably sustain the bandwidth then it won’t happen. In general no public link between Barcelona and Melbourne with ADSL endpoints guarantees bandwidth but you can at least test things a work out what the upper practical limit is — keep in mind that it will depend on network routes and network load (i.e. day of week and time of day).

On to the options that were suggested…

Hi-fi chat apps

Early on I’d suggested Skype as a simple and easy plug-and-play option. I like the idea of using a voice chat-app because it’s super-easy to set up and the software should be able to navigate the hazards of domestic situations like NAT firewall traversal without fuss. However one of the key things bP wanted was high-fidelity music grade audio. This put a lot of voice-quality internet-chat applications out of the picture. I learnt there are solutions that use the music-quality CELT codec I mentioned above (which incidentally promises better quality than mp3 at the same bit rate). To this end, Dennis Heerema on the celt-dev mailing list suggested the following two free solutions:

  • Fideliphone – Simple to configure, point to point, almost but not-quite out of beta.
  • TeamTalk – Client-server config, uses speex codec or CELT (mono and stereo).

Shoutcast, Icecast and friends

A number of people suggested shoutcast or icecast streaming. These are the usual go-to choices for internet radio broadcasting. You can buy streams from various commercial suppliers around the web.

People had good things to say about Nicecast ($40, Mac OSX only) as a simple solution for non-technical people. Matt Hitchcock said: “It is a GUI wrapper with an icecast underbelly and runs intuitively and without any fuss.” There’s a list of other icecast clients at the icecast site.

Jordan Reyne uses shoutcast for her Second Life performances “their sound quality is excellent”. She uses a free broadcast client called butt (” broadcast using this tool”), which is available for Windows, Mac and Linux. Jordan has posted a 6 part blog on using shoutcast streams inside VRs such as Second Life or Heritge Trust etc.

Distributed network music performance

Distributed network music performance is the idea of playing music live with other people over the internet. Audio quality is important here, but so is low-delay. After all, playing in time is difficult with a 50ms delay, let alone a 10 second delay! One important thing to note here is that audio codecs such as mp3 add a lot of delay just encoding and decoding the audio. So it becomes important to use uncompressed audio or low latency codecs such as CELT or its successor Opus (both with <5ms codec delay).

For low-delay distributed network music performance Alex Carôt’s Soundjack seems to be the go-to solution. As well as distributed musical performances Alex says that it’s “already used by numerous radio stations and for other high-quality audio/video streaming purposes.” The big advantage of systems like this is that they are designed to provide low-latency two-way communication for collaborative performances. Delays are often orders-of-magnitude lower than systems designed for broadcast streaming. Unfortunately you still have the speed of light to contend with (~86ms from Melbourne to Barcelona in a fibre optic cable, not to mention routing delays).

For high-bandwidth situations a few people suggested Juan-Pablo Caceres’ JackTrip. JackTrip can handle uncompressed and multichannel audio and is commonly used on local area networks. For streaming over the Internet from Barcelona to Melbourne using ADSL modems this option just wasn’t going to cut it.

Mixlr

Mixlr’s mission “is to make audio broadcasting as easy as possible, both for casual broadcasters, musicians and DJs.” They provide client and server applications for both Mac and PC. It’s not a free service but you can sign up for a 15 day free trial. This solution really appealed to me for bP’s situation — it’s focused on high quality audio for musical performance and it’s packaged in an easy to use, off-the-shelf app.

VLC (Video Lan Client)

A couple of people suggested VLC. Scott Gresham-Lancaster wrote:

Another option that I have used in the past particularly if you are just going one way with most of the content is to use Video Lan Client. If you have enough bandwidth you can do point to point streaming of HD with that, especially if you have hardware compression. We did a direct link between the stage at Stanford and University in Bejing this way with great success. Engadget have a nice intro here:
www.engadget.com/2005/11/29/how-to-stream-almost-anything-using-vlc

Other Contenders

I’m not really familiar with live video broadcasting services such as Livestream and USTREAM but the venue in Barcelona had used Livestream before and it appears to offer good quality audio, although perhaps not the “320kbps mp3” quality we were looking for. These options support video and broadcast, which although not critical in this case could be useful for many applications.

Quicktime broadcaster was also suggested, this is “Apple’s standards-based live encoding software.”

Wrap up

Which solution did bP end up using? I’m not telling 🙂 As often happens there was little time to try out all of the options and a choice was made based on expediency. My feeling is that any of the solutions listed above could have worked well and are certainly worth exploring for future events.

In the future I hope setting up a hi-fi intercontinental audio link is as easy as placing a phone call, and with many of the solutions above we’re almost there. The hardest part for the uninitiated seems to be in working out which solution to choose. Do you have experience performing music over the internet? If so, please share your experience in the comments.

Many thanks to Alex Carôt, Nick Collins, Ken Fields, Scott Gresham-Lancaster, Dennis Heerema, Matt Hitchcock, Julian Knowles, Jordan Reyne, Rob Watson and the members of ACMA-L and celt-dev for helping bP and I out and answering our questions. Thanks to bP for asking the question, I’ve learnt a lot.