Hi,
First remark, I think there is something wrong in your 2nd \amp pattern.
This will results in having the 1st tick of 4 at an amp of 1, while having the 3 next at 0.25. While your \dur pattern may results of having more that 4 ticks by beat. E.g. the \dur and \amp patterns could result in having [0.125,1] [0.125, 0.25] [0.125, 0.25] [0.125, 0.25] [0.25, 1] … And you have your next emphasis at 0.5 and not one 1.
So I would suggest you to write that 2nd Pbind like this:
b = Pbind(
\instrument, \noise,
\freq, 2200,
\dur, Pn(Pconst(1,Prand([Pseq([0.125],2),0.25],inf)),inf,\bar).trace,
\amp, Pfunc({|evt|
(evt.bar?false).and({0.5.coin}).if({1},{0.25})}).trace
).play
The Pn(Pconst,\bar) for \dur ensures that you have a \bar marker at true when all your ticks duration have reached a some of 1 (=1 full beat). It will be at nil in the other cases. So whith that \bar marker youu know you are on the beat.
The (evt.bar?false).and({0.5.coin}).if({1},{0.25})})
tells that whenever you are on the beat and with 50% chances the amp will be at 1, in all other cases it will be at 0.25.