Java MIDI Demonstration Applets for Music Education

by Eric Rangell - MUSC267 - Winter, 2003, Professor Morgan.


DISCLAIMER: This software is being distributed in the public domain, so it can be used without charge, and you may create derivative works from it, as long you agree that the author has ABSOLUTELY NO WARRANTY obligations or liability for any use or modification of this program.

IMPORTANT NOTE: All applets below require the Java Runtime Environment version 1.4 to be installed in your browser. If this version is not already installed, it will be automatically downloaded by your browser when the applet loads. Also, there is a bug in Java 1.4 where MIDI OUT data will only play on the computer's internal soundcard - it will not be sent to external MIDI devices. However, MIDI IN data can be captured from an external device, such as a synthesizer keyboard. MAC users may need to install a JAVA MIDI Service Provider Interface from: Mandolane Limited
  • 1. Test your JAVA MIDI Setup
  •       (Source code: UdmtMidiSetup.java | UdmtMidiInQueue.java)
  • 2. Sample End of Unit Exam: Major Scales
  •       (Source code: UdmtMajorScaleTest.java)
  • 3. Ear Training Exercise for Intervals
  •       (Source code: UdmtIntvEarTraining.java) | UdmtMidiOutQueue.java)
  • 4. Proof of Concept: Notation using Transparent GIF's
  •       (Source code: Anastasia.java)
  • 5. Proof of Concept: Testing Rhythmic Input
  •       (Source code: UdmtRhythmTest.java)

  • Download ZIP file containing all these Applets
    Possible future applications of this technology:
    Applet 1 would likely become a common dialog that can be launched from each lesson to allow the user to configure their MIDI setup. It should be designed so that the user's preferences are preserved in a database so they do not need to be changed each time. Note: This applet was written before many common functions were extracted into the Midi In and Out Queue classes.

    Applet 2 would be a model for end of unit exams that would be required for students to prove mastery of each unit. In this example, students must master performance of all 12 major scales before being allowed to learn about intervals. The results of each completed exam would be stored in a database. Webpages can then be built to report on student progress. This applet also demonstrates the use of audio feedback to enhance the user experience. The audio files (*.au) were recorded with the JavaSound "Capture Playback" demonstration applet provided with the Java SDK, at a bitrate of 11.025KHz, with 8 bit mono resolution.

    Applet 3 is a demonstration of a discovery module which enables the student to explore a topic interactively in an experimental setting. It illustrates the flexibility of providing the student with parameters to control the presentation of the material. It also shows how student control of MIDI parameters such as the Instrument dialog can enhance the user experience and add more dimensions of exploration. It also illustrates the use of MIDI sound effects (such as applause) as feedback for the user.

    Applet 4 demonstrates how transparent GIFs can be used to render music notation. In this example, transparent GIFs were created for each musical symbol. The applet draws 2 staffs, with treble and bass clefs, and then displays the other symbols on the treble staff. The transparent GIFs were created using the Anastasia font that is installed with notation programs such as Encore. This font can be opened in Microsoft Word and you can type the characters for musical symbols, then hit PrtSc to capture the screen to the clipboard, open Paint and paste the screen, save it as a bitmap, then open it in PaintShop Pro and export it to a Transparent GIF, setting White as the transparency color. If you have the Anastasia font and Microsoft Word on your PC then you can click here to view the entire Anastasia character set.

    Applet 5 demonstrates how student's ability to play in time can be tested. This applet displays 32 8th notes that the student needs to play against a metronome click. It then displays a statistical analysis of the student's timing. The Variance column indicates how far off the student's timing is from a perfectly quantized note. Small variances less than 25% indicate good timing. It also displays for each note the percentage of the time the student held the note down and percentage of time between the release of the note and the start of the next note. This indicates if the student played the note staccato (aroud 50%) or legato (over 75%). These statistics can eventually be used to build programs which assist students with rhythm errors and track their improvement over time.

    Click here to download the handout distributed at the class presentation

    Click here for more background information about Eric Rangell and this project

    Click here to see Eric's prototypes for MIDI Visualizations for Deaf and Hearing Impaired People

    Click here to visit Eric's blog for additional information about research being done on these topics

    To contact Eric, email: erangell@gmail.com