image thumbnail

Play MIDI Note

version (1.96 KB) by Atul Ingle
Get information about a MIDI note number like frequency and name. Play the note optionally.


Updated 02 Jul 2012

View License

PLAYMIDINOTE Obtain information about a Midi note like its frequency and
name in the equitempered scale assuming A4 is 440Hz.

[NOTENAME, FREQ] = PLAYMIDINOTE(MIDINUM) returns name of the note correspondig to Midi note number MIDINUM and also returns its frequency
FREQ in Hz.

[NOTENAME, FREQ] = PLAYMIDINOTE(MIDINUM, 1) same as above, and additionally plays the specified note for one second.

[NOTENAME, FREQ] = PLAYMIDINOTE(MIDINUM, 1, DUR) same as above, and plays the specified note duration DUR seconds.

Cite As

Atul Ingle (2022). Play MIDI Note (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!