I think in your example trial you meant to type:
/ ontrialbegin = [trial.toneon.insertstimulustime(sound.rainsound, counter.tonetime.selectedvalue)]
rather than
/ ontrialbegin = [trial.toneon.insertstimulustime(shape.blank, counter.tonetime.selectedvalue)]
Is that it?
No, meant to type what I actually typed. But either works -- the only point is that *some* stimulus must be there to establish that frame.