Done: march 2005
This is software project, for studying digital signal processing. At the Department of Telecommunications, there are some DSP ISA-based PC boards, with TMS320VC5402-100 DSPs. So the project consists of two software, one runs on the DSP (one of the thrree on the card), and another runs on the PC, to control the work of the DSP, and handle the keyboard. I used the PC-keyboard to simulate a piano-keyboard. If a key pressed, the PC sends a command to the DSP, to play a sound. After that the sound decays to zero, in circa one second. It enables to play two or more sounds in the same time.
(control software window)
In the DSP runs a multichannel signal producer algorithm, which produces all the sounds of the piano. Just the volumes of all of them are zero by default. If we want to play a sound, set the volume to 1, and it turns back to zero, in a short time interval. Chords: We can produce all of the sounds in the same time, so it is possible to play 3 sounds (dur or moll chords) in the same time, just have to use the CTRL key on the keyboard, with the normal keys.
Piano sound: I downloaded a .wav file, about a piano’s sound, and then i analized it with Matlab. It was an FFT analysis, and i wrote the amplitudes of the harmonics (i used 16 harmonics) to a paper, an then i wrote an .m file with Matlab, to produce a sum of sinus functions, weighting with the amplitudes, and it generated 256 samples. Then the DSP used it as a look-up table, vith circular addressing, to generate a piano-sound. Different frequencies: Just change the step size in the reading of the look-up table. But the reading runs in constant frequency: 44.1kHz.
(the samples in Matlab)