We help IT Professionals succeed at work.

simple library or function for sound generator

petlar930
petlar930 asked
on
127 Views
Last Modified: 2017-04-10
I'm looking for a simple library or function for generating a tone/sound with different pitch and volume.
Comment
Watch Question

evilrixSenior Software Engineer (Avast)
CERTIFIED EXPERT

Commented:
Windows has a function for this.

PlaySound function
https://msdn.microsoft.com/en-us/library/windows/desktop/dd743680(v=vs.85).aspx

Using PlaySound to Play System Sounds
https://msdn.microsoft.com/en-us/library/windows/desktop/dd757667(v=vs.85).aspx

BOOL PlaySound(
   LPCTSTR pszSound,
   HMODULE hmod,
   DWORD   fdwSound
);

Open in new window


It also has a core set of APIs for manipulating sounds.

About the Windows Core Audio APIs
https://msdn.microsoft.com/en-gb/library/windows/desktop/dd370784(v=vs.85).aspx
evilrixSenior Software Engineer (Avast)
CERTIFIED EXPERT

Commented:
I've never used it, but I've also read good things about The Synthesis Toolkit.
https://ccrma.stanford.edu/software/stk/

Author

Commented:
But windows PlaySound can ony play from a file not generate the sound?
evilrixSenior Software Engineer (Avast)
CERTIFIED EXPERT

Commented:
Did you see I also provided a link to the full Core API for generating sounds and suggested a library that can do Midi?
Senior Software Engineer (Avast)
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.