
Build a MIDI Synth with FlashConclusionThe current version of this Flash MIDI synthesizer implements the volume, expression and pan continuous controllers. You can hear these volume and pan effects in the supplied SWF. A critical part of the sound design for any digital audio synthesizer is the loudness balance of the sounds. The lengths of the sounds also have to match the durations of the notes in the score. There is, at present, no sound layering in this implementation. That is, we specify only one sound per note, and that sound has to suffice for all note durations in the music. Layering is a technique that can add quite a bit of richness to your music. But in the context of Flash, this may not be desirable, as each element of the layered sound would take up another playback channel. So now you have an outline and demonstration of the steps necessary to make and use a software MIDI synthesizer within Flash. At its core is a MIDI interpreter, written in ActionScript. It steps through the SMF using the setInterval timer, and starts and stops sounds attached to individual movie clips to play back the score. We compensate for timer inaccuracies by padding each sound with 10 mS of silence and playing catch up in the MIDI score. We map sounds from the library onto specific MIDI channel and note locations in an array of note objects, and perform note stealing to keep the number of simultaneous notes within the 8-channel constraint of Flash. Play it, Schroeder! About the author: |
Sonify.org is a community resource where Developers can unite with the common goals of adding interactive audio to the Web, Wireless and Digital Devices as well as advancing the development of the underlying interactive audio technologies. Read more. |
![]() ![]() |
![]() ![]() |