I’ve got a feeling this has been answered before, but I have only found examples of it’s use by searching the forum, no explanations of what it does.
Lines like this from seq_gp.inc (line # 59) are what I’m trying to suss out:
BIFSET SEQ_MODE0, SEQ_MODE0_STEP_EDIT, BANKED, rgoto SEQ_GP_Mode0_Button
I’ve gathered that this performs a conditional branch of sorts (Branch IF SET?), probably by comparing the first two arguments.. but the “IFSET” indicates to me that it is checking a simple 1 or 0.. little help? Also, what does the " <<" operator mean? like in the following code:
xorlw (DEFAULT_GP_DIN_SR0 - 1) << 3
I’ve also found a few problems with my beta layout for the 808 clone. I didn’t originaly plan on doing any major changes to the software, but I’ve found some problems that made me change my mind, first I didn’t keep all 16 GP buttons in two SR’s which is problem #1. It’s easy enough to change the layout for the final run, but from tracing the code I believe the primary reason for keeping the buttons consecutive is to keep the following code simple (from seq_buttons.inc starts at line 46). However, if I changed the code here (to get the beta working) I’ve got a suspicion that I would still run into trouble as perhaps the buttons need to be consecutive in order to be assigned to the proper step in the sequence and bank/pattern.
SEQ_BUTTON_Handler_ChkGP1
movf MIOS_PARAMETER1, W
andlw 0xf8
xorlw (DEFAULT_GP_DIN_SR0 - 1) << 3
bnz SEQ_BUTTON_Handler_ChkGP2
movlw 0x07
andwf MIOS_PARAMETER1, F
rgoto SEQ_BUTTON_GP
SEQ_BUTTON_Handler_ChkGP2
movf MIOS_PARAMETER1, W
andlw 0xf8
xorlw (DEFAULT_GP_DIN_SR1 - 1) << 3
bnz CS_MENU_BUTTON_Handler_NoGP
movlw 0x07
andwf MIOS_PARAMETER1, F
bsf MIOS_PARAMETER1, 3
rgoto SEQ_BUTTON_GP
I also want to implement a dedicated encoder for tempo and instrument select, along with an analog pot for swing. The encoder for instrument select is fairly easy, the SEQ tutorial lists encoder #9 as performing this task already and I assume that can be remapped. Creating a tempo knob will be a bit more involved I think as I will need to create a handler function to catch the event. The swing pot I havn’t even considered yet..
also, why does the datawheel have to be at encoder #0 for the SEQ application?
My last question is one that I havn’t investigated much yet, I’m just looking for a quick suggestion while I sort out other issues. On the final unit I want to change how a pattern is selected in play mode. You will still use the GP buttons like before to switch, but each pattern will have with it up to 4 shortcuts to other patterns, each assigned to it’s own button (this is what I plan to do with the function buttons). this has the obvious advantage to keeping core parts of a song at the fingertips, and allows easy creation of pattern chains by pressing more than one of the buttons at the same time. A pattern is assigned to a shortcut button by holding down the shortcut while selecting the bank and pattern number.