Archive for the ‘diy’ Category

edge cases of the apple ios ecosystem: musicians

So the new iPhone is out, and as predicted, it does away with the standard, unencumbered, unrestricted-by-patent 3.5mm audio connector. You can read about the release on BuzzFeed’s pretty decent writeup if you like. And this matters, even if you have an older phone, or an Android phone, because Apple is the kind of 10,000-pound-gorilla that can shape markets in this area. Even if you’re not an Apple user, this throws expectations around for the future.

There is an adaptor – really, a mini-interface-card disguised as a cable adaptor – to let you use 3.5mm devices with the lightning port. It has to contain a D/A converter and a small amplifier. One will be included with the new phones, and it costs $9 and doesn’t make your cable weird – it’s not some big block like the previous 30-pin to Lighting interface, and it’s not $30.

I have concerns about how good a job a $9-retail D/A converter and amp unit is doing to do at rendering quality audio. It will be very tempting to make it deliver “meh” quality output, and push people to new gear. That’s short-sighted, but let’s not pretend that stops anyone.

Countering that concern is the fact that at least at one point, Apple required a specific D/A converter for the Lightning audio standard: this one. I have no idea whether that’s still a requirement. But if it is, I’m willing to assume a baseline of competence for it – anything else would’ve been suicidal for the spec right out the gate.

I’ve heard a lot of people talking about whether the new interface is built for digital rights management (DRM) as the long goal. I genuinely don’t think so, because it doesn’t really add much capability they don’t already have. Sooner or later, you have to go to analogue, and unless they want to remove the capability to connect to high-end audio equipment – and Bluetooth does not cut it for audiophiles, or necessarily even mid-philes – there has to be a way to hook up to standard, not-Apple gear.

You can’t get around that. Lest people forget, an Apple-provided solution for this already exists in the form of the dock – shown on the iPhone 7 front page, too. It’s not going away. And the reason it won’t go away is that while audiophiles are not a big market, they are exactly the kind of lifestyle market Apple wants and needs in order to support its brand, and more importantly, its markup. That’s not tech; that’s image management. Even without Steve, Apple knows its image.

Similarly, they can’t cut off concert musicians and DJs from plain old analogue output. There are too many audio pros out there using phones now, and while that market isn’t actually large, it’s a market Apple still invokes in image, and it’s too perceived as cool for Apple to throw overboard without throwing another serious wrench into its branding.

And frankly, with the recording industry betting what’s left of the farm on streaming, they don’t really don’t seem to care much about DRM on plain audio anymore. The RIAA destroyed the value of owning music, so from their point of view, who cares? Music is the billboard, not the product. I just really can’t see this as “HDMI for audio.”

So from a consumer standpoint, mostly I see “Apple has made your headphone cable annoying.” Even that’s assuming you’ve got your own headset and aren’t using the one Apple included, which most people do and will continue to do.

Now, this does get more complicated for musicians and DJs. Even if the included little cable adaptor is good – and let’s say it is straight up great – then you can’t trivially run the new devices on power and interface directly to performance gear anymore. That’s a headache. “Oh shit, I forgot to charge my phone” becomes a critical failure. Best case is you get a new device for that – and the dock is not suitable, you need something you can’t knock over or drop – which means one more damn thing to buy and carry around and/or lose.

Let’s also say you’re using some sort of audio software on the phone, and it doesn’t have a way to save files that you can transfer to other devices. (Even the software I have which does this doesn’t do it easily or well, it’s kind of a pain in the ass and I don’t do it. I use the headphone jack.) And a lot of software – like 8-bit emulator sequencers, and like Animoog, which I have actually used on multiple released tracks – just doesn’t do it. So that just got more annoying on newer hardware too. Another dock or another cable or another whatever. It’s one more step.

But, interestingly, not on the iPad. So far, I’ve heard no rumours that the iPad will drop the 3.5mm connector. And the iPad – particularly the iPad Pro – has very un-phonelike things like a keyboard case and special connector, and art stylus/pencil, and so on.

So what I’m thinking – particularly with the Pro – is that Apple is seeing a differentiation opportunity between “phone” and “pad,” and that they’re pushing “iPhone” to “purely consumption device,” paralleling their attempt to push “iPad” towards “creation device.” That’s not the actual usage out there – lots of people use the iPhone to make things – but it’s coherent market segmentation, and marketroids love their market segmentation.

Also, the iPad isn’t nearly as space-constrained as the iPhone. It’s just not comparable. On the iPhone, replacing that jack space with bigger battery and camera means vastly improved camera and about an hour extra battery life. On the iPad, it’s not a big enough percentage of space to care.

If the next generation of iPad keeps the 3.5mm analogue headphone jack – while adding support for the new Apple wireless headphone specs, of course – I’ll take that to be pretty solid supporting evidence. We’ll see.

if you’re having trouble with paypal today

I’ve heard that some people are having trouble with PayPal through Bandcamp? If that describes you, drop a comment and I’ll contact you in email about alternative arrangements. We can do this, I promise.

Anybody else going to PAX today? I’ll be showing up with the shiny new PocketCHIP I supported in Kickstarter! I just got it, barely know how to turn it on, the flail will be hilarious in the handheld gaming area. But I’m bringing it! 😀

NEW SINGLE HERE! Read about and play it!

ubuntu is not and will never be desktop ready

Today, Ubuntu Linux has decided I don’t get to log in to the desktop.

I can log in via a command line just fine. Just, you know, no GUI for me today.

It let me log in a couple of hours ago, but for WHO EVEN KNOWS reasons, I was getting a bunch of XRUNs suddenly, even when I just tried to copy a track internally. (XRUNs are buffer overflows or underflows resulting in lost data.) I think that’s because the software updater decided to restart itself after I disabled it. I even uninstalled it from the command line, but I think there are secretly two of them, one command-line based and one GUI based, because WHY WOULD YOU DO THIS WHAT IS WRONG WITH YOU?!

So I went through in the GUI and disabled that version too (because when it starts, it hits the disk for obvious reasons, and when you’re recording to disk, as I was, that’s bad), and while I was at it made Dropbox not autostart anymore since the first thing I always do is turn it off until I actually need it.

Then I ran apt-get update/apt-get upgrade manually (like I do always) and restarted.

Now, no GUI for me. Oh, it gives me a graphic login, and it looks like it starts to log me in, but then it says “eh, no” and blanks the screen and throws me back to login with a big HA HA FUCK YOU GUESS WHAT YOU GET TO DO TODAY INSTEAD OF WORKING ON MUSIC.

Ubuntu is not and will never be desktop ready. I know I’ve spent a lot of time talking about using Linux and running Ardour, but you know what? Ardour also ships for the Mac, and I am done with this horseshit. I have literally spent more time this last month working on making Ubuntu Linux work again after some new damn explosion than anything I might ever conceivably release, and this isn’t a one-off, Ubuntu just fucking explodes every so often now, and this isn’t worth it.

So, yeah. My job today is fixing this piece of shit OS again. But my other job is: start saving for a studio Mac. This insanity simply isn’t worth it.

eta: Y’know what? Two hours of failed searching later, this is stupid. I have a system partition image from less than a week ago. Maybe it wasn’t the system patches, maybe it was some other damn thing. I’ll restore the boot partition from that and pray it doesn’t happen when I reapply the security updates.

Hey, I don’t have any better ideas. I lose today regardless, so why not?

eta2: Restored previous boot partition, booted up fine, applied the security updates (apt-get update / apt-get upgrade), hosed again. It’s definitely the security updates.

i guess that’ll teach me to use a drum machine

hey guess what

hydrogen – a linux-based drum machine – has decided that its 151 beats per minute should be much faster than ardour’s 151 beats per minute.

i gotta tell you, this is turning into a “why do i even try” week. really is.

so hey, usb chipsets totally matter

In yesterday’s post, I posed a question: do USB chipsets matter in the 2.0 environment? I had reason to suspect they might.

The answer is holy crap yes they matter they matter so much it is unbelievable.

First, let me talk about what prompted this research, so you’ll know why this matters.

On my old sound interfaces I had live monitoring in hardware, so I didn’t have a lot of need to care about latency. Since that won’t mean much to most people, I’ll explain; when recording, it’s good if you can hear yourself, in headphones. If you’re multitracking, it’s critical.

My old audio interfaces did this with direct connections in the hardware. Whatever came in the microphones also went out the headset. There are advantages to this method, but also disadvantages, in that you aren’t actually hearing what’s being recorded, just what’s being sent in the microphone jack.

But now, I have this shiny new 1818vsl, which doesn’t do hardware monitoring under Linux. Higher-level kit generally doesn’t provide that; they’re assuming you have enough computer that your computer can send back what is actually being recorded, effects and all, and that you’ll do that instead.

This means I now have to care about latency in my system. Latency is basically delay, between mic and computer, and computer and headset. And if the computer is feeding my monitor headphones, that delay matters. You want to hear yourself live, or close to it, not with, oh, a quarter second of delay or something horrible like that.

Now, the good news was that straight out of the box on Ubuntu 16.04 (the latest long-term support version), I had better, lower latency numbers on my new 1818vsl than on my old hardware, when I was using that on 12.04. I could get down to a buffer size of 256 samples, and three frames, which gave me about 30ms basic latency – roughly half what I had with my old hardware and old install. I could use it as-was.

But I couldn’t go any lower on those buffers. One more setting down, and even playback would lag. It’d be okay until the system had to do anything else, then you’d get a playback pause, or a skip, or if recording – presumably, I didn’t bother trying – lost sound. That’s unacceptable, so 30ms was the lower limit, and I wasn’t sure it was a safe lower limit.

And that’s what got me doing all that chipset research I talked about yesterday, and I ordered a new USB card (plugs into PCI sockets) based on that research. I was hoping for a couple fewer milliseconds of latency, that I wouldn’t actually even use; I just wanted a safety margin.

So that new card arrived on Sunday, with its OHCI-compliant chipset made by NEC, and I popped it into the machine and started things up with normal settings.

At first, I was disappointed, because I only saw about half a millisecond less lag, instead of the 1-2ms drop I’d hoped to see. But across tests, it was more consistent – it was always at that same number, which meant I could rely on that 30ms latency in ways I wasn’t sure I could before.

They I decided to see what would happen moving the sample buffer setting one level lower, into what had been failure mode. And the result was 1) it actually worked just fine, where it hadn’t before, and 2) when running analysis, tests showed much lower latency at that setting than with the previous USB ports.

That was an ‘oh ho‘ moment, because it implied that the 256-sample run rate was basically the spot at which the on-motherboard USB could just keep up, and trying to run faster wouldn’t actually produce any actual processing improvement. It’d try, but fail, and time out.

So I did a couple of recordings on that, and they all worked. Then I dropped it another level, until finally, I just said hell with it, let’s just set it as far down as the software will allow and see how hilariously we explode.

I just successfully recorded test tracks four times with these settings, on the new card:

0.7 milliseconds isn’t even something you think about on USB 2.0. 2.8ms, maybe, okay. I’ve seen that managed a few times before, and that’s genuinely indistinguishable from realtime/hardware monitoring. But 0.7ms?

Seriously, this is well into “…is that actually possible?” territory. I’ve never even heard of someone running over USB 2.0 at latencies this low.

So, I guess it looks like the chipset matters a whole lot. Maybe not for most applications, and maybe not in the same way as in USB 3.0 or in FireWire, were there are serious compatibility issues. But in the 2.0 world, in realtime audio, it appears that the chipset makes all the difference in the world.

And yet, I can find this nowhere online. I’m beginning to think nobody bothered until now. Certainly when I’ve asked about it, the response has “why are you on USB get firewire” or “why are you on USB get PCI” because sure I want to throw out all this hardware and start over THANKS NO.

I think USB users have been trained just to accept it and deal. But surprise! You don’t have to! You can actually get a better USB card, if your system allows it, and it’s $30 instead of $1300!

So, HELLO, OTHER SMALL-STUDIO MUSICIANS! You want a chipset that uses OHCI on the USB 1.1 level even if it’s a USB 2.0 card or later because the 1.1 layer still matters, and still gets invoked by the higher-order drivers for card management. See previous post for why that’s important.

This means avoid Intel and VIA chipsets, and look for NEC or SiS – or anything else that loads OHCI drivers and not UHCI. If you’re on Linux, you want to:

cat /proc/interrupts | grep usb

If you see “uhci_hcd” in there, you have a UHCI chipset running your USB port and getting a new USB card with an OHCI-compatible chipset (and disabling whatever’s already installed) might help you with your latency issues.

Good luck!

usb 2.0 chipsets, digital audio workstations, and linux

I’ve been trying to find out whether there’s any sort of difference between USB 2.0 cards, specifically as addresses the needs of digital audio workstations on Linux.

Very few people in linux communities seem to have addressed this question at all, and none I can find on the audio side. (Firewire, oh my gods yes – huge lists. Just not USB.)

But I did a lot (a lot) of digging, and discovered via the Linux USB kernel driver dev mailing list(!) that while there’s not much difference on the USB 2.0 side, there are important differences on the 1.1 side. These difference manifest in two different driver models. That still matters at least a little bit in 2.0, because those 1.1 drivers still get loaded.

Anyway, that difference is that there are two very different driver interface models. One is UHCI, created by Intel and used by Intel and Via, mostly. The other is OHCI, which Compaq pushed when it was still around, and Microsoft preferred; it has less intellectual-property load, and NEC, SiS, and some other makers use it. If you see a “Mac compatible” card? It’s going to be OHCI.

The OHCI model puts a lot more of the business of doing USB into hardware on the card. UHCI has the processor do that work. And while that isn’t a heavy load, it is a nonzero load, and more importantly means that UHCI chipsets require more CPU attention than OHCI chipsets, on a recurring basis. And that is something we don’t need in a digital audio workstation; there are only so many board interrupt opportunities; I want them for moving data, not servicing USB mechanics.

Once I knew that, I did more searching and found people saying how switching to a NEC chipset card had (in one case in particular) ‘saved their bacon’ specifically on their digital audio workstation. They were using ProTools on Windows, not Linux, but it was still with a USB audio interface.

The chipset used by my on-motherboard USB ports is, of course, Intel, and therefore UHCI. (And UHCI drivers are actually loaded, I checked.) There’s also an on-motherboard hub between the outside world and the one true root device; that doesn’t help anything either. So there’s a nonzero chance I’ll see improvement both from changing from UHCI to OHCI, and from moving to a true root USB device instead of a hub device. It won’t be much, but I’m only looking for a few milliseconds of latency here. And even that’s more for… reliability buffer, I suppose? Yeah. Reliability buffer, rather than pure necessity.

I’m mostly posting this 1) so I remember it and 2) so other people looking for this data can find it. HI! I can’t be the only one!

I’ll update this post if I get interesting results.

eta: INTERESTING RESULTS AHOY: CHIPSETS MATTER SO MUCH OMG. I’ll write up a post with details, post it tomorrow.

fit and finish

So, I’ve had my Gnome3 desktop up and running for a while (because Unity has not improved with time), and mostly things are okay! But there are small things bugging me.

My desktop, in tiny form, for reference:


Yes, that offset is intentional. The monitor mounting points don’t match.

ONE: Why aren’t these tips being clipped?


Peek-a-boo!

All the windows have them. Sometimes they’re black. So some sort of clipping isn’t. Is this because I’m using the open-source nvidia driver instead of the official one, or is something else going on?

TWO: I can’t run gnome-tweak-tool because it fails out if you don’t run pulseaudio. Is there a way around that? I suspect I might be able to solve item one if I could run item two.

THREE: I can make a link on the desktop to directories with ln -s, of course. But if I make one to Dropbox, the local-instance directory path ends up being /home/kahvi/Desktop/Dropbox instead of /home/kahvi/Dropbox, and even if I put things in the directory, and it is the right directory, Dropbox won’t sync it because the local reference at time of addition was wrong, and it never notices later so never syncs.

I can alt-F2 and type “Dropbox” and get the folder with the right local path, but that’s kind of lame. I can also pull up the Dropbox mini-app and go through a couple of menus to get there, but that’s also kind of lame. It’d be nicer if I could just click on the icon like I used to do. Or better yet, drag onto the icon, that’d be best.

None of these are really big deals, but it’d be nice to get them worked out, so if you have some tips, throw them into comments? Thanks!

oh look, i’ve stopped screaming

After we got back, I discovered that my digital audio workstation had decided to Not anymore. No idea why; it was fine when I turned it off, it was Not At All Fine when I turned it back on.

I blame Bond, James Bond, somehow. Or maybe that turncoat Q. He used to be a supervillain scientist, you know. That bastard.

Anyway, since Ubuntu 12.04 LTS was going to fall out of support in the spring anyway, and since the problem appeared to be some sort of USB driver issue with the new sound interface, I decided I’d upgrade. That went… very badly. (See also, see also, see also, see also, there’s even more on my personal Facebook account, and none of this even covers the first half.)

But I did eventually get it working, and! I found a good use for an under-desk add-on keyboard tray. Look! It’s a LazyRack!


Hello!


Are you still there?


Targeting acquired!

I can do this because unlike my old interface, it’s meant to rack-mount, so almost everything is front-facing. Reclaimed desk space, and pushed back, all the cable ends are still out of the way! It’s great.

Also, I love these mic preamps oh my gods they are so much better. This probably won’t mean much to you listening on laptop speakers, but here’s a quick zouk sample straight into the mics I recorded last night, once I had things up and running. No processing at all, as there shouldn’t be… it’s… it’s just that these preamps (and same mics I’ve had before!) are picking up all these subtleties in the low-end that the TASCAM buried, and I’d have to dig back out with EQ and stuff. This is an absolutely raw recording and it’s all just there already.

It’s kind of like I didn’t just get new mic preamps, I got new microphones too thrown in.

I’ve written many times that you can do a lot on the cheap, and I think I’ve proven that, but I’ve also always said you’re trading time and knowledge (work) for money. I finally decided to run that trade the other way, and still ended up with a boatload of work thanks to Ubuntu. But for the improvements I’m hearing so far, in the studio? I’ll take it.

Westercon and Clallam Bay Comicon

Who’s going to be at Westercon in Portland? That’s this weekend! Anna has a share of a dealer table, so you’ll find us at least some of the time in the dealer room – at both conventions, actually, because that’s how it works out sometimes.

To be honest, we weren’t originally planning on Westercon, but a bunch of friends from afar are showing up, so we decided hey, let’s go for it.

About the only new thing here aside from my Overwatch addiction – my username is solarbirdy, surprise – is that I got a 6m long MIDI cable so I could try to get the electric piano’s MIDI output over to the desk.

See, I’d got this keyboard only after I’d bought a very large MIDI-only keyboard controller (because reasons), and said MIDI-only keyboard controller – a Roland A-30 – is nice, but it’s huge and kind of a pain in the ass to set up for small things. I have to get out the ironing board to use as a support, it’s wider than the desk, etc, etc, etc.

But I had some idea that the electric piano’s MIDI didn’t work, and it didn’t when I tried it, but I dug out how to reset its internals, and did so, and that made the MIDI port come back online, which was great, except that also turned on this auto-accompaniment feature which takes away like a third of the keyboard and wow it is terrible, like a parody of piano music, terrible in that oh-god-oh-god-how-do-I-stop-this kind of way, in that either-this-has-to-go-or-I-do kind of way, in that I need to stop this right now or there are going to be detonations kind of way, and I’m just saying we got unnecessarily close to tire explosions before I was able to dig out how to turn that shit off.

(WHY DOES “SYNC” MEAN “OFF” THIS MAKES NO SENSE WHAT IS GOING ON IN YOUR HEADS YAMAHA?!)

So, yeah, basically, it’s been quiet. See you at Westercon or Clallam Bay? Hope so! I may nerf you, but I still love you.

pickup chamber with animated spectral analysis

I’ve been playing with that ‘added pressure adds bass response’ idea, for use with these piezo pickups. I made a little wooden chamber that would let me add light pressure, as with the bridge pickup design. It would be held down with a clamp for testing, but would isolate that pressure from the piezo itself.

Anyway, I made a bunch of recordings, two for control, and eight with a range of pressure in the chamber. The controls were made with the pickup taped to the front of my zouk with double-sided tape (standard attachment), and with the pickup directly clamped to the front (also a standard attachment) and come first and second in the recording. The other eight were with the pickup in the test chamber, with increasing amounts of pressure on the crystal, applied by inserting paper as seen here:


With thin cardboard and two sheets of paper

Note again that the clamp is not adding pressure to the disc in any way.

Audio samples in a single mp3, here. There is some extra noise in these recordings; I was trying the modular approach again and that’s the result. I think the TRS connectors are inherently noisy. But that’s a separate matter.

I also ran spectrographic analysis on each recording, and combined those into a single animated gif that cycles through the recordings in order. Here’s the key for both. The gif is repeating, so each frame is labelled in the upper left.

 1: taped to top
 2: clamped directly to top
 3: in chamber, no paper
 4: in chamber, thin cardboard (0.46mm)
 5: in chamber, cb+1 sheet  (+0.11mm)
 6: in chamber, cb+2 sheets (+0.21mm)
 7: in chamber, cb+3 sheets (+0.31mm)
 8: in chamber, cb+4 sheets (+0.42mm)
 9: in chamber, cb+5 sheets (+0.52mm)
10: in chamber, cb+6 sheets (+0.63mm)

You’ll note in both the graphs and the audio that bringing in the chamber at all, even with no additional crystal pressure, caused a big drop in high-end oversensitivity, and boosted the low-end. That was interesting; I have suspected for a while that the crystal side of the disc would actually be better as a source-facing element, but there are physical issues to doing that, since the wires have to attach on that side.

Adding pressure continued to boost low-end response through test 7, without inhibiting high-end response. After that, I think additional pressure began to overcome the benefits, and you see a return to a more midrange-heavy sound – though in all cases, I think it’s better than either traditional mount.

This is consistent with tests made in the bridge pickup from last week, and reminds me of a diagramme I saw of a period crystal microphone that implied the crystals themselves would be set up forward-facing.

Anyway, data! And lots of it, for lots of your crystal/piezo experimental needs.

Return top

The Music

THE NEW SINGLE