← Back to all work
Project 07 / Programming & sound

Interactive MATLAB piano

A graphical interface that turns a click into sound.

WhenMay 2025
ContextME 260 · Individual project
Tools & methodsMATLAB · GUI callbacks · Audio synthesis
The one-octave graphical piano interface.

The one-octave graphical piano interface.

The project

A one-octave piano implemented in MATLAB, with clickable keys, equal-tempered pitches, and synthesized sound. The project combines graphical objects, event callbacks, and waveform generation.

12Playable pitches
44.1 kHzAudio sample rate
440 HzA4 reference frequency

My contribution

I implemented the interface, pitch mapping, callbacks, and sound playback. The waveform formulation was adapted from a reference credited in the project submission.

From question to method

  • Mapped twelve pitches using equal temperament with A4 at 440 Hz.
  • Built white and black keys from MATLAB graphical objects.
  • Connected mouse clicks to stored waveforms and temporary key-color feedback.
  • Combined decaying harmonics to produce a more piano-like tone at a 44.1 kHz sample rate.

In motion

Screen recording of the original MATLAB piano.

Results & perspective

The interface responds to mouse clicks with audible notes and visible key feedback. The downloadable MATLAB files preserve the submitted implementation, and the recording shows the interface in use.

What I took from it

The project connected mathematical waveform design with a simple user interaction: a clear visual response makes the underlying signal processing easier to explore.

Reports & project files