LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-20-2007, 11:54 AM   #1
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current & "True Multilib." PC-BSD.
Posts: 2,230

Rep: Reputation: 176Reputation: 176
Midi files


In both Slackware 11 and 12, I have not been able to play midi files. KDE installs a midi player. I've fired it up, picked a midi file and the player goes through all the motions of playing the file, but there is no sound.
Other than midi files the sound card works perfectly and I've installed Timidity, but no joy. Is there a "switch" somewhere I need to throw?
Thank you.
 
Old 08-20-2007, 12:29 PM   #2
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
If it looks like it's playing, then everything else should be ok but you either have muted the midi device, or you are using the wrong midi device (it could be using a dummy sound device, for example). If you're using ALSA, check alsamixer and make sure there are levels high enough (and unmuted), and if that doesn't help, see what device your player is using.
 
Old 08-20-2007, 02:43 PM   #3
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),Suse 13.1 (Desktop),, Mepis on the wifes lappy
Posts: 767

Rep: Reputation: 92
You might like to try this:-


Add the following to your /etc/rc.d/rc.local file:


Code:
modprobe snd-seq-midi
timidity -iA -B2,8 -Os -EFreverb=0 &
Good luck
 
Old 08-20-2007, 02:56 PM   #4
GregLee
Member
 
Registered: Feb 2004
Location: Waimanalo, HI
Distribution: Slackware 10, Fedora 6
Posts: 308

Rep: Reputation: 30
Maybe you don't have patches. Midi files have notes, but no sounds. Timidity and other midi players are often installed together with the "freepats" patch set, but there are other patch sets around, and you can also use Soundfonts. If you don't know whether you have patches, "locate timidity.cfg" and look in that file with an editor for a list of files with patches (if you have them).
 
Old 08-20-2007, 07:48 PM   #5
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware 14.1 64-bit with multilib
Posts: 2,074

Rep: Reputation: 199Reputation: 199
Audacious is in Slackware 12 and it has midi plugins (timidity), still doesn't work. I gave up on midi a long time ago. Its just something that never worked for me under Linux, but at the same time it wasn't crucial at all. *shrug*
 
Old 08-20-2007, 08:54 PM   #6
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,616

Rep: Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415
I hope this isn't considered spamming but...

If you go to the "how to properly set up Slackware Linux" link in my sig, you will find detailed instructions on getting MIDI to work.
 
Old 08-25-2007, 01:08 PM   #7
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current & "True Multilib." PC-BSD.
Posts: 2,230

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by vdemuth View Post
You might like to try this:-
Add the following to your /etc/rc.d/rc.local file:
Code:
modprobe snd-seq-midi
timidity -iA -B2,8 -Os -EFreverb=0 &
Good luck
Thank you. I tried that and get the message on boot up that,

"cannot execute binary file."

I've checked permissions, etc., and it is marked as executable. Any ideas why it won't execute?
Many Thanks.
 
Old 08-25-2007, 02:48 PM   #8
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 111Reputation: 111
Binary is for the wrong architecture? You can run "file" on the binary and see if what it identifies is what you expect.
 
Old 08-25-2007, 02:58 PM   #9
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current & "True Multilib." PC-BSD.
Posts: 2,230

Original Poster
Rep: Reputation: 176Reputation: 176
When I ran "file" on the binary it reported,

"ELF 64-bit LSB executable, x86-64, version 1 ( SYSV), dynamically linked (uses shared libs), stripped"

?
Thanks.
 
Old 08-25-2007, 04:35 PM   #10
MannyNix
Member
 
Registered: Dec 2005
Location: ~
Distribution: Slackware -current, OpenBSD
Posts: 449

Rep: Reputation: 41
Hi, lately i installed prboom on my laptop and i couldn't get the music to play following the directions from the prboom homepage
Quote:
Music
The SDL_mixer library used by PrBoom supports software MIDI music synthesis. If you want to hear the Doom music, you need a set of Timidity instrument patches. Get the timidity.tar.gz from the bottom of the SDL_mixer page, and extract in /usr/local/lib. You may need to symlink /usr/local/lib/timidity/timidity.cfg to /etc/timidity — see the console output from PrBoom to see where it is looking for this file.
But then i came across AlienBob's timidity SlackBuild
Problem solved for me
I'm not sure why it's not on Slackbuilds.org, i guess i'll ask on irc
 
Old 08-25-2007, 06:09 PM   #11
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,223

Rep: Reputation: Disabled
Quote:
Originally Posted by mannyslack View Post
But then i came across AlienBob's timidity SlackBuild
Problem solved for me
I'm not sure why it's not on Slackbuilds.org, i guess i'll ask on irc
I don't post nor host my own stuff on SlackBuilds.org. I am an admin of SBo and scrutinize the submissions, but I keep my own stuff in my own repository. My SlackBuild scripts do things different than the scripts on SBo in many ways. At SlackBuilds.org we have the goal to keep the SlackBuild scripts as simple as possible.

Eric
 
Old 08-25-2007, 06:42 PM   #12
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current & "True Multilib." PC-BSD.
Posts: 2,230

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by cwizardone View Post
When I ran "file" on the binary it reported,

"ELF 64-bit LSB executable, x86-64, version 1 ( SYSV), dynamically linked (uses shared libs), stripped"

?
Thanks.
Well the answer was obvious and I downloaded a 32bit version and installed it. It fires up, but midi still doesn't play.... oh, well.......
 
Old 08-25-2007, 09:11 PM   #13
scott-k
LQ Newbie
 
Registered: May 2007
Location: Canada
Distribution: Slackware
Posts: 1

Rep: Reputation: 0
I had the same problem with an Audigy 4 under Slackware 12. Midi files would appear to play, but no sound was produced... Installing the soundfont fixed the issue.

1. Download and install the awesfx package
2. Copy the soundfont from your Creative CD into /usr/share/sounds/sf2
3. Load the sound font:

# asfxload /usr/share/sounds/sf2/CT8MGM.SF2

4. Find an open port for playing midi:

$ aplaymidi -l
Port Client name Port name
14:0 Midi Through Midi Through Port-0
16:0 Audigy 4 [SB0610] Audigy MPU-401 (UART)
16:32 Audigy 4 [SB0610] Audigy MPU-401 #2
17:0 Emu10k1 WaveTable Emu10k1 Port 0
17:1 Emu10k1 WaveTable Emu10k1 Port 1
17:2 Emu10k1 WaveTable Emu10k1 Port 2
17:3 Emu10k1 WaveTable Emu10k1 Port 3

5. Play your midi file:

$ aplaymidi --port=17:0 pachebel.midi


If it works through aplaymidi, just configure timidity to use the sound font. Here's my /usr/local/share/timidity/timidity.cfg file:

opt -EFresamp=l
opt -EFreverb=G,32 # Set reverb level with a number(0-127)
dir /usr/share/sounds/sf2
soundfont CT8MGM.SF2 order=0


This only works if your card uses soundfonts though... Check out the Gentoo Linux ALSA Guide - I know, it's a Gentoo doc, but it has some really good info on midi and alsa in general.


SK
 
Old 08-26-2007, 10:37 AM   #14
GregLee
Member
 
Registered: Feb 2004
Location: Waimanalo, HI
Distribution: Slackware 10, Fedora 6
Posts: 308

Rep: Reputation: 30
Quote:
Originally Posted by scott-k View Post
Here's my /usr/local/share/timidity/timidity.cfg file:

opt -EFresamp=l
opt -EFreverb=G,32 # Set reverb level with a number(0-127)
dir /usr/share/sounds/sf2
soundfont CT8MGM.SF2 order=0


This only works if your card uses soundfonts though...
When you use timidity, your card never sees the Soundfont or any midi commands, so all the card has to be able to do is reproduce pcm audio.
 
Old 09-03-2007, 10:19 AM   #15
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,616

Rep: Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415Reputation: 1415
Okay, people, here's a one-stop solution for getting MIDI to work:

http://www.vcn.bc.ca/~dugan/timidity/

It's a TiMidity++ SlackBuild that also installs eawpats and adds a TiMidity script to rc.d. Afterwards, you will have a working MIDI port at 128:0. You will also be able to use TiMidity to play MIDI files directly, and hear music in games that use the TiMidity libraries (such as prBoom and Exult).

I've tested it on a fresh full install of Slackware 12.

Last edited by dugan; 09-03-2007 at 10:30 AM.
 
  


Reply

Tags
midi


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot play MIDI files! koolgentoo Linux - Hardware 2 07-24-2005 07:26 AM
How to play MIDI files: needed a MIDI mapper? vharishankar Linux - General 3 12-30-2004 12:12 AM
midi files Mark_Grieveson Linux - Newbie 5 11-05-2004 06:25 PM
Reading midi files. gbowden Programming 2 08-07-2004 02:42 PM
Playing MIDI files rajan_kanwar Linux - Software 1 02-05-2004 04:46 AM


All times are GMT -5. The time now is 04:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration