BFMixer A GUI class for mixing BFormat files together
See a screenshot at http://students.washington.edu/joshp/BFMixer.jpg
To pull up a new mixer, type:
BFMixer.new;
The BFMixer can handle up to ten BFormat Tracks at one time. In addition, each track can have independant amplitude and an envelope applied to it. In addition, the final result has an overall amplitude and envelope control, as well as several output options.
The Tracks
Each track needs to first have a file loaded into it. Press the load file button to select a soundfile. Once a file is selected, a few defaults are filled in. The file is placed at theh begining of the mix (time 0), a default amplitude of 0dB is given, as well as a default envelope of [[0, 1, 1, 1], 1].
Changing a tracks start-time in the overall mix: enter a new time in the "File Start In Mix" number field.
Trimming a file: to take time off the begining of the file, enter a value in the "Skip Time Into File" field. To trim from the end, enter a value in "Shorten File".
Changing overall amplitude of a track: Either adjust with the "Amp (in dB)" slider, or enter a value to the left of the slider. To mute a track, press the "mute" button.
Adjusting the tracks envelope: Envelopes are in the following format: [[time1, value1, time2, value2 ... timeN, valueN], curve]. For envelopes, all times are scaled from 0 to 1 (0 is the begining of the track, 1 is the end). All values are in dB. A curve value of 1 produces linear breakpoints. >1 produce concave curves, and values between 0 and 1 produce convex curves. If the base button is pushed (changing its value to exp) exponential curves are produced. Beware of curves crossing 0 when using exponential envelopes.
The Mix as a whole
Adjusting tracks within the mix: Each files duration is represented as a blue bar in the mixer. This bar will adjust its placement and length according to the length of the track and its placement in relation to the rest of the files in the mix. You can also move the soundfiles placement by ctrl-clicking the bar, and moving it.
Playing a mix: Press the play button to start playing, press stop to stop. You can also adjust the current start time by placing a value in the "Start Time In Mix" number field. The output format can be adjusted to the following: BFormat (for mixing BFormat files into a new BFormat file), stereo, quad, UHJ (a two channel encoded file which can be decoded back to BFormat, the decoded to any other speaker configuration) and a 6 channel "5.1" mix. The channel order in "5.1" is lf, cf, rf, rr, lr, low-pass. This is not a Dolby encoded signal! The individual tracks could be split into 6 mono tracks, however, and encoded using your favorite encoding software.
Writing a new soundfile: Use the write file button to create a mixed soundfle in NRT mode. Because NRT doesn't work with the localhost server running (this server is started for you by default, and a bug in Mac OS creates this problem), the server is quit, and the new file is written. I know this is messy, and when I have some time, I will no longer limit the mixer to a specfic server, or kill anything for you... but for now, this is how it works. The file will be written with the output parameters selected.
Saving and loading a mix: The parameters of a mix can be saved to a text file for later usage. Select "Save Current Mix" and create a file. "Load a Mix" will load a previously saved mix.
Close All: Closes all.