🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.coco
Article #43233

Sound and DAC's.

#43233
From: Timothy Johns
Date: Thu, 16 Dec 1993 17:59
70 lines
3385 bytes
On sending sounds to a speaker,

I was able to get some pretty good sounds with a simple program I wrote
on the Coco, that was something like this:

main()
{
   int buf[MAX];

   gen_wav(buf, SINE);

   play_wave(buf);
}

gen_wav(buf, code)
int *buf; int code;
{
   int i;

   for(i = 0; i < MAX; i++)
      buf[i] = sin(i);

}

play_wave(buf)
int *buf;
{
   int i;

   for(i = 0; i < MAX; i++)
     *(0xff7a) = buf[i];
}

Or something like that (I was just trying to output to my Orc90 pak,
but something similar could be done for the MM/1 or the Coco's built
in sound port).

I suspect that possibly the DMA or some other such feature of the MM1
gets rid of the annoying buzzing I got from the multi-tasking of the Coco.

What I think would be cool (and relatively easy to build) is a simple circuit
that is accessed via 2 bytes, a control and a data byte, has a little RAM and
a couple of flip-flops, with the RAM input (it would be good to make it one-
addressed, like a UART or some such, so as not to fill up any more of the
Coco's hardware map) at one address as data and the flip-flops mapped to
the next address or something.  Memory could be logically divided into
two buffers.  The program could fill one buffer like the method used above,
and then toggle a bit at the control that says "Hey, start consecutively
stepping through the memory of buffer 1 and moving those bytes to the
DAC."  Well, if the timing was done correctly, the program could fill the
second buffer before the first one was empty, and then tell the device
to "play" that buffer.

Although the sound would be neccessarily slower to accomodate multi-tasking,
I think it would still sound very good, and then waveforms possibly COULD
be generated on the fly.  The above is just an idea, and I have done absolute
no research on the topic at all, but I thought it was kind of a cool idea,
and might spark a little interest.  Any ideas?

I'd love to take that on a as a project, but I have about 15 projects
going right now that I can't seem to get finished, so....

-Tim

-------------------------------------------------------------------------------
:  Timothy A. Johns                 Z_JohnsTA@ccsvax.sfasu.edu                :
:  P.O. Box 16050 S.F.A.            Physics/Computer Science Undergraduate    :
:  Nacogdoches, TX  75962           Stephen F. Austin State University        :
:  Hm: (409) 560-1876               Wk: JOTA Productions                      :
-------------------------------------------------------------------------------
Technical Details
Message-ID: <9312161759.AA00591@Atanasoff.sfasu.edu>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!yale.edu!yale!gumby!destroyer!gatech!usenet.ins.cwru.edu!agate!library.ucla.edu!europa.eng.gtefsd.com!paladin.american.edu!auvm!ATANASOFF.SFASU.EDU!johns

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 110568,427f0343974109bf,start
X-Google-Attributes: gid110568,public
X-Google-ArrivalTime: 1993-12-16 10:39:06 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!yale.edu!yale!gumby!destroyer!gatech!usenet.ins.cwru.edu!agate!library.ucla.edu!europa.eng.gtefsd.com!paladin.american.edu!auvm!ATANASOFF.SFASU.EDU!johns
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.coco
Return-Path: <@AUVM.AMERICAN.EDU:COCO@PUCC.BITNET>
Message-ID: <9312161759.AA00591@Atanasoff.sfasu.edu>
Date: Thu, 16 Dec 1993 11:59:24 CST
Reply-To: Timothy Johns <johns@ATANASOFF.SFASU.EDU>
Sender: COCO - Tandy Color Computer List <COCO@PUCC.BITNET>
From: Timothy Johns <johns@ATANASOFF.SFASU.EDU>
Subject: Sound and DAC's.
Lines: 69