LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices

Reply
 
Search this Thread
Old 01-14-2009, 05:04 AM   #1
KWTm
Member
 
Registered: Jan 2004
Distribution: Kubuntu 10.04 (Dell Linux-preinstalled laptop + a desktop); Maemo 5 (N900 phone computer)
Posts: 116

Rep: Reputation: 21
setting up Rosegarden (for MIDI music) in Linux (Ubuntu 8.04)


It took me a long time to set up Rosegarden, the Midi music composer/player software. Rosegarden would seem to run, load the music files, show the notes and tracks etc. The ONLY thing I could not do was to get the sound out to my speakers. A kind soul on IRC finally told me how to do it, so I decided to post it here so that the effort would not go wasted.

I use (k)Ubuntu 8.04, but this probably works for other distros, too.

One confusing thing is that the programs kept referring to the JACK software. Although JACK seems to be versatile and powerful, I still haven't figured out how to use it after spending quite a bit of time on it --and you don't need it to run Rosegarden. So here's how I did it.

I found out that, like many Musical Instrument Digital Interface ("MIDI") applications, Rosegarden itself does not produce sound, and must tell a separate "midi synthesizer" what sounds to produce. This "midi synthesizer" can be software or hardware (if you have a sound card with midi). So the key is to:

1. get a midi synthesizer running
2. install a sound font
2. tell Rosegarden to send the music to that midi synthesizer

Step 1: Get a MIDI synthesizer running

You need to install a MIDI synthesizer program. You can install QSynth/FluidSynth. (Another alternative not covered here is TiMidity++.) QSynth is the GUI front-end that lets you easily control FluidSynth, which is the actual synthesizer. In Ubuntu (and probably most distros), if you install QSynth, it will automatically realize that you need FluidSynth to go with it, and install that program also. So, either open a terminal and type the command:

sudo apt-get install qsynth

or use Synaptic or whatever program. Other distros will have their own way of installing the qsynth package.

In a terminal, type the command "qsynth". This will activate QSynth. Unfortunately, it will also probably bring up an error message and complain that the JACK software isn't running. But all you need to do is tell it that you don't want to use JACK, so close the error message windows and:
- click the Setup button on the left (NOT the "Options" button on the right)
- click the Audio tab
- for Audio Driver, select "alsa" instead of "jack". (This changes the rest of the options on the screen.)

Step 2: Install a sound font

You need to get install a soundfont file. This tells QSynth what each instrument sounds like. There are various types of soundfont files; the kind gentleman who helped me pointed me to a small basic all-purpose soundfont file that contains the General Midi ("GM") standard 128 instruments. He gave me the file directly, but I'm told that it can be found here:

http://www.hammersound.com/cgi-bin/s...nerGi8.zip;436

However, you can also use the Ubuntu package "fluid-soundfont-gm". This file is about 140MB in size --presumably the instruments sound that much better! If you install that package, whether using the command "sudo apt-get install fluid-soundfont-gm" or using Synaptic, then the soundfont file will end up at:
/usr/share/sounds/sf2/FluidR3_GM.sf2
Remember this file location. Other distros might put it elsewhere; your package manager can tell you where the file is installed.

If you want to get a soundfont from somewhere else, I was told to try these web sites:
http://personalcopy.com/
http://personalcopy.com/linuxfiles.htm
or
http://hammersound.net/

I checked out both sites. Hammersound seemed to have more specialized sounds that were better as add-ons, but I didn't find a general soundfont file for all-purpose use. PersonalCopy seemed to be better, but I didn't actually download their soundfont to try, so try at your own risk! Remember where you've put your downloaded file.

Once you have a soundfont file on your computer, tell QSynth where it is:
- click the Setup button on the left (NOT the "Options" button on the right)
- click the Soundfont tab
- click the Open button, and open your soundfont file

Now QSynth is ready to play your notes. You just need to get Rosegarden to tell it what notes to play!

Step 3: set up Rosegarden

In Ubuntu, you install Rosegarden with the command "sudo apt-get install rosegarden" or use Synaptic. Do whatever the equivalent is for your distro.

Before you run Rosegarden, make sure QSynth is already set up and running. Now go ahead and run Rosegarden. If it doesn't appear on your menu, you can type the "rosegarden" command at a terminal.

When you run Rosegarden, it will also complain that the JACK software is not running. Ignore it. Go to the Rosegarden main menu > Studio > Manage MIDI Devices. Under "Play devices", you can choose which MIDI device for "General MIDI Device" and "MIDI output system device". You might need to set up each of these two settings, but it worked for me when I just set the "General MIDI Device" one. It lets you choose a connection or "No connection". The available connections will NOT be marked "QSynth" so you have to figure out which is the correct one. Mine says "128:0 Synth input port" but maybe yours is different.

Okay, that's it! Rosegarden should now play actual sound to your speakers! Of course, make sure that your computer speakers are plugged in and the volume is high enough to hear. Grab a MIDI file or one of the included Rosegarden "RG" files (an RG file is a MIDI file with some added features) and play it to see if it works.

Some notes:

I found that when I loaded one of the RG files, it reset the MIDI output to the wrong connection, so I had to go back to main menu > Studio > Manage MIDI Devices > Play devices and change the General MIDI Output device to the right connection again.

Note that if you already have TiMidity++ running in the background, then QSynth won't work properly. While trying to get Rosegarden working, I ran TiMidity++ once --but after it was done, it stayed running in the background (as root!) and I found that things didn't work any more. It could be running the background without you realizing! You can check if it's running with the command:

ps -ef | grep timidity

If it comes back with only one line that says somewhere "grep timidity", then timidity is NOT running. If the response has more than one line, and one or more lines contain the word "timidity" but not "grep timidity", then timidity is running, and you need to use the command "sudo killall -s9 timidity" to get rid of it BEFORE you run QSynth.

In the same way, if the JACK software daemon is running in the background, it can make things confusing (since Rosegarden and QSynth will try to use it). If you know how to use JACK, go ahead. (And also tell *me* how to use it!) (And what are you doing reading this guide if you already know how to use JACK?) Otherwise, you can make sure the JACK daemon software is not running using a similar method:

ps -ef | grep jackd

If it comes back with only one line that says somewhere "grep jackd", then jackd is NOT running. If the response has more than one line, and one or more lines contain the word "jackd" but not "grep jackd", then jackd is running, and you need to use the command "sudo killall -s9 jackd" to get rid of it BEFORE you run QSynth.

If you already have a hardware MIDI synthesizer on your soundcard, then you don't need QSynth. I guess you would tell Rosegarden to use that connection under main menu > Studio > Manage MIDI Devices. If it doesn't work, then try it with QSynth anyway.

Hope that helps!

Last edited by KWTm; 01-14-2009 at 12:32 PM.
 
Old 02-03-2009, 01:51 PM   #2
Another Oldguy
LQ Newbie
 
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
Great Rosegarden Midi Instructions work for Suse 11.1

Thanks alot KWTm. Nice job on your Rosegarden midi help. Ive been running cubase for a long time. Also been trying the protools for m-audio. Had my own computer from back in CPM days. Only curiosity has moved me to take a look at the Linux platform and various applications.
I'm in Suse now after having tried multiple unsuccessful install attempts with other distros. Anyway, just getting a distro working properly was not easy. When I booted to a blank screen with no command line option anywhere in the process, the only pertinent advice seemed to be "try another distro." I believe finding help such as yours is certainly available from many others, but wading through countless ineffective suggestions is fatiguing. I guess I could use the Edison philosophy on his way to the incandescent bulb: "I know ten thousand things that won't work," but at this point I'm a bit compromised by waning patience, since I already have multiple windows machines doing amazing things. But you definitely can teach an old dog a new trick if there is a reward (that's my contribution to the forum). Your clear step by step instruction on how to get the midi operating on my test system was EXCELLENT! I knew it was a software issue, but I sure didn't have a clue as to the cause. (I tended to doubt myself thinking my onboard sound was the problem. Of course I have expensive sound cards running cubase and protools on other boxes.) How you figured out to ignore all the messages about JACK this and that along with all the forum instructions about needing to install qjackctl etc was quite an accomplishment. Now that I have a working system I'm sure I can find other ways to monkey around and try other settings that might work. I was ready to quit after DAYS of trying a hundred different things. Unrelated to this issue but relevant to the linux experience in general: I believe most of the millions of people who have become accustomed to 100% point and click computing are not going to acccept working with a command line. The majority of users are not interested in the "power of the command line." They just want to use a program that works by doing nothing but clicking an icon to start it and then use a good GUI. Anyway, thanks again.
 
Old 07-26-2009, 11:42 PM   #3
Carlo Ghega
LQ Newbie
 
Registered: Jul 2009
Posts: 1

Rep: Reputation: 0
Smile Thx a lot! Step 3 was it!

Thank You very much KWTm!

You saved my day. Really not easy to find any clear step by step instruction guide like Yours.

Am a still really fresh Newbie sitting behind a Amilo V2030 (some issues on Linux and not been the most expensive notebook), trying to get to run Rosegarden on Linux Mint since 3 days: including the installing of a rt-kernel and getting Jack to work.

Thank Yours I'm hearing the music at last!!!

This thread is well advanced in months, but since my Jack works very okay by now, as well as I am yet a tiny little bit experienced in some selected related trouble:

If I could still help You getting Jack to work, I'd love to return the favour for your help!

Just to remark: Also with Jack running, one needs to configure the General Midi, synth and sound devices in the way You showed me, as I learned now. And I am still amazed, You got Rosegarden to work without it.

Once again thank You very much, and let know if I could do anything for you.

Best Regards!

Carlo
 
Old 08-01-2009, 04:41 AM   #4
shantiq
LQ Newbie
 
Registered: Aug 2009
Location: narch narfuk innit
Distribution: ubuntu maverick
Posts: 15

Rep: Reputation: 0
how to save to a wave file?

well guys i to am struggling with rosegarden but not in the same way


it played straight away thru my speakers thru the alsa i think


i am using jaunty jackalope


only problem i have and that is why i am writing is

HOW DOES ONE SAVE A MIDI COMPOSITION TO A WAVE FILE?

the way i have done on cubase for years


i see no export option


how does it work?


surely there is a simple way


anyone could enlighten me here


thanks shan
 
Old 12-03-2009, 05:06 AM   #5
anjsimmo
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 0
Re: how to save to a wave file?

You can save as a midi and then:
1. install timidity
2. in a terminal:
timidity input.mid -Ow -o out.wav

source: http://yoten.blogspot.com/2007/07/co...di-to-wav.html
 
Old 12-04-2009, 02:57 AM   #6
shantiq
LQ Newbie
 
Registered: Aug 2009
Location: narch narfuk innit
Distribution: ubuntu maverick
Posts: 15

Rep: Reputation: 0
thanx anjsimmo

yes i was pondering all this back in august and was given the timidity code sometime in the fall timidity input.mid -Ow -o out.wav and yes it does work

i use soundkonverter most of the time tho as it is quicker and does not require command line


i know linux is all about discovery but the guys who designed rosegarden could have written two lines somewhere obvious so we KNOW how to do this on day one

i compose entirely on midi and the first piece i wrote ended up without a way to turn it to wave which really is useless to man or beast

maybe it is the gap between user and software designer?


i think they should always have a "dumb" user on the team to ask them the obvious non-specialist questions (as we are not all computing science phds )



some might say well then do not use linux if that is the way you feel


my answer would be why should it be a treasure hunt? how does it add to the experience?

but hey i digress thank you for your input or should i say your input.mid -Ow -o out.wav

 
Old 02-25-2010, 01:53 AM   #7
mikek1121
LQ Newbie
 
Registered: Feb 2010
Posts: 1

Rep: Reputation: 0
thanks so much

thanks KWTm you probably saved me countless hours of figuring out how to set this up. I knew about rosegarden and jack but had no idea about Qsynth and how that all worked. I got it running within 20 minutes thanks to your post. I know im a year late but these kinds of posts are few and far between.

thanks again
 
Old 09-01-2010, 12:34 PM   #8
gismapper
LQ Newbie
 
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
I'll echo the huge thanks, KWTm! I have a decent idea of what I'm doing with linux, but I've never played with MIDI before. Thought rosegarden would be a great way (= "free") to learn. LOL! I learned, alright! I learned how confusing linux audio can be at first. After several days of floundering, I've found your post. Now I can't wait to get home and give it yet one more try...this time, ignoring all of rosegarden's warnings (as illogical as that seems).

So, is rosegarden's push for jack all about low latency? How bad is latency with alsa? Anyone know?

Now, if only someone would put together a similar post regarding how to get rosegarden and jack working together! Yeah, yeah, I know...read the docs and man pages. But if someone is very new to linux audio, where do you go to get the big picture? The docs seem to presume a certain level of familiarity with linux audio.

Thanks again...can't wait to give it a try.
 
Old 10-10-2010, 12:36 AM   #9
albertBeach
LQ Newbie
 
Registered: May 2006
Location: Australia
Distribution: Fedora Core 7,9,12 CentOs 5
Posts: 26

Rep: Reputation: 15
Thanks KWtm for the heads up.. I'm at the stage of configuring Rosegarden for FC13 I think I have all the dependencies now most
were all devel file issues but all resolved I guess a little while to go yet.
I'm running a 32 bit dual core SMP Version of Fedora Core 13, 2.6.33.6-147.2.4.fc13.i686.PAE #1 SMP xxxxx i686 i686 i386 GNU/Linux

...etc
checking for liblo... yes
checking for lrdf... yes
checking for fftw3f... yes
checking for sndfile... yes
checking for samplerate... yes
checking for perl... /usr/bin/perl
checking for xargs... /usr/bin/xargs
checking for makedepend... no
configure: error: Failed to find required makedepend program.

I'm bogged down a bit ..now and need more research the configure script stops at
i have not seen this stop here before and need to find out what happens next...
am I missing files in rosegarden
any help for where to look next will be appreciated

Thanks guys
 
Old 10-11-2010, 02:41 AM   #10
albertBeach
LQ Newbie
 
Registered: May 2006
Location: Australia
Distribution: Fedora Core 7,9,12 CentOs 5
Posts: 26

Rep: Reputation: 15
DONE! I have Rosegarden working and yes I followed the above re QSYnth and have sound
cheers for the help KWTm


it's allways On ..On.. Yay Linux

albertbeach
 
Old 05-06-2011, 07:18 PM   #11
mozgren
LQ Newbie
 
Registered: May 2011
Posts: 5

Rep: Reputation: 0
KWTM Thanks! Your advice solved a two year problem in five minutes!
I've been editing - exporting midi- listening - editing - exporting - listening... etc etc ... Now I can hear it.
Thanks again!
Maurice
 
Old 01-29-2012, 08:53 AM   #12
Chiel92
LQ Newbie
 
Registered: Jun 2011
Distribution: Ubuntu
Posts: 1

Rep: Reputation: Disabled
Thumbs up Great Howto!

This is a great Howto! Still up to date!
I wish I had found it earlier. Midi on linux is so chaotic.
Maybe there is too many software and there are just too many ways to play Midi.
 
  


Reply

Tags
linux, midi, rosegarden, suse11, wave


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
problems setting up MIDI music in KMid newbiesforever Linux - Software 3 02-10-2009 01:42 AM
midi rosegarden problems angelo_maci Linux - Software 9 10-23-2006 04:20 PM
MIDI music in Linux joshknape Linux - Software 1 11-16-2005 09:25 PM
Rosegarden + Midi.. cna this be done? trey85stang Linux - Software 1 05-26-2005 04:36 AM
Lilypond/Rosegarden/midi problem Icarus56 Linux - Software 7 10-01-2004 02:57 PM


All times are GMT -5. The time now is 12:48 AM.

Main Menu
Advertisement
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