Scripting Audacity's custom preferences

Hi all,

Even though I have been using Audacity for 2 years now, I am new to these forums. I have found audacity very quick and convenient in audio waveform analysis…

I have so many custom shortcuts and preferences in audacity and usually they are mostly different from audacity’s default preferences and shortcuts. Lately, my PC has been running into problems and at some occasions when I run audacity, my computer crashes. I believe this has to do with Logitech USB audio device that I have been using. This crashing is very unpredictable. I am so dependent on my PC’s customization that I can not afford some tweaking of the system (reinstalling windows, audio driver …).
When pc crashes, after booting audacity, I loose all my shortcuts and preferences - all of them. So I have to spend some 5 minutes re-customizing.

Is there a way where I can list my customizations in a script, and whenever my PC crashes, I run the script to restore all audacity pref. and shortcuts.


Any help will be appreciated.

Thanks

Is that belief based on the fact that there are no crashes when Logitech is not connected?

You need to fix those crashes, but we are missing essential information - your version of Windows, version of Audacity (see the pink panel at the top of the page) and model number of the Logitech device.

If you have recently upgraded the same machine to a new version of Windows, you may need drivers for that new version of Windows for your built-in device and also for Logitech (if it does not use standard Windows USB Audio Class drivers).

Please see this FAQ that tells you how you can determine the cause of the crashes: http://manual.audacityteam.org/o/man/faq_errors.html#reboot.

You have no usable system to customize if it keeps crashing. :wink:

If you have Windows settings that you need to keep, the best approach once the machine is stable would probably be to back up regularly to a system image. If some disaster strikes, restore Windows from the last good system image, which preserves all your settings, apps and drivers.

Why does that happen? Because Audacity never quits cleanly, and so your reconfigured settings are never saved?

Just backup the audacity.cfg settings file - see http://manual.audacityteam.org/o/man/preferences.html#stored. If you launch Audacity with you backed up audacity.cfg present, Audacity will launch with those settings.

Bear in mind that not all settings may necessarily be written to audacity.cfg before you quit Audacity. So you may have to quit Audacity cleanly at least once.


Gale

Thanks for your reply.

I noticed that while rescanning audio devices while audacity was running, my PC crashed - the same way i mentioned in my earlier post. This could have some correlation with my earlier statement that ‘‘booting audacity crashes the system’’ because when starting audacity, it checks for audio devices connected to the system (kind of what Rescan Audio Devices does).

I reinstalled Realtek audio driver and so far problem hasnt occured. Hope it wont.

Thanks for mentioning audacity.cfg file. I was looking for a config file like that; I have made a backup of that, so if audacity makes PC crash this time, I will replace the saved config file so most of the audacity shortcuts will be preserved.


THANKS AGAIN FOR YOUR SUPPORT. My issue is resolved, thanks to your config file path and perhaps because of reinstalling audio driver.

Audacity cannot crash the PC because it does not have kernel privileges to do so. Drivers have such privileges.


Gale

The other mechanism you can use for your preferred shortcuts is to go to Edit>Preferences>Keyboard and use the Export button to export your shortcuts to a file - you can then later use the Import to restore them.

WC

Gale, thank you for your consistent help. I really appreciate that. It is people like you who make this open source project thriving.

WC… ma man, ma man!! Gale helped me trouble shoot problem with audacity, and you give me a nice trick! exactly what I was looking for…

If you only want to backup shortcuts, exporting an XML file of your key bindings is the best solution.

But if want to backup other preferences as well, which you said, there is no great point in exporting the bindings. The audacity.cfg files stores the non-default bindings in its [NewKeys] section.


Gale