[comp.sys.amiga] looking for music/sound C code

george@osc.COM (George Baggott) (03/22/90)

I'm looking for some C or C++ code that will allow me to access the Amiga's
sound capabilities to play a musical note or a frequency.  The function I
have in mind might be used something like:

    frequency_play(440.0);      /* play a 440 Hz signal */

or

    Note A = note_create("A");  /* create a note */
    note_play(A);               /* play it */

Any leads on something along these lines would be greatly appreciated.


George

kent@swrinde.nde.swri.edu (Kent D. Polk) (03/23/90)

In article <2240@osc.COM> george@flamingo.UUCP (George Baggott) writes:
>
>I'm looking for some C or C++ code that will allow me to access the Amiga's
>sound capabilities to play a musical note or a frequency.  The function I
>have in mind might be used something like:
>
>    frequency_play(440.0);      /* play a 440 Hz signal */

Get a copy of Rob Peck's AudioTools.c. It has lots of nice features to
get you up and running very quickly. It has a bit of overhead, so may
not be the best for really fast applications, but for simple ones it
really takes the pain out of programming sound on this machine.

You can queue up notes, frequencies, samples & light them off. You can
Wait() at a message port for a particular note to start playing &
more...

====================================================================
Kent Polk - Southwest Research Institute - kent@swrinde.nde.swri.edu
        Motto : "Anything worth doing is worth overdoing"
====================================================================

djh@dragon.metaphor.com (Dallas J. Hodgson) (03/24/90)

In the original NewZAP source distribution (so long ago - check your Fish
llibrary, disk # 52 or so) there's a routine called 'beep.c'. It's probably
as minimal a sound routine as can be done for the audio device. If you need
to play note-names, you'll need to supply a note-name to frequency table;
refer to the new RKM.
+----------------------------------------------------------------------------+
| Dallas J. Hodgson               |     "This here's the wattle,             |
| Metaphor Computer Systems       |      It's the emblem of our land.        |
| Mountain View, Ca.              |      You can put it in a bottle,         |
| USENET : djh@metaphor.com       |      You can hold it in your hand."      |
+============================================================================+
| "The views I express are my own, and not necessarily those of my employer" |
+----------------------------------------------------------------------------+