Formant wave function synthesizer
From SoftwarePractice.org
This article describes a project that implements a Formant-Wave Function musical synthesizer using Matlab. It is suitable for a team implementation and design project in a second class in signals and systems.
Overview
Formant Wave Function (FWF) synthesis was invented by Xavier Rodet in the late 1970's. As far as I know, the best reference is the following paper:
- Xavier Rodet. Time-domain formant-wave-function synthesis. Computer Music Journal, 8(3):9--14, 1980.
FWF synthesis is a practical solution to the problem of simulating musical instruments that consist of an excitation source and a series of time-varying resonant filters. These resonant filters are termed formants, and characterize many sources of musical sound, such as voice, brass instruments, organ pipes, and so on.
While conventional filter design methods offer sophisticated filter design flexibility, they are not intended for designing filters that change characteristics with time. For example, a filter in which the center frequency changes over the course of a musical note (as happens).
Rodet's solution is to synthesize waveforms directly in the time domain, based on the properties of the desired frequency response of the resonant filters. He identified a set of parameters that affect the filter shape, yet which can easily be fed into the algorithm for generating the time-domain signal. The time-domain waveform generation is computationally efficient, which adds to the appeal of this algorithm.
(The algorithm does have one significant drawback, which you will be exploring in this project.)
Project
You will implement an FWF music synthesizer in Matlab. As input, the program will take an array of "events," where each event consists of the note name or ID code, a flag indicating whether this is a "note on" or a "note off" event, the "velocity" of the key, and the time at which the event occurs.
As output, the program will produce an audio signal that is generated using the FWF synthesis method.
Note that:
- Each note has an amplitude envelope applied to it. You should experiment with different envelopes.
- A note can have one or more formant parameters altered while the note is playing. If the formant center frequency is altered, for example, interesting effects can be obtained. You should experiment with this.
- Note-on and note-off events do not necessarily occur alternately. So, there could be more than one note playing at a time.
- The velocity of the note-on event should effect the amplitude of the note. It should also affect the FWF parameters such that a higher velocity results in a higher harmonic content of the note.
- The velocity of the note-off event can be ignored.
- A set of Matlab variables should be used to set the key parameters of the sound synthesis, including the parameters for each formant, the rate of the attack and decay envelopes, and the extent to which velocity affects amplitude and timbre.
To demonstrate the program, the instructor will ask you to "program" the synthesizer with a well-known tune.
Your project documentation should address at least the following:
- The theory of FWF synthesis
- A description of your implementation, including issues encountered and proposed enhancements
- Sample Matlab code to illustrate key points
- Plots and spectra to show how your program behaves with different sets of parameters
- A sample input and output file
- A discussion of the limitations of FWF synthesis
You should not only implement this synthesizer, but also use it to demonstrate your engineering skills. In this particular project, you should explore the performance limits of your program and investigate ways of improving performance. You should also perform some investigation into how the program could be implemented to run in real time, and predict the expected performance limits on your chosen platform. Thus, your report should also include:
- Performance measurement and analysis
- A discussion of how this program (or a similar one written in another language) could be made to function in real time
Extra credit will be awarded to teams who do an excellent job of implementing and documenting the program as described above, and either a) make their program function in real time, or b) implement a useful and usable GUI to the program.
Other resources
- Formants, Wikipedia
