korg_wavedrum_midification
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
korg_wavedrum_midification [2013/06/09 11:38] – typo midisaron | korg_wavedrum_midification [2015/02/09 17:55] (current) – [MIDIfying the Wavedrum - Software] Updated Software download midisaron | ||
---|---|---|---|
Line 1: | Line 1: | ||
**The Korg Wavedrum MIDIfied** | **The Korg Wavedrum MIDIfied** | ||
- | ====History==== | + | ====History |
In 1994 Korg released their first // | In 1994 Korg released their first // | ||
In 2009, Korg had stopped making Wavedrums a long time ago, a new // | In 2009, Korg had stopped making Wavedrums a long time ago, a new // | ||
Line 9: | Line 9: | ||
To keep the price low, Korg had to cut cost wherever possible. All newer Wavedrums came with a very limited user interface (no text let alone graphics - only a 3-digit seven segment display! 8-o), and they had no MIDI or other computer interface at all! I felt the urgent need to do something about that. | To keep the price low, Korg had to cut cost wherever possible. All newer Wavedrums came with a very limited user interface (no text let alone graphics - only a 3-digit seven segment display! 8-o), and they had no MIDI or other computer interface at all! I felt the urgent need to do something about that. | ||
- | ====MIDIfying the Wavedrum==== | + | ====MIDIfying the Wavedrum |
- | ===Hardware=== | + | ===Signals from the wavedrum=== |
- | ==Signals from the wavedrum== | + | |
The //WD-X//, the // | The //WD-X//, the // | ||
- | ==Interfacing the LPCXpresso board== | + | ===Interfacing the LPCXpresso board=== |
The LPC1769 microprocessor on the LPCXpresso board has an on-chip 12 bit A/D converter. Sampling both the head and the rim pickup at a rate of 10 kHz each, their waveforms can be captured quite accurately. While it would be possible to get the signals from the piezos directly, I decided to take them from the outputs of the buffer amplifiers located on the Wavedrum' | The LPC1769 microprocessor on the LPCXpresso board has an on-chip 12 bit A/D converter. Sampling both the head and the rim pickup at a rate of 10 kHz each, their waveforms can be captured quite accurately. While it would be possible to get the signals from the piezos directly, I decided to take them from the outputs of the buffer amplifiers located on the Wavedrum' | ||
Line 25: | Line 24: | ||
{{: | {{: | ||
- | ==Power supply for the LPCXPresso board== | + | ===Power supply for the LPCXPresso board=== |
The Wavedrum is powered from an external 9V/1.7A wall wart supply. Since the Wavedrum draws much less current than 1.7 amps it is possible to power the LPCXpresso board from the wall wart too. I use a simple linear regulator to get 3.3 volts from the 9 volts. The LPCXpresso board is quite a current hog, so the LM317 runs rather hot and needs a small heat sink. I placed the regulator on an extra board, but with a clever layout perhaps it would be possible to fit it onto the board carrying the LPCXpresso and the preamp too.\\ | The Wavedrum is powered from an external 9V/1.7A wall wart supply. Since the Wavedrum draws much less current than 1.7 amps it is possible to power the LPCXpresso board from the wall wart too. I use a simple linear regulator to get 3.3 volts from the 9 volts. The LPCXpresso board is quite a current hog, so the LM317 runs rather hot and needs a small heat sink. I placed the regulator on an extra board, but with a clever layout perhaps it would be possible to fit it onto the board carrying the LPCXpresso and the preamp too.\\ | ||
The Wavedrum is a quite noisy (electrically) environment. There are several DC/DC converters in there. The ground connection to the extra circuitry is critical. After a few experiments I found that noise is suppressed best with a single heavy wire ground connection from the sheet metal that holds the KLM-2739 board to pin 1 of the LPCXpresso board. The 9 volts are taken from the small board with the power supply jack and the on/off switch. Maybe there are better options. | The Wavedrum is a quite noisy (electrically) environment. There are several DC/DC converters in there. The ground connection to the extra circuitry is critical. After a few experiments I found that noise is suppressed best with a single heavy wire ground connection from the sheet metal that holds the KLM-2739 board to pin 1 of the LPCXpresso board. The 9 volts are taken from the small board with the power supply jack and the on/off switch. Maybe there are better options. | ||
Line 31: | Line 30: | ||
{{: | {{: | ||
- | ==Schematics== | + | ===Schematics=== |
{{: | {{: | ||
{{: | {{: | ||
- | ==User interface== | + | ===User interface=== |
Sorry, no user interface yet. At the moment all user-alterable parameters can be edited via MIDI Sysex only. | Sorry, no user interface yet. At the moment all user-alterable parameters can be edited via MIDI Sysex only. | ||
- | ===Software=== | + | ====MIDIfying the Wavedrum - Software==== |
+ | {{: | ||
==Capturing the head's and the rim's signals== | ==Capturing the head's and the rim's signals== | ||
- | The ADC takes a sample every 50 microseconds. When idle, the head piezo, the rim piezos and the force sensor are sampled in turns. When a trigger on the head or on the rim is detected, i. e. a threshold is crossed, the force sensor is temporarily not sampled until 64 samples on the triggered channel (head or rim) are recorded and the event is processed. During that time the non-trigered | + | The ADC takes a sample every 50 microseconds. When idle, the head piezo, the rim piezos and the force sensor are sampled in turns. When a trigger on the head or on the rim is detected, i. e. a threshold is crossed, the force sensor is temporarily not sampled until 64 samples on the triggered channel (head or rim) are recorded and the event is processed. During that time the non-triggered |
- | ==Processing the signals== | + | Optionally all 64 samples are output via MIDI Sysex, so the recorded signal can be viewed. Here are a few examples recorded this way: |
- | When hit, a MIDI drum usually generates a Note On message with a fixed note number and a velocity value depending on how strong the drum was hit. To determine the strength I use the maximum deviation from idle level at the moment. Because the whole signal (64 samples) is available, many other ways are thinkable. | + | |
{{: | {{: | ||
Line 53: | Line 52: | ||
(The screenshots are taken from SoundDiver. I'm still using Apple' | (The screenshots are taken from SoundDiver. I'm still using Apple' | ||
- | ==Auto-zero== | ||
- | There are two trimpots to adjust the zero levels for the head and the rim signal (see schematics above). However, to determine the zero levels more precisely the levels at the three ADC inputs are measured on startup (after waiting for a few seconds, to allow for things to warm up). The zero levels of the head and the rim signals are also adjusted dynamically while waiting for trigger events. | ||
- | ==Crosstalk suppression== | + | ===Crosstalk suppression=== |
On the Wavedrum there is always crosstalk between head and rim. In some situations it may be desirable that only one MIDI message is generated when a trigger is detected on both pickups at the same time. When recording the head or rim signal is completed while on the other channel there' | On the Wavedrum there is always crosstalk between head and rim. In some situations it may be desirable that only one MIDI message is generated when a trigger is detected on both pickups at the same time. When recording the head or rim signal is completed while on the other channel there' | ||
- | ==Processing the force sensor== | + | ===Processing the signals=== |
- | When the voltage | + | 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:// | ||
+ | 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' | ||
+ | Only the absolute values | ||
+ | < | ||
+ | but I skip the square root to save execution time. So the squares of the absolute values are used rather than the absolute values themselves.\\ | ||
+ | At the moment, I extract three parameters out of the FFT result: // | ||
- | ==MIDI== | + | ===Auto-zero=== |
- | When hit at the head or at the rim, a Note On message is sent. The note number and the MIDI channel can be set individually for the head and for the rim. If there' | + | There are two trimpots to adjust the zero levels for the head and the rim signal (see schematics above). However, to determine the zero levels more precisely the levels at the three ADC inputs are measured on startup (after waiting for a few seconds, to allow for things to warm up). The zero levels of the head and the rim signals are also adjusted dynamically while waiting for trigger events. |
+ | |||
+ | ===Processing the force sensor=== | ||
+ | When the voltage at the force sensor changes, a MIDI Control Change, Aftertouch or Pitch Bend message can be generated. Also the note number of drum trigger events can be varied depending on pressure. | ||
+ | |||
+ | ===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: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ==Note On== | ||
+ | When the drum is hit at the head or at the rim, a Note On message is sent. The note number | ||
+ | The velocity can be taken from the // | ||
+ | The MIDI channel can be set individually for the head and for the rim. | ||
+ | |||
+ | ==Note Off== | ||
+ | If there' | ||
+ | |||
+ | ==Control Change, Aftertouch and Pitch Bend messages== | ||
+ | In addition to the Note On message a CC# message representing the // | ||
+ | |||
+ | ==System Exclusive== | ||
Various user-settable parameters can be transmitted to the software via MIDI Sysex messages. The bulk dump format is as follows: | Various user-settable parameters can be transmitted to the software via MIDI Sysex messages. The bulk dump format is as follows: | ||
- | $F0 $7D $57 $44 $4D $49 $20 $02 $00 $00 //$0h $0l....$0h $0l// $F7 | + | $F0 $7D $57 $44 $4D $49 $20 $02 $00 $00 //$0l $0h....$0l |
- | The //$0h $0l....$0h $0l// part designates a block of 512 MIDI bytes. These represent 256 parameter bytes ((as in SYSEX_FORMAT 1 in tutorial 025)) which are listed in the table below (numbered from 0 to 255). Some parameters are 16-bit, in these cases the LSByte is sent first.\\ | + | The //$0l $0h....$0l |
When the software receives such a message, the parameters are updated. The internal settings can be requested with a dump request: | When the software receives such a message, the parameters are updated. The internal settings can be requested with a dump request: | ||
Line 101: | Line 125: | ||
|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' | ||
+ | [[http:// | ||
- | ===Future plans=== | + | ====MIDIfying the Wavedrum - Future plans==== |
- | ==Replacing the force sensor== | + | ===Replacing the force sensor=== |
It's sometimes mentioned that the rebound of the Wavedrum is not great (playing with sticks, rebound helps when playing snare rolls etc). Some say this is because the force sensor pushes against the bottom side of the drum head. I think it should be possible to replace the mechanical sensor with a reflective optical sensor like the CNY70. This would not be in touch with the drum head at all, hence no impact on rebound. The sensitivity of the head pickup might be improved too. Regarding the Wavedrum' | It's sometimes mentioned that the rebound of the Wavedrum is not great (playing with sticks, rebound helps when playing snare rolls etc). Some say this is because the force sensor pushes against the bottom side of the drum head. I think it should be possible to replace the mechanical sensor with a reflective optical sensor like the CNY70. This would not be in touch with the drum head at all, hence no impact on rebound. The sensitivity of the head pickup might be improved too. Regarding the Wavedrum' | ||
- | ==Separating the two rim sensors== | + | ===Separating the two rim sensors=== |
As mentioned, there are two sensors attached to the rim, but these are just wired in series. Interpreting the two sensors' | As mentioned, there are two sensors attached to the rim, but these are just wired in series. Interpreting the two sensors' | ||
- | ==User interface== | + | ===User interface=== |
At least a text display and a few buttons. Unfortunately there isn't much room for this in the Wavedrum. | At least a text display and a few buttons. Unfortunately there isn't much room for this in the Wavedrum. | ||
- | ==Improving the Wavedrum' | + | ===Improving the Wavedrum' |
At the moment everything is coded into three digits or letters (letters that can reasonably be displayed in a seven-segment digit, that is). It's impossible to edit the Wavedrum' | At the moment everything is coded into three digits or letters (letters that can reasonably be displayed in a seven-segment digit, that is). It's impossible to edit the Wavedrum' | ||
With a text display the Wavedrum' | With a text display the Wavedrum' | ||
Yes, I'm aware that this is a huge programming task.:-o | Yes, I'm aware that this is a huge programming task.:-o | ||
- | ==Position sensing== | + | ===Position sensing=== |
Unlike the Roland HPD, the Wavedrum cannot sense //where// the drum head is hit. There are application notes from NXP on capacitive touch sensing with the LPC processors (AN11023, AN11095). I have no idea if this is feasible, but maybe regions of the drumhead can be covered with some conductive paint (from the bottom side perhaps), and, with hand playing, the region that was hit can be detected. | Unlike the Roland HPD, the Wavedrum cannot sense //where// the drum head is hit. There are application notes from NXP on capacitive touch sensing with the LPC processors (AN11023, AN11095). I have no idea if this is feasible, but maybe regions of the drumhead can be covered with some conductive paint (from the bottom side perhaps), and, with hand playing, the region that was hit can be detected. | ||
korg_wavedrum_midification.1370777906.txt.gz · Last modified: 2013/06/09 11:38 by midisaron