LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-31-2008, 05:39 PM   #1
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
Rosegarden doesn't playback the music


*** Two problems was solved: the first concerning the playback of MIDI files with Rosegarden, and the second concerning printing of scores with LilyPond. If you seek for the solution, read the entire thread ***


I installed four packages using SlackBuilds: fftw, rosegarden, jack-audio-connection-kit, and libsndfile.

At the beginning I run JACK server. I tried two commands: jackd -d alsa and jackstart --driver=alsa. Both display the same result:

JACK compiled with System V SHM support.
loading driver ..
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: use 2 periods for playback

Then I run Rosegarden. When I load some MIDI file or write own music and try to playback it I hear nothing.

Other applications such as play, mpg321, or timidity play the music.

I tried Rosegarden as a regular user and as root.

Rosegarden displays a huge bunch of information on the console -- I attached it in postscript.

Some highlights of that output are:

Creating device 0 in Play mode for connection 14:0 Midi Through Port-0 (duplex) (not connecting)
Creating device 1 in Record mode for connection 14:0 Midi Through Port-0 (duplex) (not connecting)
Composition::getTrackById(0) - WARNING - track id not found, this is probably a BUG /tmp/SBo/rosegarden-1.7.0/src/base/Composition.cpp:1539

On some Russian-language homepage <http://subscribe.ru/archive/comp.soft.linux.discuss/date/681845?682397> I found information: ``Run JACK and then in the control center of KDE select sound system jack'' (Rus. ``Запустить JACK, потом в центре управления KDE выбрать звуковую систему jack'').

There are three problems with that advice...

The first, if I run jackd -d alsa and then KDE it complais ``Error while initializing the sound driver:; device: default can't be opened for playback (Device or resource busy); The sound server will continue, using the null output device'', and if I run KDE and then jackd -d alsa, it complains: ``the playback device "hw:0" is already in use. Please stop the application using it and run JACK again; cannot load driver module alsa; no message buffer overruns''.

The second, I can't find JACK Sound System in KDE Control Center.

The third, I used to use Window Maker.

This is my first experience with JACK and Rosegarden. So far I used Slackware 11.0 with xgmc. I tried to compile xgmc in Slackware 12.1 but without success. So I try now JACK and Rosegarden.

What should I do to force Rosegarden to play the music?

Have a nice day...

w1k0

PS

This is the output of Rosegarden's messages displayed on the console -- I divided it into four sections: Running Rosegarden; Loading Nokia tune.mid; Playing and pausing music; Quitting Rosegarden:

*** Running Rosegarden ***

kbuildsycoca running...
bash-3.1# Rosegarden 1.7.0 - AlsaDriver [ALSA library version 1.0.15, module version 1.0.15 (Tue Nov 20 19:16:42 2007 UTC), kernel version 2.6.24.5-smp]

JackDriver::initialiseAudio - JACK sample rate = 48000Hz, buffer size = 1024
JackDriver::initialiseAudio - creating disk thread
JackDriver::initialiseAudio - found 2 JACK physical outputs
JackDriver::initialiseAudio - connecting from "rosegarden:master out L" to "systemlayback_1"
JackDriver::initialiseAudio - connecting from "rosegarden:master out R" to "systemlayback_2"
JackDriver::initialiseAudio - found 2 JACK physical inputs
JackDriver::initialiseAudio - connecting from "system:capture_1" to "rosegarden:record in 1 L"
JackDriver::initialiseAudio - connecting from "system:capture_2" to "rosegarden:record in 1 R"
JackDriver::initialiseAudio - initialised JACK audio subsystem

ALSA Client information:

14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2, ptype 655362, cap 99]

CREATED OUTPUT PORT 3ut 1 - MIDI output system device for device 0
done
Creating device 0 in Play mode for connection 14:0 Midi Through Port-0 (duplex) (not connecting)
Default device name for this device is MIDI output system device
Creating device 1 in Record mode for connection 14:0 Midi Through Port-0 (duplex) (not connecting)
Default device name for this device is MIDI input system device
AlsaDriver::setCurrentTimer((auto))
extractVersion: major = 1, minor = 0, subminor = 15, suffix = " (Tue Nov 20 19:16:42 2007 UTC)"
AlsaDriver::versionIsAtLeast: is version 1.0.15 (Tue Nov 20 19:16:42 2007 UTC) at least 1.0.14? yes
extractVersion: major = 2, minor = 6, subminor = 24, suffix = ".5-smp"
AlsaDriver::versionIsAtLeast: is version 2.6.24.5-smp at least 2.6.20? yes
Current timer set to "RTC timer" with timer checks
AlsaDriver::initialiseMidi - initialised MIDI subsystem

Composition::getTrackById(0) - WARNING - track id not found, this is probably a BUG /tmp/SBo/rosegarden-1.7.0/src/base/Composition.cpp:1539
Available track ids are:
Renaming device 0 to General MIDI Device
Renamed 128:3 to General MIDI Device
CompositionModelImpl::slotInstrumentParametersChanged()
TrackButtons::slotUpdateTracks
Comparing current version "1.7.0" with latest version "1.7.0"

ALSA Client information:

14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2, ptype 655362, cap 99]

*** Loading Nokia tune.mid ***

Composition::getTrackById(0) - WARNING - track id not found, this is probably a BUG /tmp/SBo/rosegarden-1.7.0/src/base/Composition.cpp:1539
Available track ids are:
Renaming device 0 to General MIDI Device
Renamed 128:3 to General MIDI Device
midiBytesToLong(0,0,0,6) -> 6
Parsing Track 0
midiBytesToLong(0,0,0,52) -> 52
Parse track: last track number is 0
MidiFile: new channel map entry: channel 0 -> track 0
MidiFile: track number for channel 0 is 0
Parsing Track 1
midiBytesToLong(0,0,0,234) -> 234
Parse track: last track number is 1
MidiFile: new channel map entry: channel 1 -> track 1
MidiFile: track number for channel 1 is 1
Program change or channel aftertouch: time 0, code 193, data 0 going to track 1
Parsing Track 2
midiBytesToLong(0,0,0,238) -> 238
Parse track: last track number is 2
MidiFile: new channel map entry: channel 2 -> track 2
MidiFile: track number for channel 2 is 2
Program change or channel aftertouch: time 0, code 194, data 4 going to track 2
Parsing Track 3
midiBytesToLong(0,0,0,238) -> 238
Parse track: last track number is 3
MidiFile: new channel map entry: channel 3 -> track 3
MidiFile: track number for channel 3 is 3
Program change or channel aftertouch: time 0, code 195, data 14 going to track 3
Parsing Track 4
midiBytesToLong(0,0,0,245) -> 245
Parse track: last track number is 4
MidiFile: new channel map entry: channel 4 -> track 4
MidiFile: track number for channel 4 is 4
Program change or channel aftertouch: time 0, code 196, data 78 going to track 4
Parsing Track 5
midiBytesToLong(0,0,0,87) -> 87
Parse track: last track number is 5
MidiFile: new channel map entry: channel 15 -> track 5
MidiFile: track number for channel 15 is 5
Program change or channel aftertouch: time 1, code 207, data 124 going to track 5
New Rosegarden track: id = 0, instrument = 2000, name = Imported MIDI
MidiFile: converted MIDI tempo 500000 to Rosegarden tempo 12000000
New Rosegarden track: id = 1, instrument = 2001, name = Imported MIDI
New Rosegarden track: id = 2, instrument = 2002, name = Imported MIDI
New Rosegarden track: id = 3, instrument = 2003, name = Imported MIDI
New Rosegarden track: id = 4, instrument = 2004, name = Imported MIDI
New Rosegarden track: id = 5, instrument = 2015, name = Imported MIDI
DataBlockRepository::clear()
Warning: Composition::~Composition() with 2 observers still extant
Observers are: 0x8a10d6c [N10Rosegarden19SegmentParameterBoxE] 0x8ab1750 [N10Rosegarden20CompositionModelImplE]
CompositionModelImpl::slotInstrumentParametersChanged()
TrackButtons::slotUpdateTracks

*** Playing and pausing music ***

SoundDriver::initialiseAudioQueue -- new queue has 0 files
AudioPlayQueue::~AudioPlayQueue()
JackDriver::stopTransport: resetting m_haveAsyncAudioEvent
SoundDriver::clearAudioQueue

*** Quitting Rosegarden ***

RosegardenSequencerApp::quit()
AudioInstrumentMixer::destroyAllPlugins
done
AudioInstrumentMixer::~AudioInstrumentMixer
AudioInstrumentMixer::removeAllPlugins
AudioInstrumentMixer::~AudioInstrumentMixer exiting
DataBlockRepository::clear()
SoundDriver::~SoundDriver (exiting)
AudioPlayQueue::~AudioPlayQueue()
Toodle-pip.
Warning: Composition::~Composition() with 1 observers still extant
Observers are: 0x8a19908 [N10Rosegarden20CompositionModelImplE]
WARNING: Composition::getSegmentVoiceIndex: segment 0x8bd25a0 not found in composition
WARNING: Composition::getSegmentVoiceIndex: segment 0x8c02938 not found in composition
WARNING: Composition::getSegmentVoiceIndex: segment 0x8c03828 not found in composition
WARNING: Composition::getSegmentVoiceIndex: segment 0x8bc42d8 not found in composition
WARNING: Composition::getSegmentVoiceIndex: segment 0x8be90e8 not found in composition
WARNING: Composition::getSegmentVoiceIndex: segment 0x8beb1e0 not found in composition

Last edited by w1k0; 06-05-2008 at 08:07 AM. Reason: problem solved
 
Old 06-01-2008, 03:18 AM   #2
ppr:kut
Member
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 361

Rep: Reputation: 93
This depends on what you want rosegarden to do. You will only need jack running if you want to play *real* audio files, like mp3, wave, etc inside rosegarden. For midi-playback you will need a softsynth like fluidsynth and a Soundfont. Start fluidsynth before you start rosegarden. If you then start rosegarden, everything should work fine. You can get a build-script for fluidsynth on slackbuilds.org.
 
1 members found this post helpful.
Old 06-01-2008, 04:52 PM   #3
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Original Poster
Rep: Reputation: 196Reputation: 196
Problem solved by ppr:kut -- thank you very much

I followed the above advice by ppr:kut and now Rosegarden plays the music.

Here are my remarks for future users of Rosegarden (not for hackers)...

1. You can't compile fluidsynth 1.0.8 from the SlackBuild (see: PS. The errors during the compilation of fluidsynth 1.0.8 with SlackBuild) -- you need to compile it manually from the source.

2. Next you need to run ldconfig to link the libraries.

3. Now you need some SoundFonts. You'll find them on <http://www.hammersound.net/>. Go to Sounds | SoundFont library | Collections. Here there are a lot of collections of SoundFonts. I tested a few and I recommend Chorium. It doesn't sound exactly as eawpats for TiMidity++ but close to them.

4. Unpack ChoriumRevA.rar and rename ChoriumRevA\\ChoriumRevA.SF2 file to ChoriumRevA.SF2.

5. Run the command fluidsynth ChoriumRevA.SF2 -- it displays some warnings on the console but never mind.

6. Run Rosegarden, write your own music or import some MIDI file, and play it.

Additional remarks...

Some buggy MIDI files can spoil your synthesizer. If you import and play standard Nokia tune.mid it plays nothing. If you then import any other MIDI file containing a few channels Rosegarden will play only the first channel. In such case you need to exit Rosegarden, break fluidsynth using Ctrl+C command, and run fluidsynth and Rosegarden once again.

You can't run both JACK and fluidsynth.

If you run jackd and then fluidsynth it displays error message:

ALSA lib pcm_dmix.c:866snd_pcm_dmix_open) unable to open slave
fluidsynth: error: The "default" audio device is used by another application
Failed to create the audio driver

If you run fluidsynth and then jackd it displays error message:

the playback device "hw:0" is already in use. Please stop the application using it and run JACK again
cannot load driver module alsa
no message buffer overruns

Feel free do add your comments to the present thread. If you know any better SoundFont collection than recommended above don't omit to announce where you found it and what's its name. If you know any method to manage buggy MIDI files like Nokia tune.mid write about it too. If you feel any other information suits this thread -- write it down.

w1k0

PS

*** The errors during the compilation of fluidsynth 1.0.8 with SlackBuild ***

In file included from fluid_synth.h:39,
from fluid_alsa.c:27:
fluid_ladspa.h:38:20: error: ladspa.h: No such file or directory
In file included from fluid_synth.h:39,
from fluid_alsa.c:27:
fluid_ladspa.h:88: error: expected specifier-qualifier-list before 'LADSPA_Data'
fluid_ladspa.h:116: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
fluid_alsa.c: In function 'new_fluid_alsa_audio_driver2':
fluid_alsa.c:213: warning: the address of 'hwparams' will always evaluate as 'true'
fluid_alsa.c:214: warning: the address of 'swparams' will always evaluate as 'true'
fluid_alsa.c: In function 'new_fluid_alsa_seq_driver':
fluid_alsa.c:969: warning: the address of 'port_info' will always evaluate as 'true'
make[2]: *** [libfluidsynth_la-fluid_alsa.lo] Error 1
make[2]: Leaving directory `/tmp/SBo/fluidsynth-1.0.8/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/SBo/fluidsynth-1.0.8/src'
make: *** [all-recursive] Error 1

Last edited by w1k0; 06-01-2008 at 05:01 PM. Reason: removed duplicated post
 
Old 06-02-2008, 02:11 AM   #4
ppr:kut
Member
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 361

Rep: Reputation: 93
Quote:
In file included from fluid_synth.h:39,
from fluid_alsa.c:27:
fluid_ladspa.h:38:20: error: ladspa.h: No such file or directory
From the fluidsynth.SlackBuild README:

Quote:
Requires ladspa-sdk
This is obviously what you're missing and therefore fluidsynth doesn't compile. Alternatively you may change the line "--enable-ladspa" to "--disable-ladspa".

Quote:
You can't run both JACK and fluidsynth.

If you run jackd and then fluidsynth it displays error message:

ALSA lib pcm_dmix.c:866snd_pcm_dmix_open) unable to open slave
fluidsynth: error: The "default" audio device is used by another application
Failed to create the audio driver
You can't run JACK and fluidsynth using the same output device. Startup jack, then start fluidsynth this way:
Code:
fluidsynth -a jack ChoriumRevA.SF2
There are two nice guis out there for both fluidsynth and jack called qjackctl and qsynth. Configuration might get easier using those.
 
1 members found this post helpful.
Old 06-02-2008, 04:14 AM   #5
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Original Poster
Rep: Reputation: 196Reputation: 196
As you guessed I didn't read SlackBuild README. Now I installed ladspa-sdk and fluidsynth from SlackBuilds successfully. Thank you for the hint...

***

Qjackctl 0.3.2 and qsynth 0.3.2 need both Qt 4.1 or greater.

***

If I run fluidsynth ChoriumRevA.SF2 it displays the message:

fluidsynth: warning: Requested a period size of 64, got 940 instead
fluidsynth: ALSA driver: Using format s16, rw, interleaved

and Rosegarden plays MIDI files.

If I run jackd -d alsa and then fluidsynth -a jack ChoriumRevA.SF2 it displays the message:

fluidsynth: warning: Jack sample rate mismatch, expect tuning issues (synth.sample-rate=44100, jackd=48000)

and Rosegarden doesn't play MIDI files.

I googled for the last message -- without results.

***

It's my nineteenth hour of computing. I think it's the high time to turn off the machine.
 
Old 06-02-2008, 04:47 AM   #6
ppr:kut
Member
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 361

Rep: Reputation: 93
jack doesn't play sound on every soundcard. It is possible that your soundcard simply doesn't work with jack and you therefore do not hear anything.
However, you could try matching the samplerates, so either 48k in fluidsynth or 44,1k in jack. It does work here, though not that perfect. But I am using qjackctl and qsynth. You will probably have to take a look at the man-pages if you don't want to use them.
If midi is all you care about, this is likely not worth the effort.
 
Old 06-02-2008, 05:15 AM   #7
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,138

Rep: Reputation: 49
set Jack to 44.1 You can use Qjackctl for that.
What are you going to use rosegarden for?
I think the problem with it is that it tries to be a notation editor, a sequencer and a multitrack recorder. As a result, it won't do any of that properly. It doesn't support multiple staffs, multiple voices, forget polyrythms. And it's not that awesome on the editing and mixing part either.
You could try it with a live cd like denemo to see if you even like it.

Last edited by oskar; 06-02-2008 at 05:23 AM.
 
Old 06-02-2008, 09:50 AM   #8
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Original Poster
Rep: Reputation: 196Reputation: 196
I tried:

1) jackd -d alsa -r 44100 together with fluidsynth -a jack ChoriumRevA.SF2

2) jackd -d alsa together with fluidsynth -r 48000 -a jack ChoriumRevA.SF2

In both cases fluidsynth doesn't display mentioned above messages (nor the first, neither the second) but Rosegarden doesn't play the music.

Maybe my ThinkPad T41 doesn't cooperate with JACK indeed. It uses AD1981B AC'97 Audio controller. At the moment I'm interested in playing MIDI files and live music during composing so I can no bother with JACK.

I use Rosegarden to compose ringtones for mobile phones. I'm impressed by that program. It's much better than xgmc or MusE. Maybe it's like use a steam hammer to crack a nut but after a dozen or so hours of work with it I like Rosegarden very much.

Last edited by w1k0; 06-04-2008 at 03:59 PM. Reason: erratum
 
Old 06-02-2008, 06:26 PM   #9
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Original Poster
Rep: Reputation: 196Reputation: 196
Rosegarden doesn't print scores with LilyPond

Well... I met a new problem. I installed from SlackBuilds LilyPond, as well as Potrace, t1utils, Mftrace, and FontForge including freetype trick described in Slack Build's README file.

When I try to print or preview score with LilyPond Rosegarden displays KDialog:

ERROR: LilyPond processing failed.
LilyPond output follows:

(Below the last line is an empty output.)

My first question is: what should I do to print scores from Rosegarden with LilyPond?

I can't see the possibility of printing PDF files with LilyPond.

My second question is: is it possible to print scores with LilyPond to PDF files?
 
Old 06-02-2008, 11:00 PM   #10
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,138

Rep: Reputation: 49
Rosegarden should be able to export to lillypond out of the box. Check the file options, it should be there somewhere.
Lillypond alone might do it too if you can deal with just typing the stuff. I tried to write jazz arrangements, but all of the available options for linux didn't do it. With lillypond things get very complex pretty fast... Luckily Finale runs in wine.
You might want to take a look at Denemo if you haven't. For the task it should do very well. I think it puts out directly to timidity. No Jack involved.

To test if jack works properly you can hook up that one jack compatible media player that I've now been googling for for the past 15 minutes to no avail... :? - or qsynth with that screen keyboard. You'll need qjackctl to manage the connections.

Anyway, without a realtime kernel you might get problems even if you get sound. I have never used Slackware, so I can't help you with that, but rosegarden + jack + qsynth + realtime-kernel is a one-line install on Ubuntu 6.06+ Fedora 4+ (needs CCRMA repository) Suse 9.3+ and PCLOS. I've never had any issues with rosegarden after 2005.

Last edited by oskar; 06-02-2008 at 11:13 PM.
 
Old 06-03-2008, 08:18 AM   #11
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Original Poster
Rep: Reputation: 196Reputation: 196
I know it should to do it out of the box but it doesn't and I can't figure the reason why.

I looked at <http://denemo.sourceforge.net/>. Denemo seems to be very interesting program, but I don't look for some new editor to write scores. I don't want to write scores. I'd like to print scores from Rosegarden or using Rosegarden's .rg files. Those files are gzipped XML files. I can rename some_file.rg to some_file.rg.gz and gunzip it. My question is if it is possible to print such files using LilyPond on the command line.

In Freshmeat there are sixty six projects related to ``jack''. For example Audacity, Hydrogen or MusE. Because I installed MusE two or three days ago I tried it with JACK. It doesn't play the music. There must be something wrong with JACK in my system but at the moment I don't mind about that. I'm glad I can play the music with Rosegarden using fluidsynth.

As I said above qsynth and qjackctl require both Qt 4.1 or greater and Slackware 12.1 uses Qt 3.3.8. I suppose upgrade to some newer Qt can cause a lot of troubles with the other stuff. I don't like troubles. I'd like to use some stable Linux distribution. This is the reason why I use for the last eight years Slackware exclusively. I use very sophisticated configuration of the system and of the applications. I don't want to move to Ubuntu, Fedora or SuSE.

So I ask if it is possible to print Rosegarden's files using LilyPond on the command line?

Last edited by w1k0; 06-03-2008 at 08:55 AM. Reason: typo
 
Old 06-03-2008, 08:33 AM   #12
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Original Poster
Rep: Reputation: 196Reputation: 196
Problem solved by w1k0

If you ask the proper question you'll gain the answer... I tried File | Export | Export LilyPond file option of Rosegarden. Now I can print exported .ly file to PDF file using lilypond some_file.ly command.

Erratum:

I misunderstood the first hint by oskar. He wrote about exporting Rosegarden's files to LilyPond format. So that problem was solved by oskar not by me. Thank you oskar!

Last edited by w1k0; 06-03-2008 at 08:48 AM. Reason: erratum
 
  


Reply

Tags
music, playback, rosegarden


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
Good linux distro for music/movie playback Wingdom Linux - Software 4 07-10-2006 11:05 PM
Music Playback on Ubuntu (Hoary) cnastiuk Linux - Hardware 2 02-06-2005 12:40 AM
Music Cd playback problem seagreen Linux - Hardware 2 09-14-2004 01:36 AM
Rosegarden or some music composer with notation program Icarus56 Linux - Newbie 0 02-29-2004 09:11 PM
Music playback problems nick2003 Linux - Newbie 5 11-14-2003 11:31 AM


All times are GMT -5. The time now is 09:44 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