User Tools

Site Tools


mb808

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mb808 [2006/08/30 01:32]
moogah
mb808 [2011/09/13 12:34] (current)
gslug Removed Spam
Line 1: Line 1:
 +====== Summary ======
 +
 This page is to describe the operation of the MB808 Sequencer application. ​ It is a work in progress, comments are welcome and usually appreciated :)  This page is to describe the operation of the MB808 Sequencer application. ​ It is a work in progress, comments are welcome and usually appreciated :) 
  
Line 12: Line 14:
  
  
-This application is not meant to be part of a modular system or even a standalone box, it's origins are a simple adaptation of the MBSEQ v2.4 application to mimic to functionality of the original 808's digital section. ​ As such the primary task for this application is to provide 13 editable tracks to cover the 12 instruments + accent data and to create the proper pulse signals for the inputs of the instruments. ​ However, MBSEQ v2.4 is a very deep application and it would be a shame to ignore many it's features so the primary ​task is to create an interface using the available buttons and encoders that can access as many menu functions as possible, without making the whole thing obscure. ​ Remember, this is a drummachine first, sequencer second :)+This application is not meant to be part of a modular system or even a standalone box, it's origins are a simple adaptation of the MBSEQ v2.4 application to mimic to functionality of the original 808's digital section. ​ As such the primary task for this application is to provide 13 editable tracks to cover the 12 instruments + accent data and to create the proper pulse signals for the inputs of the instruments. ​ However, MBSEQ v2.4 is a very deep application and it would be a shame to ignore many it's features so the secondary ​task is to create an interface using the available buttons and encoders that can access as many menu functions as possible, without making the whole thing obscure. ​ Remember, this is a drummachine first, sequencer second :)
  
 ==== Features ==== ==== Features ====
Line 26: Line 28:
   * Each pattern will have A and B variations that can be switched between or morphed between with dedicated controlls   * Each pattern will have A and B variations that can be switched between or morphed between with dedicated controlls
   * Save, Copy, Paste and Clear operations. ​ One level of undo would be sweet.   * Save, Copy, Paste and Clear operations. ​ One level of undo would be sweet.
 +  * Dedicated tempo encoder
 +  * Dedicated tap tempo button
  
 ==== Theory of operation ==== ==== Theory of operation ====
  
-The MB808 application will  essentially be unchanged from the SEQ v2.4 application. ​ The changes that will be made reguard the interface, specifically the LCD screen and encoders will not be present. ​ At this time I also think it is best to use TK's drummode for the operation of the sequencer. ​ Although this prevents each step from having it's own flam value, what we gain is much more than what we loose.  Firstly using drum mode gives us 12 instrument tracks + accent all in one pattern as opposed to re-working the handling of the pattern sets to allow the use of 12 complete tracks, this keeps things compatible with the base application and hopefully with the upcoming SEQv3 application :)  Using drum mode also allows us to use the morph feature, but in a way that mimics the original 808.  Each pattern ​can be linked to the same pattern in the lowercase bank switched between like with the "A+B" ​toggle switch on the original, my favorite feature.  This will take a bit of trickery in code to keep things compatible, so it may not be implemented in the first version. ​ The second big advantage I realized this morning while thinking about the Pro-1.  ​It'​s ​sequencer was absolutely minimal, you just switched into edit mode and entered ​notes until the phrase was entered. ​ No rests.  The Pro-1 would then play it backautomatically looping ​it.  ​I realized that with the extra tracks avaiable ​and using the arrpegiate mode along with the step edit mode the mb808 could also sequence basslines and trigger arrpegios! ​ This is very cool! +The MB808 application will  essentially be unchanged from the SEQ v2.4 application ​and I hope to create an adaptation of the V3 which keeps all the best features for a drum sequencer.  The changes that will be made reguard the interface, specifically the LCD screen and encoders will not be present ​by default, but will still be supported in software.  At this time I also think it is best to use TK's drummode for the operation of the sequencer. ​ Although this prevents each step from having it's own flam value, what we gain is much more than what we lose.  Firstly using drum mode gives us 12 instrument tracks + accent all in one pattern as opposed to re-working the handling of the pattern sets to allow the use of 12 complete tracks, this keeps things compatible with the base application and hopefully with the upcoming SEQv3 application :)  Using drum mode also allows us to use the morph feature, but in a way that mimics the original 808, where each pattern ​had A and B variations that could be chained together. ​ Instead of accessing 16 banks of 8 patterns ​the interface and some of the functionality will be modified so that there are only 8 banks of 8 patterns, the remaining 8 banks will become ​the "​B" ​variations for those patterns.  This will take a bit of trickery in code to keep things compatible, so it may not be implemented in the first version. ​ The GP buttons will retain their default function for each mode, but will gain additional functionality through ​the use of 4 extra menu shortcut buttons (F1-F4) which will allow the user to select a menu, set the cursor position and enter a value without needing a screen.  ​Accessing the 4 additional menus is a matter of holding one of the menu keys down, at which point the 16 GP Led'​s ​will display information about the menu page and paramters represented. ​ Once a parameter has been entered ​the menu can be automatically exited, or the application could simply wait until the menu key has been released.  The Select and Exit buttons are still present on the layoutbut at this time it is a bit unclear what their function will be.  ​The metronome feature will not be so readily accessable ​and will instead be replaced by a dedicated button for tap tempo. ​ A dedicated tempo encoder will also be included. ​ 
  
 ==== Description of the interface ==== ==== Description of the interface ====
  
-There are 35 elements to the MB808 interface. ​ They are:+There are 36 elements to the MB808 interface. ​ They are:
   * 16 GP buttons   * 16 GP buttons
   * 4 Menu buttons (m1 - m4)   * 4 Menu buttons (m1 - m4)
   * 4 Mode buttons (Song, Pattern, Mute, Edit)   * 4 Mode buttons (Song, Pattern, Mute, Edit)
 +  * 2 Variation buttons (A, B)
   * 5 Transport controls (Play, Stop, Fwd, Rwd, Loop)   * 5 Transport controls (Play, Stop, Fwd, Rwd, Loop)
   * 2 Control buttons (Select, Exit)   * 2 Control buttons (Select, Exit)
Line 43: Line 47:
   * Tempo encoder   * Tempo encoder
   * Swing/Morph pot   * Swing/Morph pot
-  * Datawheel+
  
 ====== Operation Manual ====== ====== Operation Manual ======
Line 119: Line 123:
  
 ==== Modifying the interface ==== ==== Modifying the interface ====
-In order to get the most out of the SEQ application without using a datawheel or an LCD and without risking becoming totally incompatible with future versions I decided it was best to use the 4 function ​buttons as menu buttons to modify the action ​of the GP's.  In order to do this I need to modify the code in each of the "​F"​ buttons handlers. ​ These can be found starting on line 681 of seq_buttons.inc. ​ First I cleared out the code that was in there. ​ Now, the simplest way to do this is to set a bit representing when one of the menu buttons is pressed. ​ Since I want them all to be momentary I can then simply clear the bit when the button is released. ​ Code will be needed to be sure that only one bit is set at a time as it makes no sense to edit multiple menu's at once.  Now, in order to turn these button presses into additional menu shortcuts the operation of the GP's need to be overloaded with 4 additional cases represented by the bits in the "​current_menu"​ register. ​ Since the operation of the GP buttons and the menus is not exactly straight forward care needs to be taken so that the normal operation of the SEQ application is not interrupted. ​   SO, how, exactly do the GP menu shortcuts work?+In order to get the most out of the SEQ application without using a datawheel or an LCD and without risking becoming totally incompatible with future versions I decided it was best to use the 4 function buttons to create additional layers ​of menu shortcuts.  In order to do this I need to modify the code in each of the "​F"​ buttons handlers. ​ These can be found starting on line 681 of seq_buttons.inc. ​ First I cleared out the code that was in there. ​ Now, the simplest way to do this is to set a bit representing when one of the menu buttons is pressed. ​ Since I want them all to be momentary I can then simply clear the bit when the button is released. ​ Code will be needed to be sure that only one bit is set at a time as it makes no sense to edit multiple menu's at once.  Now, in order to turn these button presses into additional menu shortcuts the operation of the GP's need to be overloaded with 4 additional cases represented by the bits in the "​current_menu"​ register. ​ Since the operation of the GP buttons and the menus is not exactly straight forward care needs to be taken so that the normal operation of the SEQ application is not interrupted. ​   SO, how, exactly do the GP menu shortcuts work?
   * Once a DIN event has been determined to have come from one of the two SR's assigned to be the GP buttons SEQ_GP_Button [21] is called.  ​   * Once a DIN event has been determined to have come from one of the two SR's assigned to be the GP buttons SEQ_GP_Button [21] is called.  ​
   * In SEQ_GP_Button [21] the application can branch to 3 different places.  ​   * In SEQ_GP_Button [21] the application can branch to 3 different places.  ​
   * If Menu mode is active (the menu button is pressed) than the app branches to SEQ_GP_Mode4_Button [240]   * If Menu mode is active (the menu button is pressed) than the app branches to SEQ_GP_Mode4_Button [240]
 This is done using one of TK's macros: "​BIFSET"​ which checks if a specified bit in a specified register is set and then branches to a specified function if it is.  The register is SEQ_MODE0, the bit for Menu mode is SEQ_MODE0_MENU. ​ The line of code: This is done using one of TK's macros: "​BIFSET"​ which checks if a specified bit in a specified register is set and then branches to a specified function if it is.  The register is SEQ_MODE0, the bit for Menu mode is SEQ_MODE0_MENU. ​ The line of code:
-''​BIFSET SEQ_MODE0,​ SEQ_MODE0_MENU,​ BANKED, rgoto SEQ_GP_Mode4_Button''​. ​ The functionality we want to add is very similar to the Menu shortcut mode, but lets not jump there just yet, there is more to learn right here. +  ​''​BIFSET SEQ_MODE0,​ SEQ_MODE0_MENU,​ BANKED, rgoto SEQ_GP_Mode4_Button''​.  ​ 
-  * SEQ_GP_Button then checks to see if a "​callback hook" has been installed. ​ I am not 100% clear on the function of the callback hook, but if it is not installed the application will end up branching to either Step edit mode or song mode. +The functionality we want to add is very similar to the Menu shortcut mode, but lets not jump there just yet, there is more to learn right here. 
 +  * SEQ_GP_Button then checks to see if a "​callback hook" has been installed. ​ I am not 100% clear on the function of the callback hook, when and why it is installed, but if it is not installed the application will end up branching to either Step edit mode or song mode. 
   * If the hook has been installed than the application branches to CS_MENU_ExecMenuGPCallbackHook [502]   * If the hook has been installed than the application branches to CS_MENU_ExecMenuGPCallbackHook [502]
-  * Once the application has branched to this point the program flow becomes harder ​to read, so we are going to start with a higher level analysis of how the menus are mapped and how parameters are accessed, edited and stored. +  * Once the application has branched to this point it begins dealing with the minutia of navigating the menu and handling the LCD.  Since there are many technical considerations ​to these processes which will not be immediatly obvious ​we are going to start with a higher level analysis of how the menus are mapped and how parameters are accessed, edited and stored.  ​Once we understand that we can isolate ​the functions we are most interested in
-  * Those who have worked with modern GUI programming are probably familiar with the event driven model for creating an interface. ​ At this point it is unclear to what extent the SEQ's menu's can be considered event driven, but it is probably best not to try squeezing them into that mold as there are some important differences+   ​* The menus are implemented through a table of function pointers that are retrived through an index which is determined by the context of the mode and GP button number. ​ You can see the menu tables in cs_menu_tables.inc
-  * The menus are implemented through a table of function pointers that are retrived through an index which is determined by the context of the mode and GP button number. ​ You can see the menu tables in cs_menu_tables.inc+
 Spend some time reading that file until you get a grasp of it's premise. ​ Menus are created and navigated by indexing through a matrix of function pointers. ​ Take note of some parameters from cs_menu.inc:​ Spend some time reading that file until you get a grasp of it's premise. ​ Menus are created and navigated by indexing through a matrix of function pointers. ​ Take note of some parameters from cs_menu.inc:​
     * CS_MENU_CURSOR_POS     * CS_MENU_CURSOR_POS
 +    * CS_MENU_POS
 +    * CS_MENU_NEW_POS
 +    * CS_MENU_ENTRIES
 +    * CS_STAT
 Let's allow that to sink in for awhile. Let's allow that to sink in for awhile.
   * Next we want to know how parameters are modified. ​ From the operation of the SEQ we know that the navigation functions (Right, Left, Datawheel, Select, Exit) are used to select a parameter within a menu and then the Datawheel and Right/Left buttons can increment it's value. ​ Browsing through cs_menu.inc we can find the following three functions which sum up these operations: ​   * Next we want to know how parameters are modified. ​ From the operation of the SEQ we know that the navigation functions (Right, Left, Datawheel, Select, Exit) are used to select a parameter within a menu and then the Datawheel and Right/Left buttons can increment it's value. ​ Browsing through cs_menu.inc we can find the following three functions which sum up these operations: ​
Line 139: Line 147:
   * Each one of these functions places a value in WREG (CS_MENU_Enc already has the encoder direction in WREG) and then calls CS_MENU_AddMenuParameter [573]. ​ From the comments:   * Each one of these functions places a value in WREG (CS_MENU_Enc already has the encoder direction in WREG) and then calls CS_MENU_AddMenuParameter [573]. ​ From the comments:
  
-''​-------------------------------------------------------------------------- +  ​''​-------------------------------------------------------------------------- 
-;;  This function adds WREG to CS_MENU_PARAMETER_[LH] and saturates +  ;;  This function adds WREG to CS_MENU_PARAMETER_[LH] and saturates 
-;;  if the max value has been reached +  ;;  if the max value has been reached 
-;;  IN: add value in WREG +  ;;  IN: add value in WREG 
-;;  OUT: result in CS_MENU_PARAMETER_L +  ;;  OUT: result in CS_MENU_PARAMETER_L 
-;;       ​branches to menu parameter hook and requests screen update +  ;;       ​branches to menu parameter hook and requests screen update 
-;; --------------------------------------------------------------------------''​+  ;; --------------------------------------------------------------------------''​ 
mb808.1156901561.txt.gz · Last modified: 2006/10/15 09:35 (external edit)