The first thing to understand is why it keeps playing forever rather than just 0.2. You can see what's going on if you run the Pbind
equivalent:
p = Pbind(\instrument, \default, \dur, 0.2, \freq, 400).play;
If you run this you don't just hear a single note, you hear the note being hit again and again forever, until you run
p.stop;
So why is that? It's because all of the "values" specified are simple numbers or symbols (\default ... 0.2 ... 400
), and these are always interpreted as meaning "continue forever or until something else stops us".
If you wanted Pbind to play just one note you would need to use at least one pattern in there which limits itself to just one item:
p = Pbind(\instrument, \default, \dur, 0.2, \freq, Pseq([400], 1)).play;
So you can do the same thing with Pmono:
p = Pmono(\default, \dur, 0.2, \freq, Pseq([400], 1)).play;
This has exactly the same result as the Pbind example, actually, but that's because it's playing only one note. We can make the difference a little bit clearer with these two-note examples:
p = Pbind(\instrument, \default, \dur, 0.4, \freq, Pseq([400, 500], 1)).play;
p = Pmono(\default, \dur, 0.4, \freq, Pseq([400, 500], 1)).play;
The first plays two separate notes, the second plays one with a pitch change halfway through.
So, note that your inference was correct - the node does get deleted after the Pmono terminates - but your Pmono was not terminating.