PlayTune
by Alan Tan
16 Jun 2006
(Updated 21 Jul 2006)
This function plays musical tunes. Write your own musical tune and call the function to play it.
|
Watch this File
|
| File Information |
| Description |
This function plays musical tunes. Write your own musical tune and call the function to play it.
Notation:
[CDEFGAB] keys, 5 full octaves
[12345678] key/rest duration, with the default [1] semiquaver, [2] quaver, [4] crochet and [8] minim
[#] sharp / [b] flat / [.] rest / [^] raise octave / [_] lower octave
The musical scores for Canon in D (Pachelbel), Prelude No 1 (Bach), The Globe Trotter and Fantasie Impromptu (Chopin) are also attached.
Essential files: playtune.m
Accompanying files: canon_in_d.m, prelude_no_1.m, the_globe_trotter.m, fantasie_impromptu.m |
| MATLAB release |
MATLAB 5.3.1 (R11.1)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (6) |
| 28 Jun 2006 |
John D'Errico
|
|
|
| 29 Jun 2006 |
Alan Tan
|
|
|
| 20 Sep 2006 |
S Murphy
|
|
|
| 18 Apr 2007 |
Ruoting Yang
|
|
|
| 26 Oct 2008 |
Ameya Deoras
|
|
|
| 02 Aug 2011 |
Chihiro
|
|
|
| Updates |
| 20 Jun 2006 |
Edited the function for a more natural sounding tone. |
| 21 Jun 2006 |
Added residual phase to generating signals. |
| 22 Jun 2006 |
Added the musical score of Prelude No 1 by Bach. |
| 27 Jun 2006 |
Enabled customizable tone generator; at the same time, set the lowest note to C(-2), i.e., two octaves below the middle C of the piano. Also added a new musical score "The Globe Trotter" which plays both right and left hands. |
| 27 Jun 2006 |
Tidied up the codes. |
| 28 Jun 2006 |
Edited description. |
| 29 Jun 2006 |
Added additional help and examples in playtune. |
| 21 Jul 2006 |
Added Fantasie Impromptu (plays both hands), one of my favorite pieces by Chopin. |
|
Contact us at files@mathworks.com