Hi TK,
I’m trying to learn to do this in ain_example3_v1_3. In its original coded form below, in the section “USER_AIN_NotifyChange”, the pots are referenced to mios_tables.inc and for 64 pots table entry position 0x00 to 0x3f.
;; we read the entry from MIOS_MPROC_EVENT_TABLE
;; this has a big advantage: you can setup the "input" and "output"
;; events at one place!
TABLE_ADDR MIOS_MPROC_EVENT_TABLE ; this macro sets the base address
movf AIN_POT_NUMBER, W ; add pot offset (number *2) to TABLPTR
mullw 2 ; multiplicate with 2, result in PROD[LH]
movf PRODL, W
addwf TBLPTRL, F ; low-byte
movf PRODH, W
addwfc TBLPTRH, F ; high-byte (+carry bit on overrun)
;; for MIDIbox Link: notify begin of stream
call MIOS_MIDI_BeginStream
;; send first MIDI byte
tblrd*+ ; read first byte from table
movf TABLAT, W
call MIOS_MIDI_TxBufferPut ; and send
;; send the second MIDI byte
tblrd*+ ; read second byte from table
movf TABLAT, W
call MIOS_MIDI_TxBufferPut ; and send
;; send the third MIDI byte
movf INDF0, W ; value from 0x00 to 0x7f
call MIOS_MIDI_TxBufferPut
;; for MIDIbox Link: notify end of stream
call MIOS_MIDI_EndStream
;; request a display update by setting DISPLAY_UPDATE_REQ,0
;; USER_DISPLAY_Tick polls this flag!
bsf DISPLAY_UPDATE_REQ, 0
;; thats all
How do i get the pots to reference for example to table entry positions 0x80 to 0xbf and still be able to get the soft takeover to function correctly for new pot positions.
Sorry to keep picking on your brains but i’m just so motivated by all the possibilities of MIOS that i want to learn as much as i am capable of to be able to customise my own setups.
Peace & thanks
Frank