Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Play and Sound Replacements?
#1
Has anyone done any work on routines that duplicate the functions Play and Sound? I saw the great tutorial on 3D sound but what about non-3D sounds. Maybe a MIDI replacement for Play?
Reply
#2
Ther are many sound libraries available..

Look in the examples folder, there are examples using FMOD and others.
Reply
#3
I had seen that but isn't that just for playing MOD files. I mean something like generating a sound at some given freq. (i.e. 5600 HZ) as well as playing specific notes (C4, D3, etc).

Have I miss understood the FMOD example?
Reply
#4
I have to say I'm interested in direct wave control of the soundcard too, I'm thinking of maybe making a MIDI-controlled synthesiser for fun. So you have to create wave "packets" in quick succession and send them to the soundcard or what?
8% of the teenage population smokes or has smoked pot. If you're one of the 2% who hasn't, copy and paste this in your signature.
Reply
#5
Quote:Has anyone done any work on routines that duplicate the functions Play and Sound? I saw the great tutorial on 3D sound but what about non-3D sounds. Maybe a MIDI replacement for Play?
I've been working on and off on a PLAY drop-in that uses the MIDI port but the PLAY metalanguage is pretty complex.
I'd knock on wood, but my desk is particle board.
Reply
#6
Quote:I had seen that but isn't that just for playing MOD files. I mean something like generating a sound at some given freq. (i.e. 5600 HZ) as well as playing specific notes (C4, D3, etc).

Have I miss understood the FMOD example?

After reading your post today, I wrote a tutorial on FMOD... it's in this forum. Smile

-shiftLynx
img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
Reply
#7
Thanks you, I read it and learned a lot... but it still misses part of my question.

The FMod seems great for playing a midi tune or a premade wav. Put in QB one could generate the tune by code during run-time. With the FMOD stuff it seems like everything must be done pre-run time.

Not all sound tools are for games or back ground music. For example, you can learn a lot about Fourier Transform by seeing and hearing it. Music composing algorithms are another area were MIDI (or some other music format) generation would be nice, and something that FMOD doesn't seem to do.

Again, the tutorial was great and it covered a lot about loading and playing sound, but the sound and play functions did more than that.
Reply
#8
Hmm, I see what you mean now... SDL allows you to send raw data to the sound card... I've never used the functions to do this, but maybe somebody here has played with them? I believe you have to use SDL_OpenAudio to set up a callback function, which is called every time SDL wants you to fill the sound buffer with the next piece of audio data. You could then link the callback function into some sort of wave generating routines.

I'm not sure - these are just some thoughts; this is the only way I know how to feed raw sound data to the soundcard. Smile

-shiftLynx
img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
Reply
#9
I remember writing something a while back that uses kernel32's Beep function to play notes (I had a table of 50-some notes, and I wrote a really simple sublanguage similar to PLAY.)

It's not portable. I'll see if I can find the code, though.
color=blue]subxero - admin at this place.[/color]
Reply
#10
don't tell me FMOD doesn't allow to access the mixing buffer or install a mixing callback... I can't believe a so famous and widely used library doesn't allow it!

EDIT: ahhh, from fmod.org, on the features page I found this:
Quote:# User call-back custom streams.
# Generate custom samples.
That means it has a way to pass user buffers... Gotta check the docs
ngelo Mottola - EC++
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)