Jump to content

Button to send chords?


Recommended Posts

Posted

Hi there,

1st post on the forum,bit a newbie to this. I have built a low spec box with some buttons to trigger samples etc, im wondering if theres anyway to program 3 note or more button events?

Ive seen the double note in the midibox 64 software.is it just  a case of adding and extra line to that?

Thanks

Posted

Hi Skynth,

yes, you can do this on a similar way like for the double note events. Just take a look into mb64_meta.inc

Best Regards, Thorsten.

Posted

Hi Thorsten,

Many thanks for your pointers on this.I think I have this worked out now. Programming is beginning to make sense!

Will post code tomorow if it works,should anyone else need it.

Thanks again

Skynth

Posted

Hi all,

Heres the code just in case its useful!

MB64_META_Handler_11    ;insert your own mapping number here.remembering to add it to table at top!

MB64_META_Handler_Chord

     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      MB64_META_Handler_ChordOff      ; when Zero (pot value = 00 or button released): send Note Off

MB64_META_Handler_ChordOn

     ;; NOTE ON

     movlw      1x90            ; send 1x90 (Note On Header, channel 1)

     call      MIOS_MIDI_TxBufferPut

     movlw      1x60            ; send 1x60 (C-4) -- 1st note

     call      MIOS_MIDI_TxBufferPut

     movlw      1x7f            ; send 1x7F (velocity)

     call      MIOS_MIDI_TxBufferPut

     movlw      1x64            ; send 1x64 (E-4) -- 2nd note

     call      MIOS_MIDI_TxBufferPut

     movlw      1x7f            ; send 1x7F (velocity)

     call      MIOS_MIDI_TxBufferPut

     movlw      1x67            ; send 1x67 (G-4) -- 3rd note

     call      MIOS_MIDI_TxBufferPut

     movlw      1x7f            ; send 1x7F (velocity)

     call      MIOS_MIDI_TxBufferPut

     rgoto      MB64_META_Handler_ChordEnd

     ;; ----

     

MB64_META_Handler_ChordOff

     ;; NOTE OFF

     movlw      1x80            ; send 1x80 (Note Off Header, channel 1)

     call      MIOS_MIDI_TxBufferPut

     movlw      1x60            ; send 1x60 (C-4) -- 1st note

     call      MIOS_MIDI_TxBufferPut

     movlw      1x00            ; send 1x00(velocity) note off

     call      MIOS_MIDI_TxBufferPut

     movlw      1x64            ; send 1x64 (E-4) -- 2nd note

     call      MIOS_MIDI_TxBufferPut

     movlw      1x00            ; send 1x00 (velocity) note off

     call      MIOS_MIDI_TxBufferPut

     movlw      1x67            ; send 1x67 (G-4) -- 3rd note

     call      MIOS_MIDI_TxBufferPut

     movlw      1x00            ; send 1x00 (velocity) note off

     call      MIOS_MIDI_TxBufferPut

     

MB64_META_Handler_ChordEnd

     goto      MIOS_MIDI_BeginStream      ; end stream and exit

Now just to work out how to send an all notes off command everytime a Bank is loaded....

Catch ee on

Skynth

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...