Difference between revisions of "Firmware-72 Function-003"
Line 3: | Line 3: | ||
The frequency function measures either the frequency of successive peaks or the frequency calculated from the time between peak and end-peak events defined in the EDIT CONFIG command. The following methods can be selected using the FUNCTION command’s parameter values FP1: | The frequency function measures either the frequency of successive peaks or the frequency calculated from the time between peak and end-peak events defined in the EDIT CONFIG command. The following methods can be selected using the FUNCTION command’s parameter values FP1: | ||
+ | FP1 | ||
{| | {| | ||
− | | | + | |0yyyyyyy: |
|yyyyyyy = [1..127]; Scale factor | |yyyyyyy = [1..127]; Scale factor | ||
|- | |- |
Revision as of 16:02, 3 November 2015
FREQUENCY (3, 03h)
The frequency function measures either the frequency of successive peaks or the frequency calculated from the time between peak and end-peak events defined in the EDIT CONFIG command. The following methods can be selected using the FUNCTION command’s parameter values FP1:
FP1
0yyyyyyy: | yyyyyyy = [1..127]; Scale factor |
yyyyyyy = 1; Frequency is output as Hz | |
yyyyyyy = 60; Frequency is output as BPM |
The output range is divided by 1000 times the scale factor, so that if the scale factor is set to 1 and the frequency is output as pitch-bend messages, the frequency range is approx. 0 Hz – 16 KHz (Hertz). With the scale factor set to 60, and the frequency output as control-change messages, the frequency range is 0 – 127 BPM (beats per minute).
Example:
In order to output the frequency in BPM taps on a Touch sensor connected to input 1 of the USB-microDig as MIDI controller 64 messages, the following messages are sent (see also the EDIT CONFIG command):
- 240, 125, 0 {DEV}, 8 {FUNCTION}, 0 {yyy = 0}, 0 {FP2}, 3 {frequency function}, 60 {BPM}, 247 (F0h, 7Dh, 00h, 08h, 00h, 00h, 03h, 3Ch, F7h)
- 240, 125, 0 {DEV}, 106 {EDIT CONFIG}, 1 {configuration number}, 0 {input}, 48 {control-change message}, 64 {controller number}, 2 {peak detection}, 64 {threshold}, 127 {top}, 0 {noisegate}, 0 {time window}, 247 (F0h, 7Dh, 00h, 6Ah, 02h, 00h, 30h, 40h, 22h, 40h, 7Fh, 00h, 00h, F7h)
The threshold value may need adjustment to properly capture the signal peaks that occur when tapping the Touch sensor.