Page 2 of 2
Re: "theft" of audio output by Audacity on Mac
Posted: Fri Jul 04, 2008 7:28 pm
by Leland
galeandrews wrote:Hi Leland
Not being on Mac, I've never *completely* understood the problem in 1.2.5/6. I believe if you asked Audacity to record say 16 bit 48000 Hz, and observed Audio MIDI Setup, you'd see it change to 48000 Hz and then other apps may not have sound. But given the Audacity default is 32 bit 44100 Hz, and Audio MIDI Setup (I thought) had no 32 bit option, I don't know what Audio MIDI changed to exactly that then meant 16 bit 44100 Hz apps had no sound.
In the pre-1.2.4 series and early 1.3.x releases, I believe portaudio/Audacity would open each device with all the standard formats and rates and if it got an error, it knew it wasn't that combination wasn't supported. Unfortunately that had the side effect of change the system side settings. Dominic did get this worked out a bit in the last few 1.2.x releases.
Here's where this started to improve (I think) on the 1.3.x series:
http://www.nabble.com/Will-PortAudio-ch ... l#a4700805
But can you clarify with 1.3.5, if you set it to record 24 bit 48000 Hz, doesn't it now change Audio MIDI settings if you open that up and take a look (if not, are we sure Audacity really is recording 24 bit 48 000Hz)? Or does Audacity change the Audio MIDI Settings, but then change them back to default when it exits?
Here's a few snaps that will show the settings not changing.
Here's my AMS settings for the input device. This was snapped before Audacity was started.

- AMS before starting Audacity
- before_recording.png (61.98 KiB) Viewed 3956 times
Here's the AMS settings while Audacity was recording. I'd change the Audacity settings to 48000 and 24-bit.

- While recording with Audacity set to 48000/24-bit
- while_recording.png (61.98 KiB) Viewed 3958 times
Finally, here's the what the AMS settings wound up being after I exited Audacity.

- After exiting Audacity
- after_recording.png (61.98 KiB) Viewed 3954 times
I just don't see anything changing.
I'll have to look into your "(if not, are we sure Audacity really is recording 24 bit 48 000Hz)" question...
Leland
Re: "theft" of audio output by Audacity on Mac
Posted: Sat Jul 05, 2008 10:38 pm
by wildsage2
Mea culpa, mea maxima culpa: I have yet to try anything on 1.3.5. But perhaps some answers to my mistakes. It has been some time ago that I had the problem with 1.3.3 so I may not be able to answer Leland's questions adequately. After this event I just stuck to 44100 Hz 2-ch 16 bit for all my projects..... settings in both Mac and Audacity. What I do remember, and may have been a mistake on my part, was that I manually changed the Audio Input settings in the Mac Audio Midi Setup to agree with those that I was going to try recording in Audacity, which if I remember correctly was 48,000 Hz 2-ch 24 bits. I figured they had to match. Am I wrong? Should one just leave the Mac setting alone at its 16 bit default? As Leland notes, if you set Audacity to a non-default Mac setting (like 24 bits) nothing happens in the Mac Audio Setup, hence my manual change. And Gale's question, "if it doesn't change are we really recording in 24 bits" is an interesting one. Well, something about that whole thing messed me up, I got an error and it wouldn't record properly. So I abandoned that recording session altogether, reset manually the Mac input settings to their normal default, but in the end could get no sound OUTPUT from any other Mac application other than Audacity! Including after changing the Audacity settings back to 16 bit, existing all, and even after rebooting. All the screen grabs Gale provides "configuring" Audio Output on the Mac shows "Output is not supported". Whatever was "hung" in the system just wouldn't return normal "output" once exiting Audacity. Oops. Apologies to all. I see in Leland post there is also "Audio Output" supported. This is what I failed to realize was available through the Properties for drop-down menu on the left (odd that it isn't on the right where the Output is!!), and probably would have solved my problem. But if input doesn't change, is it always the case that output will change if you choose different recording sample rates? And does it mean that you have to reset this manually each time? (FYI: This all took place on OS X 10.5.2 or maybe 10.5.3. I now have 10.5.4, and all latest ITunes etc.)
So the simple question: do you change the Mac Input or not, regardless of the Audacity recording settings chosen? And what would those recommended Audacity settings be? And must you reset output when you are finished?
Please note: I am a total amateur and new to audio recording and editing. I am however a Ph.D. in music, and a composer. I had hoped to use Audacity to restore some of my old performances and compositions from poor audio cassettes to a better state in a more enduring format.
Re: "theft" of audio output by Audacity on Mac
Posted: Fri Jul 11, 2008 5:14 pm
by wildsage2
I hope I haven't been abandoned here. From my previous ramblings did emerge at least a couple of basic questions that someone can no doubt answer: do you change the Mac Input settings or not, regardless of the Audacity recording settings chosen? And what would those recommended Audacity settings be? And must you manually reset Mac output when you have finished each session?
There were a few questions raised by others: if the Mac input remains unchanged (without manual adjustment), and the Audacity recording settings are 24 bit, for example, are you really recording in 24 or not?
Couldn't the check-box for "don't change system settings" be returned to future releases of Audacity for Mac?
Re: "theft" of audio output by Audacity on Mac
Posted: Sat Jul 12, 2008 1:50 am
by Gale Andrews
wildsage2 wrote:Do you change the Mac Input settings or not, regardless of the Audacity recording settings chosen? And what would those recommended Audacity settings be? And must you manually reset Mac output when you have finished each session?
Bear in mind I'm not on Mac, but I don't believe what you did in 1.3.3 was wrong, where you say "manually changed the Audio Input settings in Audio Midi Setup to agree with those that I was going to try recording in Audacity, 48,000 Hz 2-ch 24 bits. I figured they had to match." In case of problems, matching at least the sample rate in AMS and Audacity is exactly what we recommended in the past, and still do. Especially for those still on OS X 10.4, Audio MIDI Setup remains somewhat fickle. The same goes for using Audacity on Mac to record from external devices, which can impose another layer of matching.
As to recommended settings, they would be the Audacity defaults, 44100 Hz, 32 bit float.
I think what Leland is saying is that in later versions of 1.3, the PortAudio v19 we use there should not in principle change the AMS settings. It uses newer API's (called AUHAL) to access the hardware. According to the AUHAL documentation, "default settings should be reasonable: they don't change the Sample Rate of the device and don't cause interruptions if other devices are using the device". This is backed up by Leland's experience, and mine in dealing with questions on this issue from users on 1.3.3 or later (though I wrongly assumed such users were avoiding the problem by using a checkbox which did not actually exist). This does not mean to say that AMS may not have glitches. These may well sometimes require sample rate/format matching with AMS so that Audacity can get the sample rate it wants from the hardware.
wildsage2 wrote:There were a few questions raised by others: if the Mac input remains unchanged (without manual adjustment), and the Audacity recording settings are 24 bit, for example, are you really recording in 24 or not?
Leland will have to answer, but I'd now be surprised if Audacity wasn't really recording 24 bit; if Audacity is querying the sound device and not changing its settings, then I would assume PortAudio19 actually allows it to operate at a certain level of independence from AMS.
wildsage2 wrote:Couldn't the check-box for "don't change system settings" be returned to future releases of Audacity for Mac?
I wouldn't support that as necessary on Leland's evidence.
I do have one query of my own, which is why in Leland's shots, the input and output in AMS is never simultaneously supported?
Gale
Re: "theft" of audio output by Audacity on Mac
Posted: Sat Jul 12, 2008 5:53 pm
by Leland
Sorry ol' sagie one, I completely forgot about this thread until I got a gentle prod as a reminder.
I think Gale's responses are correct and in answer to his final question...
The display only makes it look like they aren't supported at the same time. But, what's actually happening is the it's only displaying the properties for one device at a time. That "Properties for:" drop down selects which device whose properties you want to modify.
Leland
Re: "theft" of audio output by Audacity on Mac
Posted: Sun Jul 13, 2008 2:22 am
by wildsage2
This has all been very useful for me, if a bit tedious for all of you. Thank you.
Just one last bit of confusion on my part: if 32-bit float is the recommended setting for Audacity to record, but it isn't available as a setting on Mac, does one just proceed, or can one only choose a sample rate that one can match on the Mac systems input? From the discussion of the 24-bit example, I would take it to mean that you don't need to change the Mac input and that "record" is handled through the Port-Audio-19 without modifying the AMS . Or have I still got it wrong?
(I appear to be "wild"... but as to the "sage" part, we must be talking about the plant, and not a man of wisdom!)
Re: "theft" of audio output by Audacity on Mac
Posted: Sun Jul 13, 2008 5:00 am
by Gale Andrews
wildsage2 wrote:if 32-bit float is the recommended setting for Audacity to record, but it isn't available as a setting on Mac, does one just proceed, or can one only choose a sample rate that one can match on the Mac systems input? From the discussion of the 24-bit example, I would take it to mean that you don't need to change the Mac input and that "record" is handled through the Port-Audio-19 without modifying the AMS .
In 1.3.3+, if you can press the Record button in Audacity and start and stop the recording properly at your chosen sample/rate format, you don't need to go into AMS to change anything. Almost no sound devices record in 32 bit resolution, and on Windows most inbuilt sound devices are still 16 bit. Recording (and working) in 32 bit float by default is something Audacity does for a number of reasons:
* Normalised floating point values are quicker and easier to process on computers than fixed integer values, avoiding rounding errors
* Greater dynamic range can be retained after editing
* There is effectively no noise floor
For example, with fixed integer data, applying a compressor effect to lower the peaks by 9 dB and separately amplifying back up would cost 9dB (or more than 2 bits) of signal to noise ratio (SNR). If done with floating point data, the SNR of the peaks remains as good as before (except that the quiet passages are 9dB louder and so 9dB noisier due to the noise they had in the first place).
Gale
Re: "theft" of audio output by Audacity on Mac
Posted: Thu Jul 17, 2008 5:56 pm
by wildsage2
It is getting clearer and clearer to me. Audacity's default sample format is 32 bit float. Is the default setting in Audacity 44100 Hz and should it be maintained? I don't recall changing anything in Audacity, but I don't see a reset to default option either. Is there one? What advantages/disadvantages are there to using different Hz settings?
The default Input on the Mac my system is 44100 HZ at 16 bit 2-channel (other choices are 2-ch 20 and 2-ch 24 bit.) It is a relief to think that it is no longer necessary to mess with AMS.
Another Mac related question: having finally found the Output controls (hiding as they are on the left panel even though Output is on the right panel), I notice that on my computer my Output properties are 44100 Hz at 2-ch 24 bit. Does any body know if this is the default? I don't remember changing anything here as I only just discovered the Output properties panel. All system audio and other audio play fine with this setting. Just curious as to why it isn't 2-ch 16 bit, the "normal" CD setting.
Sincerely,
The fatigue inducing wildsage2: Christopher
Re: "theft" of audio output by Audacity on Mac
Posted: Thu Jul 17, 2008 10:54 pm
by Gale Andrews
wildsage2 wrote:Is the default setting in Audacity 44100 Hz and should it be maintained?
Yes - I said the defaults are 44100 Hz 32 bit float which are the recommended settings.
wildsage2 wrote: I don't see a reset to default option either. Is there one?
http://audacityteam.org/wiki/index.php? ... defaults_2
wildsage2 wrote: What advantages/disadvantages are there to using different Hz settings?
Generally, use the highest rate your sound device supports. If your recording device was sending output at more than 44100 Hz, it would be better to record at that rate (assuming the inbuilt sound isn't already resampling it to 44100 Hz before it gets to Audacity). If the highest supported rate of your playback device was 48000 Hz, it would make sense to set the Audacity rate to that, but this is less important for playback because if you imported say a 22050 Hz file then the project rate should change to that anyway. The objective is always to avoid resampling from one rate to another if possible because that is lossy (especially downsampling of course).
wildsage2 wrote: Another Mac related question: having finally found the Output controls (hiding as they are on the left panel even though Output is on the right panel), I notice that on my computer my Output properties are 44100 Hz at 2-ch 24 bit. Does any body know if this is the default? I don't remember changing anything here as I only just discovered the Output properties panel. All system audio and other audio play fine with this setting. Just curious as to why it isn't 2-ch 16 bit, the "normal" CD setting.
24 bit gives you more dynamic range than 16 bit. But if you only play CDs and 16 bit files or sources you might be better to use 16 bit.
Gale
Re: "theft" of audio output by Audacity on Mac
Posted: Fri Jul 18, 2008 6:38 pm
by wildsage2
Many thanks for all of your help.
Christopher
