Jump to content

Recommended Posts

Posted

Can someone explain the encoder table to me? It does not appear to have any significant definitions aside from the comment at the end of the line.

DIN and DOUT both have table fields that define individual functions, so I can move them around and delete/comment out whatever I like. For the encoders it does  not appear that I have that option. My problem is that in my custom setup I skip over the LFO and go for the envelope. I only have 5 shift registers but the encoders for the envelope are near the end of the line in SR 6 and 7. Should I just zero out the LFO stuff but keep it in the same order on the list? I'm not certain how the encoder identities are figure out by the compiler.

ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2 ; LFO rate

ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2 ; LFO depth

ENC_ENTRY  4,  2,  MIOS_ENC_MODE_DETENTED2 ; Filter CutOff

ENC_ENTRY  4,  4,  MIOS_ENC_MODE_DETENTED2 ; Filter Resonance

ENC_ENTRY  5,  0,  MIOS_ENC_MODE_DETENTED2 ; Env depth/assign #1

ENC_ENTRY  5,  2,  MIOS_ENC_MODE_DETENTED2 ; Env attack/assign #2

ENC_ENTRY  5,  4,  MIOS_ENC_MODE_DETENTED2 ; Env decay/assign #3

ENC_ENTRY  5,  6,  MIOS_ENC_MODE_DETENTED2 ; Env sustain/assign #4

ENC_ENTRY  2,  6,  MIOS_ENC_MODE_DETENTED2  ; Env release/assign #5

Posted

The order of the list is important - it's used to identify the encoder.

Therefore, you don't change the order of this list, just assign your custom SR/pin values to the entry.

I was going to recommend using "0, 0" for SR/pin, but looking at the ENC_ENTRY macro, it might not...


;; encoder entry structure
ENC_ENTRY MACRO sr, din_0, mode
dw (mode << 8) | (din_0 + 8*(sr-1))
ENDM
ENC_EOT MACRO
dw 0xffff
ENDM
[/code]

"0, 0" would turn "(din_0 + 8*(sr-1))" into -8... probably not handled gracefully elsewhere. Then again, maybe it is, I don't know.

Something like "16, 0" would definitely work... you won't have a 16th DIN (plus "DEFAULT_SRIO_NUMBER" is default to 10 - state on the 16th DIN would never be shifted into the PIC anyway).

Posted

Yeah you are right... use "16,0" instead for the DOUT table. Or, if you don't have any DOUT modules at all (no 74HC595) then any SR >= 1 would do.

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...
×
×
  • Create New...