Dumb question #18: How can I, in C++ (Borland) sound a musical note or a series of notes?

Jim Taylor

If by musical note u mean a beep then it can be done using

for (int i = 0; i < 20; ++i)
        prinf ("\7");

will sound the beep 20 times.

If u mean musical notes like piano and the likes then maybe an external sound library would be more like it ( OpenAL, FMOD ??).

Hope it helped,
Bye.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.