Re: [linux-audio-dev] munlock and mmap

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] munlock and mmap
From: Paul Winkler (slinkp23_AT_yahoo.com)
Date: Wed Apr 05 2000 - 09:19:55 EEST


Paul Barton-Davis wrote:
> When we punch into record mode, we (may) have to do a cross fade with
> the existing material (and also when we punch out). But not the
> *current* existing material - stuff from several msecs earlier. We
> also have to write the recorded data back to a point in the file that
> before the current playback position (*)

So far you've already thought about everything everyone's suggested,
I don't expect this post to be any different; but I'll stick my toe
in anyway...

I wonder if you're emulating hardware tape recorders a little more
closely than is necessary.

Why not do it like this: Don't overwrite any of the existing track
until recording (AND playback) is stopped. When punch-in happens,
data goes to a new file (in any standard format you like) & the
application makes a note of where it's supposed to end up & with
what sort of crossfade. When you hit "stop" button, the app.
automatically merges the existing track and the punch-in file
correctly (accounting for latency & crossfades), does the job as
quickly as it can, and you don't have any worries about that being
slow enough to lose data.

OK, the obvious drawbacks:

1) you give up instantaneous playback after the punch; you have to
wait while the drive crunches for a while. OTOH I wouldn't be
surprised if it's still faster than hitting "locate" on most analog
tape decks or MDMs.

2) you need a bit more free disk space for punch-ins. (But the
separate punch-in file can be erased immediately after being merged
in with the existing track.) This might not be insignificant if
you're punching 24 tracks simultaneously, which I guess people
really do occasionally...

3) If you want punch-out to sound "right" to the performer you still
need to be buffering data from the existing track just in case you
need it. (But that's true of every design you've tried, isn't it?)

Advantages:

1) you can use standard file formats, AIF or whatever

2) no need to manually convert anything

3) safety net: it would be pretty easy to insert a "Keep this punch?
[yes /
no ]" dialog that pops up before the new file is spliced in to the
old data, very handy in case you suddenly realize you f*cked up the
punch and / or hated the performance etc... otherwise you have to
build in some kind of more complicated undo system... *some* things
about analog tape are NOT nice. Personally I would *love* it if my
recording app. gave me more than one chance to obliterate a track.

So it's a tradeoff of "everything happens instantly" vs.
"accidentally hitting record is not a disaster."

-- 
................    paul winkler    ..................
slinkP arts:   music, sound, illustration, design, etc.
A member of ARMS    ----->    http://www.reacharms.com
or http://www.mp3.com/arms or http://www.amp3.net/arms
personal page   ---->    http://www.ulster.net/~abigoo


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Apr 05 2000 - 09:52:43 EEST