Jump to content

Reassigning CS in SID. What am I missing.


jhitesma
 Share

Recommended Posts

I know I have to be missing something simple here.  I just got my single SID MB up and running and decided to start in on a control surface (and second SID).  Decided to dive in feet first and tackle the mod matrix as the first step of the CS.

But at this point I'm only running one DIN and one DOUT so I had to do some reassignments.  I'm already running a 2x40 LCD and managed to figure out how to remap the DIN's so I could have 10 selection buttons.

I also managed to get this Matrix LED's displaying properly off the last two SR's on the single DOUT board I'm running (SR 2 for anodes and 3 for cathodes)

But now I'm trying to get the Matrix selection buttons to work off the last two SR's on the single DIN I have so far...and they work...but they aren't doing what they're supposed to.  I figured it must be because it was still configured for rotary encoders and I modifed mios_tables and set all the encoders (except my menu wheel) to SR 0 Pin 0:

MIOS_ENC_PIN_TABLE
	;; encoders 1-16
	;;        SR  Pin  Mode
#if CS_MENU_USE_INCDEC_BUTTONS
	ENC_EOT
#else
	ENC_ENTRY  1,  0,  MIOS_ENC_MODE_DETENTED2	; menu encoder
#endif

	;; additional CS encoders
	;;        SR  Pin  Mode
	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Osc delay/transpose/assign #1
	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Osc attack/finetune/assign #2
	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Osc decay/portamento/assign #3
	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Osc sustain/release/assign #4
	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Osc release/pulsewidth/assign #5

	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; LFO rate
	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; LFO depth

	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Filter CutOff
	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Filter Resonance

	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Env depth/assign #1
	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Env attack/assign #2
	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Env decay/assign #3
	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Env sustain/assign #4
	ENC_ENTRY  0,  0,  MIOS_ENC_MODE_DETENTED2	; Env release/assign #5

	ENC_EOT
Here's what I have in my  menu_cs_io_tables for the DIN_TABLE:
CS_MENU_DIN_TABLE
	;;		Function name		SR#	Pin#
	DIN_ENTRY	CS_MENU_BUTTON_Dec,		 1,	 1	; only valid if rotary encoder not assigned to these pins
	DIN_ENTRY	CS_MENU_BUTTON_Inc,		 1,	 0	; (see mios_tables.inc) and CS_MENU_USE_INCDEC_BUTTONS == 1
	DIN_ENTRY	CS_MENU_BUTTON_Exec,	 1,	 2
	DIN_ENTRY	CS_MENU_BUTTON_Sel1,	 1,	 7
	DIN_ENTRY	CS_MENU_BUTTON_Sel2,	 1,	 6
	DIN_ENTRY	CS_MENU_BUTTON_Sel3,	 1,	 5
	DIN_ENTRY	CS_MENU_BUTTON_Sel4,	 1,	 4
	DIN_ENTRY	CS_MENU_BUTTON_Sel5,	 1,	 3
	DIN_ENTRY	CS_MENU_BUTTON_Sel6,	 2,	 0	; define this if CS_MENU_DISPLAYED_ITEMS > 5
	DIN_ENTRY	CS_MENU_BUTTON_Sel7,	 2,	 1	; define this if CS_MENU_DISPLAYED_ITEMS > 5
	DIN_ENTRY	CS_MENU_BUTTON_Sel8,	 2,	 2	; define this if CS_MENU_DISPLAYED_ITEMS > 5
	DIN_ENTRY	CS_MENU_BUTTON_Sel9,	 2,	 3	; define this if CS_MENU_DISPLAYED_ITEMS > 5
	DIN_ENTRY	CS_MENU_BUTTON_Sel10,	 2,	 4	; define this if CS_MENU_DISPLAYED_ITEMS > 5

	DIN_ENTRY	CS_MENU_BUTTON_SID1,	 0,  0
	DIN_ENTRY	CS_MENU_BUTTON_SID2,	 0,  0
	DIN_ENTRY	CS_MENU_BU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ENU_BUTTON_M_L4,	 4,	 5
	DIN_ENTRY	CS_MENU_BUTTON_M_L5,	 4,	 6
	DIN_ENTRY	CS_MENU_BUTTON_M_L6,	 4,	 7

	DIN_ENTRY_EOT

But still even after recompiling, converting and uploading the new code my buttons are acting like they're still mapped to the encoder functions.  What am I missing?

Link to comment
Share on other sites

Ah....found what I was missing.

I had two versions of the code on my drive  :-[

The first version was nestled too many sub-directories deep and MPLAB was choking on it during compile as a result.

So I made a second version that I had been using.

But when I edited the mios_tables and cs_menu_io_tables files I accidentally edited the old versions instead ::)

Just copied them into the correct directory....recompiled...and my matrix is working!

Well, almost.  I got half of my wires backwards so I've got to either swap a few assignments or move a few wires.  But it's MUCH closer :D

Link to comment
Share on other sites

Cannot believe that this bug does already exist in MPLAB :-/

Hint: don't assign the missing encoders to pin 0, but move the ENC_EOT to the last valid encoder entry instead. just to avoid any unexplainable side effects

Best Regards, Thorsten.

Link to comment
Share on other sites

Yeah I was shocked about the file length issue.  Then again I had it in:

i:/midi_stuff/sid_v1_7/midibox_sid_v1_7

I didn't know you thought ahead and built your Zips to extract into their own directory so I had already created one and ended up with them that deep.  Just forgot to delete the unused version so it wouldn't confuse me like it did :D

I'll go ahead and move  ENC_EOT, I'll be adding the full CS eventually but need to find some knobs I like before I can tackle the next step!

That and I may go ahead and tackle the sequencer next since I've got all the bits on hand for it!

Maybe these things should be considered a dangerous import - they're addictive! 

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...