Page 2 of 2
Re: Automatically import raw data files?
Posted: Wed Aug 12, 2015 4:24 pm
by cyrano
My only guess here is that it probably is a compressed format since storage is very limited on the ios platform. With high compression and hopefully, lossless. But there's a lot of those around...
Re: Automatically import raw data files?
Posted: Wed Aug 12, 2015 4:26 pm
by Gale Andrews
steve wrote:Gale Andrews wrote:Audacity should decode ATRAC if you add FFmpeg to your computer. Decoding will not work if the file is encrypted (most ATRAC files are encrypted).
There are many variations of ATRAC so I'd not be confident that FFmpeg (using a reverse engineered decoder) will succeed.
According to
https://www.ffmpeg.org/general.html ATRAC 1, 3 and 3+ are decodable.
steve wrote:Would FFmpeg be able to correctly identify ATRAC if it is headerless?
I don't think so. You usually have to use -f to tell FFmpeg the input format of raw audio, but there is no way in Audacity to pass that information to FFmpeg.
IMO, Robotman should ask RODE what format the audio is in, and if it is headerless, given using this was their suggestion.
Gale
Re: Automatically import raw data files?
Posted: Thu Aug 13, 2015 12:22 am
by robotman
Just to clarify ... importing as Raw Data does work.
I was asking if there's a way to get Audacity to automatically detect the file as raw data and open it.
Thanks for your suggestions.
Re: Automatically import raw data files?
Posted: Thu Aug 13, 2015 8:31 am
by cyrano
What you're asking is how OSX can detect raw data and send the file to Audacity when you double click it.
This can be done with RCDefaultApp, see:
http://www.rubicode.com/Software/RCDefaultApp/
It's a prefs panel that will load into System Preferences and allows you to set an app for every creator code, every file extension and every file type.
It might not work with raw data if the file extension differs. E.g. you have a file with an extension .1 and .2 and you would need to define each one, as raw dat usually has no creator code.
Re: Automatically import raw data files?
Posted: Thu Aug 13, 2015 2:01 pm
by Gale Andrews
The
OS X built-in method to change default application for a file type should work too.
I don't think that is what Robotman was ultimately asking. He asked:
Robotman wrote:Is there a way to have Audacity automatically recognize and import the files as raw data files so I don't need to choose "Import Raw Data" for each file?
Which I answered:
Gale Andrews wrote:Audacity can't pass a file with .RAW extension directly to the "Import Raw Data" dialogue.
The only way you might get Audacity to open the file automatically is to install
FFmpeg and see if it will open the file, just in case the file has headers but Audacity's default PCM decoder cannot understand them.
After installing FFmpeg, open
Extended Import Preferences. If your files have .RAW extension, create a rule called
Or create two rules per the extensions you mentioned:
Then drag "FFmpeg-compatible files" to the top of the importer order, uncheck "Attempt to use... " and OK. There is no way to add the raw importer to the list.
If after double-clicking the file in Finder to open it in Audacity you still see the suggestion to open using Import Raw, that is what you will have to do.
Gale
Re: Automatically import raw data files?
Posted: Thu Aug 13, 2015 10:05 pm
by robotman
I already have FFMPEG installed.
I set the OS to open raw files in Audacity and created a new rule for the "*.raw" extension.
Now when I double-click a file in Finder, Audacity opens and thinks for a while. It looks like it tries to open the file with the MP3 or WAV decoder but then gives an error saying it can't recognize the file and try Import Raw Data.
Based on Gale's answer, this means the FFMPEG is not automatically able to open the raw file.
There doesn't appear to be any macro control in Audacity except for Chains, but I don't see an ImportRaw command in Chains which would be the only other way I can think something would work for automating with the built-in features of Audacity.
Can anyone think of a 3rd party utility (or using scripts) that would detect the file extension, open Audacity, and then send keystrokes to go through the Import Raw Data menu? I'm not familiar with what Apple Scripts can do and if they can intercept the system's file association process.
Appreciate everyone's help and any other ideas you may have.
Re: Automatically import raw data files?
Posted: Fri Aug 14, 2015 10:57 am
by steve
The main reason that most file types have "headers" is to tell applications about the format so that applications can open the file correctly. For audio files it can be very difficult to work out what the exact format is unless you already know, which is why headers are usually used for public files.
Audacity's "Import Raw" feature attempts to work out what the format is for files that don't have header information -
sometimes it gets it right.
Audacity can't pass a file with .RAW extension directly to the "Import Raw Data" dialogue. That would be a
feature request.
Re: Automatically import raw data files?
Posted: Fri Aug 14, 2015 12:43 pm
by cyrano
robotman wrote:Can anyone think of a 3rd party utility (or using scripts) that would detect the file extension, open Audacity, and then send keystrokes to go through the Import Raw Data menu? I'm not familiar with what Apple Scripts can do and if they can intercept the system's file association process.
AppleScript could do it. But Audacity is not scriptable, afaik. Could Automator record it?
Re: Automatically import raw data files?
Posted: Fri Aug 14, 2015 1:28 pm
by Gale Andrews
cyrano wrote:AppleScript could do it. But Audacity is not scriptable, afaik.
There is GUI scripting, which has to be enabled in System Preferences.
http://www.macosxautomation.com/applesc ... scripting/
http://www.mactech.com/articles/mactech ... index.html
Gale