Menu

#524 cmdline options to undo previous options

bugfix
closed-accepted
None
5
2014-06-22
2014-06-10
No

currently, Pd has no way to disable a cmdline option. e.g. the flag -noautopatch disables the auto-patching feature, but there is no corresponding -autopatch flag.
similarily, on linux there is no way to switch to the default MIDI-API (OSS) once the alsa-API has been chosen (using the -alsamidi flag).

this is annoying in three cases:

  • partially overriding preferences:
    if the user added some flags to their preferences (e.g. to use alsa-MIDI as the default; or run in verbose mode), they cannot override these defaults on an ad-hoc basis without either completely disabling their preferences (using the -noprefs flag) or by modifying them (which they probably don't want to, as these are the settings they prefer)

  • scripts that call Pd with flags:
    some scripts (I use) call Pd with a number of flags that makes them fit for the target purpose (e.g. running on an embedded device, thuse using -nogui) and other wise pass cmdline args unchanged to Pd (e.g. the patch to open, the search-paths to use).
    it is often desirable to be able to override one of these flags for testing purposes (e.g. starting up the GUI when running the script in an interactive session with X-Forwarding)

  • binaries with different defaults:
    sometimes binaries that pretend to be Pd-vanilla (like the Debian package "puredata") chose slightly different defaults (Debian uses alsa as the default MIDI-API, as this provides an out-of-the-box solution for much more people than OSS). how to restore the original "defaults"?

the attached patch adds a number of additional flags that negate previous settings (e.g. -gui to override a -nogui flag) when it seems to make sense.

i left out the -prefs flag (overriding a -noprefs option) mainly because this could be useful for specifying an alternative preferences-file (-prefs /tmp/myotherprefs).

1 Attachments

Discussion

  • danomatika

    danomatika - 2014-06-11

    Maybe this is relevant to another issue, but isn't it reasonable at this point to use Alsa as the default api on Linux in vanilla?

     
  • Miller Puckette

    Miller Puckette - 2014-06-22

    Looks like ALSA's the default after all (I was wrong in saying OSS was in some earlier mail)

     
  • Miller Puckette

    Miller Puckette - 2014-06-22
    • status: open --> closed-accepted
     

Anonymous
Anonymous

Add attachments
Cancel