Project

General

Profile

How-to: MIDI playback

Added by Pat Kelly almost 10 years ago

I am trying to be an ordinary user of Audacious, and need a little help. As I looked around I see that this seems to be mostly for developers and I am sorry that I created an account just to ask the question below. If my starting an account was inappropriate please just delete it.

I am running Fedora 19 linux and I loaded Audacious from the Fedora repository. I just have some MIDI files I want to play. When I load a MIDI file I get the error "You have not selected any sequencer ports for MIDI playback. You can do so in the MIDI plugin preferences." I have looked around in the menus and can not find anthing like that. Can someone please tell me where and how to do this so I can play my MIDI files?

Thanks in advance for your help.


Replies (21)

RE: midi plugin - Added by John Lindgren almost 10 years ago

There's absolutely nothing wrong with asking for help, and this is the right place to do it. :)

The MIDI plugin requires some configuration before it will work. To get to the settings for it, go to File menu -> Preferences -> Plugins page -> Input tab. Select "AMIDI-Plug (MIDI Player)" in the list of plugins and click on the Preferences button at the bottom.

This will bring up a new window. Select FluidSynth in the backend list.

Now go to the FluidSynth tab on the left. There will be a list (probably empty) of SoundFont files. You can use whatever SoundFont you like, but I recommend that you install the fluid-soundfont-gm package (Debian and Fedora both provide it) and add /usr/share/soundfonts/FluidR3_GM.sf2 to the list (click on the "+" button on the right to get a file browser window).

Then you should be good to go!

RE: How-to: MIDI playback - Added by John Lindgren almost 10 years ago

Making this post sticky since others have had trouble with setting up MIDI playback in the past.

RE: How-to: MIDI playback - Added by Pat Kelly almost 10 years ago

Thanks for the help. I really appreciate it. If I may I need a bit more help. I got the sound font set up as you showed. The positive result is that I don't get an error message any more and when I click the Play button The bar at the top shows The play time. Also the song title along with a disk and music note icon appears in the black bar at the bottom of the window.

The music doesn't play, the progress bar at the top doesn't move, and the play time stays at zero. When I click the Stop button everything seems frozen and I have to force a quit. I've tried several different MIDI files with the same result.

To gather a little data that might help troubleshooting, I added some songs to the play list without clicking the Play and looked at the Song Info. Some are Type 0 and some are Type 1. The lengths range from about 2 minutes to about 4 minutes. The number of tracks range from 1 to 27. The BPM range is from 100 to 159 with one Variable with wavg=75. The Time Div ranges from 96 to 480. None of the songs I tried will play. I believe they should be okay because they used to play okay in my Windows system before I switched to linux.

Any help you can provide will be appreciated.

RE: How-to: MIDI playback - Added by John Lindgren almost 10 years ago

Run Audacious in GDB ("gdb audacious" in a terminal and then "run" at the (gdb) prompt). Try to play a MIDI file. When it hangs, switch back to the terminal window, press Ctrl-Z to interrupt Audacious, the type "thread apply all bt" and post the output here.

RE: How-to: MIDI playback - Added by Pat Kelly almost 10 years ago

When it first started:

"(gdb) run
Starting program: /usr/bin/audacious
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
WARNING: Audacious seems to be already running but is not responding.
[New Thread 0xb7c8fb40 (LWP 3083)]
[New Thread 0xb72c2b40 (LWP 3084)]
[New Thread 0xb6ac1b40 (LWP 3085)]
[New Thread 0xb62c0b40 (LWP 3086)]
[New Thread 0xb5abfb40 (LWP 3087)]
[New Thread 0xaf9e7b40 (LWP 3089)]
[New Thread 0xaf1e6b40 (LWP 3090)]
[Thread 0xaf1e6b40 (LWP 3090) exited]
[Thread 0xaf1e6b40 (LWP 3197) exited]"

Then when I clicked play:

"[New Thread 0xaf1e6b40 (LWP 3202)]
[New Thread 0xae489b40 (LWP 3203)]
ERR: bio2jack.c::JACK_Error(967) Cannot connect to server socket err = No such file or directory
ERR: bio2jack.c::JACK_Error(967) Cannot connect to server request channel
ERR: bio2jack.c::JACK_Error(967) jack server is not running or cannot be started
[Thread 0xae489b40 (LWP 3203) exited]
[New Thread 0xae489b40 (LWP 3204)]
ERR: bio2jack.c::JACK_Error(967) Cannot connect to server socket err = No such file or directory
ERR: bio2jack.c::JACK_Error(967) Cannot connect to server request channel
ERR: bio2jack.c::JACK_Error(967) jack server is not running or cannot be started
ERR: bio2jack.c::JACK_OpenDevice(1019) jack server not running?
[Thread 0xae489b40 (LWP 3204) exited]
fluidsynth: warning: Failed to pin the sample data to RAM; swapping is possible.
fluidsynth: warning: Failed to pin the sample data to RAM; swapping is possible.
[New Thread 0xaf9e7b40 (LWP 3205)]"

Then Ctrl-Z:

"^Z
Program received signal SIGTSTP, Stopped (user).
0xb7fff424 in __kernel_vsyscall ()
(gdb) "

I hope I captured what you wanted.

Thanks for your continuing help.

RE: How-to: MIDI playback - Added by Michael Schwendt almost 10 years ago

Did you intentionally turn on the "JACK" output plugin in the Audio Preferences? In case you don't know what it does, switch back to Pulse Audio output, which is the default for Fedora.

Btw, I've just verified that John's instructions from above work with Fedora 19.

RE: How-to: MIDI playback - Added by Pat Kelly almost 10 years ago

I switched the preference from Jack to Pulse and then in a terminal window:

"(gdb) run
Starting program: /usr/bin/audacious
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
WARNING: Audacious seems to be already running but is not responding.
[New Thread 0xb7c8fb40 (LWP 3720)]
[New Thread 0xb72c2b40 (LWP 3721)]
[New Thread 0xb2ac0b40 (LWP 3722)]
[Thread 0xb2ac0b40 (LWP 3722) exited]
[New Thread 0xb2ac0b40 (LWP 3723)]
[Thread 0xb2ac0b40 (LWP 3723) exited]
[New Thread 0xb2ac0b40 (LWP 3724)]
[New Thread 0xb6ac1b40 (LWP 3725)]
[New Thread 0xb62c0b40 (LWP 3726)]
[New Thread 0xb4553b40 (LWP 3728)]
[New Thread 0xb3d52b40 (LWP 3729)]
[Thread 0xb4553b40 (LWP 3728) exited]
[Thread 0xb3d52b40 (LWP 3729) exited]"

Then I clicked play:

"[New Thread 0xb3d52b40 (LWP 3731)]
[New Thread 0xb4553b40 (LWP 3732)]
fluidsynth: warning: Failed to pin the sample data to RAM; swapping is possible.
fluidsynth: warning: Failed to pin the sample data to RAM; swapping is possible.
[New Thread 0x9eeffb40 (LWP 3733)]"

The icon with the name of the song appeared at the left of the lower black area and something that looks like it might be a sound level meter appeared at the right of the black area, but the play progress indicator at the top does not move and there is no sound.

Then I clicked the stop button:

At this point Audacious is frozen. The stop button remains grey and will not respond to any other clicks. There is no further data in the terminal window.

Then I clicked the close window "X" in the upper right of the Audacious window. to terminate the application. After a few seconds the Force quit option appears and I select that option. THe following is the output in the terminal window:

"[Thread 0xb4553b40 (LWP 3732) exited]
[Thread 0xb3d52b40 (LWP 3731) exited]
[Thread 0xb62c0b40 (LWP 3726) exited]
[Thread 0xb6ac1b40 (LWP 3725) exited]
[Thread 0xb2ac0b40 (LWP 3724) exited]
[Thread 0xb72c2b40 (LWP 3721) exited]
[Thread 0xb7c8fb40 (LWP 3720) exited]
[Thread 0xb7fd3880 (LWP 3716) exited]

Program terminated with signal SIGKILL, Killed.
The program no longer exists.
(gdb)"

I just tried Audacity to play a WAV file. The options seem to be ALSA or Jack. When set to ALSA it will not play, but when set to Jack is does play. Does this shed any light on the situation?

Thank you for your continuing help.

RE: How-to: MIDI playback - Added by Michael Schwendt almost 10 years ago

Well, it seems your problems are not specific to MIDI files, or why else would you mention Audacity and a WAV file? Audacity uses a completely different audio output system (likely still the PortAudio library). And Pulse Audio provides means to intercept ALSA output, but if no Pulse Audio system is installed and running, you can't use it. In that case, ALSA output would be the more low-level output system.

In your earlier posts I see no mention of whether Audacious works for you at all. Can you play the WAV files in Audacious and with which output plugin then?

You've mentioned Fedora 19, but which spin of it? Which desktop environment? GNOME Shell or KDE? Or even a different one?

And where are the details about JACK? Are you familiar with it? Have you installed and enabled it yourself? Have you installed the separate audacious-plugins-jack package intentionally because you want to use JACK? Or have you installed everything you could find, perhaps using wildcards or following dubious instructions on some web page? If you don't use JACK, you don't need to install the audacious-plugins-jack package.

RE: How-to: MIDI playback - Added by Pat Kelly almost 10 years ago

I am running the Gnome desktop. I installed Jack back when I was trying on my own to get something to play my MIDI files. I don't know anything about it. In the prior post, when Jack was called into question, I used the Software application to see what Jack modules I had installed. The only Jack module I have is "The Jack Audio Connection Kit". When I searched for Jack in the Software application I also found "LASH Audio Session Handler" I think this one got installed because something else installed wanted it.

I installed Audacity because I sometimes need to edit WAV files. The Audacity Preferences under Device say it's using ALSA and PortAudio V19-devel. I hadn't discovered that Audacious would play WAVs yet. I just tried to play some WAVs in Audacious and they work fine. In the Audacious Preferences under Input WavPack Decoder is checked.

I just searched for Pulse in the Software application and these are the items I found installed:

Alsa to PulseAudio backend
Audacity
Shared libraries for GSM speech compressor
Pulse-VCO Anti-aliased pulse and sawtooth oscillators
Libxmp
PulseAudio
PulseAudio GDM integration
Libraries for PulseAudio clients
GLIB 2.x bindings for PulseAudio clients
Bluetooth support for the PulseAudio sound server
X11 support for the PulseAudio sound server
PulseAudio sound server utilities
Library for echo cancellation
Multi-format module playback plugin for Audacious using libxmp

Thanks again for your continuing help I really appreciate it.

RE: How-to: MIDI playback - Added by Pat Kelly almost 10 years ago

Well, this is really strange, but after I played the WAVs, I decided to try the MIDIs again. I opened a MIDI and it Played! A big surprise to be sure, but none the less welcome. Just to see if it was a fluke, I quit Audacious, restarted it and set up a play list with MIDI files and they all work now. Any ideas why? I think I'll reboot and see if it still works after that.

Again Thanks for bearing with me.

RE: How-to: MIDI playback - Added by Pat Kelly almost 10 years ago

I just rebooted and MIDIs are still playing fine, but it's a real mystery to me why.

RE: How-to: MIDI playback - Added by Michael Schwendt almost 10 years ago

WavPack is something different, you don't need it for playing WAV files. See http://www.wavpack.com/

RE: How-to: MIDI playback - Added by Daniel Bedrenko over 9 years ago

In v3.5.2 the AMIDI settings window has a lot less options than what is shown in the original thread (see attached screenshot). Is it just me? Is there another way to set the options which I'm missing?

RE: How-to: MIDI playback - Added by John Lindgren over 9 years ago

Which of the removed options are you trying to change, and why? I am sure you are aware that the ALSA "back end" was removed in Audacious 3.5, as stated in the release notes, so obviously the ALSA-specific options have been removed. Furthermore, there is no need to select a back end since FluidSynth is now the only one available. The three "advanced settings" (reading length, comments, and lyrics from MIDI files) are all enabled now and cannot be disabled, since they are useful features and do no harm even if you do not need them. The only other option was "load soundfont on player start"; it was removed simply because it has not worked for a long time (since Audacious 2-dot-something).

RE: How-to: MIDI playback - Added by Daniel Bedrenko over 9 years ago

Excuse for not replying; I didn't receive an email despite "Watch"ing this topic.

Some of my MIDI files play too quietly and I was hoping to find in the settings something that would enable behaviour like Replay Gain. If I increase the "Gain" setting from the default "0.2" the sound is distorted. Oh well, I've learnt to live with it. Maybe the solution is to edit the quiet MIDI files to make them louder.

Anyway, thanks for the answer :)

RE: How-to: MIDI playback - Added by cam d over 9 years ago

D B wrote:

Excuse for not replying; I didn't receive an email despite "Watch"ing this topic.

Some of my MIDI files play too quietly and I was hoping to find in the settings something that would enable behaviour like Replay Gain. If I increase the "Gain" setting from the default "0.2" the sound is distorted. Oh well, I've learnt to live with it. Maybe the solution is to edit the quiet MIDI files to make them louder.

Anyway, thanks for the answer :)

Hi ! I'm sad, not because ALSA back end was removed, but because now, i can't play my Midi files on my Yamaha piano...
The possibilty select the output midi device was removed too... :(

Any hope about this regress ??

RE: How-to: MIDI playback - Added by John Lindgren over 9 years ago

For hardware MIDI playback I'd recommend Rosegarden (or aplaymidi if you're command-line savvy).

RE: How-to: MIDI playback - Added by cam d over 9 years ago

yes I know, but I preferred to use audacious... This is a regression ... :-/

RE: How-to: MIDI playback - Added by Nils Altenbach almost 9 years ago

Can Audacious play MIDI files on an actual synthesizer connected via MIDI? I've got a Yamaha CS1x which can be switched into XG mode, which is a proprietary Yamaha extension of the General MIDI standard, with which it is fully backwards compatible. I've used it to play MIDI files before, just not via Audacious.

RE: How-to: MIDI playback - Added by John Lindgren almost 9 years ago

Older versions (3.4.x or earlier) could play to hardware MIDI. In newer versions, it is not supported.

RE: How-to: MIDI playback - Added by Nils Altenbach almost 9 years ago

That's good, since my Linux distro (Ubuntu Trusty) still uses 3.4.3 - it should be possible to write an output plugin for hardware MIDI, right?

    (1-21/21)