Link to home
Start Free TrialLog in
Avatar of petlar930
petlar930

asked on

simple library or function for sound generator

I'm looking for a simple library or function for generating a tone/sound with different pitch and volume.
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

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
I've never used it, but I've also read good things about The Synthesis Toolkit.
https://ccrma.stanford.edu/software/stk/
Avatar of petlar930
petlar930

ASKER

But windows PlaySound can ony play from a file not generate the sound?
Did you see I also provided a link to the full Core API for generating sounds and suggested a library that can do Midi?
ASKER CERTIFIED SOLUTION
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial