[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving binary files to /RAM



Michael J. Mahon <mjmahon@aol.com> wrote:

> Simon Williams wrote:
> 
> > Tried that... same problem, however I did realize that I can actually do
> > what I need with less audio data, which solves the delay issue by
> > avoiding it entirely. Sometimes the best solution is to create a
> > different problem ;-)
> 
> This is called annihilating the problem rather than solving it.  ;-)
> 
> Always a good choice.

The underlying problem I've been trying to get around is the audible
click at the start and end of DAC522 playback. In my original TIMELORD
program I had short percussion samples playing alternately with a delay
loop to control tempo. Typically, a sequence would "look" like this:
.        .         .        .         .        .         .        . 
|||      |         |||      |         |||      |         |||      |
|||||::..|         |||||::..|         |||||::..|         |||||::..|
<-audio--><-delay->
         
...as you can see, the initial "click" is masked quite well by the fast
attack of the audio, however the final click occurs after the sound has
decayed and is quite pronounced. If the delay length is proportionally
different from the sample length this can result in an out-of-synch
effect, which is a bit annoying.
Originally, I was planning to use much longer samples to avoid having
the delay loop, so that the final click of playback would be masked by
the attack of the next note, thus:
.                 ..                 ..                 ..            .
|||               ||||               ||||               ||||          |
|||||::...........||||||::...........||||||::...........||||||::......|

Eventually it dawned on me that, in Apple II terms, the "useful" part of
any percussion sample occurs within the first 2K of the file, so it
would be just as effective to use 2K samples and have them load ahead of
a 2K (or larger) "buffer" of zero-bytes, so that DAC can play a 4K file,
but the program only has to move 2K from AUXMEM.
Of course this "solution" is only effective for percussion sounds which
typically have a very short attack and little or no sustain. It might
also be possible to add a faux reverb after the sample rather than just
silence.

Programming is a lot easier when you actually know what your program is
supposed to do ;-)
-- 
._____.
|[LD8]! SIMON WILLIAMS :: LUDDITE ENTERPRISES UNLIMITED
| (O) | 68K MACINTOSH SERVER   http://luddite.no-ip.com
!__!__! FAILURE RECORDS http://failurerecords.no-ip.com