Changed osc_next_sample() to tick()