Hello!
I'm trying to write a simple musical program for macosx terminal (haven't yet graduated to GUI) and not sure how to work the sounds out, especially since the included crt unit's "sound" doesn't seem to work. Basically, I'm trying to get some pitches specified as notes. Should I be approaching this by writing directly to the sound card somehow, or else maybe using sound files, or somewhere in between? any help or nudges in one direction or another would be greatly appreciated. thanks.
nathan
Nathan Schneider wrote:
I'm trying to write a simple musical program for macosx terminal (haven't yet graduated to GUI) and not sure how to work the sounds out, especially since the included crt unit's "sound" doesn't seem to work. Basically, I'm trying to get some pitches specified as notes. Should I be approaching this by writing directly to the sound card somehow, or else maybe using sound files, or somewhere in between? any help or nudges in one direction or another would be greatly appreciated. thanks.
For using audio on Mac OS X using "Carbon" and "GPCPInterfaces" see the following docs from Apple:
http://developer.apple.com/technotes/tn/tn1198.html http://developer.apple.com/documentation/mac/Sound/Sound-2.html <http://developer.apple.com/documentation/QuickTime/INMAC/SOUND/ imsoundinput.2.htm>
Other docs from Apple:
http://developer.apple.com/audio/macosxaudio.html http://developer.apple.com/audio/quicktimeaudio.html
Detailed questions can be asked on the "maspascal" mailing list, see http://www.pascal-central.com/maillist.html.
Regards,
Adriaan van Os
Adriaan van Os wrote:
Nathan Schneider wrote:
I'm trying to write a simple musical program for macosx terminal (haven't yet graduated to GUI) and not sure how to work the sounds out, especially since the included crt unit's "sound" doesn't seem to work. Basically, I'm trying to get some pitches specified as notes. Should I be approaching this by writing directly to the sound card somehow, or else maybe using sound files, or somewhere in between? any help or nudges in one direction or another would be greatly appreciated. thanks.
For using audio on Mac OS X using "Carbon" and "GPCPInterfaces" see the following docs from Apple:
http://developer.apple.com/technotes/tn/tn1198.html http://developer.apple.com/documentation/mac/Sound/Sound-2.html <http://developer.apple.com/documentation/QuickTime/INMAC/SOUND/ imsoundinput.2.htm>
Does the system provide a way to play a (continuous) sound of fixed frequency until turned off? If so, it might be worth to support the CRT routines (see crtdjgpp.h and crtlinux386.h for examples of other platform-specific CRT extensions).
If it can only play PCM sounds or similar (to playing a continuous tone would require constant background activity), it's probably not worth the effort to support CRT style `Sound' (unless someone really needs it and is willing to do the necessary coding) ...
Frank
Frank Heckenbach wrote:
Does the system provide a way to play a (continuous) sound of fixed frequency until turned off?
The Macintosh plays asynchronous waveforms, so this can be implemented.
If so, it might be worth to support the CRT routines (see crtdjgpp.h and crtlinux386.h for examples of other platform-specific CRT extensions).
I can put it on my todo list (if I find the time for it, later this year).
Regards,
Adriaan van Os