HI Jerome
Well done for getting as far as you have and thanks for giving a progress report.
I am not sure how generally useful the shortcut to toggle the waveform view is, even though I can see its value for those using Repair to remove clicks.
Does your command work on all tracks or only the selected or focused track? And does toggling to Spectrogram change the "Default View Mode" in Tracks Preferences? If that preference is set to "Waveform (dB)", does your shortcut still toggle the track to Spectrogram?
It occurred to me it might be more generally useful if Tracks Preferences had an additional "Toggle Shortcut View Mode" with the same choices as "Default View Mode". Then your shortcut (or maybe even a button on the Track Control Panel) would toggle between the current view of the track and the "Toggle Shortcut" view set in Preferences.
So you could have one track showing default Waveform view which could be toggled to the "Toggle Shortcut" view, and another track which you had changed from default "Waveform" to "Waveform (dB)" view (by using the Track Drop-Down Menu) and which could also be toggled to the "Toggle Shortcut" view.
Or each track could specify its own toggled view in the Track Drop-Down Menu, so the toggled view could be different per track. The toggled view would still have to default to some other view unless changed (the default other view would be set by the "Toggle Shortcut" preference if we had that as well).
What do you think about any of that? I know it's no use to you, but I'm thinking of an improvement that may be general enough to be committable.
As for the audio restoration, do you mean you are using Click Removal and then Repair? I wonder if this is the source of the problem somehow, or is it that there are too many interactions between the samples when using Repair on a long section? What length of audio are you processing, and does the problem lessen if you process (say) 44100 samples (one second at default sample rate)?
I'd be interested in seeing a patch for what you have done (preferably separate patches for the shortcut and the audio restoration, but not essential). I know the restoration isn't usable yet, but I'm interested in seeing a decent click (and clip) repair feature work on longer or entire selections so I'm collecting a number of ideas and patches for possible progression in the future.
Gale
switch to Spectogram display by code
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: switch to Spectogram display by code
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Re: switch to Spectogram display by code
Hi Gale,
Thanks for your profound reaction... Hower you are miles ahead.
I am just putting the first steps on a long road to maybe nothing, each step of which takes hours of struggling through the Audacity sources and you are asking all sorts of detailed questions about a far future, some of which I hardly understand, as you know Audacity much better than I do.
I will try to answer as well as possible:
- On the toggle of the waveform view:
At the moment the switching is done quite oversimplified. It switches both stereo tracks (it assumes stereo because my testfile is stereo) from any non-Spectrum mode to the first Spectrum mode and back to the first Wave mode. But now I have the basic code for that, it is quite simple to incorporate the nuances you described. For me that are finishing touch matters which might become important at a later stage.
- On the audio restoration:
Don't think in terms of existing Effects menu items. All software actions are new: the click detection as wel as the repair of a click. Only the repair code itself is 'stolen' from Dominic Mazzoni and adapted to my needs.
The maximum allowed repair lenght is set in my code to about 225 and could be changed as needed but that doesn't affect the maximum of 128 pixels set in the Effects::Repair menu. At the moment I need a definition of the maximum allowed crack lengt as it defines the shift-right distance, being the track-display-width minus the maximum crack length. Once the automatic crack repair is done 'in silence' like all existing Effects menu items, then there is no need to restrict the maximum crack length.
The code I have now working, is in fact experimental and permits me to find out the best approach to replace cracks by a waveform which does not crack and also does not generate other unwanted noise.
The crack detection is done simply by using the FastFourier output as shown in Spectrum view. It works quite well, but would need a further finishing touch once the best repair method is found.
And as I said in my progress story: both stereo tracks are processed per screenview, the one after the other, which on my laptop means the sample equivalence of some 1442 pixels. When both stereo tracks are processed, the screen is scrolled to right and the processing cycle is repeated untill the end of file is reached or the process is paused or quitted by the user.
Of course a possible part of the finishing touch could be to make this automatic repair processing available to selections.
But Gale, be patient!
Hope this extra info is useful for you.
Kind regards,
jerome42
Thanks for your profound reaction... Hower you are miles ahead.
I am just putting the first steps on a long road to maybe nothing, each step of which takes hours of struggling through the Audacity sources and you are asking all sorts of detailed questions about a far future, some of which I hardly understand, as you know Audacity much better than I do.
I will try to answer as well as possible:
- On the toggle of the waveform view:
At the moment the switching is done quite oversimplified. It switches both stereo tracks (it assumes stereo because my testfile is stereo) from any non-Spectrum mode to the first Spectrum mode and back to the first Wave mode. But now I have the basic code for that, it is quite simple to incorporate the nuances you described. For me that are finishing touch matters which might become important at a later stage.
- On the audio restoration:
Don't think in terms of existing Effects menu items. All software actions are new: the click detection as wel as the repair of a click. Only the repair code itself is 'stolen' from Dominic Mazzoni and adapted to my needs.
The maximum allowed repair lenght is set in my code to about 225 and could be changed as needed but that doesn't affect the maximum of 128 pixels set in the Effects::Repair menu. At the moment I need a definition of the maximum allowed crack lengt as it defines the shift-right distance, being the track-display-width minus the maximum crack length. Once the automatic crack repair is done 'in silence' like all existing Effects menu items, then there is no need to restrict the maximum crack length.
The code I have now working, is in fact experimental and permits me to find out the best approach to replace cracks by a waveform which does not crack and also does not generate other unwanted noise.
The crack detection is done simply by using the FastFourier output as shown in Spectrum view. It works quite well, but would need a further finishing touch once the best repair method is found.
And as I said in my progress story: both stereo tracks are processed per screenview, the one after the other, which on my laptop means the sample equivalence of some 1442 pixels. When both stereo tracks are processed, the screen is scrolled to right and the processing cycle is repeated untill the end of file is reached or the process is paused or quitted by the user.
Of course a possible part of the finishing touch could be to make this automatic repair processing available to selections.
But Gale, be patient!
Hope this extra info is useful for you.
Kind regards,
jerome42