Mod Archive Forums

Music Production => MilkyTracker => Tracking => MilkyTracker Support => Topic started by: supernoob5000 on August 19, 2019, 05:01:12

Title: How to use MIDI keyboard with MilkyTracker on Linux?
Post by: supernoob5000 on August 19, 2019, 05:01:12

TL;DR: MilkyTracker isn't being recognized as a midi receiver by aconnect, but that's the only way I know of possibly getting midi input working. I'm just looking for some general guidance on how I can try to get midi input working from here.


My System Setup (If it helps)
I'm running Manjaro Linux with nothing special changed from the default audio setup as far as I'm aware. My MIDI input is going in through an audio interface, and that interface is also where the final audio is output to.


Long version:
Hi,
As the title says, I'm trying to get my midi keyboard to work in Linux. It works correctly with other software, but not in MilkyTracker for some reason. I'm also having trouble finding any useful information about how to resolve this, as neither the documentation nor Google seem to have any answers that I can find.

The docs (https://milkytracker.titandemo.org/docs/MilkyTracker.html#MIDI) only say
Quote
Enabled by default if available on the system. See the Linux readme for details.

I believe the readme they're referring to is this (https://github.com/milkytracker/MilkyTracker/blob/master/docs/readme_unix), but that only says
Quote
If available, MilkyTracker will detect Alsa and configure itself as a Midi receiver.  You can then link MilkyTracker up to a Midi sender in the normal manner.

I'm assuming the "normal manner" means using aconnect, though maybe they had something else in mind. I'm honestly not sure. Regardless, aconnect does not report MilkyTracker as a midi receiver.

Output of "aconnect -l" is
Code: [Select]
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 16: 'UMC404HD 192k' [type=kernel,card=0]
    0 'UMC404HD 192k MIDI 1'

This is unique to MilkyTracker. If I start any other program which accepts midi input -- for example, SchismTracker -- then the output of "aconnect -l" is
Code: [Select]
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 16: 'UMC404HD 192k' [type=kernel,card=0]
    0 'UMC404HD 192k MIDI 1'
client 128: 'Schism Tracker' [type=user,pid=17979]
    0 'Schism Tracker  '

So far, I've tried changing SDL_AUDIODRIVER to various settings including both "pulseaudio" and "alsa" and it seems to have no effect.

I've also tried searching previous posts on this forum and any other plausible place on the internet I could find, such as the MilkyTracker subreddit. So far, while I've found some questions on MIDI keyboard setup, nothing I've found offers a solution to my problem.

I'm at a complete loss at this point, so I'm hoping someone could please point me in the right direction. I'm new to MilkyTracker and I generally love the experience so far, but using a MIDI keyboard is vitally important for my creative workflow. I really don't want lack of MIDI keyboard support to be what turns me away from this otherwise awesome tracker.
Title: Re: How to use MIDI keyboard with MilkyTracker on Linux?
Post by: izmozero on August 21, 2019, 06:52:01
i knew nothing about this but i learned about it a little on http://tedfelix.com/linux/linux-midi.html and the https://www.systutorials.com/docs/linux/man/1-aconnect/ to answer your post

have you already tried using
aconnect -o
to see milkytrackers port?

but i dunno, it seems like -l is listing everything so maybe that's not your problem

but what i'm hoping is that you actually made a typo and you were running
aconnect -i or that aconnect -l doesn't show output devices
and the schism tracker was showing up as an input midi device (to use as input in another DAW, it seems like this is a feature of schism tracker)

anyway, if you figure out both ports you can then set it up with aconnect
Title: Re: How to use MIDI keyboard with MilkyTracker on Linux?
Post by: supernoob5000 on August 27, 2019, 02:03:10
Thanks for taking the time to research this a bit. In particular, I was greatly helped by the part where you confirmed aconnect-ing the ports is the correct way to do things. That at least narrows the issue to determining why aconnect isn't finding MilkyTracker instead of wondering if there's another way I'm missing.

Unfortunately, your suspicious were correct: aconnect -l does list everything and MilkyTracker still is not recognized by aconnect, even with aconnect -o.

I read both of your links and while they haven't led me to a solution yet, it was still interesting to learn more about the Linux audio systems. That knowledge may come in handy for the eventual solution.

From my side, I haven't had a lot of progress towards fixing this. I'm suspecting either there's something very odd about my audio setup or I've discovered some sort of bug in either aconnect or MilkyTracker. For now, I've gotten a temporary workflow going which involves both OpenMPT and MilkyTracker, which at least gets the job done but isn't really ideal at all.


If it helps anyone, here's my system setup: I'm running Manjaro Linux with nothing special changed from the default audio setup as far as I'm aware. My MIDI input is going in through an audio interface, and that interface is also where the final audio is output to. (Also duplicating this information into the original post for clarity to any new eyes on the post)
Title: Re: How to use MIDI keyboard with MilkyTracker on Linux?
Post by: izmozero on September 05, 2019, 10:13:01
i finally actually went in and played around in linux and google
on my debian system i when i run milkytracker a client  appears in aconnect -l called RtMidi Input Client
and i connected my nanokey to that and it worked

but yours doesn't do that based on your copy and pastes...

one thing you could trying sudo milkytracker

i'm not really a linux person, but i like to mess around sometimes
and i feel like a lot of the people i see in threads don't care what the commands they're running are doing or why
a lot of times it's beyond what i can try to understand, but i still show an appreciation

if actual midi support is a dead end you may try playing with converting the keys to qwerty
https://superuser.com/questions/1170136/translating-midi-input-into-computer-keystrokes-on-linux
since milkytracker already accepts playing notes on the qwerty keyboard
i haven't tried it and the solutions i found in that thread are home-made