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

Thread: Easiest elegant way to convert a MIDI file to MP3?

  1. #1
    Join Date
    Feb 2007
    Beans
    863

    Easiest elegant way to convert a MIDI file to MP3?

    Hi

    Please find some mid for example. I tried with sox and convert and it did not work.

    http://www.gmajormusictheory.org/Fre...s/0AuraLee.mid

    :8

    --
    Onnline, one can with :
    http://www.hamienet.com/midi2mp3

    Come on, sox could ... ?
    Last edited by honeybear; June 25th, 2011 at 01:10 PM.

  2. #2
    Join Date
    Dec 2009
    Location
    Fareham, UK
    Beans
    2,382
    Distro
    Ubuntu

    Re: Easiest elegant way to convert a MIDI file to MP3?

    Your best bet is probably to try here

  3. #3
    Join Date
    Feb 2007
    Beans
    863

    Re: Easiest elegant way to convert a MIDI file to MP3?

    Quote Originally Posted by westie457 View Post
    Your best bet is probably to try here
    Thanks. I used this solution. I actually wanted to batch to convert lot of old game file I had in my old game dedicated to windows 95 cdrom ...

    In 2011, it is funny that Linux is not capable to convert easily using a sox or kind of emulator of sound card.
    Last edited by honeybear; June 25th, 2011 at 01:21 PM.

  4. #4
    Join Date
    Dec 2009
    Location
    Fareham, UK
    Beans
    2,382
    Distro
    Ubuntu

    Re: Easiest elegant way to convert a MIDI file to MP3?

    The link I posted was found in this thread

    There probably is no easy way to do what you want. However it does suggest a way.

  5. #5
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Easiest elegant way to convert a MIDI file to MP3?

    Quote Originally Posted by honeybear View Post
    I actually wanted to batch to convert lot of old game file I had in my old game dedicated to windows 95 cdrom ...
    Hi
    Use timidity
    Code:
    sudo apt-get install timidity
    To play the file:-
    Code:
    timidity 0AuraLee.mid
    For mp3 pipe it to FFmpeg or LAME.
    Like this:-
    Code:
    timidity 0AuraLee.mid -Ow -o - | ffmpeg -i - -acodec libmp3lame -ab 64k 0AuraLee1.mp3
    Or this:-
    Code:
    timidity 0AuraLee.mid -Ow -o - | lame - -b 64 0AuraLee2.mp3
    Then write a script for the batch.

  6. #6
    Join Date
    Feb 2007
    Beans
    863

    Re: Easiest elegant way to convert a MIDI file to MP3?

    Quote Originally Posted by ron999 View Post
    Hi
    Use timidity
    Code:
    sudo apt-get install timidity
    To play the file:-
    Code:
    timidity 0AuraLee.mid
    For mp3 pipe it to FFmpeg or LAME.
    Like this:-
    Code:
    timidity 0AuraLee.mid -Ow -o - | ffmpeg -i - -acodec libmp3lame -ab 64k 0AuraLee1.mp3
    Or this:-
    Code:
    timidity 0AuraLee.mid -Ow -o - | lame - -b 64 0AuraLee2.mp3
    Then write a script for the batch.
    thank you very much ! btw is there something else than timidity?

    Gorgeous amazing replay thx!!!!!

    apt-get install timidity
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following extra packages will be installed:
    timidity-daemon
    Suggested packages:
    pmidi fluid-soundfont-gm fluid-soundfont-gs
    The following NEW packages will be installed:
    timidity timidity-daemon
    0 upgraded, 2 newly installed, 0 to remove and 40 not upgraded.
    Need to get 614kB of archives.
    After this operation, 1,552kB of additional disk space will be used.
    Do you want to continue [Y/n]?

  7. #7
    Join Date
    Dec 2006
    Beans
    7,349

    Re: Easiest elegant way to convert a MIDI file to MP3?

    Quote Originally Posted by honeybear View Post
    btw is there something else than timidity?
    I suspect that timidity is the best option but vlc can convert from midi to mp3 if it has been compiled against fluidsynth. My own copy has been:

    Code:
    andrew@skamandros~$ cvlc --list | grep 'fluidsynth'
    VLC media player 1.2.0-git Twoflower (revision 6c101d6)
      fluidsynth             FluidSynth MIDI synthetizer
    and your midi file converts nicely . Details here:

    MIDI with VLC media player
    http://www.remlab.net/op/vlc-midi.shtml

    Edit: The commandline to convert your file could be:

    Code:
    cvlc -vvv --sout "#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access=file,mux=raw,dst=0AuraLee.mp3}" 0AuraLee.mid
    Last edited by andrew.46; June 26th, 2011 at 06:37 AM.
    You think that's air you're breathing now?

  8. #8
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Easiest elegant way to convert a MIDI file to MP3?

    That's interesting Andrew.
    My Linux version of VLC isn't compiled with fluidsynth support.
    But I've emulated your work using VLC Portable from here:- http://portableapps.com/apps/music_video/vlc_portable
    And GeneralUser GS FluidSynth v1.43.sf2 from here:- http://www.schristiancollins.com/generaluser.php
    Then converted the midi file by running VLC Portable in wine with this command:-
    Code:
    VLCPortable.exe 0AuraLee.mid --sout "#transcode{acodec=mp3,ab=64,channels=2,samplerate=44100}:std{access=file,mux=dummy,dst="0AuraLee3.mp3"}" vlc://quit
    Last edited by ron999; June 26th, 2011 at 12:01 PM.

  9. #9
    Join Date
    Feb 2007
    Beans
    863

    Re: Easiest elegant way to convert a MIDI file to MP3?

    thank you

    ffmpeg does not support MIDI at all . In the second link,the author is wrong: that is a process of creating and exporting a MIDI sample

    It would be great that mencoder could, by some tricks too... I googled midi and mencoder and low resutls are given

  10. #10
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Easiest elegant way to convert a MIDI file to MP3?

    no, ffmpeg and mplayer can't do that alone as midi is not an audio file.

    THat's the reson for using fluidynth. You need soemthing rto actually read the MIDI data and play it into music.

    ..on the other hand that would give you PCM audio, and that's where ffmpeg or kmplayer comes to play, they are able to encode the PCM audio from fluidynth into MP3 file.

    I don't see anybody here claiming that ffmpeg would support MIDI, and the second link from ron999's post is for MIDI soundfonts. Having good soundfonts is essential for getting good audio from the MIDI file. Think of MIDI as sheet music, you still need a good player and instruments to convert it into audible music. Timidity is the player, and soundfonts are the instruments it uses.

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
  •