Jump to content

adding 16 permanents independants track mute buttons on SEQV3


matoz
 Share

Recommended Posts

Hello all!

In live, I constantly need to have the “track mute†under the fingers, so I would like to add a line of 16 independent mute buttons (short cuts of the 16 buttons in mute mode already existing) without that changing posting in progress on LCD Screen,  (for example track edict or any other mode). There is just enough  place to add 16 buttons on 3rd module DIN. I hardly beginning programmation in C language, and I see that  MBSEQ V3 application is in .asm.  ???

How must I do?

Thanks

MATOZ

Link to comment
Share on other sites

No, but you can learn it in reverse.... Write some simple C code and compile it, and look in the _output directory to see what the ASM looks like. The comments contain your original code. Use that in conjunction with the instruction set in the datasheet and it will help you to relate ASM to C :)

Link to comment
Share on other sites

Woh!  :-X  I tried it yesterday night, it is a "gaz factory"!!!

I found that : (in french)                                                    http://benoit-m.developpez.com/assembleur/tutoriel/

They explain ASM language. And i saw there is a forum, perhaps they will be able to help me.     

Link to comment
Share on other sites

Is there a spécific ASM language for each chip?

Yes.

Most of the chips in the same family (eg PIC18F*) will use the same instructions, so what you learn for the 452 is also useful for the 4620 and to some extent the 4685... and to a lesser extent the PIC16F series, which has similar instructions but not as many. Read the datasheets, give it a try, and you'll see.

Link to comment
Share on other sites

Hrm.. I don't want to be a tease.. but.. if you take some time to learn the basics of ASM first I'd be happy to walk you through how to make these modifications.  They will be fairly similar to how I did the prototype code for the MB808.. stop into the chat room sometime :)

Link to comment
Share on other sites

I am actually pretty crap at writing ASM but fairly good at reading source... most of the time when I want to do something, I find where TK has done something similar and then copy/paste it and change it to suit.

So, for something like what you want, I would first go have a look at how the mute track functions are implemented now... and here's a block of code that actually does the work, which is used within the handler for the GP buttons when in the Mute screen:


CS_M_MUTE_GP_Callback_Mute
;; toggle mute flag
lfsr FSR1, SEQ_TRKS_MUTED0
btfsc MIOS_PARAMETER1, 3
movf POSTINC1, W ; increment pointer if track > 8

movf MIOS_PARAMETER1, W
call MIOS_HLP_GetBitORMask
xorwf INDF1, F
[/code] So basically you need to write a set of 16 button handlers much like the way the SEQ_BUTTON_Track1 etc. buttons are defined in seq_buttons.inc. Add the following code to seq_buttons.inc
[code]
SEQ_BUTTON_MuteTrack1
movlw 0
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack2
movlw 1
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack3
movlw 2
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack4
movlw 3
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack5
movlw 4
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack6
movlw 5
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack7
movlw 6
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack8
movlw 7
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack9
movlw 8
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack10
movlw 9
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack11
movlw 10
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack12
movlw 11
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack13
movlw 12
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack14
movlw 13
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack15
movlw 14
rgoto SEQ_BUTTON_MuteTrackx_Cont
SEQ_BUTTON_MuteTrack16
movlw 15
;; rgoto SEQ_BUTTON_MuteTrackx_Cont

SEQ_BUTTON_MuteTrackx_Cont
movwf MIOS_PARAMETER1

;; do nothing when button has been released
btfsc MIOS_PARAMETER2, 0
return

;; toggle mute flag
lfsr FSR1, SEQ_TRKS_MUTED0
btfsc MIOS_PARAMETER1, 3
movf POSTINC1, W ; increment pointer if track > 8

movf MIOS_PARAMETER1, W
call MIOS_HLP_GetBitORMask
xorwf INDF1, F

;; request display re-initialisation
bsf CS_STAT, CS_STAT_DISPLAY_INIT_REQ

return

Then connect SEQ_BUTTON_MuteTrack1 etc. to buttons in the DIN entry table.

BTW I didn't compile this code, and don't know if it works, I provide it only as a starting point.

Note I took the mute function code out of cs_m_mute.inc instead of calling it directly because you said you didn't want it to change to the mute screen.

If you are already in the mute screen when you press these mute track buttons, then the GP LEDs won't update because I didn't copy or call that code. You could get that to work too if you really wanted to, I just don't have time to do it right now ;) the best way would be to test if you're in the Mute scree when you press the Mute Track buttons and then make the Mute Track buttons act like GP buttons 1-16 by calling the same GP button handler.

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