Jump to content

Button to send chords?


Guest skynth
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...