Article View: comp.sys.amiga.tech
Article #153Re: Audio quirks
From: Rob Peck
Date: Fri, 23 Jun 1989 16:36
Date: Fri, 23 Jun 1989 16:36
54 lines
3359 bytes
3359 bytes
In article <17648@swrinde.nde.swri.edu> kent@swrinde.UUCP (Kent D. Polk) writes:
>In article <12293@well.UUCP> farren@well.UUCP (Mike Farren) writes:
>>Well, having just fought my way through a three-week battle with the
>>audio.device, I thought I'd put a few notes out, for all of you folks
>>who might want to do real nice sounds, and lots of 'em...
>
>Check out Rob Peck's Audiotools (almost) library. The functions may be
>fast enough for your application. At least it's a good tutorial. Saved
>me an uncountable number of hours.
Just for those who need the info... Audiotools release 3 was placed on the
Washington DC Devcon disks and included in the conference notes. I hope to
have a release 4 available in another 3-4 months, depending on other things
gettin in the way so to speak. Particularly to include one channel
modulating another as Kent wants to do (if he figures it out, I wanna
see it). And yes, release 3 has PlaySamp(...) for sampled sounds.
An alert of things-to-come is that the NEXT issue of Compute's
Amiga Resource (Summer '89???) in my column I answer the question
"How Can I Play A Sampled Sound?". A short program reads and parses
an 8SVX IFF sampled sound ("hello" or "hello, world") and sets up the
audio device to play it back exactly as recorded. The trick was to
set the appropriate parameters based on what is read from the 8SVX
file which was 8343 samples per second. The other trick was to calculate
the proper sampling rate even though using exclusively integer arithmetic
in 32-bits max width. I think I even got it right (whew).
Anyway, the compiled version (lattice 5.02, with no option flags set) is
about 8600 bytes, and the PD program that does the same thing on the
Audiomaster II disk (maybe it does more, but who knows) is slightly over
18k. Oh yes, theirs runs from Workbench, to keep code size down, mine
is CLI only, but can be run from ICONX to get wbench support, so to
speak.
Now that I know how to calculate from sample rates, this'll be in the
next audiotools.
Nother thing that will definitely go in is converting it fully to a
shared library, and probably AREXX support so that directly under
AREXX, the equivalent of PlayNote/PlayFreq/PlaySamp could be called.
=============
For any who already HAVE the audiotools... note that I'll likely remove
support for permanently allocated i/o control blocks, assigning only
dynamic ones. As seen in the source code, they are handled a little
differently and someone once ran into a bug for which no static
i/o blocks were playing on any channel and yet something in the system
thought that at least one was not yet "back" from doing its job.
Nobody else ever reported a similar bug, but I may not want to take
a chance. Handle everything the same, and shrink code size as well.
Rob Peck
DATAPATH, POBox 1828, Los Gatos, CA 95031
Technical Details
Message-ID:
<7025@ardent.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!ubvax!ardent!ez!rapReferences:
<12293@well.UUCP> <17648@swrinde.nde.swri.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!ubvax!ardent!ez!rap From: rap@ez.ardent.com (Rob Peck) Newsgroups: comp.sys.amiga.tech Subject: Re: Audio quirks Message-ID: <7025@ardent.UUCP> Date: 23 Jun 89 16:36:58 GMT References: <12293@well.UUCP> <17648@swrinde.nde.swri.edu> Sender: news@ardent.UUCP Reply-To: rap@ez.ardent.com (Rob Peck) Organization: Ardent Computer Corp., Sunnyvale, CA Lines: 54