Subject: Re: another sound survey...
To: None <port-mac68k@NetBSD.ORG>
From: SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
List: port-mac68k
Date: 05/08/1998 04:11:22
Good morning:-)

Colin Wood <cwood@ichips.intel.com> wrote:

>> The code I sent drove ASC in free-wave mode and This
>> drives it in four voice mode.

Colin> No, this is the EASC's square-wave mode (which
Colin> appears to simply be a variation on
Colin> synthesized/free-wave mode).  Four-voice or wavetable
Colin> mode is _much_ more complicated on both, mainly
Colin> because the hand-coded assembly does strange things
Colin> to avoid running out of registers :-)

Really?  So I must be confusing here.  I'll recheck my
disassembled code.

I hacked asc.c and ascvar.h of 1.3.1 and added ascreg.h, but
it doesn't work for the moment, but you might hit the reason.
Thanks.

Colin> The ASC appears to have a dedicated square-wave mode.
Colin> The interesting thing about it is that the current
Colin> asc.c driver appears to be playing a synthesized
Colin> sound in the ASC's dedicated square-wave mode
Colin> (i.e. it sets 0x830-0x837 to a value related to the
Colin> frequency instead of to 0xFE like in synthesized
Colin> sound mode).

I think asc.c sets freq's to 0x814-0x82f and doesn't touch
0x830-837.  Am I missing something?

>> It's pretty good that if there are some ioctls to handle
>> both modes of [E]ASC.

Colin> I'm glad it works :-) True synthesized sound might
Colin> require more work, tho.  I still haven't gotten it to
Colin> stop coughing on the sample with the 22kHz sampling
Colin> rate, and that's what most are.  I may have an idea
Colin> for a workaround, tho.

>> I think...
>> 
>> /dev/bell for bell device.

Colin> Some NetBSD platforms do have some minor device
Colin> number versions of /dev/audio used as a console bell,
Colin> I think.  That might not be too hard to do.

>> /dev/audio for play audio file.
>> 
>> Thoughts?

Colin> Definitely :-) There is already a machine-independent
Colin> /dev/audio.  All it will take is writing the glue
Colin> code once we've figured out exactly how the silly
Colin> thing works (or so I think ;-)

Well,  MI driver seems to handle the u-law format.  I think
it's next stage.

Colin> temp = 0x11999999 / count;
>> The magic number is 0x58000000 on IIcx.  There may be
>> another?

Colin> Possibly.  I didn't try it on my SE/30 last night
Colin> because it was getting late.  I assume that it will
Colin> work on the original II-series Macs since the sound
Colin> hardware is pretty much the same as in my IIci.  I've
Colin> got a dump of the SE/30's .Sound driver.  I'll have
Colin> to take a look at it to make sure I'm not screwing
Colin> anything up....
 
>> BTW, I made a test prog. try to figure the 4 tones and it
>> made a kind of harmony, but I found that I needed to
>> implement the scheme to handle musical score even if
>> there are limited only 4...

Colin> :-) Cool.

:-) hack, more hack! > me.

--
砂Γ挟試恵輝 (SUNAGAWA Keiki) kei_sun@ba2.so-net.ne.jp
Happy Hacking!