Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2007-11-28 1:38:50 am

ColonelKernel
Member
Registered: 2007-11-09
Posts: 14

How do I play a MIDI file?

I was apparently foolish to think I could just click the file in the File Manager and a media player of what ever kind would open and start playing.

I've just started Linux.org's Beginner's Course, but it'll be a while before I learn anything useful, so I'd appreciate some direction.

I will of course except any help I get, but I do not want to have to use the command line at all.  I understand the command line is where the real power is but I have to tell you I honestly don't care.

I don't need to know a single thing about how an automobile engine works to drive a car.  I am content to leave the innards to a reputable, knowledgeable mechanic.  That's how I want to use Linux.

Sorry if this comes across a whining, but I am really getting frustrated with this.  To make matters worse, every help file (when they exist) is written at an intermediate level.  Telling me what size bit to use does me no good if I don't know how to use a drill,

Offline

 

#2 2007-11-28 8:34:50 am

WrightFlyer
Member
Registered: 2007-10-22
Posts: 24

Re: How do I play a MIDI file?

A google for "Linux MIDI sequencer" will probably prove useful. For example it hits:

http://sound.condorow.net/midi.html
http://tldp.org/HOWTO/MIDI-HOWTO-8.html

and others, amongst those:

http://www.rosegardenmusic.com/

looks pretty good!

Cliff

Offline

 

#3 2007-11-28 8:40:23 am

Neil
Moderator
From: Berkshire, England
Registered: 2007-11-25
Posts: 6813
Website

Re: How do I play a MIDI file?

I do not want to have to use the command line at all.  I understand the command line is where the real power is but I have to tell you I honestly don't care.

I don't need to know a single thing about how an automobile engine works to drive a car.  I am content to leave the innards to a reputable, knowledgeable mechanic.  That's how I want to use Linux.

Sure- but, at the moment, you are still in the process of building the car, as you want to install things. I'd be surprised if you could install a midi sequencer withour resorting to terminal at some point in the process, sadly. From the look of it, midi under Linux is not particularly easy: http://www.linuxquestions.org/linux/ans … I_on_Linux.

RoseGarden looks excellent, though, as does the LilyPond annotation engine.

Last edited by Neil (2007-11-28 8:41:05 am)

Offline

 

#4 2007-11-28 11:30:48 am

albkwan
ExtrEmE User
From: Hong Kong
Registered: 2007-11-04
Posts: 1440
Website

Re: How do I play a MIDI file?

There is no hardware MIDI synthesizer in the sound card of the eeepc. So to play MIDI, you'll need to install a software MIDI synthesizer. One easy solution is to install "timidity" (1.7 MB) and "freepats" (34 MB). But they are BIG.

If you know how to edit the config file of Timidity (timidity.cfg), you can set up timidity to use a smaller sf2 soundfont file instead of the Gravis Ultrasound compatible patches from "freepats". e.g. Synthgms.sf2 is only 1 MB.

You may also try to install other software MIDI synthesizers, but I've found those available on the Debian and Xandros repositories have dependencies conflict with Eeepc Linux, so I dare not try.

So, the simple solution is:

1) Add the Xandros Repositories
2) Install "timidity" and "freepats" by either using:

sudo synaptic

OR

sudo apt-get install timidity
sudo apt-get install freepats

If you don't mind typing a few words, apt-get is the more secure way. Synaptic in Eeepc Linux is somehow not very reliable.

How to set the file association is tricky. I haven't figure it out yet. May be someone can help here?

EDIT 2009/5/31: Correct package size of timidity

Last edited by albkwan (2009-05-31 7:41:13 am)


EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

Offline

 

#5 2008-01-06 9:30:49 am

marysmarys
Member
From: Iowa
Registered: 2007-12-26
Posts: 22

Re: How do I play a MIDI file?

Just to clarify...  on this machine, unless we download and install something, a midi file cannot be played?  I know that on Firefox/Mozilla/Netscape we cannot get any background midis playing on a website, but I had hoped that the midi could be downloaded and then heard.  Not a big deal, but probably not something a  Linux newbie would want to deal with on a new toy with a not quite usual Linux distribution.  On the other hand, MP3s seem to be no problem..

Offline

 

#6 2008-01-06 9:32:03 am

Neil
Moderator
From: Berkshire, England
Registered: 2007-11-25
Posts: 6813
Website

Re: How do I play a MIDI file?

Just to clarify...  on this machine, unless we download and install something, a midi file cannot be played?

That's my understanding, yes.

Offline

 

#7 2008-01-06 9:50:11 am

albkwan
ExtrEmE User
From: Hong Kong
Registered: 2007-11-04
Posts: 1440
Website

Re: How do I play a MIDI file?

It's a hardware issue - cheap sound card without MIDI synthesizer.


EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

Offline

 

#8 2008-01-06 10:49:41 am

marysmarys
Member
From: Iowa
Registered: 2007-12-26
Posts: 22

Re: How do I play a MIDI file?

I guess I can't complain.  This little machine has already given me more than I really expected.

Offline

 

#9 2008-01-06 11:26:04 am

Jon Bradbury
Moderator
From: UK
Registered: 2007-09-20
Posts: 2632

Re: How do I play a MIDI file?

How about a driver or kernel module that can use a software synth, so /dev/midi or dev/synthesiser can be used by other applications (like Doom) to play music?

Offline

 

#10 2008-01-06 11:44:28 am

marysmarys
Member
From: Iowa
Registered: 2007-12-26
Posts: 22

Re: How do I play a MIDI file?

You folks all seem to be very familiar with Linux, and I am not!  I played with Red Hat some time ago, but the learning curve was steeper than I cared to deal with. I can, however, follow instructions if someone told me exactly what to do just to be able to hear the occasional midi file.   I'm not sure how much storage space I would want to devote to it however... 17 or 34 MBs?  I think not, unless it could all live on an external drive.

Offline

 

#11 2008-01-06 9:30:07 pm

albkwan
ExtrEmE User
From: Hong Kong
Registered: 2007-11-04
Posts: 1440
Website

Re: How do I play a MIDI file?

If you are really into this. There is a good tutorial here:
http://susewiki.org/index.php?title=Using_MIDI

Bear in mind, mininium you will need is about 20 MB. Also read this thread.


EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

Offline

 

#12 2008-01-07 3:13:02 am

graemeallan
Member
From: Liverpool, UK
Registered: 2007-12-07
Posts: 19

Re: How do I play a MIDI file?

If you have a Creative Soundblaster card in a PC, they have small footprint, good quality General MIDI soundfounts (2, 4 and 8MB) on the installation CD.  I've been using these with Timidity.

Offline

 

#13 2008-01-07 6:09:22 am

albkwan
ExtrEmE User
From: Hong Kong
Registered: 2007-11-04
Posts: 1440
Website

Re: How do I play a MIDI file?

You can also use Synthgms.sf2 (1.03MB) from SynthFont. Just download the program and extract the soundfont file from it. But of course you will need to install a software synthesizer like Timidity to use it to play MIDI.


EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

Offline

 

#14 2008-01-26 8:26:54 am

ProDigit
Senior Member
Registered: 2007-12-26
Posts: 936

Re: How do I play a MIDI file?

I suppose you could plug a external USB soundcard from creative; but I don't know if they're compatible wiht Xandros.

Offline

 

#15 2008-10-12 4:45:32 pm

alfille
New member
Registered: 2008-10-12
Posts: 1

Re: How do I play a MIDI file?

Installing "timidity" and "freepats" works well.

I thought I'd be clever and try a small program like "playmidi" -- but it complains "no /dev/seq". Exactly what you said, the hardware doesn't have midi support.

30MB really isn't that large. If you really don't want the command line, you can do it all in synaptic (except installing and starting synaptic).

Making the association of timidity to .MID in firefox is easy -- the first time you click to play, it asks what program to associate and offers timidity as a choice.

In the FileManager, when you click on the midi file, it'll ask what application to associate -- type "/usr/bin/timidity" -- works like a charm.

Music Manager and Media Player ignore midi files.

Last edited by alfille (2008-10-12 4:46:31 pm)

Offline

 

#16 2009-01-22 3:11:05 pm

lapont
New member
Registered: 2009-01-22
Posts: 1

Re: How do I play a MIDI file?

albkwan wrote:

How to set the file association is tricky. I haven't figure it out yet. May be someone can help here?

Here is a solution that worked on 901 Xandros EasyMode:

In a terminal do:


Code:

cd /usr/share/applications
sudo cp smplayer.desktop timidity.desktop

Edit timidity.desktop with the editor of your choice:

Code:

sudo kwrite timidity.desktop

The two very important lines are the two beginning with 'exec' and 'MimeType'
My timidity.desktop looks like this (I am danish):

Code:

[Desktop Entry]
Categories=AudioVideo;Player;Video;Qt;KDE
Comment=A great MIDIPLAYER
Encoding=UTF-8
Exec=timidity -ia %f
GenericName=A great MIDIPlayer
Icon=smplayer
MimeType=audio/x-midi
Name=Timidity
Type=Application
Name[da]=Timidity
Comment[da]=A great MIDIPlayer
GenericName[da]=A great MIDIPlayer

Save the file and timidity will start when you click a midi-file in the filemanager (I do not remember if a reboot was needed).

Offline

 

#17 2009-04-26 3:31:06 pm

amiga2u
New member
Registered: 2009-04-26
Posts: 1

Re: How do I play a MIDI file?

On Xandros EeePC you should install a sound Driver with MIDI capability:
ALSA
With synaptic or in command-line :
    sudo apt-get install alsa-base
    sudo apt-get install alsa-utils
You can now load and use timidity (MIDI player) + freepats (the MIDI sound base)
    timidity     /home/user/fichier.mid
I suggere you load lmms too, it's like garageband

Better MIDI sound base in :
    http://gentoo.mirrors.pair.com/distfile … ull.tar.gz

Offline

 

#18 2009-05-31 8:05:08 am

albkwan
ExtrEmE User
From: Hong Kong
Registered: 2007-11-04
Posts: 1440
Website

Re: How do I play a MIDI file?

Looking at this old thread again, I found that a few steps are missing in the instructions above:

1) You should need to load alsa MIDI sequencer kernel module so that timidity can output sound to alsa:

Code:

sudo modprobe snd-seq-midi

Alternatively, you can modify /etc/modules to load it at startup:

Code:

sudo bash
echo snd-seq-midi >> /etc/modules

2) You can use a soundfont file (sf2) with timidity instead of the huge 32MB freepats. A decent one is 5MBGMGS.sf2. Then timidity + 5MB soundfont will just take up 6.7MB of our precious disk space.

To set up timidity to work with soundfont, edit /etc/timidity/timidity.cfg as root

Code:

sudo kwrite /etc/timidity/timidity.cfg

Comment out the line "source /etc/timidity/freepats.cfg" and add this new line:

Code:

#source /etc/timidity/freepats.cfg
soundfont [Path to]/5MBGMGS.sf2

BTW, I have also uncomment the section for moderate CPU.

3) You can run timidity with a GUI interface with this command:

Code:

timidity -iatv ABC.mid

http://wiki.eeeuser.com/_media/howto:timidity-gui.png

4) This is the kde desktop shortcut file (/usr/share/applications/timidity.desktop) I have been using to set file association in File Manger to play MIDI files with timidity-gui:

Code:

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=timidity-gui
GenericName=timidity MIDI player GUI
Exec=timidity -iatv %f
Comment=timidity MIDI player GUI
Icon=amarok
MimeType=audio/x-midi
Categories=Qt;KDE;AudioVideo;Player;

P.S. An alternative to playing MIDI with timidity is fluidsynth. I have just explored this but my conclusion is timidity is better. For those who are interested, you can read my recent blog.

Last edited by albkwan (2009-05-31 8:41:59 am)


EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson