Jump to content

FM Frontpanel


chriss
 Share

Recommended Posts

Hi all,

at the moment i am designing the frontpanel for the opl3 synth, and i am asking if it´s possible to change the buttons for the instrument / operator selection.

my idea is to have for instrument 1-4 and operator 1-4 a dedicated button, so instead of five buttons , eight buttons.

i know that i need three more digital inputs and that means an extra Din chip, but that would be ok for me.

since i don´t build anything yet, i don´t know if this has any advantages in handling the synth, but it would defenitly better fit in my frontpanellayout.

thanks

chriss

Link to comment
Share on other sites

Hi Chriss,

this should be possible by changing the CS_MENU_BUTTON_InsOP_Cont in "cs_menu_buttons.inc" . Currently it either moves the pointer to CS_MENU_SELECTED_INS_FLAGS or CS_MENU_SELECTED_OP_FLAGS into FSR0 depending on the CS_MENU_MODE_INS_OP flag...

Quick change: add four additional OP button functions and set the CS_MENU_MODE_INS_OP flag there. Clear this flag within the instrument button functions

Best Regards, Thorsten.

Link to comment
Share on other sites

hi thorsten,

cool that this is possible.

as always i don´t know what to do exactly....

i just pasted the original code here:

CS_MENU_BUTTON_InsOP1

movlw 1 << 0

rgoto CS_MENU_BUTTON_InsOP_Cont

CS_MENU_BUTTON_InsOP2

movlw 1 << 1

rgoto CS_MENU_BUTTON_InsOP_Cont

CS_MENU_BUTTON_InsOP3

movlw 1 << 2

rgoto CS_MENU_BUTTON_InsOP_Cont

CS_MENU_BUTTON_InsOP4

movlw 1 << 3

;; rgoto CS_MENU_BUTTON_InsOP_Cont

CS_MENU_BUTTON_InsOP_Cont

movwf TMP1

;; pointer to _FLAGS register which should be modified in FSR0

lfsr FSR0, CS_MENU_SELECTED_INS_FLAGS

btfsc CS_MENU_MODE, CS_MENU_MODE_INS_OP

lfsr FSR0, CS_MENU_SELECTED_OP_FLAGS

and now i would put in four extra Op_buttons like this:

CS_MENU_BUTTON_OP1 for example.

but how to set the CS_MENU_MODE_INS_OP flag there? like this?

CS_MENU_BUTTON_OP1

lfsr FSR0, CS_MENU_SELECTED_OP_FLAGS

rgoto CS_MENU_MODE_INS_OP

and how can i clear the flag within the instrument button functions? like this?

lfsr FSR0, CS_MENU_SELECTED_INS_FLAGS

btfsc CS_MENU_MODE, CS_MENU_MODE_INS_OP

when i do that i get following error:

MIDIBO_FM_V1_0 MODIFIED\MACROS.H 161 : Argument out of range (-6901 not between -1024 and 1023)

MIDIBO_FM_V1_0 MODIFIED\MACROS.H 161 : Argument out of range (-6904 not between -1024 and 1023)

MIDIBO_FM_V1_0 MODIFIED\MACROS.H 161 : Argument out of range (-6907 not between -1024 and 1023)

thanks

chriss

Link to comment
Share on other sites

Hi Chriss,

undo your changes and add following lines to cs_menu_button.inc


CS_MENU_BUTTON_Ins1
bcf CS_MENU_MODE, CS_MENU_MODE_INS_OP
movlw 1 << 0
rgoto CS_MENU_BUTTON_InsOP_Cont

CS_MENU_BUTTON_Ins2
bcf CS_MENU_MODE, CS_MENU_MODE_INS_OP
movlw 1 << 1
rgoto CS_MENU_BUTTON_InsOP_Cont

CS_MENU_BUTTON_Ins3
bcf CS_MENU_MODE, CS_MENU_MODE_INS_OP
movlw 1 << 2
rgoto CS_MENU_BUTTON_InsOP_Cont

CS_MENU_BUTTON_Ins4
bcf CS_MENU_MODE, CS_MENU_MODE_INS_OP
movlw 1 << 3
rgoto CS_MENU_BUTTON_InsOP_Cont

CS_MENU_BUTTON_OP1
bsf CS_MENU_MODE, CS_MENU_MODE_INS_OP
movlw 1 << 0
rgoto CS_MENU_BUTTON_InsOP_Cont

CS_MENU_BUTTON_OP2
bsf CS_MENU_MODE, CS_MENU_MODE_INS_OP
movlw 1 << 1
rgoto CS_MENU_BUTTON_InsOP_Cont

CS_MENU_BUTTON_OP3
bsf CS_MENU_MODE, CS_MENU_MODE_INS_OP
movlw 1 << 2
rgoto CS_MENU_BUTTON_InsOP_Cont

CS_MENU_BUTTON_OP4
bsf CS_MENU_MODE, CS_MENU_MODE_INS_OP
movlw 1 << 3
rgoto CS_MENU_BUTTON_InsOP_Cont
[/code]

Best Regards, Thorsten.

Link to comment
Share on other sites

thanks thorsten,

did try it with the MBsid and it works.

just put in the OPbuttons into the cs_menu_io_tables.inc and assigned the 5th DIN register to them, after setting the

;; initialize the shift registers

movlw 0x04 ; use up to 4 shift registers

to

;; initialize the shift registers

movlw 0x05 ; use up to 5 shift registers

everthing seems to work

thanks again, now i can go one building my frontpanel

chriss

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