Jump to content

Project: little surface, maximum control... (updated 20 march 2007)


Ixox
 Share

Recommended Posts

After modifying the code to be able to control the LFO and the Filter with the same knobs/button like shown at the bottom of :

http://www.midibox.org/forum/index.php?topic=7233.0

I had the idea to do this surface control in the same box model :

(UPDATED : see below for next evolutions)

ProjectSid.jpg

(Black circle are buttons/encoder and red/yellow are leds...)

5 dout + 5 din + J5 enabled for some leds.

Does enabling J5 have side effect ?

The bottom part with the 6 yellow leds will have one led lighted and will show the row that the knobs will control. Pushing the up/down buttons will change the row and will allow to quickly switch from a control to an other.

The left part is, i think, exactly the same as the original design.

Before going further, just wanted to check i didn't forgot important controls... Or miss something.

The box has 1 SID inside.

The code i'm not sure with is to control the matrix like the picture shows....

Don't know if i'll have to write much stuff. The idea is to read the matrix row name on the LCD.

Idea, suggestion ?

Xavier

Link to comment
Share on other sites

Hi Xavier,

Does enabling J5 have side effect ?

yes, it doesn't allow you to route analog input signals to the LFOs - but thats all.

Before going further, just wanted to check i didn't forgot important controls... Or miss something.

I'm missing the CC and Edit button - in MBSID V2 they could get a special alternative purpose (not sure, if the link button will get an alternative purpose as well)

You could assign the keytracking parameter to the encoder between Resonance and Rate

Don't know if i'll have to write much stuff. The idea is to read the matrix row name on the LCD.

There won't be much memory space in the PIC18F452 for such features (but you will notice this sooner or later...)

However, in MBSID V2, the matrix handling will be overworked (more flexible assignments), and I will propably consider more informative LCD messages if there is enough space within the PIC18F4620 flash after all the features have been implenented

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi Thorsten and thanks for the answer,

I'm missing the CC and Edit button - in MBSID V2 they could get a special alternative purpose (not sure, if the link button will get an alternative purpose as well)

You could assign the keytracking parameter to the encoder between Resonance and Rate

I've always thought the all  STEP B buttons was only for multiple SIDs box.... I've never read this page before....  :-[

Yes i have space beside the matrix for that...

Keytracking ? I'll try to find out what it is !

There won't be much memory space in the PIC18F452 for such features (but you will notice this sooner or later...)

I had in mind to remove some drivers from the MIOS. Graphic LCD, Ain, iic...

Will that free some memory or is the SID program always loaded at the same adress (and the free space will so remain the same) ? (that question may show that i didn't understand very well how the bootloader/PIC works...).

Xavier

Link to comment
Share on other sites

Will that free some memory or is the SID program always loaded at the same adress (and the free space will so remain the same) ? (that question may show that i didn't understand very well how the bootloader/PIC works...).

It's difficult to remove parts of MIOS, I cannot give you much support for this, because there are many things which have to be considered (it begins with changing the memory protection mechanisms). It's much easier to use a PIC18F4620 instead, you want to use it anyhow once MBSID V2 is available ;-)

Best Regards, Thorsten.

Link to comment
Share on other sites

Yes i'll buy the 18F4620 as soon as the V2 is available.... and as soon as i'm sure i get a EUSART  bug free one.

In the meantime if i cannot get some memory from the Mios i could get some from the SID programm... (matrix, Master/Slave 26Kb inc file and aout).

But i'm not sure i'll need much free memory, the matrix arrows when pressed will show the same as the "Mod" menu.

Anyway... I'll have to test before keep on talking without knowing (i speak about me)....  ;)

Thanks

Xavier

Link to comment
Share on other sites

Thanks Jaicen.

I have an other control surface idea which will be even simpler to make :

No more left part... (Are the leds really usefull when you can read the LCD ? I may keep the filter leds however...)

And 3 buttons in column (exactly like the knobs) whose action depend on the current row. (choice of the item number, of the wav type, and the third for ring/sync for OSC.)

LFO and Filter will have each his own row.

I'll try to make a drawing tonight.

Do i need the 2 Assign# rows ?

What are they usually used for ?

I may keep one... Does it have to be OSC or ENV related ?

That would require : 2 dout + J5... including 2 assign# rows,the filter leds, CC and Edit.

Still 5 Din... 33 inputs... If the matrix have only a down arrow, that would require onlyt 4 dins....Maybe interesting...

Link to comment
Share on other sites

Do i need the 2 Assign# rows ?

What are they usually used for ?

currently they can be customized in the source code, by default they send MIDI CC's

But: they will get very important for MBSID V2, where you are able to assign parameters to these knobs from the patch, and you will be able to define min/max ranges for better live handling. So, each patch can get it's own assignments with all parameters which lead to nice variations.

In other words: the assignment knobs are a must for MBSID V2!

I may keep one... Does it have to be OSC or ENV related ?

both

Best Regards, Thorsten.

Link to comment
Share on other sites

Thanks Thorsten for the advice.

I have begun the main row code...

I will keep both assign rows and i added even an empty one... The new register has its 8 bits used.....  ;)

I have the code working for the MOD (reduced matrix) that you saw above. That was interesting to do : I learnt how the FSR* registers mechanism of the PIC (to light the leds).

Up and down buttons OK... (To bad there were not a ready to use CS_MENU_ButtonDec beside CS_MENU_ButtonInc...)

This is i think an interesting cutdown version of the full matrix.That may interest some. I'll publish all my modifications later.

Xavier

Link to comment
Share on other sites

  • 2 weeks later...

While i'm waiting for the new transformer of my midiboxFM to be able to finish it (the old cheap one make awfull background noise)....

I had some time to work on this "little surface, maximum control" project...

The code is finished and every thing is working fine...

The code to write was simpler than expected. The encoder function tables fit perfectly this design. My CS_MENU_ENC_CS_Handler function is very very simple

If some are interested i'll post the files i modified...

There are lots of empty cells that can be filled with custom functions very easily.

IxoxSid16.JPG

(The printing on the picture is not the last version of the design but helped me to check the buttons/knobs....)

Still a little work to do on the control surface design and a lot of work to put that in a closed box !!!

but that works !!!  ;D

Xavier

Link to comment
Share on other sites

Don't know where (and how) to put that in the WIKI.

Put here are the differences :

First the internal variables for the new states and leds...

ap_defines.h

	;; free: 0x69-0x6e
CS_MENU_SELECTED_ROW       EQU  0x069
TMP6 					   EQU  0x06a
CS_MENU_SELECTED_MATRIXROW EQU  0x06b ;; finally not used
TMP7 					   EQU  0x06c
then to light the right leds : cs_menu_leds.inc (no need to keep the TMP1-5[ * ] little functions)...
	;; clear temporary registers which hold some LED flags which are not saved anywhere else
	;; (see also CS_MENU_DOUT_TABLE)
	;; this quick & dirty method saves some memory...
	;; TMP6[0..7]
	movf	CS_MENU_SELECTED_ROW, W
	call	MIOS_HLP_GetBitORMask
	movwf	TMP6

	;; TMP7[0..7]
	lfsr	FSR1, CS_MENU_MATRIX_BEGIN	; pointer for LEDs: FSR1	
	movf	CS_MENU_SELECTED_MOD, W
	movf    PLUSW1, W
	movwf	TMP7
then a quick hack to have a dec button function in cs_menu.inc (mostly a copy of ButtonInc)...
CS_MENU_ButtonDec
	;; save WREG
	movwf	TMP5
	;; save menu settings so that we can jump back to the current menu later
	movff	CS_MENU, SAVED_CS_MENU
	movff	CS_MENU_CURSOR_POS, SAVED_CS_MENU_CURSOR_POS
	movff	CS_MENU_PAGE_OFFSET, SAVED_CS_MENU_PAGE_OFFSET
	;; change to menu
	movwf	CS_MENU
	rcall	CS_MENU_Page_Init
	;; set new page offset and cursor pos
	movff	MIOS_PARAMETER1, CS_MENU_CURSOR_POS
	movff	MIOS_PARAMETER2, CS_MENU_PAGE_OFFSET
	;; select parameter
	call	CS_MENU_EXEC_SelPar
	;; decrement the parameter value, if max value reached, reset value
	movlw   0x00
	IFNEQ   CS_MENU_PARAMETER_L, ACCESS, goto CS_MENU_ButtonDec1
	movff CS_MENU_PARAMETER_MAX_L, CS_MENU_PARAMETER_L
	incf	CS_MENU_PARAMETER_L
CS_MENU_ButtonDec1
	decf	CS_MENU_PARAMETER_L
	rcall	CS_MENU_ParameterUpdate		; update parameter
	call	CS_MENU_EXEC_Hlp_ChangeMenu	; deselect parameter
	;; change back to old parameter if we were already in the menu before
	movf	SAVED_CS_MENU, W
	xorwf	TMP5, W
	bnz	CS_MENU_ButtonIncDec_End
	movff	SAVED_CS_MENU, CS_MENU
	rcall	CS_MENU_Page_Init
	movff	SAVED_CS_MENU_PAGE_OFFSET, CS_MENU_PAGE_OFFSET
	movff	SAVED_CS_MENU_CURSOR_POS, CS_MENU_CURSOR_POS
	goto CS_MENU_ButtonIncDec_End
in cs_menu_enc.inc i replaced the old CS_MENU_ENC_CS_Handler, CS_MENU_ENC_CS_Osc, CS_MENU_ENC_CS_LFO, CS_MENU_ENC_CS_Filter and CS_MENU_ENC_CS_Env by: (I'm proud of this one....  ;D)
CS_MENU_ENC_CS_Handler
	;; move incrementer to MIOS_PARAMETER3
	movff	MIOS_PARAMETER2, MIOS_PARAMETER3
	movf	CS_MENU_SELECTED_ROW, W
	mullw   5
	movf	PRODL, W
	addwf   MIOS_PARAMETER1, W
Then, you must have 5 lines for each part in cs_menu_enc_table.in. (3 lines to add for filter and LFO and a new set of 5 lines for User....) You also have to switch the order to fit the Control surface rows : OSC, ENV, Filter, LFO, User in my case. cs_menu_io_tables.inc... (don't look at the SR/pin number...  :-[)
	DIN_ENTRY	CS_MENU_BUTTON_Exec,	 4,	 6
	DIN_ENTRY	CS_MENU_BUTTON_Sel5,	 3,	 3
	DIN_ENTRY	CS_MENU_BUTTON_Sel4,	 3,	 0
	DIN_ENTRY	CS_MENU_BUTTON_Sel3,	 3,	 1
	DIN_ENTRY	CS_MENU_BUTTON_Sel2,	 3,	 2
	DIN_ENTRY	CS_MENU_BUTTON_Sel1,	 3,	 6

	DIN_ENTRY	CS_MENU_BUTTON_General1,	 1,	 5
	DIN_ENTRY	CS_MENU_BUTTON_General2,	 1,	 4
	DIN_ENTRY	CS_MENU_BUTTON_General3,	 3,	 7


	DIN_ENTRY	CS_MENU_BUTTON_Link,	 0,	 0
	DIN_ENTRY	CS_MENU_BUTTON_CC,	 1,	 2
	DIN_ENTRY	CS_MENU_BUTTON_Edit,	 1,	 3

	DIN_ENTRY	CS_MENU_BUTTON_Row_Dec,  1,	 7
	DIN_ENTRY	CS_MENU_BUTTON_Row_Inc,	 1,	 6

	DIN_ENTRY	CS_MENU_BUTTON_MatrixRow_Dec,  1,	 1
	DIN_ENTRY	CS_MENU_BUTTON_MatrixRow_Inc,	 1,	 0

	DIN_ENTRY	CS_MENU_BUTTON_M_E1,	 2,	 0
	DIN_ENTRY	CS_MENU_BUTTON_M_E2,	 2,	 1
	DIN_ENTRY	CS_MENU_BUTTON_M_L1,	 2,	 2
	DIN_ENTRY	CS_MENU_BUTTON_M_L2,	 2,	 3
	DIN_ENTRY	CS_MENU_BUTTON_M_L3,	 2,	 7
	DIN_ENTRY	CS_MENU_BUTTON_M_L4,	 2,	 6
	DIN_ENTRY	CS_MENU_BUTTON_M_L5,	 2,	 5
	DIN_ENTRY	CS_MENU_BUTTON_M_L6,	 2,	 4

and
CS_MENU_DOUT_TABLE
	;;		Register and bit			SR#	Pin#	  Description
	DOUT_ENTRY	CS_MENU_MODE, CS_MENU_MODE_CC,		0,	1	; CC LED
	DOUT_ENTRY	CS_MENU_MODE, CS_MENU_MODE_EDIT_FLASHED,0,	2	; Edit LED

	;; TMP6 : main control matrix row 
	DOUT_ENTRY	TMP6, 0,				2,	0
	DOUT_ENTRY	TMP6, 1,				2,	1
	DOUT_ENTRY	TMP6, 2,				2,	2
	DOUT_ENTRY	TMP6, 3,				2,	3

	DOUT_ENTRY	TMP6, 4,				2,	4
	DOUT_ENTRY	TMP6, 5,				2,	5
	DOUT_ENTRY	TMP6, 6,				2,	6
	DOUT_ENTRY	TMP6, 7,				2,	7

	;; TMP7 : modulation leds of selected row
	DOUT_ENTRY	TMP7, 0,				1,	0
	DOUT_ENTRY	TMP7, 1,				1,	1
	DOUT_ENTRY	TMP7, 2,				1,	2
	DOUT_ENTRY	TMP7, 3,				1,	3

	DOUT_ENTRY	TMP7, 4,				1,	4
	DOUT_ENTRY	TMP7, 5,				1,	5
	DOUT_ENTRY	TMP7, 6,				1,	6
	DOUT_ENTRY	TMP7, 7,				1,	7
	;; 
I have many modifications in cs_menu_buttons.inc... (All useless buttons removed) The interesting part are :
CS_MENU_BUTTON_Row_Inc
	;; do nothing if button has been depressed
	IFSET	MIOS_PARAMETER2, 0, return


	movlw	0x06
	IFLEQ	CS_MENU_SELECTED_ROW, ACCESS, goto CS_MENU_BUTTON_Row_Inc_DoIt
	clrf CS_MENU_SELECTED_ROW
	goto CS_MENU_BUTTON_Row_ChangeMenu
CS_MENU_BUTTON_Row_Inc_DoIt
	incf	CS_MENU_SELECTED_ROW, F
	goto CS_MENU_BUTTON_Row_ChangeMenu

CS_MENU_BUTTON_Row_Dec
	;; do nothing if button has been depressed
	IFSET	MIOS_PARAMETER2, 0, return


	movlw	0x01
	IFGEQ	CS_MENU_SELECTED_ROW, ACCESS, goto CS_MENU_BUTTON_Row_Dec_DoIt
	movlw	0x07
	movwf	CS_MENU_SELECTED_ROW
	goto CS_MENU_BUTTON_Row_ChangeMenu

CS_MENU_BUTTON_Row_Dec_DoIt	
	decf	CS_MENU_SELECTED_ROW, F
	goto CS_MENU_BUTTON_Row_ChangeMenu

CS_MENU_BUTTON_Row_ChangeMenu
	;; update TMP6 for easy menu switching
	movf	CS_MENU_SELECTED_ROW, W
	call	MIOS_HLP_GetBitORMask
	movwf	TMP6

	;; menu display
	movlw	0x00		; cursor pos
	movwf	MIOS_PARAMETER1
	movlw	0x00		; page offset
	movwf	MIOS_PARAMETER2
	movlw	CS_MENU_FIL	; menu structure
	IFSET	TMP6, 0, movlw CS_MENU_OSC
	IFSET	TMP6, 1, movlw CS_MENU_OSC
	IFSET	TMP6, 2, movlw CS_MENU_OSC
	IFSET	TMP6, 3, movlw CS_MENU_ENV
	IFSET	TMP6, 4, movlw CS_MENU_ENV
	IFSET	TMP6, 5, movlw CS_MENU_FIL
	IFSET	TMP6, 6, movlw CS_MENU_LFO
	IFSET	TMP6, 7, goto CS_MENU_BUTTON_DisplayUpdateReq
	goto 	CS_MENU_BUTTON_Hlp_MenuChangeOk


CS_MENU_BUTTON_MatrixRow_Inc
	;; do nothing if button has been depressed
	IFSET	MIOS_PARAMETER2, 0, return
	;; just show menu if not already on the LCD
	movlw	CS_MENU_MOD
	IFNEQ	CS_MENU, ACCESS, rgoto CS_MENU_BUTTON_Hlp_MenuChangeOk
	movlw	0x00		; cursor pos
	movwf	MIOS_PARAMETER1
	movlw	0x00		; page offset
	movwf	MIOS_PARAMETER2
	movlw	CS_MENU_MOD	; menu structure
	goto	CS_MENU_ButtonInc


CS_MENU_BUTTON_MatrixRow_Dec
	;; do nothing if button has been depressed
	IFSET	MIOS_PARAMETER2, 0, return
	;; just show menu if not already on the LCD
	movlw	CS_MENU_MOD
	IFNEQ	CS_MENU, ACCESS, rgoto CS_MENU_BUTTON_Hlp_MenuChangeOk
	movlw	0x00		; cursor pos
	movwf	MIOS_PARAMETER1
	movlw	0x00		; page offset
	movwf	MIOS_PARAMETER2
	movlw	CS_MENU_MOD	; menu structure
	goto	CS_MENU_ButtonDec
	;; ------------------------------------------------------------------

CS_MENU_BUTTON_General1
	IFSET	MIOS_PARAMETER2, 0, return
	IFSET	TMP6, 0, rgoto CS_MENU_BUTTON_Osc_Sel
;;	IFSET	TMP6, 1, rgoto 
;;	IFSET	TMP6, 2, rgoto 
	IFSET	TMP6, 3, rgoto CS_MENU_BUTTON_Env_Sel
;;	IFSET	TMP6, 4, rgoto 
	IFSET	TMP6, 5, rgoto CS_MENU_BUTTON_Fil_Sel
	IFSET	TMP6, 6, rgoto CS_MENU_BUTTON_LFO_Sel
;;	IFSET	TMP6, 7, rgoto 
	return

CS_MENU_BUTTON_General2
	IFSET	MIOS_PARAMETER2, 0, return
	IFSET	TMP6, 0, rgoto CS_MENU_BUTTON_Osc_Wav
;;	IFSET	TMP6, 1, rgoto 
;;	IFSET	TMP6, 2, rgoto 
	IFSET	TMP6, 3, rgoto CS_MENU_BUTTON_Env_Curve
;;	IFSET	TMP6, 4, rgoto 
	IFSET	TMP6, 5, rgoto CS_MENU_BUTTON_Fil_Mod
	IFSET	TMP6, 6, rgoto CS_MENU_BUTTON_LFO_Wav
;;	IFSET	TMP6, 7, rgoto 
	return

CS_MENU_BUTTON_General3
	IFSET	MIOS_PARAMETER2, 0, return
	IFSET	TMP6, 0, rgoto CS_MENU_BUTTON_Osc_RS
;;	IFSET	TMP6, 1, rgoto 
;;	IFSET	TMP6, 2, rgoto 
;;	IFSET	TMP6, 3, rgoto 
;;	IFSET	TMP6, 4, rgoto 
;;	IFSET	TMP6, 5, rgoto 
;;	IFSET	TMP6, 6, rgoto 
;;	IFSET	TMP6, 7, rgoto 
	return

I also replaced in this file the 2 last lines of CS_MENU_BUTTON_Chg_Ex_Cont and CS_MENU_BUTTON_Chg_Lx_Cont by "return" because i didn't want the modulation toggle button to change the menu....

in mios_tables just put the 5 encoders and their SR/pins....

I think that's it.

Hope this made a readable message....

At least i will be able to read it again in the futur if i didn't remember the mods i made....  ;)

Regards,

Xavier

UPDATE : current control surface design.

IxoxSid17.JPG

Link to comment
Share on other sites

Hi Ixox,

thanks for writing this down!

I think the best would be to add a link to this forum article to the wiki, e.g. at this page: http://www.midibox.org/dokuwiki/doku.php?id=forum_highlights

This has the advantage, that people can read about the history (some thoughts which flew into the design), and that they can add comments

Best Regards, Thorsten.

Link to comment
Share on other sites

Ixox thanks for these tips! This is the perfect Single-Sid-CS-Solution! Great Project!!

Q: Do i have to insert the changes from http://www.midibox.org/forum/index.php?topic=7233.0 also into the code ??

MfG Christian

Thanks... I'm glad you found it usefull...

No you don't need the modification of the other thread, only the modifications of this one.

Don't hesitate to tell me if something is not clear in the message that shows the modifications.

Xavier

Link to comment
Share on other sites

  • 2 weeks later...

Ixox, that is great mod! I always wondered why there is no single SID CS. I`ve got bunch of SID chips (and none MB SIDs built yet), but still I wish to use only one chip and full CS. This kind of MB SID could be compact wich is great! I am surely going to build your version of MB SID whan I finish SEQ. Thanks for the mod.

Link to comment
Share on other sites

@IXOX

more questions  ;)

1. How many DIN's are in use for your SID-Mod ?

2. Is it possible to route 5 or 6 IC's (for the DIN) like shown in the DIN4x-Shematic, (I need more IC's because i have a 2x40 LCD. This means 4 buttons more.)instead of chaining the whole DIN4x-module??

Thanks for answering

MfG Christian aka Puddingbrumsel  ;D

Link to comment
Share on other sites

Hi,

I'm glad to see some interest in this Mini-midibox... Thanks a lot for the support.

I haven't finished it yet.... I'll have more free time this week end so it should be finished next week.

To know the number of 74HC165 (DIN) you need, count the knobs (as 2 inputs) and the button (1 input).

You can plug 8 inputs on a DIN... You'll have your number....

Answers to your question...

1 - In the last version if my box, there are 6 knobs and 23 buttons.

So 35 (12+23) inputs = 5 DINs.

2 - Of course, it is possible to chain more than 4 IC like as shown in the DIN4x pdf.... up to 16 i think.

5 DINS allows 5*8 = 40 inputs...

My version only use 35 so you have 5 free inputs... you can add your 4 buttons.

You can use a DIN4x module and add after it a single DIN.

Note : the modulation part : 10 buttons and 8 leds is optional and independent from the rest.

Other question or remakrs are very welcome,

Regards,

Xavier

Link to comment
Share on other sites

Hi Ixox,

good job on the cs  :)

I'm going to build this version

as it seems to fit quite well with my micromodular (form factor)

do you have a diagram with the measurements included?

I want to make a shaeffer layout for your frontpanel...

Michaël

Link to comment
Share on other sites

do you have a diagram with the measurements included?

I want to make a shaeffer layout for your frontpanel...

No problem... when my box is finished and when i'm sure everything is OK.

You wouldn't want a shaeffer layout in which you cannot put the knobs and buttons...  ;)

Xavier

Link to comment
Share on other sites

  • 2 weeks later...

Hi Ixox,

nice work so far!!

I've nearly finished my sid exactly like you describted it here. I made my own pcb's and realized this thing on only 3 euro-pcbs including sid, core, 4x bankstick, dinx5, doutx3, optimized c64psu and on-pcb-control-surface....

here some (crapy) pictures:

ixoxsid1.jpg

ixoxsid2.jpg

ixoxsid3.jpg

ixoxsid4.jpg

ixoxsid5.jpg

[edit]

after all of your changes in sourcecode applied:

Error[113]  C:\DOWNLOADS\MIDIBOX_SID_V1_7303B\CS_MENU.INC 1666 : Symbol not previously defined (CS_MENU_ButtonIncDec_End)

Error[126]  C:\DOWNLOADS\MIDIBOX_SID_V1_7303B\CS_MENU.INC 1666 : Argument out of range (-8993 not between -128 and 127)

Error[113]  C:\DOWNLOADS\MIDIBOX_SID_V1_7303B\CS_MENU.INC 1671 : Symbol not previously defined (CS_MENU_ButtonIncDec_End)

there must be something missing.....

[edit off]

Greets Chris

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