Add Velocity in J5_Dout_V1.3

Hello

I would like to add velocity sensivity in this project: J5 Dout v1.3

i want to set Pin 7 at 1 when the velocity is bigger than 100 on one of other pin to controle the accent in my rythm box

and set the Pin 7 at 0 when this note is off

I think i must modifiy the prog in Main.inc but i don’t know what i must add

USER_MPROC_NotifyFoundEvent

;; forward to J5_DOUT_PinSet function

;; it expects: number of pin (0-7) in WREG

;; value in MIOS_PARAMETER1

;; store pin number

movwf TMP1

;; set the pin value depending on velocity:

;;    - 0x00: set pin to 0V

;;    - other values: set pin to 5V

movf MIOS_PARAMETER3, W

skpz

movlw 0x01

movwf TMP2

;; if the event was a note off event, zero value independent from velocity

movf MIOS_PARAMETER1, W

andlw 0xf0

xorlw 0x80

skpnz

clrf TMP2

Please can you help me

thank you

…maybe you have to ask your question in the “c programming” section… :wink:

Sorry mate… I have been meaning to reply to this ever since it hit RSS … I thinx it’s been sitting in a ficefox saved session over 5 reboots now hah…

Answer coming soon, if nobody beats me to it :wink:

Hi:

I can’t answer the question, but I was about to ask something similar.

I’m building some drum modules too, and I was planing to trigger them

with the modified MIDIbox CV as stated here:

http://www.midibox.org/dokuwiki/doku.php?id=how_to_use_midibox_cv_with_a_dout

As this configuration provides 32 triggers, I want to add more than one

accent. At least 4, but could be one for every drum.

My programming skills are very limited, so any help will be great.

Thanks