fixed oscillator to keep track of its own playing state. added gain node.