Hi Coda Community!
Iβm excited to share a new function Iβve been working on that makes it easier to analyze audio files directly in your Coda docs. This function extracts key metadata from audio files, such as duration, sample rate, bitrate, number of channels, and more. It also parses file names to extract serial numbers and parts (e.g., βAβ, βBβ, etc.).
What It Does
This function accepts either a URL or a file attachment and returns the following details:
- Duration: Total duration of the audio file in seconds.
- Serial Number: Extracts the serial number from the file name (e.g.,
001
fromTrack_001_A.mp3
). - Part: Identifies the source version (e.g.,
A
,B
, etc.) from the file name. - Sample Rate: Retrieves the sample rate of the audio file (e.g., 44.1 kHz, 48 kHz).
- Bitrate: Retrieves the bitrate of the audio file (e.g., 128 kbps, 320 kbps).
- Channels: Retrieves the number of channels (e.g., Mono, Stereo, 5.1 Surround).