delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/23/16:48:17

From: jimh AT pantheon DOT yale DOT edu (J. Hormuzdiar)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Programming the SoundBlaster in Djgpp.
Date: 23 Oct 1997 14:24:55 GMT
Organization: Yale University
Lines: 50
Message-ID: <62nmnn$dmc$1@news.ycc.yale.edu>
References: <62msu0$rc0$1c AT 195 DOT 26 DOT 68 DOT 19>
NNTP-Posting-Host: minerva.cis.yale.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello-
	I too wasted much time trying to get the soundblaster to make so
much as a peep, and in the end was barely able to make the FM synthesizer
work (forget the wavetable synthesizer!).  Finally I came to a much better
solution for myself....  forget trying to directly control the card, but
instead learn how to create a midi file.  This way, I could write code to
produce a small song, run it, and immediately double click on the produced
file whose icon I always kept on the screen, hence running the Win95 midi
player. 

	If you are trying to use music in a game, etc.  this could also
work well.  Simply write a midi song with one program then use the
produced midi file in the game.

	Of course there are many advantages to this approach- first, from
my experiences, unraveling the mysteries of midi was much easier than
unraveling the mysteries of the SB card (it is really quite simple- after
you learn how to make a simple header to your file, you just add commands
like 'play note with frequency ....', or 'change instrument to trumpet').
Second, you can play the files on many different machines (I could create
my midi file on a djgpp system and play it on a Mac).  And third, the Midi
standard has been and will be around much longer and is more widespread
than the SB specifics, so it would be a better learning investment on your
part.

	To get the midi specifications just type "midi technical" into the
Yahoo search engine and you'll see a good page explaining what you want to
know.

	I have personally written programs to decode midi files into
readable language and encode a midi file from a given text file (with some
selfmade music code language).  It is not polished enough yet that I want
to show it to the public, but once it is I may want to give it out
free....  The question about making music with DJGPP seems to come up
occasionally here, and I never see a good answer (besides the stuff that
Allegro includes, which is fine if you just want to play pre-made midi
or wave files).

	(If specific individuals want my code I may be willing to give out
the unpolished stuff now, I just don't want to release half finished stuff
to the general public).

						-Jim


: > I can't seem to find a way to program the sound blaster to play sounds in
: >  Djgpp.
: > Does anyone have any source codes to help me or any ideas how to do it. No,
: > don't refer me to examine the allegro source because the codes were hard to 
: > understand plus it uses sound drivers to play sounds. 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019