Maestro: CSE466 Lab4 (Modified: Postpone Streaming to next week on advice from TA's...Thank your TA's).

Requirements:

  1. From the serial UI, implement PLAY, PAUSE, and STOP commands for music contained in ROM.  Your system should be able to play at least from low A (~55Hz) to high F (~698Hz) which spans about 3.5 octaves, and sharps and flats must be included. See the spreadsheet for the countdown or overflow values. 
  2. Demonstrate your player with a test sequence from ROM. It should be fairly short. For example, play an ascending scale on one channel and a descending one on another. This is primarily for debugging your player and for making sure that you understand the music format. You should  use only one timer for tone generation and timeslice management. 

  3. Pick a song from http://www.knightvision.com/midis.html and convert it to .466 format. You'll need the mididmp.exe(NT) and mid2cse(UNIX) or mid2cse.exe(NT) tools. Put the song in ROM and play it. The Keil SW license limits you to 2K code size so you'll either have to cut the song short or get a dongle from the TA's or Chris Morgan to run the full license version of the SW. See implementation notes below for some suggestions.
  4. Turn in:

Implementation Notes:

  1. Most midi songs are split into several tracks, usually one for each instrument in the piece. The converter only translates one track at a time, so you'll have pick which one seems to represent the music best. Spot check the mididmp and mid2cse output files to see if they look okay to you.
  2. Josh discovered a tool that allows you to view midi songs graphically and to combine separate tracks into one track. This is perfect if you want to combine a baseline or a drum track with a rhythm guitar track. The tool is called xxx, and is already installed on a few machines in the lab.
  3. Danny wrote a program that converts .466 files from mid2cse into a C unsigned char array that you can paste into your code. The Keil eval software limits you to 2K code space, so your ROM test songs have to be fairly short or you can get the full license from the TA's or Chris Morgan.
  4. Be careful with the format. Here is the final decision.
  5. Using the tools:
        mididmp song.mid > song.txt           // converts midi hex to midi text format.
        mid2cse song.txt 6 70 10 -1 song.466 > song.log