Jump to content

Working with banksticks and banks


robin303
 Share

Recommended Posts

This afternoon, I have added two banksticks to my midibox64 (which already had one functioning bankstick). So now there are three of them in my box. But I can't seem to find them!  I made sure that the DEFAULT_BANKSTICK_CS setting in main.asm is set to -1.

How can I verify if MIOS can access the extra 32 banks? Where do I find them?

Once I get it to work, I would like to write a meta event that can copy bank a from bankstick b to bank x on bankstick y. Is this possible?

Thanks for any help  :)

Link to comment
Share on other sites

Hi Robin,

for MIOS a BankStick is just a data storage, it doesn't take care for the data which is saved in the EEPROM. Therefore MIOS cannot tell you if you've 32 extra banks or not, it can only tell you if the second and third BankStick is accessible or not. The easiest way to do this is to request the BankStick content of BankStick #2 and #3 with the SysExBox tool. If MIOS transmit 32 blocks, the BankSticks are connected correctly, if MIOS returns an error code, then check your circuit.

For the MIDIbox64 application each BankStick contains 16 banks. This application is programmed in a way that you don't need to select the BankStick, you only need to select bank 17-32 for BankStick #2, 33-48 for BankStick #3, etc...

This means also that you are already able to copy data between multiple BankSticks

Best Regards, Thorsten.

Link to comment
Share on other sites

Thanks for the xplanation, I tried it out and all my 4 banksticks seem to be working perfectly  :)

Now, some more challenge, I hope you can help me on the way with this next thing. I'm really anxious to try and learn  how to program my box.

Let's say I would want to copy a "preset bank" into a "working bank"....

I have created some preset banks to control different instruments in Reason. So there's one bank configured for the Mixer, one for the Dr.Rex, one for the NN-19 etcetera.  I have stored these preset banks in bank 51 to bank 62 of my midibox64.

I also have 16 "working banks", stored in bank 1 to 16.

Now I would like to create a metaevent to load one of the "preset banks" into the currently selected "working bank":

MB64_META_Handler_03
      ;; input value 51-62 (0x33-0x3E) in MIDI_EVNT_VALUE
      ;; This will copy the SOURCE bank n to DESTINATION current_bank
      ;; 51 - reMix module                  57 - RV7000 module
      ;; 52 - Subtractor module            58 - Scream4 module
      ;; 53 - Malström module                  59 - BV512 module
      ;; 54 - NN-19 module                  60 - Small FX modules
      ;; 55 - Dr:rex module                  61 - MATRIX module
      ;; 56 - reDrum module                  62 - General controllers
      
      ;; Only continue if the current bank is a "working bank" (between 1 and 16) to avoid overwriting the preset banks.
      movlw      0x10 ;Set W to 17
      IFGEQ       MB_BANK, W, rgoto MB64_META_PATCHLOAD_NOTOK      ;If MB_BANK >= 17 then goto MB64_META_PATCHLOAD_NOTOK error message
      
      movf      MB_BANK, W      ;store the current  bank number in W (this is the TARGET of the copy action)
      movff      MIDI_EVNT_VALUE, MB_BANK ;change current bank to bank MIDI_EVNT_VALUE
      call       MB64_BANK_CopyFromExternal
      
      return

This is not working.  When I trigger the metaevent while I'm in "working bank" 4, I do see the *** snapshot *** message, but after this the midibox returns being in bank 1 without any evidence of a copy actions having taken place.  :-/

Do you see any mistakes in my code?

Link to comment
Share on other sites

strange. in IFGEQ I would replace W by ACCESS, but this isn't the reason (both constants are 0)

You could add following code:

   movlw 0xf0 ;; for debugging
   call MIOS_MIDI_TxBufferPut
   movf MB_BANK, W
   andlw 0x7f
   call MIOS_MIDI_TxBufferPut
   movff MIDI_EVNT_VALUE, WREG
   andlw 0x7f
   call MIOS_MIDI_TxBufferPut
   movlw 0xf7
   call MIOS_MIDI_TxBufferPut
before the last block, and
   movlw 0xf0 ;; for debugging
   call MIOS_MIDI_TxBufferPut
   movf MB_BANK, W
   andlw 0x7f
   call MIOS_MIDI_TxBufferPut
   movlw 0xf7
   call MIOS_MIDI_TxBufferPut

before the return for debugging

Best Regards, Thorsten.

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