Board index › Products › MIDIvampire

Changing the CC assignments?

5 posts · 12947 views

Changing the CC assignments?

by herr_prof » Wed Sep 04, 2013 17:36 UTC
Hey - I am thinking of using my vamps with this phatboy midi controller which has fixed midi cc assignments, is it possible to check the default cc map in the code? Or default midi channel so you dont have to cut traces?

Any special tricks to enable the isp pin other than soldering the connectors?

Re: Changing the CC assignments?

by guest » Thu Sep 05, 2013 01:56 UTC
yes, the CC's can be changed in the code pretty easily, as well as the default midi channel.

to reprogram it, you need an ISP programmer, an ISP header, and to connect it up to a MIDI source so it has power.

Re: Changing the CC assignments?

by herr_prof » Thu Sep 05, 2013 16:19 UTC
Any idea where these values live? I skimmed the source but didnt find anything obvious.

Re: Changing the CC assignments?

by guest » Thu Sep 05, 2013 21:18 UTC
midi channel is set with this line:
;fetch midi address
in r16,pinc
andi r16,$0f
sts midi_channel,r16


this is run once on startup, and not changed again. so if you just want to have a fixed midi channel, that is not set by the trace-cutting, do the following:
;fetch midi address
;in r16,pinc
;andi r16,$0f
ldi r16,$09 ; put midi channel here (midi channel number  - 1)
sts midi_channel,r16


are you familiar with avr assembler? ; is the comment symbol and $ is the hex number declaration. i think 0x works as well, but i never tried it. all of these parts are in vamp1.asm.

the controllers start down here:
;mov controller number to high register
;check for various control parameters
lds r16,last_byte
cpi r16,$0f ; branch the search tree for greater speed
brsh mod15
cpi r16,$0a
brne mod11
;voice selection
;temporary modification for 16 voices
;andi r17,$70 ; mask off upper bytes (only 8 different voices)
;lsr r17 ; adjust for table positions
andi r17,$78 ; temp mod
subi r17,$f0
mov r25,r17
rjmp main

mod11: ; attacks

cpi r16,$0b
brne mod12
neg r17 ; reverse knob direction
subi r17,$80 ; give an offset
brcc mod11a ; check for largest value
ldi r17,$ff ; set to max


that first bit windows the incoming control numbers, and ignores any values it does not respond to. then it compares the incoming control number with each specific controller, and sees if they match.

Re: Changing the CC assignments?

by herr_prof » Thu Sep 05, 2013 21:38 UTC
That is very helpful.. will post once i get into the task and if I run into any trouble, much thanks!