Menu

Cannot connect my Arduino MIDI controller to BB

2025-06-03
2025-06-26
  • Georges Bachelier

    Hi Everyone !

    My Hammond B3 organ clone based on setBfree is completed and I would like to add it an auto-arranger. I have chosen BackupBand because it works fine and runs on Linux. The goal is to get it running on a Raspberry PI, which is the computer I use to run setBfree, but I want to check first my understanding of BB's behaviour on my Linux Mint desktop, when BB is driven by a MIDI controller. I want BB to use Jack since I have to route both BB and setBfree outputs to the system audio.
    My experimental MIDI controller is very simple : an Arduino Nano Every board sending continuously MIDI Note ON and Note OFF messages with pauses, over channel 15. The Arduino enumerates as /dev/ttyACM0 on which I run ttymidi to change its USB class, giving it the name bb_ctrl. I did this in the past to connect my B3 clone Arduino boards to setBfree MIDI inputs and I know this works fine. So, I expected things to be as simple with BB, but I guess I am missing something here.
    Before using the NoGui version of BB, I use the regular one. When prompted to use Jack, I answer YES and I can see BB out_1 and out_2 connecting to system playback_1 and playback_2 in the QjackCtl Graph window. Clicking the Start button on BB's GUI launches the rythm box sound, as expected.
    Now I would like to connect my MIDI controller to BB, but there is no input on the BB box shown in QjackCtl Graph window.
    Using BB Setup > Human > Device there is no device listed if I select the MIDI radio button. If I select the Software radio button, I can see "bb_ctrl MIDI Out", preceded with Manually Connect. bb_ctrl is the name assigned by ttymidi to my Arduino MIDI device. So, my Arduino is reported as Software instead of MIDI controller as I expected it to be, but selecting my bb_ctrl device has no effect anyway.
    I am stuck here. Can you help me, please?

     
  • jeff

    jeff - 2025-06-18

    Try running back up band from a terminal window, and specify the arduino MIdi Output like so:

    ./backupband -SEQIN "bb_ctrl MIDI Out"

    This will cause BackupBand to look for a seq Output port named "bb_ctrl" and connect its Midi IN to it. (You won't need to manually connect using QJackCtl). Make sure your auduino is already running before you run BackupBand.

    You can also have BB automatically connect to jack's system out:"

    ./backupband -JACKOUT -SEQIN "bb_ctrl MIDI Out"

    BB has its own "session manager" built-in, so you don't need to use QJackCtl.

     

    Last edit: jeff 2025-06-18
  • jeff

    jeff - 2025-06-18

    Also, in order for your arduino to select styles, you need the arduino to send program change messages on the Master Channel. (Set Master Channel via "Human -> MIDI Controller").
    To start/stop play, you can send a controller number 67 on the Master Channel. To control tempo, send a controller 1.

    Use BB's MIDI Event Test window to check that BB is receiving the arduino mesages, and that they are activating the desired BB functions.

     

    Last edit: jeff 2025-06-18
  • Georges Bachelier

    Hi Jeff,

    Thanks a lot you for your help on this topic !

    Using the regular BB, I mean BB WITH UI, from the command line, the app displays a warning message about Drums, Bass, Guitar, etc that are assigned to the internal synth, but have no sampled instruments. The BBNoGui version works fine and this is the version I want to use, so it's fine with me.

    I have got BBNoGui working with this command line :
    ./BackupBandNoGui -JACKOUT -SEQIN bb_ctrl -MASTER 8
    "bb_ctrl MIDI Out" does not seem to be necessary.
    With the above command line, my Arduino can start the drums and produce an accompaniement by sending 3 MIDI Note On messages to produce a chord. That's a very encouraging start !

    Now, something challenging for BB :
    As you know, my organ relies on setBfree. It gets MIDI messages from Arduino boards on the following MIDI channels:
    chnl 1 : upper KB and console controls
    chnl 2 : lower KB
    chnl 3 : pedal-board

    The organ can be played in different ways:
    Both hands on upper keyboard
    Both hands on lower kb
    Right hand on upper and left hand on lower kb, or the opposit
    Left hand on lower playing chords or walking bass
    On top of that, the left foot can play bass lines, obviously.

    Q1 : Is BB flexible enough to produce consistent accompaniements when receiving MIDI note ON/OFF messages on different channels?

    setBfree runs on a Raspberry PI 4 and BB will have to run on the same RPI.
    Q2 : Did you fix the issue mentioned by someone else about building BB on RPI? Can I build and run BBNoGui on a RPI with no issue?

    ../.. Use BB's MIDI Event Test window to check that BB is receiving the arduino mesages, and that they are activating the desired BB functions.
    Q3: Is it really necessary to go through the Setup > Commands assignment process and have MIDI settings stored in Prefs before using BB, or is there a list of all possible MIDI messages that BB can interpret by default? Is there a switch usable on the command line to display all of them, or should I look into source files to find the information I need?

    Greetings
    Georges

     
  • jeff

    jeff - 2025-06-20

    Is BB flexible enough to produce consistent accompaniements when receiving MIDI note ON/OFF messages on different channels?

    Not sure what you're asking here. BB has a very complex and versatile MIDI implementation. You should be able to control anything via MIDI (although you may need to setup BB on the Commands screen if you need to use specific MIDI messages to control specific features).

    Can I build and run BBNoGui on a RPI with no issue?

    I don't have an RPI to test. But I do have two small Single Board Computers (SBC) that have ARM processors.

    I haven't gone through the code and verified all of the (unsigned char)-1 tests, but that should be the only obstacle to getting BB running on an ARM SBC.

    is there a list of all possible MIDI messages that BB can interpret by default?

    BB does indeed have a bunch of functions setup by default to be controlled via MIDI (on the Master Channel). In the manual, the section "The Master channel" lists the default setup.

     
  • Georges Bachelier

    Hi Jeff !

    Thanks for the quick reply!

    Is BB flexible enough to produce consistent accompaniements when receiving MIDI note ON/OFF messages on different channels?
    It's an usual practice to play the organ on both keyboards and setBfree imposes the organ MIDI controller to send Notes ON/OFF messages on channel 1 for upper and 2 for lower KB. These channels numbers can be modified, but they have to be different though. Therefore, BB will have to build an accompaniement from a sequence of Notes messages coming from two different MIDI channels. The User Manual reads : The Master channel is the midi channel your controller is set to play chords upon. (MIDI notes on this channel determine the chord)
    So, I suppose BB cannot play chords with setBfree settings. A possible workaround is to send every Note message from any KB over 2 channels : 1 or 2 for setBfree, plus Master for BB (channel 8 for example). Not efficient, but functional...
    Can you see another solution to this situation?

    I will try building and running BBnoGui on an RPI.

    I'm eager to hear BB playing along with me !!!

     
  • jeff

    jeff - 2025-06-20

    ok. So you want both hands to play chords. And you want chans 1 and 2 to trigger chords.

    Set "Human -> MIDI Controller -> Device" to None (since you're not using BB to play patches).
    Set "Robot -> Bass -> Channel" to 5.
    Set Master Channel to 1.

     
  • Georges Bachelier

    Thank you Jeff for the continuous help you provide me with, but your last message lets me puzzled...

    since you're not using BB to play patches..
    To play patches? What does this mean?

    What is the proper command line syntax corresponding to the settings you suggest?

    Set "Human -> MIDI Controller -> Device" to None
    Can I get the equivalent from -SEQIN None? Not sure...

    Set "Robot -> Bass -> Channel" to 5.
    I really don't know how to program this from the command line.

    Set Master Channel to 1.
    -MASTER 1 should be OK ;)

    ./BackupBandNoGui -JACKOUT -SEQIN None -MASTER 1 and then ?????

     
  • jeff

    jeff - 2025-06-25

    By playing patches, I mean using the "Human Player" part of BB, and all the patches associated with it. Your human player appears to be confined to playing BFree's organ sounds. You're using only BB's robots (and their patches).

    So you don't need a MIDI output device for BB's Human Player. Set it "Off". This means that every midi msg not on one of the robots channels, will be used to play chords. By making sure no robot is set to chan 1 or 2, then these chans play chords (rather than notes on some robot).

     
  • Georges Bachelier

    Hi Jeff ! Thanks a lot for making this clear.
    I can get almost all the required settings from the command line, but let me first show you something strange I have noticed.
    ./BBNoGui -JACKOUT -SEQIN bb_ctrl -MASTER 1 -FULLKEY -OFF SOLO
    This command line launches BBNoGui with no issue : I can see the Loading and start messages displayed into the terminal window. BBNoGui reacts to messages sent by my Arduino.

    ./BBNoGui -JACKOUT -SEQIN bb_ctrl -OFF SOLO -MASTER 1 -FULLKEY
    With this command line, the terminal window displays Loading and that's all. BBNoGui is not running. The -OFF SOLO argument position seems to be critical. Is this a command line parser issue?

    I would like to assign MIDI channel 5 to the Bass robot, as you recommend, but even after reading the manual 10 times, I still don't see how I can do this from the command line. May be isn't it possible? Is this assignment only applicable with the BBGUI version, then has to be stored in Prefs for BBNoGUI to parse it on start?

     
  • jeff

    jeff - 2025-06-25

    I'm currently working on the ARM port of BB. But I'm also going out of town this coming week, so it may be a week before I can put out some updated code.

    As I recall, you have to set the MIDI chan with the GUI version, and save the config file.

    It may be easier to change SetBFree to use chans 11 and 12 for the two organ manuals. Then you can leave BB at its default setup. (Plus, you'll be able to allow the user to layer, or solo, BB's patches for bass, guitar, piano, strings, etc, by changing a manual's chan to the Solo, Bass, Guitar, or Pad chan. For example, set the upper manual to chan 1, and send a Pgm Change of 41 on chan 1 to play the strings).

     
  • Georges Bachelier

    I'm currently working on the ARM port of BB.
    I'm so glad to read this ! Thank you Jeff !

    As I recall, you have to set the MIDI chan with the GUI version, and save the config file.
    This seems indeed to be the only way to set it.

    It may be easier to change SetBFree to use chans 11 and 12 for the two organ manuals. Then you can leave BB at its default setup.
    Oh yes it is ! With an empty /Prefs folder, I am using the following command line with the Arduino sending MIDI messages on chn 11 and 12 and BB works fine:
    ./BBNoGui -JACKOUT -SEQIN bb_ctrl -MASTER 11 -FULLKEY -OFF SOLO

    Plus, you'll be able to allow the user to layer, or solo, BB's patches
    I don't need this. I am so busy already toggling the regular organ commands (vibrato/chorus/percussion/Leslie) while playing... ;)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.