comp.lang.ada
 help / color / mirror / Atom feed
* Sound
@ 1998-04-14  0:00 Andy Perkins
  1998-04-15  0:00 ` Sound Martin C. Carlisle
  1998-04-15  0:00 ` Sound Tom Moran
  0 siblings, 2 replies; 6+ messages in thread
From: Andy Perkins @ 1998-04-14  0:00 UTC (permalink / raw)



I know the seems like a strange question, but here goes anyway...
I've been trying to figure out how to link my assembler code
into an Ada program, but haven't been able to yet.  If you can
help, see my previous message title "Pragma and Object Files."

Does anyone know of any available package, preferrably
freeware or shareware that will allow my to put either wav
or even midi sounds into my Ada programs?

Thanks
storm@vci.net





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sound
  1998-04-14  0:00 Sound Andy Perkins
@ 1998-04-15  0:00 ` Martin C. Carlisle
  1998-04-16  0:00   ` Sound Andy Perkins
  1998-04-16  0:00   ` Sound Michael F Brenner
  1998-04-15  0:00 ` Sound Tom Moran
  1 sibling, 2 replies; 6+ messages in thread
From: Martin C. Carlisle @ 1998-04-15  0:00 UTC (permalink / raw)



In article <3533E2F6.70212BB1@vci.net>, Andy Perkins  <storm@vci.net> wrote:
>Does anyone know of any available package, preferrably
>freeware or shareware that will allow my to put either wav
>or even midi sounds into my Ada programs?

At the Air Force Academy, we have a simple interface to play wav files.
See ftp://ftp.usafa.af.mil/pub/dfcs/carlisle/mcc-sounds/mcc-sounds.ad[bs]

You can play a sound, or play one in the background.

It has been tested with GNAT 3.10, but should easily be adaptable to another
compiler (check the pragma Linker_Options).

--Martin


-- 
Martin C. Carlisle, Computer Science, US Air Force Academy
mcc@cs.usafa.af.mil, http://www.usafa.af.mil/dfcs/bios/carlisle.html
DISCLAIMER:  This content in no way reflects the opinions, standard or 
policy of the US Air Force Academy or the United States Government.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sound
  1998-04-14  0:00 Sound Andy Perkins
  1998-04-15  0:00 ` Sound Martin C. Carlisle
@ 1998-04-15  0:00 ` Tom Moran
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Moran @ 1998-04-15  0:00 UTC (permalink / raw)



Do you want to "put sounds into" your program, or have the program
play midi or wav files?  The latter is more common, and you usually
call the OS to do it.  
  If you really want to run on a bare DOS machine, I have an Ada
program to play voc files through the PC's speaker.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sound
  1998-04-15  0:00 ` Sound Martin C. Carlisle
  1998-04-16  0:00   ` Sound Andy Perkins
@ 1998-04-16  0:00   ` Michael F Brenner
  1998-04-17  0:00     ` Sound v322
  1 sibling, 1 reply; 6+ messages in thread
From: Michael F Brenner @ 1998-04-16  0:00 UTC (permalink / raw)



Andy > ... package to put either WAV or even MIDI sounds into my Ada programs?

Martin > ... Air Force Academy ... a simple interface to play WAV files at
       > ftp://ftp.usafa.af.mil/pub/dfcs/carlisle/mcc-sounds/mcc-sounds.adb
       > and ads, working under gnat 3.10 and Windows 95.

This file needs a dummy, null parent visible part Package MCC. After
adding that, I confirmed that it also works under Windows NT 4 under
gnat 3.10.

If this program is maintained further, the constant 16#20000# could
be given the name snd_no_wait.

The other part of the request is a little harder. To play MIDI, you need
instruments (either software or hardward) that produce the sounds
requested by the MIDI file. You see, the MIDI file does not have
sounds in it, but rather piano-keyboard keystrokes: start note,
stop note, choose instrument, etc. 

There are several ways to do MIDI. 

The HARDWARE way is to buy a MIDI keyboard. The MIDI keyboard
has a serial port that connects to the computer's serial port. 
The computer sends the MIDI to the keyboard and the keyboard
sends the sound waves to the computer-sound-card audio-port which 
encodes them as a WAV file. Some keyboards have the feature that
you can download samples (that is, notes from additional instruments)
into the keyboard. 

The SOFTWARE way is to purchase a synthesizer software which is often
called a MIDI sequencer. The sequencer reads the MIDI file and 
merges in the sound samples for each note on each instrument. The
sequencer outputs the audio which is then sampled and encoded
into a WAV file.

Mike




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sound
  1998-04-15  0:00 ` Sound Martin C. Carlisle
@ 1998-04-16  0:00   ` Andy Perkins
  1998-04-16  0:00   ` Sound Michael F Brenner
  1 sibling, 0 replies; 6+ messages in thread
From: Andy Perkins @ 1998-04-16  0:00 UTC (permalink / raw)



Martin C. Carlisle wrote:

> In article <3533E2F6.70212BB1@vci.net>, Andy Perkins  <storm@vci.net> wrote:
> >Does anyone know of any available package, preferrably
> >freeware or shareware that will allow my to put either wav
> >or even midi sounds into my Ada programs?
>
> At the Air Force Academy, we have a simple interface to play wav files.
> See ftp://ftp.usafa.af.mil/pub/dfcs/carlisle/mcc-sounds/mcc-sounds.ad[bs]
>
> You can play a sound, or play one in the background.

    This is excellent... Almost exactly what I am looking for.  I do not know
    too much about calling Windows 95 to do things like play sounds, but
    are there any other functions or procedures in the libwinmm library?
    Do you know of any kind of a document or tutorial on such things?

    Thanks
    storm@vci.net





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sound
  1998-04-16  0:00   ` Sound Michael F Brenner
@ 1998-04-17  0:00     ` v322
  0 siblings, 0 replies; 6+ messages in thread
From: v322 @ 1998-04-17  0:00 UTC (permalink / raw)



Michael F Brenner <mfb@mbunix.mitre.org> wrote:
> There are several ways to do MIDI. 

> The HARDWARE way is to buy a MIDI keyboard. The MIDI keyboard
> has a serial port that connects to the computer's serial port. 
> The computer sends the MIDI to the keyboard and the keyboard
> sends the sound waves to the computer-sound-card audio-port which 
> encodes them as a WAV file. Some keyboards have the feature that
> you can download samples (that is, notes from additional instruments)
> into the keyboard. 

Most sound cards have a built in synthesizer, so theoretically no
conversion to WAV is needed, but the quality of thie music will be
different on different sound cards.  On a low-end Soundblaster 16 clone,
you will not be able to tell what sound is supposed to represent what real
instrument, while on an AWE 32 or 64 (or better) you will have almost real
sounding instruments. 




> The SOFTWARE way is to purchase a synthesizer software which is often
> called a MIDI sequencer. The sequencer reads the MIDI file and 
> merges in the sound samples for each note on each instrument. The
> sequencer outputs the audio which is then sampled and encoded
> into a WAV file.



If you do not plan to distribute the software (i.e. you just want to see
how to use midi) you can download midi files from the web at places such
as www.midifiest.com .


--Nick





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-04-17  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-14  0:00 Sound Andy Perkins
1998-04-15  0:00 ` Sound Martin C. Carlisle
1998-04-16  0:00   ` Sound Andy Perkins
1998-04-16  0:00   ` Sound Michael F Brenner
1998-04-17  0:00     ` Sound v322
1998-04-15  0:00 ` Sound Tom Moran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox