Need a project done?

C++ Programming Developer

Search This Blog

Sound in C++


#include <windows.h>

int main()
{
    Beep(1568, 200);
    Beep(1568, 200);
    Beep(1568, 200);
    Beep(1245, 1000);
    Beep(1397, 200);
    Beep(1397, 200);
    Beep(1397, 200);
    Beep(1175, 1000);
   
    return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include <iostream.h>
#include <windows.h>

void scale(void)
{ Beep(523,400); // 523 hertz (C5) for 400 milliseconds
 Beep(587,400);
 Beep(659,400);
 Beep(698,400);
 Beep(784,400);
 Beep(698,400);
 Beep(659,400);
 Beep(587,400);
 Beep(523,400);
}


int main()
{

 scale();
 cout << "Scale completed.\n";
 
 return 0;
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




"Don't let anyone ever make you feel like you don't deserve what you want."