York University Music Technology Group
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Reading further, compiling or using any portion of this code will be deemed as acceptance of these conditions in full.
This file covers the design of, and changes to, the bfdec.c B format decoder subcommand for the Snack audio extension for Tcl
http://www.speech.kth.se/snack/
http://tcl.activestate.com/man/
To call it, use
sound bfdec outsound options
where 'sound' is an input snack sound "command" to be processed by the 'options'. The input file has to be read into this sound.
This decoder does no optimisation of speaker feeds, this is purely under user control. Note that it is the users' responsibility to allocate enough channels in the output soundfile. An arbitrary number of speakers is allowed (actually limited to 256 at present -must implement that arbitrary sized array stuff....) and it can take first, second or third order input soundfiles. In the simplest case, a comma separated list of speaker positions (either in cartesian x,y,z or polar r,a,e form, but not mixed) is fed into the decoder and it ouputs a channel for each speaker in the list with a simple decode function applied. This includes delay equalisation but no gain equalisation for distance, unless the individual speaker gains are supplied in the list. More complex forms allow individual speaker gains to be added to the list, then individual weights for the first/second/third order components, then weights for the individual channels. This allows the user to build a script which can do whatever s/he wants in terms of optimising the decoder, without having to re-code and re-compile bfdec. You can also set a flag to produce diametric pairs output, in which case you only input the coordinates for one speaker out of each pair in use. The output sound needs to be declared with one extra channel over and above those allocated for the speaker outputs, in which the W signal will be placed. Note that delay equalisation is automatically switched OFF when this option is in force.
| -polar | use polar cordinate format (default is cartesian coordinate format) |
| -linGain | treat gains (if used) as linear multipliers |
| -logGain | treat gains as decibels |
| -inOrder | Allows soundfiles of higher order to be decoded at a lower one |
| -outOrder | chooses which one |
| -inStartSample | First sample to process in input file |
| -inEndSample or | |
| -inLength | are Interchangeable, but don't use both! Note that the user has to ensure that there actually ARE that many samples in the file. |
| -outStartSample | Where to put the decoded data in the output file |
| -inChannelOrder | takes a comma separated list in string form, which details the ordering of the channels which are included in the infile. User has responsibility for ensuring the correct functioning of this. |
| -speakerListType |
speakerListType takes a number indicating the type, which is one of
|
| -speakerList | List of coordinates as comma separated list in string form (+ possible extras as indicated above) |
| -dPairs | Use diametric pairs algorithm (see notes at start) |
| -zeroBase | Set overall weighting of zeroth order components (W) |
| -firstBase | Set overall weighting of zeroth order components (X,Y,Z) |
| -secondBase | Set overall weighting of zeroth order components (R,S,T,U,V) |
| -thirdBase | Set overall weighting of third order components (K,L,M,N,O,P,Q) |
README - general stuff on building extensions to Snack
BFREADME - how to build the BF package
|