You are not logged in.

#1 2020-10-19 23:18:04

Sourav
Member
From: India
Registered: 2019-04-22
Posts: 84
Website

[Solved] MIDI file plays but no sound

I had no idea about MIDI and thought audacious will play a downloaded MIDI file automatically for me. Sadly it doesn't.

I tried aplaymidi:

$ aplaymidi -l
 Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0

$ aplaymidi -p 14:0 ~/Downloads/teddybear.mid 

I also tried timidity++:

timidity ~/Downloads/teddybear.mid 
Requested buffer size 32768, fragment size 8192
ALSA pcm 'default' set buffer size 32768, period size 8192 bytes
Playing /home/sourav/Downloads/teddybear.mid
MIDI file: /home/sourav/Downloads/teddybear.mid
Format: 1  Tracks: 4  Divisions: 192
Track name: Piano
Track name: Base
No instrument mapped to tone bank 0, program 1 - this instrument will not be heard
No pre-resampling cache hit
Last 6 MIDI events are ignored
Playing time: ~155 seconds
Notes cut: 0
Notes lost totally: 0

I am using:

pulseaudio 13.99.2-13-g7f4d7
Linux 5.9.1

Sound Card Details:

$ lspci -v | grep Audio
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)

$ cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xd1028000 irq 126

I tried running QJackCtl as  sudo and configured to use the "default" soundcard, which runs fine, but I get no sound as before.

In alsamixer, every soundcard's master is set to maximum volume.

How do I play midi? I initially had problems playing a game's sound in WINE that has a midi soundtrack.

Last edited by Sourav (2020-10-20 00:16:38)

Offline

#2 2020-10-19 23:41:49

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 636

Re: [Solved] MIDI file plays but no sound

Wiki wrote:

Without going into the details of what the format is composed of, you just need to understand that a MIDI file eg. foobar.mid does not contain any digital audio data, hence no "PCM stream". It is a common misconception that MIDI is a sound file format, and as such you usually see people complaining that music players like Amarok cannot play the file.

Offline

#3 2020-10-19 23:51:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,365

Re: [Solved] MIDI file plays but no sound

MIDIs don't contain audio, but notes played by a specific instruments and timestamps when said instrument should play, you need something that has the instruments audio and something that converts the notes and instruments and timestamps into something audible.

So you need a soundfont and then use one of these clients to play them.

For integration with pulse I'd recommend you use fluidsynth install one of the soundfonts with the config mentioned at the end https://wiki.archlinux.org/index.php/Fl … PulseAudio

Either use the standalone player or start the service with

systemctl --user start fluidsynth

if that's setup correctly aplaymidi should play it properly.

Offline

#4 2020-10-19 23:57:55

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 636

Re: [Solved] MIDI file plays but no sound

Yup, I didn't make the connection with timidity. My bad.

https://wiki.archlinux.org/index.php/Timidity%2B%2B

Offline

#5 2020-10-20 00:16:14

Sourav
Member
From: India
Registered: 2019-04-22
Posts: 84
Website

Re: [Solved] MIDI file plays but no sound

V1del wrote:

MIDIs don't contain audio, but notes played by a specific instruments and timestamps when said instrument should play, you need something that has the instruments audio and something that converts the notes and instruments and timestamps into something audible.

So you need a soundfont and then use one of these clients to play them.

For integration with pulse I'd recommend you use fluidsynth install one of the soundfonts with the config mentioned at the end https://wiki.archlinux.org/index.php/Fl … PulseAudio

Either use the standalone player or start the service with

systemctl --user start fluidsynth

if that's setup correctly aplaymidi should play it properly.


Thanks got it working!

Offline

Board footer

Powered by FluxBB