flac2aac

What is flac2aac?

flac2aac is a simple frontend to Apple's Music.app (previously iTunes) and
flac. It currently is written in AppleScript. Commenting is supported
through metaflac; see the code to add your own fields if necessary.

Recently added was a routine to convert ReplayGain differentials (from
REPLAYGAIN_TRACK_GAIN) to iTunes' Volume Adjustment. This eliminates
having to rely on an external app like iVolume. In fact, a few quick tests
here show that the Volume Adjustments determined by flac2aac were nearly
the same as iVolume-1.6 for the standard ReplayGain 83dB level, for levels
other than 83dB, and when "Adjust for iPod with buggy firmware" was
emulated. Warning: this does not do any kind of analysis on the sound data
so clipping may result when gains higher than 83dB are desired.

What does flac2aac require?

Starting with v0.5, flac2aac requires macOS 10.15, Apple's Music.app, flac
and metaflac 1.1.1 and later.

For v0.4d and earlier, flac2aac requires macOS 10.2-10.14, iTunes 4.x or
later, and flac and metaflac 1.1.1 and later.

Usage

Double-click to start, click Run in Script Editor to run.

If you want to use a gain other than 83dB, set "desired_loudness" to an
integer other than 83. If the AACs you're making will be played on an
iPod, the value 92 is preferable; additionally, you should set "with_ipod"
to true.

Known Issues

flac2aac was hacked together from example code and working AppleScripts
from all over the place. It's amazing that it works.

- Will crash old versions of iTunes unless "iTunes -> Preferences ->
  Importing -> Play songs while importing" is UNCHECKED
. There is no known
  way to disable this through iTunes' AppleScript API.

- Will lock up if an info window is open in iTunes before the script
  accesses iTunes

Future Release Plans

- Fine-tune the REPLAY_TRACK_GAIN to Volume Adjustment conversion
- Use droplet instead of file selection dialog; in the meantime one should
  be able to select multiple individual files for transcoding
- Encode multiple AIFFs at once in iTunes
- Implement better argument checking / error detection and handling

Licensing

Feel free to hack flac2aac up, but give me credit where credit is due as I
have done for others in this code.

Download

It is highly recommended that you download the latest version:

flac2aac-0.5b - ChangeLog (2023-07-12)

Past Releases

flac2aac-0.5 - (2020-04-19)
flac2aac-0.4d - (2019-07-28)
flac2aac-0.3d - (2007-08-21)
flac2aac-0.3c - (2007-05-10)
flac2aac-0.3b - (2006-09-12)
flac2aac-0.3 - (2006-04-24)
flac2aac-0.2d - (2005-02-26)
flac2aac-0.2c - (2004-11-20)
flac2aac-0.2b - (2004-09-06)
flac2aac-0.2 - (2004-08-23)
flac2aac-0.1 - (2004-08-12)

Contact

Using flac2aac? Want more features? Hate flac2aac? Let me know.


Badlands Home