Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Howto: Easy MIDI

  1. #1
    Join Date
    Dec 2004
    Location
    Santiago, Chile
    Beans
    311
    Distro
    Ubuntu Breezy 5.10

    Howto: Easy MIDI

    I was trying to play scummvm with alsa, and I coudlnt get it to play midis.. So I did a Little research, and found this. He did an excellent job at adding midi in hoary, so this is kind of a translation and a bit of fix.
    1. Install timidity & pmidi:
      Code:
      sudo apt-get install timidity pmidi
    2. Code:
      sudo gedit /etc/modules
      and add the following lines:
      Code:
      snd-seq-device
      snd-seq-midi
      snd-seq-oss
      snd-seq-midi-event
      snd-seq
    3. Download the Unison Soundfont:
      Code:
      wget ftp://ftp.personalcopy.net/pub/Unison.sf2.gz
    4. Extract it to /etc/sounds:
      Code:
      sudo mkdir /etc/sounds/
      tar -xzf Unison.sf2.gz
      mv Unison.SF2 Unison.sf2
      sudo mv Unison.sf2 /etc/sounds/
    5. Code:
      sudo gedit /etc/timidity/timidity.cfg
      It should look like this (No more, no less):
      Code:
      soundfont /etc/sounds/Unison.sf2
    6. Code:
      sudo gedit /etc/init.d/timidity
      variable TIM_ALSASEQPARAMS (variable 22 I think), should look like this:
      Code:
      TIM_ALSASEQPARAMS="-iA -B2,8 -Os1l -s 44100"
    7. Code:
      sudo gedit /etc/default/timidity
      Uncomment the two TIM variables. It should look like this:
      Code:
      # Defaults for TiMidity++ scripts
      # sourced by /etc/init.d/timidity
      # installed at /etc/default/timidity by the maintainer scripts
      # $Id: timidity.default,v 1.3 2004/08/07 14:33:26 hmh Exp $
      
      #
      # This is a POSIX shell fragment
      #
      
      # Enable MIDI sequencer (ALSA), default is disabled
      TIM_ALSASEQ=true
      
      # Setting overrides (of /etc/timidity.conf) for the ALSA sequencer daemon
      TIM_ALSASEQPARAMS="-iA -B2,8 -Os1l -s 44100"
    8. Code:
      gedit ~/.bashrc
      Add the following line (A good idea is to add it after line 9):
      Code:
      export ALSA_OUTPUT_PORTS="128:0"
    9. Done! Now you can play midis with pmidi. Like this:
      Code:
      pmidi Song.mid
      If it doesnt work, reboot (just to be sure... Damn windows tick!)


    Bonus: SCUMMVM
    Now you can play scumm vm through alsa! Just follow these steps:
    1. Code:
      gedit ~/.bashrc
      Add the following line (Again, after line 9 is a good idea):
      Code:
      export SCUMMVM_PORT=128:0
    2. (If you want to create a launcher)
      Code:
      gedit ~/.gnomerc
      Add the folowing lines:
      Code:
      export ALSA_OUTPUT_PORTS="128:0"
      export SCUMMVM_PORT=128:0
    3. In scummvm, go to options, audio, music driver: ALSA


    Good luck.

    PD: Thanks to:

    Note: I think Ubuntu should have MIDI support by default
    Last edited by RastaMahata; August 22nd, 2005 at 01:52 AM.

  2. #2
    Join Date
    Aug 2005
    Beans
    8

    Re: Howto: Easy MIDI

    Wow, worked perfectly I like your choice of soundfont, could you tell me why you use it? Reboot was required. Just wondering if you know of any command that I can use with pmidi or timidity that would save a midi as a .wav file.

  3. #3
    Join Date
    Jun 2005
    Beans
    504

    Re: Howto: Easy MIDI

    Quote Originally Posted by deaderthanyou
    Wow, worked perfectly I like your choice of soundfont, could you tell me why you use it? Reboot was required. Just wondering if you know of any command that I can use with pmidi or timidity that would save a midi as a .wav file.
    I have an audigy2 zs sound card, surely I can use it's rom stored soundfonts?

  4. #4
    Join Date
    Jun 2005
    Beans
    504

    Re: Howto: Easy MIDI

    Quote Originally Posted by gammyhand
    I have an audigy2 zs sound card, surely I can use it's rom stored soundfonts?
    I get these errors when trying to run the tar command:

    ralph@ralph:~$ tar -xzf Unison.sf2.gz
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Archive contains obsolescent base-64 headers
    tar: Error exit delayed from previous errors

  5. #5
    Join Date
    Dec 2004
    Location
    Santiago, Chile
    Beans
    311
    Distro
    Ubuntu Breezy 5.10

    Re: Howto: Easy MIDI

    Quote Originally Posted by gammyhand
    I get these errors when trying to run the tar command:

    ralph@ralph:~$ tar -xzf Unison.sf2.gz
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Archive contains obsolescent base-64 headers
    tar: Error exit delayed from previous errors
    I think you should download it again... maybe its a corrupted download.
    Try downloading the file through your browser.

  6. #6
    Join Date
    Aug 2005
    Beans
    8

    Re: Howto: Easy MIDI

    Quote Originally Posted by RastaMahata
    I think you should download it again... maybe its a corrupted download.
    Try downloading the file through your browser.
    Actually, mine did the same thing. I just went to my home folder, right clicked on the file, and chose extract here. Something must be wrong with that command

  7. #7
    Join Date
    Jul 2005
    Location
    Sacramento, CA, USA
    Beans
    37
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Lightbulb Re: Howto: Easy MIDI

    Quote Originally Posted by gammyhand
    I get these errors when trying to run the tar command:

    ralph@ralph:~$ tar -xzf Unison.sf2.gz
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Archive contains obsolescent base-64 headers
    tar: Error exit delayed from previous errors
    I think it's because this file is just g'zipped and not tar g'zipped. A simple
    Code:
    gunzip Unison.sf2.gz
    should do the trick.

    Many thanks, RastaMahata, for posting this HOWTO. ScummVM was the EXACT reason I even started looking for sequencer support in ALSA. I just found my old Day of the Tentacle CD and had no sound.
    The world is full of tough guys. It does not need me to be one, too.

  8. #8
    Join Date
    May 2005
    Location
    Potsdam, NY
    Beans
    1,310
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Howto: Easy MIDI

    Hopefully this will let me play Final Fantasy 8 on Cedega now (Thing wouldn't load b/c it couldn't find MIDI support)
    ArchLinux 0.8.0
    Associate Member of the Free Software Foundation

  9. #9
    Join Date
    Apr 2005
    Beans
    55

    Re: Howto: Easy MIDI

    Hi RastaMahata,

    thanks for this guide which is the first that seems to work ok for me But still, i have problems with MIDI ... the sound is skippy (crackling replay) and laggy. It sounds like wavetable sonftware synthesis five years ago on my incredibly slow Pentium that wasn't fast enough to do it. But now i have a 2Ghz computer and an Audigy ZS. Is there a good guide how to set up the Audigy "natively"?

  10. #10
    Join Date
    Sep 2005
    Beans
    85

    Re: Howto: Easy MIDI

    No need to reboot!

    Code:
    sudo modprobe snd-seq-device
    sudo modprobe snd-seq-midi
    sudo modprobe snd-seq-oss
    sudo modprobe snd-seq-midi-event
    sudo modprobe snd-seq
    sudo /etc/init.d/timidity start

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •