Jump to content

IncBank DecBank Trouble


m.str
 Share

Recommended Posts

Hello,

I just noticed a peculiar error in my configuration, that is based on the way that I switch banks while running the application.

On my hardware controller I have two designated buttons, whose purpose it is to increase or decrease the bank number respectively. Basically it works as desired, the bank numbers get changed accordingly. But when I use these buttons multiple times, especially in succession to another, I noticed that my MIDI controller "resets". It return to its startup screen, but keeps continuing to react to my bank selections. This seems like an overload of some kind.

Because I did not notice any curious in the MIOS terminal I decided to take a look at it in MIDI OX. There I saw, that after triggering one of the bank switches a loop starts which repeats a bank selection command over and over again. As if the triggering by my hardware controller does not get stopped after adjusting the bank number. The peculiar thing about it is that the value for the bank selection is 0x76, which is 118 in decimal format. That does not make any sense to me, unless it is some kind of error code, which I do not know about.

Here is a picture of the log:

bankloop.PNG.c926325605f9827972bada0e922

the 0x02 values is te bank number value set by me triggering the respective button, the 0x76 lines just keep goin on and on after that.

i was also wondering about the SysEx message, but I think it might be one of the logs ("bank == 2") that I set up in the ngr script to be printed after bank switching.

The relevant ngc code for this is:

#Bank Selectors
EVENT_RECEIVER id=4042 fwd_id=SENDER:4042 type=NoteOn key=0x0a chn=1 range=0:1
EVENT_SENDER id=4042 if_equal_stop_on_match=RECEIVER:4042:1 type=Meta meta=IncBank meta=RunSection:2 
EVENT_RECEIVER id=4043 fwd_id=SENDER:4043 type=NoteOn key=0x09 chn=1 range=0:1
EVENT_SENDER id=4043 if_equal_stop_on_match=RECEIVER:4043:1 type=Meta key=0x09 chn=1 meta=DecBank meta=RunSection:2

The ngr code for that section:

if ^section == 2
 log "section 2"
 
 if ^bank == 1
  log "Sec 2 Bank 1"
  send SysEx OUT2 0xf0 0x42 0x30 0x24 0x41 0 0 0x00 0xf7 
 elsif ^bank == 2
  log "Sec 2 Bank 2"
  send SysEx OUT2 0xf0 0x42 0x30 0x24 0x41 0 1 0x00 0xf7 
 elsif ^bank == 3
  log "Sec 2 Bank 3"
  send SysEx OUT2 0xf0 0x42 0x30 0x24 0x41 0 2 0x00 0xf7 
 elsif ^bank == 4
  log "Sec 2 Bank 4"
  send SysEx OUT2 0xf0 0x42 0x30 0x24 0x41 0 3 0x00 0xf7 
 elsif ^bank == 5
  log "Sec 2 Bank 5"
  send SysEx OUT2 0xf0 0x42 0x30 0x24 0x41 0 4 0x00 0xf7 
 endif
 
 exec_meta RunSection:1
 
endif

Does this seem familiar to anyone? Any reply much appreciated here!

Best,

Micha

Link to comment
Share on other sites

Hello Micha

To understand the whole mechanism we need to know what do section 1 as you call it at the end of the section 2...

Also your sender 4043 have key definition which is not relevant due to type=meta

What about the buttons that select banks ? Do they forward to receiver 4042/4043 ?

Best

Zam

 

Link to comment
Share on other sites

  • 2 weeks later...

Hello Zam,

my response comes a bit delayed, because I did some further inspection on the error, since I found out, that this was not the only NGC/NGR-file complex where an error like that happened. Furthermore I realised, that this repetitive CC message behaviour did not just occur after switching banks (and therefore calling different sections).

I found out, that the CC number for Bank LSB was just coincidental in that case. In another script the same kind of repeating CC messages occurred with other CC numbers. What I found out was that ..

a) Those were all Messages sent to the LED rings of my hardware controller

--- the rings surround 32 Encoders; each ring is adressed by a different CC number, hence the different CC numbers in the different scripts. In the example from the earlier post there was only one LED ring where this happened, which coincidentally had the CC number which is usually standard for Bank LSB

b) this ONLY happened when the correlating EVENT-* Objects were parametrized as "bank=0", which basically happens in all of my setups.

c) There is an extensive misbehaviour of those LED rings while MIDI OX is open. Once closed, the rings are back to normal behaviour.

 

The unfortunate thing about this, is that it did not explain my original error of the repeatedly resetting MIDI controller. But the two problems do not seem to affect each other.

Link to comment
Share on other sites

On 7.8.2020 at 1:55 PM, Zam said:

Also your sender 4043 have key definition which is not relevant due to type=meta

And yes you are right, that was totally unnecessary. I probably copied that by mistake from the line above

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