This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
korg_wavedrum_midification [2014/03/24 20:11] midisaron |
korg_wavedrum_midification [2014/03/26 17:24] midisaron linked to how-to chapter |
||
---|---|---|---|
Line 58: | Line 58: | ||
===Processing the signals=== | ===Processing the signals=== | ||
After 64 samples of the head or rim signal have been captured, a FFT (Fast Fourier Transform) on these samples is performed. This results in 33 (usable) frequency bins representing the spectrum of the signal. I did not program the FFT myself but took it from NXP's | After 64 samples of the head or rim signal have been captured, a FFT (Fast Fourier Transform) on these samples is performed. This results in 33 (usable) frequency bins representing the spectrum of the signal. I did not program the FFT myself but took it from NXP's | ||
- | [[http://www.nxp.com/documents/application_note/AN10913_CM3_DSP_library_v1_0_0.zip|AN10913]]. This ZIP archive contains several files, the library which has to be linked to the MIDIBOX project is CodeRed/cr_dsplibFFTbin_cm3/libcr_dsplibFFT_cm3.a. To link this library to the project, the line <code> LIBS = libcr_dsplibFFT_cm3.a</code> is added to the makefile. A short yet comprehensible introduction into the concept of the FFT including examples on how to use NXP's DSP library is given in [[http://www.nxp.com/documents/application_note/AN10943.zip|AN10943]]. | + | [[http://www.nxp.com/documents/application_note/AN10913_CM3_DSP_library_v1_0_0.zip|AN10913]]. See below [[korg_wavedrum_midification#How to add the DSP library to the project]]. A short yet comprehensible introduction into the concept of the FFT including examples on how to use NXP's DSP library is given in [[http://www.nxp.com/documents/application_note/AN10943.zip|AN10943]]. |
I think it's amazing that the humble LPC1769 can calculate a 64-points-FFT so quickly that the delay is not noticable (at least to me). There are countless ways how the result of a FFT can be used. For the head signal, the high frequency components are stronger when the head is hit with a harder object (drumstick rather than hand), and when it's hit closer to the rim. This way a crude position detection is possible.\\ | I think it's amazing that the humble LPC1769 can calculate a 64-points-FFT so quickly that the delay is not noticable (at least to me). There are countless ways how the result of a FFT can be used. For the head signal, the high frequency components are stronger when the head is hit with a harder object (drumstick rather than hand), and when it's hit closer to the rim. This way a crude position detection is possible.\\ | ||
Only the absolute values of the complex frequency bin values are used. The correct formula would be | Only the absolute values of the complex frequency bin values are used. The correct formula would be | ||
Line 72: | Line 72: | ||
===MIDI=== | ===MIDI=== | ||
+ | This picture shows how the signals from the sensors are processed and converted to MIDI messages. At the same time this is how the SoundDiver editor window looks like: | ||
+ | {{:wavedrum_midi:sd_screenshot.jpg?600|Signal flow}} | ||
==Note On== | ==Note On== | ||
Line 122: | Line 124: | ||
|191|ADC from which the waveform was recorded; 0=Rim, 1=Head|0, 1| | |191|ADC from which the waveform was recorded; 0=Rim, 1=Head|0, 1| | ||
|192..255|waveform buffer|0..255((scaled down from 0..4095))| | |192..255|waveform buffer|0..255((scaled down from 0..4095))| | ||
+ | |||
+ | ===How to add the DSP library to the project=== | ||
+ | The FFT algorithm is taken from NXP's | ||
+ | [[http://www.nxp.com/documents/application_note/AN10913_CM3_DSP_library_v1_0_0.zip|AN10913]]. This ZIP archive contains several files, the library which has to be linked to the MIDIBOX project is CodeRed/cr_dsplibFFTbin_cm3/libcr_dsplibFFT_cm3.a. To link this library to the project, the line <code> LIBS = libcr_dsplibFFT_cm3.a</code> is added to the makefile. | ||