You are not logged in.

#1 2022-02-12 00:18:22

amca01
Member
Registered: 2008-12-28
Posts: 59

MIDI files: timidity errors

Hello,

I have carefully read through the https://wiki.archlinux.org/title/Timidity++ and the https://wiki.archlinux.org/title/MIDI pages, and as far as I can tell I've done everything I should.  Sound is working (I can play mp3 files using the mpg123 player); I've added myself to the audio group; ensured that the timidity config file points to an existing soundfont, and started timidity,service as a user service.  But I still can't play midi files, the command

timidity midifile.midi

produces the error message:

jack_client_new: deprecated
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Couldn't open output device

I'm very confused about this: I have no idea what jack client or server are doing here; I do seem to have jack2 installed - but why is timidity trying to use it?  The only uncommented line in my timidty.cfg file is the soundfont line.

I have problems with sound at the best of times, but I'd really like to be able to play midi files.  I don't even need the best and most accurate soundfont; I just need to listen to them to check some of my music work for errors.  I can do all of this in Windows 10 (perish the thought!) out of the box as it were, but linux is never easy for sound; at least not for me.

I've tried installing audacious, but I've run into a "corrupted package (PGP signature)", which I'll aim to fix.

But surely timidity should play without errors - and without jack?  Many thanks for any advice!

Offline

#2 2022-02-12 11:19:08

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,281

Re: MIDI files: timidity errors

https://wiki.archlinux.org/title/Timidity++#Play_files wrote:

There are two ways to use TiMidity++. Either as MIDI player or as daemon adding MIDI support to ALSA.

timidity.service

[Unit]
Description=TiMidity++ Daemon
After=sound.target

[Service]
ExecStart=/usr/bin/timidity -iA

[Install]
WantedBy=multi-user.target

the service starts timidity as a daemon, and requires configuring .

If my memory is correct you can't combine those 2 modes.

I suggest you stop & disable the timidity.service , then relogin (or reboot) .

Does using timidity as a standalone player work now ?

You could also try to start the daemon manually and setup a virtual midi device .
(which gives higher quality output then standalone in my experience )


Edit:

on my pure alsa system timidity plays fine, despite jack being installed.
(I only have libpulse installed, no other parts of pulseaudio or pipewire) .

Last edited by Lone_Wolf (2022-02-12 11:50:17)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2022-02-12 12:57:54

amca01
Member
Registered: 2008-12-28
Posts: 59

Re: MIDI files: timidity errors

Thank you very much for your expert answer!  In fact I cobbled together a method using JACK, configured with Cadence, that in fact works fine.  But the mixture of alsa, pulseaudio, JACK, seems overly complicated.  I think your way seems much more elegant.  I also seem to have two different timidity.service files.

/etc/systemd/user/timidity.service:

[Unit]
Description=TiMidity++ Daemon
After=sound.target

[Service]
ExecStart=/usr/bin/timidity -iA -Os

[Install]
WantedBy=default.target

/usr/lib/systemd/user/timidity.service:

[Unit]
Description=TiMidity++ Daemon
After=pulseaudio.service

[Service]
Type=Simple
ExecStart=/usr/bin/timidity -iA -Os

[Install]
WantedBy=pulseaudio.service

The service that is loaded is actually in /etc/xdg/systemd/user/timidity.service, but this is the same as the first version above, which doesn't use pulseaudio. 

I do find the workings of alsa, pulseaudio, JACK etc, tricky.  Configuring sound reminds me of the good ol' days of carefully configuring the /etc/X11/XF86Config file.  Now display is pretty much trivial - all you have to do is switch the machine on.  But sound still seems (at least to me) to need a lot more work to get going.

Anyway - thank you very much again!

Offline

Board footer

Powered by FluxBB