[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mac Sounds for Symbolics
Goal:
a) Form a primitive speech-synthesizer for the Symbolics
based on concatenated playings of single pre-recorded phonemes;
b) Make a routine that can play the amusing sounds available
on the MacIntosh.
Current Approach:
a) Locate a sound source file on the Mac, and get it on a MacIvory.
b) Copy the file from the Mac side into the Ivory LMFS, using
HOST:MacIvory:usr:me:Soundname in DIRED.
c) Copy the file onto my personal Symbolics, over the Ethernet.
d) Copy the file into the FEP volume of my personal Symbolics, using DIRED.
This is alleged to be necessary for performance considerations.
e) Resurrect functions with-multi-disk-buffering and play-disk-file
from file :>rel-7-2>examples>audio-examples.lisp, also listed
on p.519-521 of manual 7B.
f) Invoke (play-disk-file "filename") [note name only, not path].
Immediate Problem:
Trap: The array given to the ZL:AP-1 instruction, #<ART-FIXNUM-11808 123131417>,
is not allowed to be a numeric array. (called from:)
AUDIO:PUSH-ARRAY-OF-AUDIO-SAMPLES #<ART-FIXNUMetc> from:0 to:11520
(Honestly, if it doesn't take bytes, what does it want? p.503: "Each sample
pair is expected to be a fixnum." p.509, bottom: "A default audio command array
is provided as part of these audio support primitives. All of these primitives,
however, allow the specification of any suitable user-provided array as a
command array. Such an array must be a nonindirect, single-dimensional
sys:art-q array, with a fill pointer, allocated in a static area.")
Please help me translate the file into a format (play-disk-file) will like.
Anticipated problems:
1) There actually seem to be at least three sound format files on the Mac:
MacRecorder, with an RCA dog icon; an unknown black waveform icon;
and an unknown Mac with Waveform Screen icon. Presumably these all
store data in 8-bit bytes, and differ only in the file header info,
which might contain length, speed info, etc. I'm currently willing
to allow these hypothetical few bytes of data to be played as noise;
however, if anyone has Mac sound format info, it would be appreciated.
2) How can I trick ZMACS into editing a data file as HEX digit pairs
separated by spaces?
3) Mac sounds come at different sampling speeds: 12Khz, 24Khz, etc.
I'm willing to supply the speed to my function as a second argument.
However, apparently the Symbolics is hardwired to 50Khz.
It's impractical to expand the data-file; this conversion should be
done in software, at play-time, by playing some samples 2-4 times.
How to hack play-disk-file to do this?
4) Under the FEP documentation, it says to not put lots of files onto the
FEP, especially small files, or else performance will slow.
Is there a way of squishing FEP files into one area of disk?
Conversely, can play-disk-file play LMFS files rapidly somehow?
Currently, I stick the sounds in a FEP:>Sound> subdirectory.
5) I'm unclear both on the requirements of the Symbolics, and on the
resulting format of the sound-files after they have been copied.
The Symbolics seems to want TWO voices' data for its input, each
voice being 16 unsigned bits packed into a 32-bit word; however, it
ignores the top voice, and the bottom four bits of the bottom voice.
I don't know whether copying a byte file from a Mac gives bytes,
single bytes put in words filled with zeros, 4 bytes packed into
a word, 2 bytes packed into a word filled with zeros, or something else.
Again, I need a hex-based ZMACS.
6) Eventually I will want to play sequential, concatenated sounds.
Do you think play-disk-file and with-multi-disk-buffering is smart enough
not to step on its own toes, and wait until the audio facility is free,
if called multiple times in quick succession from one program?
By the way, has anyone built a DX-7 emulator or other synthesizer
for the Symbolics?
John Myers~~
myers@atr-la.atr.co.jp