tone_synth object
This method writes the current data to a sound object in memory.
sound@ write_wave_sound()
Parameters:
None.
Return value:
A sound object with the data loaded into it on success, or an inactive sound object on failure.
Remarks:
This method writes the data directly to a sound object in memory, without using a file in any way. The sound object may take a while to be created, depending on the complexity of the piece.
Example:

    // Generate and play a B major chord.

    tone_synth synth;

    void main()
    {
    synth.note("B3, D#4, Gb4", 4);
    sound@ output=synth.write_wave_sound();
    if(output.active==false)
    {
    alert("Error", "The sound object could not be created.\nReason: " + get_last_error_text());
    exit();
    }
    output.play_wait();
    }