Project

General

Profile

Feature #741

Command line control of plugin parameters

Added by Chris Laurie over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Minor
Assignee:
-
Category:
audtool
Target version:
Start date:
September 06, 2017
Due date:
% Done:

100%

Estimated time:
Affects version:

Description

I am looking for a way to change the parameters of a plugin via the command line. Specifically, the speed-pitch plugin. What I have in mind is something like this:

audtool plugin-parameter speed-pitch speed 1.15

audtool plugin-parameter speed-pitch pitch 0.891

When I send it the speed is updated and if the plugin is enabled then it has immediate effect.

History

#1 Updated by Michael Schwendt over 6 years ago

Not possible without a major redesign/rewrite of the plugin infrastructure and the plugins themselves. Btw, the configuration of most plugins is tied to their graphical UI and an "Apply" button that triggers reconfiguration.

#2 Updated by Chris Laurie over 6 years ago

OK I can think of an alternative:

A command line option that forces a reload of the config information. That way I can update the config file myself, and then signal audacious that the config settings has changed and that it must reload the information. It seems audacious reads it once on load and only saves it back when the application closes.

#3 Updated by John Lindgren over 6 years ago

  • Description updated (diff)
  • Category set to audtool
  • Status changed from New to Closed
  • Target version set to 3.10
  • % Done changed from 0 to 100

Five years ago, I would have said the same thing as Michael, but the infrastructure has been improved since then, so this is actually not hard to implement. It won't work for every plugin, but many of the newer ones (including Speed and Pitch) have been designed to be less coupled to their settings GUI. So I went ahead and implemented this, but I'll just repeat what I said in the manual page:

       --config-get [section:]name
              Print  the  value of a configuration setting.  Any use of this command is entirely unsupported.  How to
              find the section and name of a given setting is left as an exercise for the reader.

       --config-set [section:]name value
              Change the value of a configuration setting.  This command is unsupported and dangerous.  It might have
              unexpected  side  effects  (such  as crashing Audacious), or it might have no effect at all.  Use it at
              your own risk!

That said, you might find the following useful (if you build the latest Audacious from Git):

audtool config-set speed-pitch:speed 1.15
audtool config-set speed-pitch:pitch 0.891

#4 Updated by John Lindgren over 6 years ago

Chris Laurie wrote:

... It seems audacious reads it once on load and only saves it back when the application closes.

The config file (and playlists) are also auto-saved on a 5 minute timer, for the record.

#5 Updated by Michael Schwendt over 6 years ago

Well, with fairness in mind, only making it work for all plugins would invalidate what I've written above. I've had $subject in mind, not only a single plugin. Many plugins won't pass on changed configuration parameters to their backends "magically" and would need to be changed.

#6 Updated by Chris Laurie over 6 years ago

Apologies for the late response but thank very much you for this enhancement!

I am having some trouble with the windows build so I noticed there was a new windows build (3.9a 2017-09-12) released for another issue. I tried that one and it seems that this functionality is not in that build. If that was intentional, then please ignore this update.

#7 Updated by John Lindgren over 6 years ago

3.9a is still version 3.9, just another build. This feature will be in 3.10.

Also available in: Atom PDF