Sonice Input File Format
Before encoding ogg files, Sonice looks in its info directory to find out what tags should be added. This page documents what you can put in that directory to get the tags you want on your oggs.
One way to add tags is with vorbiscomment-styled files, which are a newline-separated list of KEY=value pairs. The other way is with YAML files that contain the same sort of information, but in a different form.
vorbiscomment-style Description
I haven’t bothered to add support for the older vorbiscomment-style input tag format. Support may be added at a future date.
YAML Description
There are four files (all of them optional) that control metadata and how oggs are produced. They are:
- globalcomments.txt for comments that are duplicated in all tracks
- comments.txt for track-specific comments
- globalpragmas.txt for pragmas that are duplicated in all tracks
- pragmas.txt for track-specific pragmas
Each file, if it exists, must be a valid (at least according to the version of PyYaml installed) YAML file.
globalcomments.txt
This file contains a bunch of key:value pairs, and usually contains tags like artist, album, and date. An example:
artist: Moby album: '18' date: '2002'
Note that the items starting with a number are quoted for safety.
comments.txt
The comments.txt file is a list of key:value pairs, and usually contains tags like track. An example:
- title: Rhapsody in Blue - title: An American in Paris - title: Porgy and Bess part: Part 1 comments: > Overture - Summertime - A woman is a sometime thing - Honey man - My man's gone now - I got plenty o' nuttin' - Bess, you is my woman now - title: Porgy and Bess part: Part 2 comments: > It ain't necessarily so - Strawberry woman - Crab man - I loves you, Porgy - There's a boat dat's leaving soon for New York - Oh where's my Bess - Oh Lawd, I'm on my way
A few things to notice:
- Each list element (denoted by a -) represents one track. Track numbers are taken care of automatically.
- Indentation (spaces only in this example) delineates structure. Put another way: if you change the indentation, willy-nilly, you might break things.
- The > placed right after the key in each comment field means that the following indented lines are really one line, and that each newline is to be processed as a space (much like HTML).
globalpragmas.txt
Pragmas (a term borrowed from the C preprocessor) are a way to configure various switches through textfiles as opposed to doing so at the command line.
More information is available on the pragma list.
Example
One example is “Who Let the Dogs Out” by the Baha Men; the CD was poorly mastered and so its entire volume settings are off, and will confuse vorbisgain into quieting the entire CD. Since I don’t plan to set those sorts of settings manually, I’ll just turn them off by putting this in globalpragmas.txt: vorbisgain: -
pragmas.txt
The pragmas.txt file contains track-specific pragmas to tweak individual tracks to perfection.
More information is available on the pragma list.
Example
Consider this example comments.txt from a CD I have of Aaron Copland’s works:
- title: Fanfare for the Common Man - title: Rodeo part: Buckaroo Holiday - title: Rodeo part: Corral Nocturne - title: Rodeo part: Saturday Night Waltz - title: Rodeo part: Hoe-Down - title: Quiet City performer: - Philip Collins (trumpet) - William Harrod (French horn) - title: Billy the Kid - title: Appalachian Spring
By default, sonice will append (part) to a file if the ogg has the part tag defined, so the files will look like this by default:
Fanfare for the Common Man.ogg Rodeo (Buckaroo Holiday).ogg Rodeo (Corral Nocturne).ogg Rodeo (Saturday Night Waltz).ogg Rodeo (Hoe-Down).ogg Billy the Kid.ogg Appalachian Spring.ogg
However, let’s say that we want the Rodeo tracks to look like
Rodeo - Buckaroo Holiday.ogg Rodeo - Corral Nocturne.ogg ...
instead.
What we’ll do is disable the part pragma: