Postcards from the Bleeding Edge
I havent't found a tool that will let me mark peaks, grab the times, and see what the beat of whatever I'm looking at actually is, so I rolled a little spreadsheet (ods
format) to do the job. I (tediously) marked the sharpest note in some good sounding segments of the recording I made last night, and spat them into the spreadsheet.
Looks like at least the chorus of "Living in the OOze is close to 77.84. It's probably double that (It is kind of a frenetic song, almost techno ), so that would be 145.68. Maybe I'll round up or round down, later. I think I can dismiss the slower examples as me trying to sync myself up to an echo I briefly had on the recording - when the real answer is to sync the echo to the song's tempo.
Now I only have hours and hours of other mismatched midi tempos to look over and fix, but to heck with that, it's saturday night, I wanna play... let's fiddle with that echo... get a basic drum track... do some piano...
Easter Island redux
A while back I talked about Jared Diamond's book, "Collapse", and semi-seriously suggested
a means as to how to raise the amount of particulate matter in the atmosphere in order to chill the earth. It turned out that there are multiple people mulling over solutions
to global warming via what wikipedia calls Global Dimming
. And slashdot had a huge discussion on it
a few weeks later.
I had a nightmare where the pooka statues were looking at me, with their sunken white eyes, as I walked up a long, decrepit, wooden bridge, from a raft.
In my head ran images from "google Sirius": from orbit - down to a narrow band of some bipedal species' ring of living bodies around the seashore, living, eating, mating, birthing, and dying in the tiny habitable band left after absolutely everything else had been eaten
- a scene straight out from Larry Niven's short story Bordered in Black"
Three years ago I'd come up with a song trying to take on what the heck we were going to call this decade, now that it was half over? It was called "Living in the 0002s", and I don't remember any of the lyrics now but I was pronouncing it as "oohs" so clothes must have been a rhyme in it.
And it changed to "Living in the ooze" one day while I was jamming on it (it's a lot of fun to push a bass through a guitar effect)
And now, in my head, it had overdubs from Collapse, and one phrase taken from an inane 2048 public service announcement:
"Remember Kids - Eat your plankton and jellyfish!".
Maybe the chorus would be "Easter Island", but I didn't have words to all of it, still don't, and have never liked what the melody seems to be... but the chorus is a blast to play.
Out on the beach
Just out of reach
mind melting heat
Nothing to eat
'Cause we're living in the Ooze
And we don't have any shoes
'Cause we're living in the Ooze
'Cause we're living in the Ooze
Anyway, I rocked out to this last night (instead of finishing my christmas cards). I like about 2 minutes of the bass recording, and about 2 minutes of the piano overdub, but only about 30 seconds of both at the same time.
This is a classic example of where midi would help. I really need to start with a midi drum track with the correct rhythm, maybe do the piano track second, THEN do the bass part, rather than the reverse. Problem is, I think, but am not sure, that portions of this are in 3/4 time, and so far (many listenings) I have't been able to find the right tempo for it.
... And it's a heck of a lot more fun just wailing on the bass part and not bothering with all that complexity.
Have to install some discipline. Oh, left brain? Need you this morning
G is right out. Anyone for D?
The latest svn of ardour2
apparently has a fix for the "cleanup" option as of rev 1200 - which is good, as last night I was up til 3AM doing overdubs of Billy Joel's "She's got a way" (and doing some internet christmas shopping), and accumulated dozens of fragments over the course of the evening... setting 1213 to rebuilding now....
BIG note to self: Quit smoking before you completely lose the ability to hit a high E
. I started off trying to sing this song in it's original key (G), and to hear my voice squeak up there was really not a happy experience. I transposed it down to E, and was still squeaking, so I ended up in D, which is more or less my natural key.
In my increasingly distant youth I could hit a G.
Having jack sync working is a godsend. Example: I generated the first audio track from rosegarden at 60bpm, including the melody. It clipped heavily, but as it was basically a scratch track, I didn't care, and recorded another track with just the base piano part later, in perfect sync with the first track, no melody. There's still a mistake or two on the base piano part, but I can go back and fix that, easy, but I wanted to work on gates and vocals in general, so I just ignored those problems and started doing overdubs. I have had unfixable, one take only, audio recording for a long time, and this is just wonderful!
7 vocal takes later I had about half a decent vocal track when cut apart. Another note to self - try recording in the morning.
Three crashes last night - two of rosegarden sequencer, one of ardour. The sequencer seems to die most when it sits idle a while, then gets a big transport move. I really have to start running this out of gdb soon. Ardour2 crashed on an export (not so much crashed, but took up 100% of cpu and ran all night). . But, not bad for about 6 hours of work. I'd redo the export and post it but I'm hating my voice too much this morning.
It's nice to know that my cpu fans (which are turned down to the minimum) are running fast enough to keep the system going through that sort of abuse.
Haven't crashed kernel rt11 or rt14 yet, either.
I didn't pick up any discernable noise on the analog recordings from the computers in the basement or the mess of cables, so I'm still cooking with oil.
I do have to sit down shortly and focus on getting JUST ONE song done by christmas, but I have other work to do for the next couple days and won't be able to get back to it til sunday. Or so I tell myself....
Got the PCI rme card today. It's working great in the dual opteron. I've plugged in some new devices - my old korg and a mic and a PODXTLive. I have a mono gate for the mic, that's cool.
I have been thinking about doing something odd - as the korg doesn't generate enough volume to crack -20 db, and I have been clipping my final mix a lot, I'm thinking to myself - would it hurt to just record linuxsampler and hydrogen at -20 or even -30 db? I have the headroom... why stick all these compressors inline, peak at -3 all the time, have to master it down, when I don't have to? I have at most 60db of dynamic range right now (though I intend to really fool with that with some very quiet environmental noises).. I'll have to research this...
Problem is, when I try that on analog sources, the gates go screwy (no gates needed for digital sources), they cut in at levels hat are musically sound for 44.1khz/16 bit running hot levels, but not this. maybe I should do all the digital stuff at low levels and the analog at the usual hot...
After scraching my head for a while, (there are no stereo gates in the ardour2 ladspa plugin list for some reason - I wanted to click on "Gates" and have a stereo gate to play with, I don't see one, neither would a first timer), I finally found that the Tap-Dynamics plugin has a stereo gate
, and a fairly easy way to compile in new functions, if I so choose.
It's cut-in is fixed at -80 db. And it doesn't clamp down to 0 at below -80 db, either, just to -105.... -infinity damn it! Or whatever the value for 0 volume is supposed to be.
I'll try compiling in a better one.
Still, what I want is something with knobs I can tweak dynamically, got lots of noise down in the mud on the mic, korg, and podxt (supposed to be noisy, it's an amp simuation, but still...)
There is a stereo gate in Steve Harris's plugins, (plugin 1922), but it's not compiling in by default. From looking at it, it doesn't seem like it could possibly work, either.
I have about an hour's worth of midi fragments. I have rendered down most of it. The key to it all is that at most there's 32 bars of anything that's any good, then noodling, then something else. Most of it is not in the midi tempo.
There's places where the overdubs are good, and otherplaces where they are bad.
Bunch of new age stuff, not good enough to make George Winston scared. Not all this is labeled yet.
Interregnum - which is this piece in Am and D (and some C,G) that is basically the same chord changes as Rhysling and me, but more or less stands alone. There's a sax or a flute in this one eventually. I've also done it with a howling bass part... hmm...
In no particular order on these files:
A couple good blues intros. Maybe even a pair of complete blues. Who knows?
Rhe first part of a piece I call "Estonia, 1956", which is one of the earliest things I ever wrote. It's normally in Gm, Cm and D, but I had transposed my keyboard up or down somewhere and I haven't figured out where it landed yet.
Another thing called "Spooky", in Em,D,C,Bm. Or maybe not.
Born to Cry - Basically a walk in D.
D A# B B G F# E A
D A# B B G F E A
D A B B G D E A
D A B B G G Gm7/F Gm/E maybe an A not sure yet
Next up - extracting the good bits from the monday's jam
I will periodically update these, and ultimately put up links to the rendered music. It seems to take about realtime to mix down a 96Khz mix down to 44.1. I'm typing this while that happens, the a cd burns for a test listen. I think I'll switch to audacity to cut apart the bits.
My recording pattern is now: fire everything up, record midi and audio, record, record. Stop. Save everything. copy it over to another box. Start rendering it there. (Same setup, just dual processors and 10ms latency on jackd) Go back into overdub mode on the main box, try a few things. Make some annotations. Get coffee while it plays back. Hold cat. If it held up, save everything and cp over to other server which is hopefully finished rendering by now, start it rendering again. Exit everything. Bring up rosegarden and linuxsampler. Start editing...
At the end of the session I have another half hour of some fairly worthwhile things. Cool, I can listen to all this stuff with a notepad while I get some sanding done. Enter exit everything mode.
My primary hard disk is now full. 96khz recording really eats a lot of disk. I haven't quite figured out ardour2's "cleanup" facility, it keeps wanting me to edit my snapshots in order to delete bad tracks, but I don't have any snapshots.
My biggest problem at the moment, though, is that some of the really good stuff I midi'd, wasn't against the tempo in the midi file, so it's really hard to edit. What I'd like rosegarden to do is select two notes on obvious bar boundries and have it adjust the calculated tempo to suit. I used to be able to do this, somehow, using some tool - in sonar? don't remember... there must be something that can do this in Linux....
(and oh, yea, a good 12 hrs of editing and only one crash of rosegardensequencer - and that happened when I had 600MB on swap. Definately 2GB of ram is a requirement for a half hour file and all this other stuff at 96k unless you are very careful when you edit. Still, the client/server X stuff works fantastic, editing sheet music is fast and responsive. I'm cooking with oil, here)
Dang, not much time left before christmas.
I need a place to stick all this stuff, the graphics and the sound - I try Flicker-uploadr - it fails on authentication, I try f-spot, it too fails on authentication on both picasa and flickr. I don't know why. I upload some graphics via the browser tools, but that's kind of annoying.
Now for the music - Myspace, maybe? It only seems to have an option for upload pics and videos... I upload an ogg as a video and it fails and I really should do an export that can be turned into mp3s as well as oggs...
And I really, really, have a lot of dust from all this construction. My roomba can't keep up. And my cat's fur basically sucks in dust from the air. She stopped scratching so much after I gave her a bath. It only took two days for her to start scratching like crazy again - I'd give her another bath, but the scratches she gave me have to heal first, and you're not supposed to give a cat more than one bath a month.
I think I should seal up the sensitive equipment like the ADAT for the duration of this rebuild.
My cat killing off the rme forced me to think about the musical development process. I have 4 machines available to me that can do some of this work - 2 x86_64, 2 x86. I wondered if ardour, rosegarden, and hydrogen would run over X (linuxsampler is already a client/server application in it's own right), and logged in to the laptop after first enabling X with xhost + on my box, doing a export DISPLAY=mingus:0.0...
Out of the box both 64 studio and FC6 disable connections from X applications, to turn it on you need to put in a
line into /etc/gdm/gdm.conf on 64 studio and into /etc/X11/gdm/gdmsomething on FC6.
Logout, and login again. xhost +. ssh dhcp-206. export DISPLAY=mingus:0.0; qjackctl & linuxsampler & # wait, then run ardour, then rosegarden...
Boom. Everything works over X now. AND - Finally, while doing all these applications at the same time, over the net, my laptop ends up with a mere 3MB on swap just to start. The meters in ardour lag a little (hydrogen doesn't), but otherwise I don't notice that I'm actually running over the net!
I realize that I can treat the process of moving all this audio from linuxsampler and rosegarden and hydrogen as a rendering pipeline, much like someone would do the same with graphics. I can for example, move jackd's latencies back to 20ms - and just walk away while all these tools do their magic.
And - importantly - hold cat while rendering - while, finally, she's tired of sleeping on the piano, the mixer, and the keyboard stand, and has moved to a chair behind me, she takes idle opportunities to jump on the keyboard when I'm not looking.
I do a big render of my 26 minute long session, and end up with 600MB on swap - but it completes!
Not only that, but by moving a few other sessions off to other machines, copying them over via NFS, and using X to run client server, I render a couple more sessions, then export as a float wav file mix it all down at the same time using oggenc --resample -q 48000 file.wav. cool. I have to automate this to put tags in. And burn a CD
Later on I try lame to get mp3s out of the wav files - nothing doing, it reads the floating point data and turns it into digital hash. Either I need to find a command line converter or export to some other format (24 bit int?).
I dump nearly 2 hours of ogg files onto my samsung mp3 player (I don't know what all the furor is over the ipod nano - the samsung rocks, and supports ogg)
Unfortunately, the overhead of doing ardour and linuxsampler has led to a few overruns on the laptop generated stuff which sound aweful. I need to leave the firewire drive plugged in and use that to drive linuxsampler, just in general, drive linuxsampler from a separate drive.Note to self: And next time, before I fall asleep, remove the earbuds. My right ear hurts like the devil this morning
As a first pass at rendering all this music, it's not bad, but Sturgeon's Law really applies. There's fragments of 4 old songs in here, a few excursions into covers to try and break me out of habits, and most promising - at least 4 pieces of new sounding material. Yea! I might actually get a pure piano record done by Christmas.
Since I've been effective in using jack sync for the first time, timing information has propigated through it all and I can go on the road, take notes as to what worked and what didn't, when, and then find the precise spot where the midi for all this was and re-edit.
The studio is still a mess of cables and I haven't figured out what carpet (or even maybe hardwood floors) I'm going to put in - and maybe I should build some sort of box to keep all the cables or raise it off the floor. It kind of has that garage band ambiance now though...
my rme-multiface is dead
and I think my cat killed it. I think she thought it was taking too much of my attention away from the important matter of keeping her petted and clean. I took my gentle revenge later...
I'm doing ok using the alsa 96k plughw on the laptop itself for now, but I'm going to need to do vocals sooner or later, so I bit the bullet and bought myself the pci version of the rme multiface card. It'll go into my dual opteron when it arrives thursday or friday. I should order myself more ram but that involves ripping the machine apart to see what's in it. ESR and Rob Landley have written a nice paper
on how application memory pressure on the 4GB barrier will push x86_64 into the mainstream
- I don't buy it (reasons too long to go into here) - but it's pretty obvious I need at least 2GB of ram to do what I want to do at this point, and I might as well go to 3GB in case the sticks I buy are incompatible with the 2 500MB sticks in the machine already. Hmm, maybe ESR and Landley have a point...
I've been cataloging what I do differently from most normal audio hackers in Linux. The big item is that I'm running at 96khz throughout, which means I'm pushing 2.18 times more data through the system than a system running at CD speeds - 44.1khz.
There are a lot of places where Linux audio apps make assumptions that you are running at a "normal" sampling rate. Most ladspa plugins for example have a default of 0-70db dynamic range, which is fine at 44.1/16 bit, but way too small for 96k/24, which has roughly double that. It's possible that the default stack size, and other fixed allocations in these apps are mistakenly tuned to 44.1 as well. I've got some tests in the queue for that.
One of the things that irks me right now is that the stereo gate I have doesn't want to compile. The mono gate does, with a 96k range, but that doesn't help lest I split tracks and does weird things to stereo instruments.
A gate is rather important when you are adding effects that may or may not like running at this high a resolution - You really need a gate on devices that can't output across the entire dynamic range (or, worse, leave noise behind at low levels) - you get all sorts of weird side effects from running reverb (as one example) on a bunch of not-quite-silent 96k channels and mixing down to 44.1 - the effects do NOT drop below the noise floor as they should.
Well, I've got enough problems to keep me busy without working audio hardware, time to delve back into it... I really should finish the core posting of this blog...
Why the heck is my cat featured in these blogs? Well, she was key to finding the answer... but first some more backstory:
After I "upgraded" my windows 98 box to Windows 2000 back sometime around 2002, my old 24 track motu 24i system, which used to be able to handle 14 tracks or so, rapidly deteriorated to where I'd be lucky if I could get 4 tracks to work for 15 minutes before crashing. After wrestling with it for a while, (and eventually dropping out of the band I was in), I put the motu on the shelf and tried to do pure midi with Sonar. Each successive release of Sonar performed worse and worse, and even after a major hardware upgrade, I couldn't get reliable timing out of it. I gave up, and just started performing to good old tape. Eventually my 8 track tape deck went screwy too, and that's where things stood for a couple years, my creativity frustrated, and frankly I played a lot more guitar than piano because I just couldn't handle being around all that broken electronics.
. It was the first linux app that even came close to Sonar in base capability, and upon seeing it I threw out windows from my studio. (and after begging Motu for years to produce a Linux driver without avail I traded the 24i and some other stuff for a S6000)
I got ardour to work pretty well under Linux using the rme-audio card. I was exuberant. I was tired of the yearly 100 dollar Sonar upgrade cycle, for more flash and glitz, when I couldn't even record properly in the first place. Dog-tired. Sure, I could have reverted to Windows 98, or sunk more time into Windows... but why bother - if I have the source to all my code, I can FIX it... and I knew a heck of a lot more about Linux than Windows, so I KNEW I could make it work...
Or so I thought, nearly 2 years ago. I forgot to account for the right-brain problem. And my cat.
When I get in front of a musical instrument, all my programming ability is usually exausted by work, and my right brain, my artistic side, takes over completely. Even the tiniest thing wrong technically puts my right brain sulking in corner.
Even though I'd started hacking, professionally on the realtime extensions to Linux, I rarely had time or focus left over to fix the darn studio. When I got in there, I just wanted to *play* - I could record 8+ analog audio tracks in realtime, but I wanted more - I wanted a sampler, a midi program, and a drum machine - all to work at the same time.
And ever since I started trying to do that, I've hit a brick wall - totally random crashes, system lockups, segfaults without a stack backtrace, odd network behavior, corrupted filesystems - name the problem I've hit it - sending right brain screaming out of the room - and tired left brain would ask "do I get paid for this? No? I'm outta here..." and I kind of threw up my hands and tried to be happy sitting down and recording analog all the time, when I could be bothered to record.
I picked up the bass this past winter because I just couldn't be bothered anymore.
Anyway, these past two weeks have been the first time I've had both sides of my brain available to tackle the problems, one by one. One of them being my darn cat.
I achieved a milestone today. I'm not going to go into all that went before (there will be a part two to my "Cat"astrophic blog, but it's a bit long).
I got rosegarden, ardour2, hydrogen, and Linuxsampler with a massive piano sample and a small bass sample, to all play together on x86_64 in a gig of ram. Under normal gnome, even. On a standard audio card running with the plughw1 at 96Khz. 3 stereo tracks! I know this is not much compared to what some systems can do, and not much compared to what I was doing in the late 90s, but it's better than I've managed to do in years. My basic setup now looks like this (including cat):
I have a second keyboard I use when typing isn't critical and my cat is somewhere else (which is rare). The S6000 sampler, the dual opteron, 4 hard disks with a terabyte of storage on them, and a few other devices are in the garage below this room, which keeps them silent and out of the way.
Since most of what I was fighting was memory pressure in general, (I have 800MB out on swap), and since adding ram isn't an option, and after some other tuning that I'll get to in my next blog (some of which is important), I gave up on a pure userspace software fix and:
0) Updated to 2.6.19-rt11. Mingo has come out with bunch of kernels in the past week. It's really great to do a yum update and get them without needing to recompile.
1) KILLED BEAGLED DEAD. I have no idea what beagle is for but it's an I/O pig. Let Paul Vixie do the indexing at 2AM, I say.
2) Added a second drive for swap and samples. I dug an old drive out of the garage and stuck it on the firewire port on the laptop, and formatted it with xfs for good measure.The first drive gets used for ardour and swap.
In pursuit of simplicity and because of a few crashes that seemed to be firewire related, I'd taken firewire out of the system completely. Now I'm thinking I could stripe a few firewire drives together.
3) Ran over X client/server. This took some digging - for years now Linux distributors have been arbitrarily disabling one of the most useful features of Xwindows - not only disabling the ability to run client/server, but blocking the Xwindows TCP ports by default. This has always driven me bats - the beauty of X IS that it runs transparently over the network. FC6 has even gone so far as making VNC, of all things, the default "remote desktop" option for X. Naughty, naughty...
3a) in the end, I got it all to run natively on the one display. The audio meters tended to lag more than they did running client/server, but I didn't care....
4) Always, when doing an export, I stop syncing to jack. The freewheeling mode tends to crash one of the other programs in the jack audio callback path.
Now the system is doggy as hell while doing basic things like switching windows... but it got through an entire recording process for the first time ever (from creating the drum track in hydrogen, to playing piano live into rosegarden, to recording the piano, bass and drums on 3 different stereo tracks)
Now... well, I would love to be using my rme-audio card, but my cat keeps unplugging the cable.
It's finicky, I haven't had that card come up once in 4 boots... but I don't care! the 96k plug is working just fine, I only need the rme for live instruments (guitar and vocals)UPDATE
: Right after I posted this, after letting my system idle for the time it took to type in the blog entry, I hit play on the jack synced the rosegarden+hydrogen+linuxsampler processes. Boom - Rosegarden crashed. I have a real good handle on why, now, I'm off to apply the same fixes I applied to linuxsampler and hydrogen and we'll see what happens next. Also, fiddle with vm.swappiness. "Swappiness is a waaarm gun"....