Interview 64 Studio

Hear me now Jonni Bidwell takes a break from his frantic conference snacking schedule to interview audiophiles and gentlemen, 64 Studio.

40 LXF250 June 2019 www.linuxformat.com

LXF250.iview.indd 40 12/04/2019 16:30 64 Studio Interview

he folks behind 64 Studio (https://64studio.com) are Isle of Wight-based T hacker duo Daniel James and Chris Obbard. Their eponymous first contribution to the FOSS ecosystem came in 2005 – a real-time, Debian- based multimedia distribution which exploited the (then) new instructions in AMD’s early 64-bit processors. Nowadays they contribute to all sorts of multimedia efforts, including openMHA (Master Hearing Aid), a project which uses to power hearing aids. They were at the ’s Open Source Summit in in October 2018, where they took the time to chat to wannabe turntablist Jonni Bidwell. Naturally, the conversation Chris Obbard, centre; tended towards one of their other Daniel James, right. projects: PiDeck, a Pi-powered digital vinyl system that allows people to mix/scratch/cut their digital music There was a small department within AMD every package imaginable – gigabytes of using time-coded vinyl on that looked at workstation marketing, binaries that would happily fill a DVD. a conventional turntable. because the high-end workstations used for movie graphics and things like LXF: Yes, Ubuntu has certainly got better : Daniel, you used that tended to be SGI Irix machines – about that, but a few distros still seem to write for Linux Format – proprietary UNIX boxes. Inside AMD there to overload their software stack, which and indeed our erstwhile was one guy in charge of workstation can be off-putting for new users and is a rival, then later sister marketing, and he happened to be a thorn in the side of disc editors trying to magazine and now mad-keen Frank Zappa fan. This is all a bit fit many distros on a DVD. alas deceased Linux random, so bear with me… Dweezil Zappa, DJ: I suppose we were being a little bit User & Developer… who inherited the family business, needed like a magazine, being more editorial and Daniel James: I was some sort of sponsorship deal to get his purist, cutting down the package selection maintaining a list studio up and running again after Frank to those we’d personally tested. So we of UK-related Linux died. The AMD guy decided “I can make got the ISO size down to something that websites in the ’90s. Alan Cox had started it and no longer had on studio 64’s first distro time to work on it, so I took over. When “We were a performance-orientated the first magazines were launched in the multimedia distro so we really wanted to UK, around 1999, the impetus was coming get that audio package selection down, from advertisers like IBM who wanted to to have tools that people could rely on.” spend money to show how committed they were that happen”. So they built some audio would fit on a CD. It included our HotPicks, to open source. They were workstations with Opteron processors, if you will, from all the categories in the hunting around for UK-based put them into the studio and found that greater desktop field. So we hadGimp , people who knew about this they behaved really well. The performance Inkscape, Blender and all the other usual stuff. And there weren’t that surpassed expectations, even when suspects, but obviously our main focus many of them. running 32-bit Windows, because they’d was on the audio apps. You could get Gimp opened up the chip architecture and and friends in any old distro, but we were LXF: Nice. Our subscribers memory access and things like that. a performance-orientated multimedia can find your contributions in I thought, if it works well there, why not distro so we really wanted to get that audio issues 100-130 in our archive and indeed take the Debian port to AMD64, which at package selection down, to have tools that the last years of LU&D issues. Tell me that time was brand new, and combine people could rely on. about 64 Studio. that with a real-time kernel? I was familiar Once people started using this distro DJ: Back in about 2003, AMD launched with the kernel from the DeMuDi project, on AMD64 hardware, they found a the Opteron processor, which was a bit of which was a Debian multimedia distro substantial leap in performance. One a departure because at that time people [http://www.demudi.org]. Then we of the reasons for that was that Linus were focused on [Intel’s] Itanium being the tailored the package selection, because originally wrote Linux on a 386, and future of high-performance computing. at that time a lot of the distros gave you Debian (and other distros) still compiled

www.techradar.com/pro/linux June 2019 LXF250 41

LXF250.iview.indd 41 12/04/2019 16:30 Interview 64 Studio

for i386 targets by default. When AMD64 came along it raised the bar, because suddenly you had all these things like SSE2 optimisations by default. So when you compiled an AMD64 binary you got those for free. For things like real-time audio processing, where you’ve got plug- ins that can take advantage of those extensions, there was yet again this performance leap. This raised the floor level for that binary target up to what was current at the time. On the real-time kernel side, at that time the kernel developers – Ingo Molnar and co – who were working on the real- time patchset weren’t using AMD64 Chris refuting processors. They were working for any suggestion companies that were all doing 32-bit work that he looks like on Intel, because that was the standard Danny Dyer. server platform in those days: commodity one-use servers. So we figured this made it onto sites like DistroWatch and which was very nice of them. This enabled warranted some investigation. it was really popular – to the point where us to continue releasing and pushing In the beginning those patches didn’t we had to apologise to our ISP because those releases out to other mirrors. We even compile on AMD64, because those we were exceeding our bandwidth limits. I had a large network of mirror sites. That guys didn’t have those machines. So think we had something like ten thousand ran for a couple of years and eventually we encouraged and reported back and downloads in the space of a few days. This people got the idea that this was a gradually we got to a nice configuration was before the days of GitHub and content worthwhile approach. Then other distros that worked well on the version of Debian distribution networks. came onboard and started shipping that was current at that time. That’s what Our ISP, Bytemark in York, was very realtime kernels, including Debian. we pushed out in our first releases around generous about it – they actually stepped Prior to this their policy was ‘Real-time the end of 2005. People reviewed it, it in and sponsored our download server, is dangerous, we don’t want a real-time kernel in our release’, because it was all a bit scary and new. But they came on board Back to black with that and I’m glad to say that all the good stuff we did has been carried on in LXF: How did the project evolve with for some external help, and they got mainstream Debian and fanned out to all the shift to an Arm SoC? in contact with us. Really the rest is Debian-based distros. Other distros have CO: The device consists of a BeagleBone just history. It started off with a fairly taken a similar approach too – AVLinux, Black small board computer, with standard “Can you write us a driver?” for example, still makes that kind of distro a custom circuit board called the request, and that was where we for workstations. Cape4all which sits on top [much like thought it would end. But we ended up a Raspberry Pi HAT]. This is an open getting quite involved with the project, LXF: It’s interesting to hear about all hardware bit of kit that’s got three and we actually developed a custom those CPU optimisations. I got properly audio codecs on it, which enables six running a real-time into Linux around 2004 – I guess I was mono inputs and four mono outputs to kernel on the BeagleBone, with a bunch using Gentoo first on an Athlon XP, then connect to the BeagleBone Black. of features to help their research work. later on one of the early Athlon 64s. It This was developed by the university, The kernel includes some scripts was quite thrilling to learn about all the but they had a lot of trouble getting which tweak all the drivers to run at USE flags and know that the binaries I the driver running. They managed to their best real-time performance. We spent two days compiling had all those get one out of three codecs working, also include a Bluetooth LE client to optimisations. but they had a lot of difficulty with allow communication with a mobile DJ: We definitely used a lot of the ideas the others. At that point they asked phone, so you can use an Android or from Gentoo, we knew it was really good. iOS device to tweak parameters within But we also knew that Gentoo’s barrier for the MHA software. entry was too high for most of the users The idea is that end users can tweak we were targeting. We wanted something settings. Everyone’s hearing loss that people could just download, burn and (pardon?–Ed) is different, so there’s install. And then it would boot up into a this ‘fitting’ process, where you go to an working desktop. audiologist and they figure out where It was important for us to broaden out your lack of frequency response is so the user base beyond hardcore users they can then adjust for it. who were comfortable compiling their own stuff. From a community point of The current openMHA test hardware, view, all of that individual learning you including the custom audio board. invest into your personal workstation isn’t necessarily shared out. Whereas

42 LXF250 June 2019 www.linuxformat.com

LXF250.iview.indd 42 12/04/2019 16:30 64 Studio Interview

with the Debian model, where we were The very first version of packaging these improvements and the PiDeck hardware, pushing them back out through our distro with a soundcard building tool, we found that was much modified by Chris. more manageable for sharing those benefits. We wouldn’t knock Gentoo at all, but it wasn’t the right approach for the community we were looking at: creative people who had an interest in open source, but weren’t necessarily ready to go down that [rabbit hole].

LXF: Your talk has the rather fetching title of ‘PREEMPT_RT isn’t just for lasers: The perfect match for hearing aid research’, so I’ll certainly go along. Can you tell us what it’s all about? DJ: I can introduce that and then I’ll pass you over to Chris, who did all the work on it. In 2009 there was a group at the University of Oldenburg in Germany called More recently they wanted to make that a very expensive mistake, because the Hearing4all [http://hearing4all.eu/en]. more compact, easy to carry, and with a cost of miniaturising the hardware is so It’s what they call a competence centre, longer battery life, so they switched from high. What we’re doing is helping with the which is basically a cross-collaboration AMD64 to Arm (see Back to Black, page middle step, if you like, the one before between university and industry. The 42). That’s when Chris joined the project. the miniaturisation. It’s all about avoiding university has a spinoff, Hörtech, and premature optimisation. Even if you get that’s where these two come together. LXF: I guess it’s all highly configurable a successful algorithm, the work to make They’ve been using Ubuntu as their from the user side? that run on this very limited hardware is base platform for their R&D workstation. Chris Obbard: Exactly. The main difference expensive and time-consuming. So you They had a good idea that it would work, between a software hearing aid running want to be able to have a device which but they turned to us for some assistance our openMHA tools and an off-the-shelf maybe doesn’t have as good a battery [fine] tuning it. So what we did, in 2009, hardware hearing aid is the fact that life as a real hearing aid, but gives you the you can instantly flexibility to try different things before you change the bake them in and start optimising. diy hearing aids? software that’s If your algorithm isn’t showing good running on it to potential at the field-test stage, then “One developer is actually give a different there’s really no point in miniaturising it. frequency That’s mostly what the openMHA platform working on a device to put his response. With is about; it’s not really intended that you a hardware could walk around in your daily life with hearing into the ultrasonic range.” hearing aid, this research platform running, but that this may not option is there. People have put a simpler was to build a distro called MaHaliA – the be so straightforward. Our system is two-channel version onto a Raspberry Pi. MHA part stands for Master Hearing Aid. all about software reconfigurability. Given the availability of boards like the All our codenames are based on artists Pi Zero and the Pocket Beagle that cost and musicians, so this one’s named after LXF: I’m just imagining a bunch of Linux just a few dollars, it’s not impossible that Mahalia Jackson, the gospel singer. Our audio geeks reverse-engineering off-the- people could do a completely DIY hearing first iteration consisted of a ThinkPad shelf hearing aids to run DOOM. aid. Simple stereo headsets are available X-series, the smallest, lightest, fastest DJ: We were at an audio conference in on the open market. thing available at the time. last summer, and there was a developer there with a cochlear implant LXF: I’m quite attached to the IQAudio LXF: I’m planning on getting a ThinkPad who was actually working on a device to HAT, and there are a bunch of other so that I can put Coreboot on it. put his hearing into the ultrasonic range, audiophile DACs available for the Pi. DJ: Yep, it’s a great bit of hardware. The so he could detect bats and things like Does this kind of add-on board make actual hearing aid was a USB peripheral, that. So there are hearing aid hackers, but the Pi a more viable platform for more so the idea was you could carry the laptop it’s quite a niche community… advanced openMHA usage? around in a backpack and have cables I think the main benefits of this sort of CO: The problem is really still the two- running to the earpiece. Then people research approach through universities channel limitation. There are solutions could take the whole apparatus out in the is that if they want to try a new way of that exist, such as the Audio Injector Octo, street and field-test different algorithms working, a completely new algorithm, which does allow eight channels. But what and techniques – there are many ways of the cost of that is relatively low because they’re actually doing is quite sneaky – tackling hearing enhancement. They could it’s just software. Once you bake that they’re piping eight channels of audio into leave the lab and go out into real-world algorithm into hardware and you fix two. This is fine, but the problem comes environments with just a backpack for a certain parameters, then if you’ve gone when there’s an audio skip or a processing couple of hours, until the battery went flat. down the wrong route, that is going to be latency problem and one of the channels

www.techradar.com/pro/linux June 2019 LXF250 43

LXF250.iview.indd 43 12/04/2019 16:30 Interview 64 Studio

jumps. Then you get all of your high- frequency sound coming out of a speaker Chris and Daniel suddenly it’s not intended for, and it blows that up. realise that neither one of So that’s quite a risky approach in a real- them turned the oven off. time context. For the medical applications we’re aiming for, you really need reliability, so we’ve chosen a Texas Instruments part which has been verified for use in medical and industrial environments. There’s always a compromise to make these things work. One of the things I’ve been looking into at the moment is some of the Allwinner chips, which have large channel counts. We’re seeing these sort of devices because of [demand for] home cinema systems. So you’re seeing SoCs with 16 or 32 audio channels, coupled with a quad-core processor.

LXF: In my diverse adventures I’ve vaguely touched on the maths behind digital long time, but you do need a well-tuned to retrofit CDJs to give them these new signal processing. It’s amazing how it all system to run it effectively and with low features. This is a great DIY project, given works, but pretty difficult for a beginner latency. The physical turntables are the cost of buying new hardware. There to get their head around. very latency-sensitive, so you can hear are other projects that use a keyboard and DJ: There is a lot of maths involved, whenever there’s any delay – you’ve got other live instruments in real time. The but happily I don’t have to deal with it. issues with hand-eye coordination to ear Raspberry Pi universe is just incredible for If you wanted to get involved, though, coordination. People have been running its creativity, and we’re very happy to be there is a good community of audio xwax on PCs and laptops for a long time, part of that through PiDeck. plug-in developers – LADSPA and other but what we did was to package it for Arm communities on the Linux audio scene and put it into a ready-to-go image for LXF: That seems much more productive that’ve been around for a long time. Raspberry Pis. then my festival experiences last Again, we wanted to make this summer. I guess it makes DJ life much LXF: Tell me about PiDeck. How did accessible to that broader community easier, too. that come about? who were interested, but maybe not ready DJ: It’s a common problem for DJs (and CO: PiDeck [http://pideck.com] is to dive deeply into how it all works. We’ve stage managers). They’ve got their basically a digital vinyl system which is been doing this for a couple of years now, laptops and their CDJs and their boxes completely open source. It’s based on the and there’s a user community on YouTube and cables, so the changeover is quite Audio Injector card, which was funded [www.youtube.com/c/PiDeck] who cumbersome and you’ll always get some through Kickstarter. It all started around like to upload their own videos, which downtime. One of the fun things about the 2014. We were at a not-for-profit festival is always good to see. We’ve got people PiDeck is that it’s very shareable. There’s on the Isle of Wight called Mondomix. Dan doing small, portable turntables into no user data on the Pi itself – it’s all stored was having some trouble getting his digital which they’ve built a Raspberry Pi and on the USB stick with the music. So one vinyl system working while he was DJing, touchscreen. We’ve had people running person can come along, pop a stick in and and he said “Wouldn’t it be easy if there reggae soundsystems with this – it’s all take over, without any further plugging, was an open source bit of kit that I could good fun. And we keep getting people unplugging or cable swapping. plug in and it would Just Work?”. So then popping up [with new ideas]. The latest thing in DVS [digital vinyl we got hacking. A particular thing at the moment systems] is the MWM Phase system DJ: Xwax [https://xwax.org] is a great seems to be people who have the older [https://mwm-store.com], which application and it’s been around for a generation CDJs that don’t have some is an accelerometer that fits onto the of the features of label of the record. You don’t actually their successors – put the needle on the record – you use showing waveforms the accelerometer to send a signal to or supporting a receiver box, which then generates media playback timecode for that rotation speed and from USB sticks, direction. We’ve just had a user pop up for example. and say they’re going to get one of these They’re using and make it work with the Raspberry Pi. the Raspberry Pi It looks unusual when you see people using it, because they’re doing the same actions on the turntables, but the needle is still on its rest. One of the problems with An early version of turntables is that the manufacturers of the software up and styli are going out of business or closing running with the audioinjector.net stereo down, because it’s such a niche thing now sound card. and the tools that DJs have relied on for

44 LXF250 June 2019 www.linuxformat.com

LXF250.iview.indd 44 12/04/2019 16:30 64 Studio Interview

decades are going away. Obviously there are practical difficulties with the stylus the art of noise interface – fluff, greasy fingerprints and suchlike. So having the accelerometer on LXF: Mitigating hearing loss is pretty noise and to focus amplification. That’s the record obviates all that. complicated. How does it work? where it gets really tricky and we need DJ: On the correction side it can get multiple audio channels. LXF: Sunshine can be a bit of a vinyl killer quite complex. So for example, if you Research earpieces have up to too, eh? just have a straight amplifier, that’ll three microphones per ear and they DJ Yes, warped records – outdoor gigs amplify everything you hear – including use different techniques, such as in general are a hassle. We did one at our a truck going past, people chatting in directional arrays – pointing all the mics local skateboard park, and none of the the restaurant or whatever. in one direction – and beamforming, records I brought with me came back flat. That can all be quite distressing to which is used in video conferencing for It was a hot day and there was no shade. the wearer, because they’re hearing trying to block out noise. So that means One of the fun things about control vinyl sounds that they don’t want to hear more microphones, but it also means [for DVS] is that it’s often not black and so louder than the ones that they do. This more processing power. This is where deals with the heat rather better. is the main focus of digital hearing aids, it becomes challenging, because most rather than the traditional analogue of these small Arm boards, like the LXF: And expensive special-edition vinyl ones – to use algorithms to filter out Raspberry Pi, only have stereo input is often a different colour too. and output because they’re designed DJ: Yep, red or purple or see-through. for consumer-type applications. That’s actually a real practical benefit What we’ve been able to leverage if they don’t melt in the sun, which is is that some of these boards, like the something I’d never thought of until I BeagleBone Black, have more, for had a box of wobbly vinyl. One of the applications like home cinema. So fun things about physical DJing with we’re taking that and putting it into turntables is that because of Boiler Room a real-time context. [https://boilerroom.tv], people are interested in what DJs look like when A field test of the laptop- they’re performing, rather than just what based version of Mahalia they sound like. So there’s more focus from around 2009. on the performance aspect, and we think turntables are good for that, compared to just sitting in front of a laptop. LXF: It’s interesting that 4 Studio is based been a really fun project. What it does At the Linux Audio conference they on the Isle of Wight, which itself has a is hide a lot of real-time complexity in a had a live coding concept at the Native strong musical tradition… relatively easy to use interface. If people Instruments headquarters in Berlin. DJ: Yup. We did a sort of music club in get into real-time audio processing There was a guy making the most intense, association with a festival and we got through PiDeck or a project like it, then amazing music just sat at a laptop some kids involved with the PiDeck. They that’s great. We’re trying to help people typing code. But then at the end people get it straight away, because they don’t understand what’s going on behind the were like, “Is it finished?”, and then he understand analogue vinyl, but they do scenes as well, so all the tools we use to took his hands off the keyboard and… understand digital music. So they’ll say create the distro are open source. We’ve [rapturous applause noise]. It’s a different things like “Why are you turning the record got all the wiki and GitHub pages up for performance style and I think people like over?”, not understanding that there could explaining how to use certain things. the visual aspect. be music on the other side. But the tactile We’re trying to be as open so we can to aspect of turntablism is really popular help other people learn what we know. with younger people. And they can work We’re hoping, in the next few months, in groups and get hands-on with it – it’s a to have a new release of our Platform very different interface to the laptop and Development Kit [https://github. everything else they’re used to. com/64studio/pdk], which lets you create your own custom distribution. LXF: How does this compare to Traktor? I like to be quite down on Traktor because LXF: That’s pretty cool. Ubuntu it’s a proprietary product (that I can’t Customization Kit (UCK) seems to have afford) and it makes DJing (which I’m fallen by the wayside now. rubbish at) far too easy. DJ: This is something we adopted from DJ: We’re trying to bridge that gap Progeny Linux Systems, which was around between too easy and too complicated. some years ago. We carried on using it, People might not want to take their and we’re probably the only people still expensive records out – it’s much easier using it, but it suits our purposes. You to take a single control vinyl and a USB basically create components, put them stick full of music. You don’t need to worry together and make a distro. It’s based on about people (or yourself) spilling beer Git so you get all the revision control for on the records. And they’re really heavy free, you can do reproducible builds, and it Reproduced with permission batandcat.com from Reproduced A prototype of USA-based BatAndCat’s openMHA- to carry around too, not at all practical for supports APT and RPM-based repositories powered hearing aid and earpiece. taking on public transport. But PiDeck’s as well.

www.techradar.com/pro/linux June 2019 LXF250 45

LXF250.iview.indd 45 12/04/2019 16:30