Author Topic: Need help with midi in signal not being recognized  (Read 113 times)

matramurena

  • Newbie
  • *
  • Posts: 5
    • View Profile
Need help with midi in signal not being recognized
« on: March 17, 2024, 12:02:14 PM »
I made a pedalboard with Arduino Nano that sends midi signals to a traditional 5-pin DIN connection. Works well with other applications such as Bias Fx, Amplitude, Guitar Rig, etc.
But I can't get Modep to recognize my controller because as soon as I touch the save button on MoDep it saves it without me even pressing any button on the pedalboard.
 However, after many hours trying to understand the problem, I tried it with a Behringer FCB1010 midi pedalboard and the same thing happened as soon as I pressed the save button, it saved without me pressing any button on the midi controller or even without any midi device connected to the pistomp.
 I would like to know if anyone has had the same problem and what the cause might be.
However, I tried to see it in the Linux terminal if it recognizes any midi device by writing Amidi -1 and the message is as follows

pistomp@pistomp:~ $ amidi -l
Dir Device Name
cannot determine device number: Inappropriate ioctl for device

I also activated the midi
with the commands

sudo systemctl enable ttymidi
sudo systemctl start ttymidi

But the problem continues.
I would like help from someone who knows more about Linux than I do to see if I can get the MIDI input to work as it should.
Thank you for your help on the resolution
to this problem.

matramurena

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Need help with midi in signal not being recognized
« Reply #1 on: March 18, 2024, 04:05:21 PM »
I wrote  again on the terminal amidi -L and this time the message is the following

patch@patchbox:~ $ amidi -L
RawMIDI list:
default {
        type hw
        card {
                @func getenv
                vars {
                        0 ALSA_RAWMIDI_CARD
                        1 ALSA_CARD
                }
                default {
                        @func refer
                        name 'defaults.rawmidi.card'
                }
        }
        device {
                @func igetenv
                vars {
                        0 ALSA_RAWMIDI_DEVICE
                }
                default {
                        @func refer
                        name 'defaults.rawmidi.device'
                }
        }
        hint.description 'Default raw MIDI device'
}
hw {
        @args.0 CARD
        @args.1 DEV
        @args.2 SUBDEV
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars {
                                0 ALSA_RAWMIDI_CARD
                                1 ALSA_CARD
                        }
                        default {
                                @func refer
                                name 'defaults.rawmidi.card'
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars {
                                0 ALSA_RAWMIDI_DEVICE
                        }
                        default {
                                @func refer
                                name 'defaults.rawmidi.device'
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default -1
        }
        type hw
        card $CARD
        device $DEV
        subdevice $SUBDEV
        hint {
                description 'Direct rawmidi driver device'
                device $DEV
        }
}
virtual {
        @args.0 MERGE
        @args.MERGE {
                type string
                default 1
        }
        type virtual
        merge $MERGE

Does this tell anything about the midi state of my PIStomp? I appreciate any help from forum members with Linux knowledge to discover why my midi input is not recognized when I try to send midi cc commands.

Randall (Admin)

  • Administrator
  • Full Member
  • *****
  • Posts: 217
    • View Profile
Re: Need help with midi in signal not being recognized
« Reply #2 on: March 18, 2024, 11:29:32 PM »
Your output from amidi -L looks as expected.

Your problem might not be with your DIN MIDI at all.  Because you say the control gets mapped in Mod as soon as you hit save, I'm thinking you have another controller that's continuously sending MIDI messages.  That's easy to do if you have a analog control specified in default_config.yml but you don't have anything connected to that adc_input.  In that case, it will be floating which often results in just a constant stream of MIDI messages.  I would recommend commenting-out or removing all of those and restarting with ps-restart.

If the MIDI messages from your MIDI controller still aren't heard by MOD, then I'd test your hardware with this:
sudo systemctl stop ttymidi
~/pi-stomp/utils/monitor_din_midi.py


Then tweak your controller.  Does the utility report a message (eg. print "msg 127")?  If so, your MIDI in module is working.  If not, make sure it's connected properly.

Once you get that working, start up ttymidi again and try mapping the control via MOD:
sudo systemctl restart ttymidi

matramurena

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Need help with midi in signal not being recognized
« Reply #3 on: March 19, 2024, 06:50:07 AM »
Hello Randall
As always ready to help newbies like me solve their problems, thank you for your quick help.
I will try the solutions you suggest and as soon as I find the problem I will explain it here so that I can also help colleagues with the same problem. The idea had also occurred to me that it must be something that is continuously sending midi signals, for that reason as soon as the save button is pressed, MoDep saves it as having received the Midi command.
What intrigues me most is that this happens even if nothing is connected (Midi Controller) to the Raspberry board, so now to me it makes sense that could be something sending random signals on the pins that are not being used as you suggest, but as all this Linux programming is new to me as I'm just starting to learn, I would like, if possible if you could explain to me how to access the default_config.yml  file from the terminal or otherwise to see if I have something connected to the ADC entries and then how to disable the ADC input pins in this configuration.
My apologies for my ignorance about the Linux code but if you or someone else could tell me how to access it I would appreciate it.
« Last Edit: March 19, 2024, 02:35:13 PM by matramurena »