Category : Modula II Source Code
Archive   : M2MUSIC.ZIP
Filename : PIANO.MOD

 
Output of file : PIANO.MOD contained in archive : M2MUSIC.ZIP
MODULE SimplePiano;
(* Demonstrate the facilities provided by simple Speaker module
Pat Terry, December 1988 for FST Modula-2 *)

IMPORT Terminal;
FROM Speaker IMPORT Sound, NoSound, A, B, C, D, E, F, G,
ASharp, CSharp, DSharp, FSharp, GSharp;

VAR
CH : CHAR;

BEGIN
Terminal.WriteString('Simple keyboard - C Major on middle row');
Terminal.WriteLn;
Terminal.WriteString('Hit "z" to stop');
REPEAT
Terminal.Read(CH); NoSound;
CASE CAP(CH) OF
"A" : Sound(C)
| "W" : Sound(CSharp)
| "S" : Sound(D)
| "E" : Sound(DSharp)
| "D" : Sound(E)
| "F" : Sound(F)
| "T" : Sound(FSharp)
| "G" : Sound(G)
| "Y" : Sound(GSharp)
| "H" : Sound(A)
| "U" : Sound(ASharp)
| "J" : Sound(B)
| "K" : Sound(2 * C)
ELSE NoSound
END
UNTIL CH = 'z';
NoSound;
END SimplePiano.


  3 Responses to “Category : Modula II Source Code
Archive   : M2MUSIC.ZIP
Filename : PIANO.MOD

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/