From the course: Code Clinic: C++

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution overview: Musical instrument

Solution overview: Musical instrument - C++ Tutorial

From the course: Code Clinic: C++

Start my 1-month free trial

Solution overview: Musical instrument

- [Instructor] As I considered this challenge, I realized there were two main components to it, figure how to get input from the mouse and figure out how to generate sounds on demand. I knew that getting input from the mouse would require some sort of interaction with the operating system so I decided to structure the program as a Windows application rather than the more generic console applications I've written for the previous challenges. To generate the sound, I relied on a third-party library called libao which I'll cover in a later video. My solution consists of three source files, InstrumentWinMain.cpp contains the main function and code for the Windows application portion of the program and the instrument.cp and its corresponding header contains an instrument class which uses mouse inputs to generate sound. I've already compiled the program using the included make file. To run it, I'll double click instrument.exe…

Contents