Archive for November, 2013

have i mentioned aSpace?

2013/11/24

[update – aSpace works well on the $29 ARM based cubie boards i am now using for my demos, and should run on basically most things with a line or mic input, and a line out, given that it’s audio signal processing – DSP – unit is reasonably stable]

you said to keep in touch.  what follows is a new attempt to present
on old pet project of mine, which in turn is a stab in the dark on my
part, in the vague hopes of starting something i can build on.

this is not a begging letter, merely a request for comments, and for
what it may be worth, first dibs at my best and only pet idea.  it
has never been easy to explain, and i am not confident what follows
even manages to describe what i am on about, so please don’t waste
any time on this, and please feel free to ignore, etc.

the problem is simply that it is much easier to demonstrate the real
thing, than to try and describe what it does.  i have done this a few
times over, over the years, with versions running on standard desktop
machines, and each time have managed to impress any number of punters
enough to make me think it would fly, as a commercial product.

unfortunately desktop architecture kept changing, and honest to god,
it seemed like the industry was deliberately trying to pull the rug
out from under my feet, and generally i never quite managed to keep
up, especially back when a fast enough machine cost many thou.

now however, with the advent of cheap single board computers, like
the beagle and minnow boards, and the raspberry pi, i am fairly sure
i could easily build a solid portable demo that i could hawk around
at trade shows and flea markets and the like, as well as online, as
an open source project, in order to grow what i am hoping might turn
into something popular.

the above being the executive summary, what follows is the song and
dance, attempting to explain what it is and does, and how it solves
an old problem in order to provide a new tool and/or toy.

this is effectively the one thing which might possibly be worth my
keeping in touch about, if you see what i mean, and i feel i should
show it to you first, in case of any interest.

over more than the past decade i have been working on a program i
sometimes called aSpace (short for arbutus space but more simply)
meaning a space in time, for recording in, and also as a nod to the
old tape loop effect unit it was inspired by, the Roland Space Echo.

very simply it makes a loop of the audio line in and line out, with a
long delay, measured in anything from a handful of musical bars, or a
verse or more, or the whole length of single piece, or a whole program,
through basically as long as you like, and have room for in hardware.

i’ve been building these things since the first sound-blaster days, in
essence since PCs became fast enough to handle the data, and have both
expanded and simplified on the design, over time, to make it as easy
to use as i can.

it essentially causes the sense of a recording studio type environment
to vanish – instead you are simply in a “live” space in time which is
looped, and everything you play will come back to you, the next time
around, in precise sync, and with various means of controlling which
bits return when, and other approaches i have worked out, over time.

the ability to link many of these spaces in (pseudo) real (as in next)
time (around) over the net, using either standard revision control, or
standard live mirroring, is something i am confident will be easy to
do, although i have not actually written any real examples, as yet.

the result is both an unique method of recording, and an already quite
well known method of performance, in which the thing you are recording
has no definite beginning or end, and repeats constantly, as you add
(and optionally adjust or remove) new parts.

the data thus produced is easily imported into essentially any multi-
track editing software, for “post production” work and/or mixing back
into a running session.

in the meantime, mostly only in the past few years, musician’s toys
have been showing up, which perform various parts the same thing.

now we have all these single board machines around, and from reading
the online tech news, i know any time now someone is going to blow
right past me with the gadget that does all these things (if not
already and i just have not noticed yet) and frankly i’m not sure i
want to let that happen, without at least taking my own punt at it.

it should run fine on anything from a raspberry pi through whatever
tablets and smart whatever is out there, and has suitable audio i/o.

my plan for the immediate future is to spend the next month or so
porting my latest design to a nokia n900, being the one platform i
happen to have, that should (just) suit, but really i believe i need
to get it past this, and onto something i can actually sell/publish,
before it will go anywhere.

there is one caveat – and unfortunately a long digression – true zero
latency recording ability has been missing from virtually all “personal
computing” type devices since around the millenium.

(latency meaning the offset in time between the audio input and output
devices on the chip, which has to be known precisely, in order to align
recorded tracks in true sync with the playback)

many sound cards, prior to about 2000, had a driver supported trigger
you could set to fire the record and output devices simultaneously.
since they both run off the same clock device, this guaranteed very
close to perfect sync, and genuinely perfect (at the connectors) once
you had compensated for analog delays in the hardware circuitry.

suddenly this driver supported call vanished, in both linux and windows,
and as far as i know has never been supported since, as far as i can see
because it is no longer supported by sound card firmware, and possibly
no longer even by the hardware itself.

to counteract this (i think deliberate) deficiency, in late 99 i began
developing various algorithms for detecting the precise latency offset
between playback and record by turning on a “monitor” feature that was
common in most cards, for a few years after the millenium.  this meant
i could route the output audio back through the recording device, and
simply compare the waveforms.

as soon as i had this down i could record in perfect sync again, and as
long as my code and the machine ran fast enough not to drop anything, it
stayed in sync essentially forever, because, as far as i know, the chips
still run everything off a common clock, even today.

suddenly however (imagine my horror) the monitor trick vanished on all
audio chips, almost overnight.  this just happened to be at a time when
a lot of people were ripping audio CDs by exactly this method…

but anyway, the point of this long digression being that these days, as
far as i know, the only way my concept will work in any sense of a true
studio quality device, is with an external cable, which must connect to
both the line in and the line out devices on whatever machine is being
used, and which in turn exposes these connectors for normal use.

when a button on the cable is pushed it routes line out back through
line in, which signal is detected by my program, and then used to set,
(and test/reset) “true” zero latency sync.

by true i mean that my system is accurate to within exactly one sample
measured at exactly the point where the signals cross in the external
cable.  because this measurement is reliable, it can easily be offset
to compensate precisely for any known downstream delays, in whatever
external equipment is involved.

this is significantly more precise than most (perhaps all) so called
“studio quality” solutions, at least for the “home” market, and the
difference is quite stunning, especially when multi-tracking vocals.

um, so, to try and make sense of all this background.  i am currently
able to perform these tricks on my older desktop machine, and my next
step is to port my code to my old nokia n900 tablet, which ought to
be just fast enough to demonstrate the concept in the first portable
form to date.

my hangup is that the nokia o/s is not android, and what i really want
is to try and develop an app that will run on as many yuppies, i mean
new toys, as it can.  it should work on anything that has both audio
in an out, or can connect to same, given a pushbutton cable, assuming
these devices still cannot provide an internal monitor switch.

the other approach i have in mind involves either a beagle or minnow
type board, any model with on-board audio, or alternately a raspberry
board with add-on audio, via usb or other.  it should be fairly simple
to hack such a system to provide an on-board monitor under program
control, via an expansion pin, in order to eliminate the need for the
external (and therefore manual) pushbutton circuit.

this would then be run headerless, and controlled by an client over
bluetooth or wifi or ether or usb, or it could also be developed into
a standalone by adding a touch screen and/or other control/display
options.

i believe either of these deployments would make a fairly sure fire
point of sale type item, and also the sort of thing i think i could
flog at the flea markets and similar gigs i seem to be spending too
much time hanging around, and i have an idea it may take off, as it
is really quite fun to play with, at least in my experience, and can
turn anyone into a quite large (dis)orchestra (depending on ability)
quite quickly.

the real kicker is that it is simple to sync the data online, which
results in what i perceive to be the musical equivalent of virtual
adjoining bubbles in time, in anything from the more static sense of
an online forum, where people post their contributions to a master
over time, through virtually real-time multi-user recording type chat
spaces, in which people upload live tracks as they record them, with
various forms of editorial control.

it could also sync video, i can think of multiple approaches, i just
haven’t wanted to spend the time developing them, is not really what
i am interested in.

all these things sort of exist already, in big expensive ways, and
most of have sprung up only very recently – what i want to do is try
make the whole thing cheap and easy and fun, and see if i can get a
lot of people to join in, a la “social networking” style.

of course you have probably noticed that i have no concrete plan for
making any real money on this.  my idea fuzzily involves giving both
the code and the design away for free, in the general hope that it
might get popular enough to attract some kind of interest, somehow.

i’m fairly sure i could sell a few myself, not to mention raise a
bit of pin money, playing guitar through it, at the busker level,
but beyond this i do not actually have any sort of plan, at all.

i could also be out of date in my assumptions regarding what modern
hardware can do in terms of providing precise sync, meaning all the
malarkey about same above could already be (or might easily become)
redundant.

i am also not sure about what hardware and/or software there may
already be out there which has all of this covered, ahead of me.

at time of writing i am resisting doing any further research on
these issues, and am merely focusing on describing what i have in
mind, simply because the only development i can currently afford
to contemplate is the nokia 900 port, and i don’t need to waste
time studying devices i cannot afford, markets i cannot reach,
if all i am building is yet another toy for myself.

it keeps me amused, anyway, and all is well here, otherwise – i do
hope this finds you the same,

james