moogah Posted August 2, 2006 Report Share Posted August 2, 2006 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_GPI 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. Quote Link to comment Share on other sites More sharing options...
TK. Posted August 2, 2006 Report Share Posted August 2, 2006 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?This is my personal macro to do something if a bit is set or cleared - it improves the readability.The macros are defined in macros.hthe difference between IFSET and BIFSET is, that BIFSET works also with BANKED registers >= 0x80 <= 0xf7fAlso, what does the " <<" operator mean? like in the following code:It leftshifts the constant n times.e.g., "0x01 << 3" results into 0x08" - this is also to improve the readabilityHowever, 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.yes, I cannot say, where changes have to be made - there might be different places. Better not to change the pin layout of the GP buttons, especially if you want to keep it compatible to MBSEQ V3also, why does the datawheel have to be at encoder #0 for the SEQ application?You can change the mapping in main.asm, USER_ENC_NotifyChangeYou 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).you can achieve the same (and more) in the song menu, when song mode is turned off (press song button twice). You can predefine pattern sets and chains at different "song offsets" (A1, C1, E1, ...), and select the offsets with the 16 GP buttons during the sequencer is playing. I think that I've described this mechanism in the ChangeLogBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.