MELODY

Plays a melody in 2-letter code.
2.5K Downloads
Updated 11 Nov 2004

No License

Just a New Year joke:
a MATLAB note player:
a melody can be represented as a column of notes, e.g.

>>gam=[
'do'
're'
'mi'
'fa'
'so'
'la'
'ci'
'd2'
];

>>Z=melody(gam,2);
Z is input for sound:

>>sound(Z/2)

By default MELODY plays russian Xmas song "Elochka" with freq. factor 3, e.g.

>>melody;

Cite As

Vassili Pastushenko (2026). MELODY (https://uk.mathworks.com/matlabcentral/fileexchange/6217-melody), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R10
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0