hallo
i thought i could use the spectrasymbol soft pots to trigger the BeatRepeater in Ableton with a single touch.
To achieve that i need to:
1- read the pot movement and send the CC
void AIN_NotifyChange(unsigned char pin, unsigned int pin_value) __wparam
{
// a pot has been moved, send CC# at channel 1
MIOS_MIDI_TxBufferPut(0xb0); // CC at channel 1
MIOS_MIDI_TxBufferPut(pin); // pin number corresponds to CC number
MIOS_MIDI_TxBufferPut(MIOS_AIN_Pin7bitGet(pin)); // don't send 10bit pin_value,
// but 7bit value
}
2- set a note ON message if the CC value is >0 (finger(or whatever) on softpot) 3- set a note OFF message if the CC value is =0 i thought i could transform the CC to Velocity and insert the ASM code for double note (with the proper adaptation) as found in the Meta Handler example in MB64
MB64E_META_Handler_DoubleNote
call MIOS_MIDI_BeginStream ; begin stream
;; branch depending on content of MIDI_EVNT_VALUE
movf MIDI_EVNT_VALUE, W ; get MIDI_EVNT_VALUE value
bz MB64E_META_Handler_DoubleNoteOff ; when Zero (enc value = 00 or button released): send Note Off
MB64E_META_Handler_DoubleNoteOn
;; NOTE ON
movlw 0x90 ; send 0x90 (Note On Header, channel 0)
call MIOS_MIDI_TxBufferPut
movlw 0x00 ; send 0x00 (C-0) -- cakewalk needs this as MIDI Remote indicator
call MIOS_MIDI_TxBufferPut
movlw 0x7f ; send 0x7F (velocity)
call MIOS_MIDI_TxBufferPut
movf MIDI_EVNT1, W ; send content of second byte (08-0f)
call MIOS_MIDI_TxBufferPut
movlw 0x7f ; send 0x7F (velocity)
call MIOS_MIDI_TxBufferPut
rgoto MB64E_META_Handler_DoubleNoteEnd
… am i in the right direction?
simone