Quantcast

MuseScore playback capabilities

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

MuseScore playback capabilities

lasconic
Administrator
Hi,
The following PDF[1] is an attempt to sum up the playback capabilities
of MuseScore 0.9.5.
The goal is too make it more simple for users/new developers to
understand what JACK, ALSA, PortAudio etc... mean and where they fit.
I post it here to have some feedback about its accuracy and to see if
it is useful for anyone else but me.
It can also be a support for future development discussion on topics
already mentioned such as Jack MIDI support, or Windows/Mac midi out.

Comments very welcome!!!

Lasconic

[1] The pdf is on my public dropbox to allow easy update if necessary
http://dl.getdropbox.com/u/497455/MuseScore_playback.pdf

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MuseScore playback capabilities

Toby Smithe-2
2009/8/16 Lasconic <[hidden email]>:
> Hi,
> The following PDF[1] is an attempt to sum up the playback capabilities
> of MuseScore 0.9.5.
> The goal is too make it more simple for users/new developers to
> understand what JACK, ALSA, PortAudio etc... mean and where they fit.
> I post it here to have some feedback about its accuracy and to see if
> it is useful for anyone else but me.
> It can also be a support for future development discussion on topics
> already mentioned such as Jack MIDI support, or Windows/Mac midi out.

Looks quite good, and just shows how complex audio frameworks get..
PortAudio can even output to ALSA, on Linux, and that's what I enable
in Debian and Ubuntu. Apart from that, I don't see any deficiencies,
just a linear simplification of the complexity.

--
Toby Smithe :: http://fulltinreality.com

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MuseScore playback capabilities

lasconic
Administrator
Thanks for the feedback!

"PortAudio can even output to ALSA, on Linux, and that's what I enable
in Debian and Ubuntu."
Do you mean that direct alsa output is not used? Maybe it can simplify
the code & I/O preferences window?

Any other feedback someone?

Lasconic


2009/8/23 Toby Smithe <[hidden email]>:

> 2009/8/16 Lasconic <[hidden email]>:
>> Hi,
>> The following PDF[1] is an attempt to sum up the playback capabilities
>> of MuseScore 0.9.5.
>> The goal is too make it more simple for users/new developers to
>> understand what JACK, ALSA, PortAudio etc... mean and where they fit.
>> I post it here to have some feedback about its accuracy and to see if
>> it is useful for anyone else but me.
>> It can also be a support for future development discussion on topics
>> already mentioned such as Jack MIDI support, or Windows/Mac midi out.
>
> Looks quite good, and just shows how complex audio frameworks get..
> PortAudio can even output to ALSA, on Linux, and that's what I enable
> in Debian and Ubuntu. Apart from that, I don't see any deficiencies,
> just a linear simplification of the complexity.
>
> --
> Toby Smithe :: http://fulltinreality.com
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MuseScore playback capabilities

Toby Smithe-2
2009/8/24 Lasconic <[hidden email]>:
> Thanks for the feedback!
>
> "PortAudio can even output to ALSA, on Linux, and that's what I enable
> in Debian and Ubuntu."
> Do you mean that direct alsa output is not used? Maybe it can simplify
> the code & I/O preferences window?

Not quite. mscore, when using ALSA, is blocked by PulseAudio.
PulseAudio is set as the default ALSA "card" in Ubuntu, and locks the
hardware sound card. Thus, I wrap mscore in a helper script that
suspends pulseaudio if necessary, and then loads mscore. I also have
applied a very simple patch to the default preferences (below) to
enable PortAudio output. This is done as, when mscore initially tries
to access ALSA, it finds the default card (the suspended pulseaudio
daemon) unavailable. However, PortAudio is more intelligent, and
instantiates a list of available ALSA (and other) cards, and selects
the first one to use. This means that mscore is able to work for more
people on more occasions without tweaking.  Ideally, and though adding
extra abstraction inherently increases latency, PortAudio would be
able to output to PulseAudio, and I could do away with the helper
script, and keep pulseaudio running, allowing users to be able to also
use their cards as usual while mscore runs.

As for simplifying the code and prefs window, I think that depends on
where else mscore is used. ALSA provides a lot of versatility, and I'm
unsure whether the Fedora or PCLinuxOS packages have the same patches
as mine. Of course, the packagers are welcome to reuse my changes;
they're all easily available in a bzr repository[1].

[1] http://bazaar.launchpad.net/~mscore-ubuntu/musescore/debian/files/head:/patches/

--- trunk~/mscore/mscore/preferences.cpp        2009-05-10
10:20:29.000000000 +0100
+++ trunk/mscore/mscore/preferences.cpp 2009-05-10 11:12:32.077146352 +0100
@@ -364,7 +364,7 @@
 #else
       useAlsaAudio       = s.value("useAlsaAudio",
true).toBooIdeally, PortAudio wouldl();
       useJackAudio       = s.value("useJackAudio", false).toBool();
-      usePortaudioAudio  = s.value("usePortaudioAudio", false).toBool();
+      usePortaudioAudio  = s.value("usePortaudioAudio", true).toBool();
       useMidiOutput      = s.value("useMidiOutput", false).toBool();
 #endif



--
Toby Smithe :: http://fulltinreality.com

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MuseScore playback capabilities

wschweer
Administrator
In reply to this post by lasconic
Hi,

audio/midi is unpleasantly complex. This is my view (sorry no picture):

>From a programmers view the different audio subsystems are distinguished by
their API.
First we have the low level sytem interfaces for the different platforms:

        - ALSA/OSS (unix/linux) (OSS is obsolete)
        - MME/ASIO (Windows)
        - CoreAudio (MAC)

Second there are some API converters mainly useful for cross platform
development:

        - Portaudio
          converts to ALSA, MME, CoreAudio

For mscore this could mean that we can drop direct ALSA audio support as
PortAudio also does the job.

All this low level interfaces can be only used by one application at a time if
the soundcard does not support logical channels with an hw mixer. Otherwise
for this mixing (and other features) we need a sound daemon.
So third we have some sound daemons:

        - JACK
        - PulseAudio
        - aRts (obsolete)

For linux JACK & PulseAudio send their data to ALSA.
Problem is, that if JACK or PulseAudio is running, the audio card is blocked
and no ALSA application can access it.

To make things a little bit more complicated the different sound systems often
support more than one API. Also from time to time some people decide to
"simplify" things by creating a new API (example "phonon").

>From a programmer of a multiplatform application, this is a nightmare because
in the end you have to implement ALL soundsystems.

Werner



Am Sonntag 16 August 2009 11:21:25 schrieb Lasconic:

> Hi,
> The following PDF[1] is an attempt to sum up the playback capabilities
> of MuseScore 0.9.5.
> The goal is too make it more simple for users/new developers to
> understand what JACK, ALSA, PortAudio etc... mean and where they fit.
> I post it here to have some feedback about its accuracy and to see if
> it is useful for anyone else but me.
> It can also be a support for future development discussion on topics
> already mentioned such as Jack MIDI support, or Windows/Mac midi out.
>
> Comments very welcome!!!
>
> Lasconic
>
> [1] The pdf is on my public dropbox to allow easy update if necessary
> http://dl.getdropbox.com/u/497455/MuseScore_playback.pdf
>
> ---------------------------------------------------------------------------
>--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day trial. Simplify your report design, integration and deployment - and
> focus on what you do best, core application coding. Discover what's new
> with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Mscore-developer mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/mscore-developer

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MuseScore playback capabilities

lasconic
Administrator
Thanks for the insight!
If I understand it well, my schema is quite ok.
I would like to go back on two points to keep the discussion going.

1/ "For mscore this could mean that we can drop direct ALSA audio support as
PortAudio also does the job."
It will mean less platform dependent code in the "core" of MuseScore
and every platform going through portaudio.
If there is no advantages in doing direct ALSA output, I guess we can
remove it indeed.

2/Regarding linux issues, they are raised by the numbers of audio
servers avalaible I guess.
I tried to find my way when I did the schema to understand the pro and con
of each audio servers, where they fit, and how they work together.
As far as I understand:
- Jack output in MuseScore is great because there are a lot of apps supporting
jack and you can route the stream to them to do other processing.
- PulseAudio is the default sound server on ubuntu & fedora.
I understood there was no way to have portaudio writing to PulseAudio
directly. That's why Toby
made a wrapper to stop pulseaudio before starting MuseScore.
I find a discussion with a patch to do it. Don't know if it's a path to follow
http://music.columbia.edu/pipermail/portaudio/2008-December/009023.html

Lasconic



2009/8/25 Werner Schweer <[hidden email]>:

> Hi,
>
> audio/midi is unpleasantly complex. This is my view (sorry no picture):
>
> >From a programmers view the different audio subsystems are distinguished by
> their API.
> First we have the low level sytem interfaces for the different platforms:
>
>        - ALSA/OSS (unix/linux) (OSS is obsolete)
>        - MME/ASIO (Windows)
>        - CoreAudio (MAC)
>
> Second there are some API converters mainly useful for cross platform
> development:
>
>        - Portaudio
>          converts to ALSA, MME, CoreAudio
>
> For mscore this could mean that we can drop direct ALSA audio support as
> PortAudio also does the job.
>
> All this low level interfaces can be only used by one application at a time if
> the soundcard does not support logical channels with an hw mixer. Otherwise
> for this mixing (and other features) we need a sound daemon.
> So third we have some sound daemons:
>
>        - JACK
>        - PulseAudio
>        - aRts (obsolete)
>
> For linux JACK & PulseAudio send their data to ALSA.
> Problem is, that if JACK or PulseAudio is running, the audio card is blocked
> and no ALSA application can access it.
>
> To make things a little bit more complicated the different sound systems often
> support more than one API. Also from time to time some people decide to
> "simplify" things by creating a new API (example "phonon").
>
> >From a programmer of a multiplatform application, this is a nightmare because
> in the end you have to implement ALL soundsystems.
>
> Werner
>
>
>
> Am Sonntag 16 August 2009 11:21:25 schrieb Lasconic:
>> Hi,
>> The following PDF[1] is an attempt to sum up the playback capabilities
>> of MuseScore 0.9.5.
>> The goal is too make it more simple for users/new developers to
>> understand what JACK, ALSA, PortAudio etc... mean and where they fit.
>> I post it here to have some feedback about its accuracy and to see if
>> it is useful for anyone else but me.
>> It can also be a support for future development discussion on topics
>> already mentioned such as Jack MIDI support, or Windows/Mac midi out.
>>
>> Comments very welcome!!!
>>
>> Lasconic
>>
>> [1] The pdf is on my public dropbox to allow easy update if necessary
>> http://dl.getdropbox.com/u/497455/MuseScore_playback.pdf
>>
>> ---------------------------------------------------------------------------
>>--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day trial. Simplify your report design, integration and deployment - and
>> focus on what you do best, core application coding. Discover what's new
>> with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Mscore-developer mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/mscore-developer
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Mscore-developer mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/mscore-developer
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MuseScore playback capabilities

Brenton Partridge
Hi,

Just wanted to put my 2 cents in. I've been a happy user of MuseScore for the past week, want to help with development, so signed up for the list and what do you know, this thread was the first to pop up. I used to work on PortAudio up until a year ago, and I might be able to provide a little insight.

The situation AFAIK is thus: PortAudio can output to Jack, but I'm not sure how performant it is - but we don't need this anyways. Although it's possible to suspend PulseAudio (using http://linux.die.net/man/1/pasuspender or Toby's wrapper) for the duration we're running MuseScore, it would be ideal to keep the mixer running; among other things, it would be nice to run a media player and MuseScore simultaneously when transcribing recordings.

Theoretically, PortAudio can output to PulseAudio if properly patched because PulseAudio can represent itself as an emulated ALSA device. The patch Lasconic found enables this, and from the Audacity wiki, there's a patch for that patch that makes it non-crackly at http://launchpadlibrarian.net/20289232/audacity_1.3.5-2ubuntu0~ppa2_1.3.5-2ubuntu0~ppa3.diff.gz.

I made a suggestion a while back at http://osdir.com/ml/audio.pulseaudio.general/2007-11/msg00054.html to add direct PulseAudio support as a backend to PortAudio, to avoid the emulation step. I looked into the APIs and it looks like there is no "impedance mismatch" i.e. it should be simple to write in theory. However, nobody picked it up, and as I use a Mac and don't have a spare machine I was unable to do the development myself (it's never a good idea to write code you can't test yourself). It looks like the need for it never died though...

I've kind of moved on from the audio end of things and I'm looking at a possible big feature addition for MuseScore, a feature that not even Finale, Sibelius etc. have: I'll release more details in another post. But to sum all this up, a properly patched PortAudio should satisfy our basic audio needs. If anyone's looking at writing a PulseAudio adapter for MuseScore core, it would be great if instead you could put it into PortAudio and then a bunch of apps could benefit.

Hope this helps,
Brenton

On Tue, Aug 25, 2009 at 9:02 AM, Lasconic <[hidden email]> wrote:
Thanks for the insight!
If I understand it well, my schema is quite ok.
I would like to go back on two points to keep the discussion going.

1/ "For mscore this could mean that we can drop direct ALSA audio support as
PortAudio also does the job."
It will mean less platform dependent code in the "core" of MuseScore
and every platform going through portaudio.
If there is no advantages in doing direct ALSA output, I guess we can
remove it indeed.

2/Regarding linux issues, they are raised by the numbers of audio
servers avalaible I guess.
I tried to find my way when I did the schema to understand the pro and con
of each audio servers, where they fit, and how they work together.
As far as I understand:
- Jack output in MuseScore is great because there are a lot of apps supporting
jack and you can route the stream to them to do other processing.
- PulseAudio is the default sound server on ubuntu & fedora.
I understood there was no way to have portaudio writing to PulseAudio
directly. That's why Toby
made a wrapper to stop pulseaudio before starting MuseScore.
I find a discussion with a patch to do it. Don't know if it's a path to follow
http://music.columbia.edu/pipermail/portaudio/2008-December/009023.html

Lasconic



2009/8/25 Werner Schweer <[hidden email]>:
> Hi,
>
> audio/midi is unpleasantly complex. This is my view (sorry no picture):
>
> >From a programmers view the different audio subsystems are distinguished by
> their API.
> First we have the low level sytem interfaces for the different platforms:
>
>        - ALSA/OSS (unix/linux) (OSS is obsolete)
>        - MME/ASIO (Windows)
>        - CoreAudio (MAC)
>
> Second there are some API converters mainly useful for cross platform
> development:
>
>        - Portaudio
>          converts to ALSA, MME, CoreAudio
>
> For mscore this could mean that we can drop direct ALSA audio support as
> PortAudio also does the job.
>
> All this low level interfaces can be only used by one application at a time if
> the soundcard does not support logical channels with an hw mixer. Otherwise
> for this mixing (and other features) we need a sound daemon.
> So third we have some sound daemons:
>
>        - JACK
>        - PulseAudio
>        - aRts (obsolete)
>
> For linux JACK & PulseAudio send their data to ALSA.
> Problem is, that if JACK or PulseAudio is running, the audio card is blocked
> and no ALSA application can access it.
>
> To make things a little bit more complicated the different sound systems often
> support more than one API. Also from time to time some people decide to
> "simplify" things by creating a new API (example "phonon").
>
> >From a programmer of a multiplatform application, this is a nightmare because
> in the end you have to implement ALL soundsystems.
>
> Werner
>
>
>
> Am Sonntag 16 August 2009 11:21:25 schrieb Lasconic:
>> Hi,
>> The following PDF[1] is an attempt to sum up the playback capabilities
>> of MuseScore 0.9.5.
>> The goal is too make it more simple for users/new developers to
>> understand what JACK, ALSA, PortAudio etc... mean and where they fit.
>> I post it here to have some feedback about its accuracy and to see if
>> it is useful for anyone else but me.
>> It can also be a support for future development discussion on topics
>> already mentioned such as Jack MIDI support, or Windows/Mac midi out.
>>
>> Comments very welcome!!!
>>
>> Lasconic
>>
>> [1] The pdf is on my public dropbox to allow easy update if necessary
>> http://dl.getdropbox.com/u/497455/MuseScore_playback.pdf
>>
>> ---------------------------------------------------------------------------
>>--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day trial. Simplify your report design, integration and deployment - and
>> focus on what you do best, core application coding. Discover what's new
>> with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Mscore-developer mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/mscore-developer
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Mscore-developer mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/mscore-developer
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MuseScore playback capabilities

Thomas Bonte
Administrator
"I'm looking at a possible big feature addition for MuseScore, a feature that not even Finale, Sibelius etc."
You're making us very curious now ;-)

Brenton Partridge wrote
Hi,

Just wanted to put my 2 cents in. I've been a happy user of MuseScore for
the past week, want to help with development, so signed up for the list and
what do you know, this thread was the first to pop up. I used to work on
PortAudio up until a year ago, and I might be able to provide a little
insight.

The situation AFAIK is thus: PortAudio can output to Jack, but I'm not sure
how performant it is - but we don't need this anyways. Although it's
possible to suspend PulseAudio (using
http://linux.die.net/man/1/pasuspenderor Toby's wrapper) for the
duration we're running MuseScore, it would be
ideal to keep the mixer running; among other things, it would be nice to run
a media player and MuseScore simultaneously when transcribing recordings.

Theoretically, PortAudio can output to PulseAudio if properly patched
because PulseAudio can represent itself as an emulated ALSA device. The
patch Lasconic found enables this, and from the Audacity wiki, there's a
patch for that patch that makes it non-crackly at
http://launchpadlibrarian.net/20289232/audacity_1.3.5-2ubuntu0~ppa2_1.3.5-2ubuntu0~ppa3.diff.gz<http://launchpadlibrarian.net/20289232/audacity_1.3.5-2ubuntu0%7Eppa2_1.3.5-2ubuntu0%7Eppa3.diff.gz>
.

I made a suggestion a while back at
http://osdir.com/ml/audio.pulseaudio.general/2007-11/msg00054.html to add
direct PulseAudio support as a backend to PortAudio, to avoid the emulation
step. I looked into the APIs and it looks like there is no "impedance
mismatch" i.e. it should be simple to write in theory. However, nobody
picked it up, and as I use a Mac and don't have a spare machine I was unable
to do the development myself (it's never a good idea to write code you can't
test yourself). It looks like the need for it never died though...

I've kind of moved on from the audio end of things and I'm looking at a
possible big feature addition for MuseScore, a feature that not even Finale,
Sibelius etc. have: I'll release more details in another post. But to sum
all this up, a properly patched PortAudio should satisfy our basic audio
needs. If anyone's looking at writing a PulseAudio adapter for MuseScore
core, it would be great if instead you could put it into PortAudio and then
a bunch of apps could benefit.

Hope this helps,
Brenton

On Tue, Aug 25, 2009 at 9:02 AM, Lasconic <lasconic@gmail.com> wrote:

> Thanks for the insight!
> If I understand it well, my schema is quite ok.
> I would like to go back on two points to keep the discussion going.
>
> 1/ "For mscore this could mean that we can drop direct ALSA audio support
> as
> PortAudio also does the job."
> It will mean less platform dependent code in the "core" of MuseScore
> and every platform going through portaudio.
> If there is no advantages in doing direct ALSA output, I guess we can
> remove it indeed.
>
> 2/Regarding linux issues, they are raised by the numbers of audio
> servers avalaible I guess.
> I tried to find my way when I did the schema to understand the pro and con
> of each audio servers, where they fit, and how they work together.
> As far as I understand:
> - Jack output in MuseScore is great because there are a lot of apps
> supporting
> jack and you can route the stream to them to do other processing.
> - PulseAudio is the default sound server on ubuntu & fedora.
> I understood there was no way to have portaudio writing to PulseAudio
> directly. That's why Toby
> made a wrapper to stop pulseaudio before starting MuseScore.
> I find a discussion with a patch to do it. Don't know if it's a path to
> follow
> http://music.columbia.edu/pipermail/portaudio/2008-December/009023.html
>
> Lasconic
>
>
>
> 2009/8/25 Werner Schweer <ws@seh.de>:
> > Hi,
> >
> > audio/midi is unpleasantly complex. This is my view (sorry no picture):
> >
> > >From a programmers view the different audio subsystems are distinguished
> by
> > their API.
> > First we have the low level sytem interfaces for the different platforms:
> >
> >        - ALSA/OSS (unix/linux) (OSS is obsolete)
> >        - MME/ASIO (Windows)
> >        - CoreAudio (MAC)
> >
> > Second there are some API converters mainly useful for cross platform
> > development:
> >
> >        - Portaudio
> >          converts to ALSA, MME, CoreAudio
> >
> > For mscore this could mean that we can drop direct ALSA audio support as
> > PortAudio also does the job.
> >
> > All this low level interfaces can be only used by one application at a
> time if
> > the soundcard does not support logical channels with an hw mixer.
> Otherwise
> > for this mixing (and other features) we need a sound daemon.
> > So third we have some sound daemons:
> >
> >        - JACK
> >        - PulseAudio
> >        - aRts (obsolete)
> >
> > For linux JACK & PulseAudio send their data to ALSA.
> > Problem is, that if JACK or PulseAudio is running, the audio card is
> blocked
> > and no ALSA application can access it.
> >
> > To make things a little bit more complicated the different sound systems
> often
> > support more than one API. Also from time to time some people decide to
> > "simplify" things by creating a new API (example "phonon").
> >
> > >From a programmer of a multiplatform application, this is a nightmare
> because
> > in the end you have to implement ALL soundsystems.
> >
> > Werner
> >
> >
> >
> > Am Sonntag 16 August 2009 11:21:25 schrieb Lasconic:
> >> Hi,
> >> The following PDF[1] is an attempt to sum up the playback capabilities
> >> of MuseScore 0.9.5.
> >> The goal is too make it more simple for users/new developers to
> >> understand what JACK, ALSA, PortAudio etc... mean and where they fit.
> >> I post it here to have some feedback about its accuracy and to see if
> >> it is useful for anyone else but me.
> >> It can also be a support for future development discussion on topics
> >> already mentioned such as Jack MIDI support, or Windows/Mac midi out.
> >>
> >> Comments very welcome!!!
> >>
> >> Lasconic
> >>
> >> [1] The pdf is on my public dropbox to allow easy update if necessary
> >> http://dl.getdropbox.com/u/497455/MuseScore_playback.pdf
> >>
> >>
> ---------------------------------------------------------------------------
> >>--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> >> 30-Day trial. Simplify your report design, integration and deployment -
> and
> >> focus on what you do best, core application coding. Discover what's new
> >> with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> >> _______________________________________________
> >> Mscore-developer mailing list
> >> Mscore-developer@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/mscore-developer
> >
> >
> ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> > trial. Simplify your report design, integration and deployment - and
> focus on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > Mscore-developer mailing list
> > Mscore-developer@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/mscore-developer
> >
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Mscore-developer mailing list
> Mscore-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mscore-developer
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mscore-developer mailing list
Mscore-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MuseScore playback capabilities

Toby Smithe-2
In reply to this post by Brenton Partridge
2009/8/25 Brenton Partridge <[hidden email]>:
> Theoretically, PortAudio can output to PulseAudio if properly patched
> because PulseAudio can represent itself as an emulated ALSA device. The
> patch Lasconic found enables this, and from the Audacity wiki, there's a
> patch for that patch that makes it non-crackly at
> http://launchpadlibrarian.net/20289232/audacity_1.3.5-2ubuntu0~ppa2_1.3.5-2ubuntu0~ppa3.diff.gz.

This is intriguing; I'd never heard of this patch before. What is its
status in PortAudio trunk?

> I made a suggestion a while back
> at http://osdir.com/ml/audio.pulseaudio.general/2007-11/msg00054.html to add
> direct PulseAudio support as a backend to PortAudio, to avoid the emulation
> step. I looked into the APIs and it looks like there is no "impedance
> mismatch" i.e. it should be simple to write in theory. However, nobody
> picked it up, and as I use a Mac and don't have a spare machine I was unable
> to do the development myself (it's never a good idea to write code you can't
> test yourself). It looks like the need for it never died though...

I began this work, having a backend that could successfully connect
PortAudio applications to the Pulse daemon. However, my life became
busy before I got around to writing any playback logic, and the last
time I committed any code was six months ago[1]. I'd also be very glad
to see this work done.

[1] https://code.launchpad.net/~tsmithe/+junk/portaudio.pulse

Regards,

--
Toby Smithe :: http://fulltinreality.com

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MuseScore playback capabilities

gseaman
In reply to this post by Toby Smithe-2
Toby Smithe-2 wrote
As for simplifying the code and prefs window, I think that depends on
where else mscore is used. ALSA provides a lot of versatility, and I'm
unsure whether the Fedora or PCLinuxOS packages have the same patches
as mine. Of course, the packagers are welcome to reuse my changes;
they're all easily available in a bzr repository[1].
--
Toby Smithe :: http://fulltinreality.com
I package pclinuxos rpms for mostly music notation programs. I've been reading about linux audio for a while now, but it is still very complicated. Fortunately, mscore builds, runs and plays on pclinuxos without patches. Pulseaudio is available, but not the default.

I am glad these discussions are out in the open, so that if a patch becomes necessary, I'll be on top of it.

Galen
Loading...