soundtrack object
This method will write a song to a wave file.
bool write(string filename)
Parameters:
filename
a string containing the desired file name for the wave file.
Return value:
true on success, false on failure.
Remarks:
Use the add_channel method first to add some music, otherwise you will create an empty wave file.
Example:

    // Write a song.

    #include "soundtrack.bgt"

    void main()
    {
    soundtrack s;
    string preamble = "t140u6";
    string chords1 = "@1v97l2a8r100q12[C&E&G]2[<B&>E&G]2[<B-&>E&G]2[<A&>D&F]2<F+&A&B&>D<A-&B&>D&E<A&>C&E<G&>C&E<E&G&>C<D&F+&>C<F&G&>C&D<F&G&B&>D";
    string chords2 = "[<B&>D&G]2[C&E&G]2q20<B4&>D4&B4C8&E8&>C8<<l4B&>D&B<A&>C&Aq12l2<G&B&>Gp8<G&B&>C&G<B&>D&G<B&>D&F<B&>D&G<G&>C&E";
    string chords3 = "<G&>C&E<F+&>C&D<F&>C&D<F&B&>D";
    string chords4 = "[<A&>C&F]3<G&B&>F<G&>C&El8q8r10<B-&>C&Gl4<A-&>C&Fl1<G&>C&Ep8l4<A-&>C&E<A-&>C&Dp4l1<E&G&>C";
    string chords = chords1 + chords1 + chords2 + chords3 + chords2 + chords4;
    string bass1 = "@3r100C2.CC2.CC2.CC2.C<B2>E2<A2.A>D2.D<G2.";
    string bass2 = "E2.E<A2.A>F2.FE2<A2>F2<B2>E2<A2>";
    string bass3 = "D2.D<G2.>F";
    string bass4 = "D2.D4<G2.G>C1C1C4<G4p4C1";
    string bass = bass1 + "G>" + bass1 + ">F" + bass2 + bass3 + bass2 + bass4;
    string melody1 = "@2a10r10E2.p4E2.p4EE8FCD2.p4p8DD8E4.<B8>C4.DC<BA2p8>E.";
    string melody2 = "l4G2.p4G2.p4B>C8<BAG2.p4p8B8B8>C8<B4.A8G4.>D8C4.<";
    string melody3 = "E8E2.p8D8CD2A4.";
    string melody4 = "l4EEF8F4.GA2B2>C1.";
    string melody = melody1 + "D2.p4" + melody1 + "D2p8A4." + melody2 + melody3 + melody2 + melody4;
    s.add_channel(preamble + "o3" + bass);
    s.add_channel(preamble + "o2" + bass);
    s.add_channel(preamble + chords);
    s.add_channel(preamble + melody);
    s.add_channel(preamble + "o5v90" + melody);
    s.write("song4.wav");
    }