If I define:
aNote[x_] := Sin[440 * 2 * Pi * x];
then this works (i.e. it produces a widget with a Play button, and clicking on this button produces an A note):
Play[aNote[x], {x, 0, 3.5}]
but this doesn't:
env[x_] := HeavisidePi[x - 1] + HeavisidePi[x - 2.5];
Play[env[x] aNote[x], {x, 0, 3.5}]
The latter just produces something like:
Sound[SampledSoundFunction[
Function[{Play`Time24},
Block[{x =
0. + 0.000125 Play`Time24}, ((HeavisidePi[x - 1] +
HeavisidePi[x - 2.5]) aNote[x] + 0.00024672) 1.00025]],
28000, 8000]]
...but no widget, and no sound.
The difference between the two is that in the second one, the sinusoidal sound wave is multiplied by an "envelope" consisting of two rectangular unit bumps of width 1, and centered at 1 and 2.5, respectively.