--no-sequencer

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

--no-sequencer

David Faure
Do I understand correctly that the --no-sequencer command-line option is supposed to disable
any sound output? From what I can see, extending the selection (Shift+Right) still plays a sound.
(I'm seeing the same in my unit test)

I'm tempted to add
    if (!m_document->isSequencerRunning()) return;
at the beginning of NotationScene::previewSelection()
and MatrixScene::previewSelection()

Sounds right, or am I confusing concepts?

--
David Faure, [hidden email], http://www.davidfaure.fr
Working on KDE Frameworks 5


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Rosegarden-devel mailing list
[hidden email] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
Reply | Threaded
Open this post in threaded view
|

Re: --no-sequencer

Ted Felix-2
On 04/26/2016 08:29 AM, David Faure wrote:
> Do I understand correctly that the --no-sequencer command-line option is supposed to disable
> any sound output?

   I don't think so.  I think it's supposed to disable the sequencer thread.

> From what I can see, extending the selection (Shift+Right) still plays a sound.

   Sure.  That doesn't involve the sequencer.

> I'm tempted to add
>      if (!m_document->isSequencerRunning()) return;
> at the beginning of NotationScene::previewSelection()
> and MatrixScene::previewSelection()
>
> Sounds right, or am I confusing concepts?

   I believe you are confusing concepts.

   The "no sequencer" thing may have been for debugging the UI without
the unstable, in-progress sequencer thread getting in the way.

Ted.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Rosegarden-devel mailing list
[hidden email] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
Reply | Threaded
Open this post in threaded view
|

Re: --no-sequencer

David Faure
Hi Ted,

Thanks for your clarifications. Of course they trigger more questions from me :-)

On Tuesday 26 April 2016 09:15:37 Ted Felix wrote:
>    I believe you are confusing concepts.
>
>    The "no sequencer" thing may have been for debugging the UI without
> the unstable, in-progress sequencer thread getting in the way.

So the "sequencer" is the thing that plays an entiere piece in the background ?

I notice, though, that with --no-sequencer, RosegardenDocument::initialiseStudio()
is not called. Is it still OK to play sounds then?

In fact, from what you say, I wonder: is --no-sequencer still useful for anything, or can we clean it up?

Finally, would it make sense for me to add setSoundEnabled(bool) / bool isSoundEnabled()
to RosegardenDocument ? I guess only the unittest would use that then, unless we
see a need for a command-line arg that disables sound usage altogether (e.g. for
people with a crash in libjack, who just want to write and print music).
I found a #ifdef NO_SOUND in the code that seemed related to this idea, but it's not
set anywhere (-> I'll clean it up).

--
David Faure, [hidden email], http://www.davidfaure.fr
Working on KDE Frameworks 5


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Rosegarden-devel mailing list
[hidden email] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
Reply | Threaded
Open this post in threaded view
|

Re: --no-sequencer

Ted Felix-2
On 04/26/2016 09:46 AM, David Faure wrote:
> So the "sequencer" is the thing that plays an entire piece in the background ?

   Yes.

> I notice, though, that with --no-sequencer, RosegardenDocument::initialiseStudio()
> is not called. Is it still OK to play sounds then?

   Probably not.  In fact, I just tested it with a sequence with two
synths, and the second one doesn't work in this situation.  So, this is
a feature/bug.

> In fact, from what you say, I wonder: is --no-sequencer still useful for anything, or can we clean it up?

   It doesn't appear to save on CPU usage which is my main area of
interest.  It looks like the audio subsystem is still churning away
sucking up CPU.

   I don't see the point then.  I would wait for Chris and Michael to
weigh in before undertaking any cleanup.  They may have some historic
perspective that will help make the right decision.

> Finally, would it make sense for me to add setSoundEnabled(bool) / bool isSoundEnabled()
> to RosegardenDocument ? I guess only the unittest would use that then, unless we
> see a need for a command-line arg that disables sound usage altogether (e.g. for
> people with a crash in libjack, who just want to write and print music).

   Running rg in some sort of minimal no audio/no MIDI mode might indeed
be useful to someone.  We do have a Windows port that has no sound
support (IIRC).  So, that might come in handy on that side.

 > I found a #ifdef NO_SOUND in the code that seemed related to this
idea, but it's not set anywhere (-> I'll clean it up).

   This might be used by the Windows port.  It might be set by the
Windows solution/project files.

Ted.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Rosegarden-devel mailing list
[hidden email] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
Reply | Threaded
Open this post in threaded view
|

Re: --no-sequencer

Richard Bown-2
In reply to this post by David Faure
On Tue, Apr 26, 2016 at 3:46 PM, David Faure <[hidden email]> wrote:
 
I notice, though, that with --no-sequencer, RosegardenDocument::initialiseStudio()
is not called. Is it still OK to play sounds then?

Studio is another concept (to do with MIDI maps loaded against physical instruments).
 
In fact, from what you say, I wonder: is --no-sequencer still useful for anything, or can we clean it up?

It might be... I keep on meaning to have a look at the Windows code again and attempt to integrate it into the trunk.  And some of these flags are useful as pointers as to where to look for things (alongside the ALSA and JACK flags of course).  Also when porting it's good to try to build first without the sound bits.

It would be good to get this part of the code tidied up so that it's clear why its there and how it can be used.  I'm continuously struggling for time however..

R

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Rosegarden-devel mailing list
[hidden email] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
Reply | Threaded
Open this post in threaded view
|

Re: --no-sequencer

D. Michael McIntyre-3
In reply to this post by Ted Felix-2
On 04/26/2016 10:05 AM, Ted Felix wrote:

>     Probably not.  In fact, I just tested it with a sequence with two
> synths, and the second one doesn't work in this situation.  So, this is
> a feature/bug.

It seems to me "no sequencer" implies "there may be a studio for file
loading purposes, but none of the connections to anything are hooked up,
because there is no backend, and no sound will be produced."

Seems like the proper solution would be to leave the noise playing code,
and if that code worked correctly, it wouldn't play any noise when
--no-sequencer.  Seems like the caller shouldn't have to worry about
this, and the sequencer should deal with disabling itself.

I don't have a strong sense of what is right and good with this one.
The most useful thing it could be used for is running Rosegarden as a
GUI only on BSD or OS-X or something.  People used to do that.
--
D. Michael McIntyre

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Rosegarden-devel mailing list
[hidden email] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
Reply | Threaded
Open this post in threaded view
|

Re: --no-sequencer

David Faure
In reply to this post by Ted Felix-2
On Tuesday 26 April 2016 10:05:26 Ted Felix wrote:

> On 04/26/2016 09:46 AM, David Faure wrote:
> > So the "sequencer" is the thing that plays an entire piece in the background ?
>
>    Yes.
>
> > I notice, though, that with --no-sequencer, RosegardenDocument::initialiseStudio()
> > is not called. Is it still OK to play sounds then?
>
>    Probably not.  In fact, I just tested it with a sequence with two
> synths, and the second one doesn't work in this situation.  So, this is
> a feature/bug.

I'm confused by "feature/bug" and by the fact that, if you meant bug, it contradicts
your first reply where you said --no-sequencer should NOT disable all sounds output.

What's the conclusion? Should --no-sequencer disable all sounds output?

> > In fact, from what you say, I wonder: is --no-sequencer still useful for anything, or can we clean it up?
>
>    It doesn't appear to save on CPU usage which is my main area of
> interest.  It looks like the audio subsystem is still churning away
> sucking up CPU.
>
>    I don't see the point then.  I would wait for Chris and Michael to
> weigh in before undertaking any cleanup.  They may have some historic
> perspective that will help make the right decision.
>
> > Finally, would it make sense for me to add setSoundEnabled(bool) / bool isSoundEnabled()
> > to RosegardenDocument ? I guess only the unittest would use that then, unless we
> > see a need for a command-line arg that disables sound usage altogether (e.g. for
> > people with a crash in libjack, who just want to write and print music).
>
>    Running rg in some sort of minimal no audio/no MIDI mode might indeed
> be useful to someone.  We do have a Windows port that has no sound
> support (IIRC).  So, that might come in handy on that side.
>
>  > I found a #ifdef NO_SOUND in the code that seemed related to this
> idea, but it's not set anywhere (-> I'll clean it up).
>
>    This might be used by the Windows port.  It might be set by the
> Windows solution/project files.

Right, but then this would indeed be about disabling all sound output, not just the sequencer.


How about I rename --no-sequencer to --no-sound, so we have only one
concept (I would then merge isSoundEnabled() and isSequencerRunning()
since it's the same concept).

--
David Faure, [hidden email], http://www.davidfaure.fr
Working on KDE Frameworks 5


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Rosegarden-devel mailing list
[hidden email] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
Reply | Threaded
Open this post in threaded view
|

Re: --no-sequencer

Chris Cannam

On Sun, May 1, 2016, at 10:12 AM, David Faure wrote:
> How about I rename --no-sequencer to --no-sound, so we have only one
> concept (I would then merge isSoundEnabled() and isSequencerRunning()
> since it's the same concept).

"--no-sequencer" dates from when the sequencer was a separate process
rather than a separate thread. IIRC it essentially meant "don't start
the sequencer process, and ignore any actions that would normally depend
on it".

I think it was mainly useful on systems where the soundcard
configuration wasn't working properly, so as to edit a composition
without having to fix your ALSA config. It seems fair enough to me to
merge it with "--no-sound", giving one option that basically means
"don't try to open any of the system-specific sound drivers".


Chris

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Rosegarden-devel mailing list
[hidden email] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel