Thanks for the suggestions! Using record~, buffer~ and waveform~ worked okay, although I must say I’m a little surprised that Max doesn’t have better support for this (a multi-channel scope that lets you pick which channel to use as trigger, just like on a digital oscilloscope). Maybe I’m just holding it wrong.
Follow-up question: I’m trying to implement basic phase distortion synthesis as described here. That needs two phasors: one for the base frequency and one for the resonance. Whenever the base phasor resets, the resonance one should also.
I started by using two phasor~ objects, but couldn’t find a way to reset a phasor exactly when another one resets. I then tried using a phasor~ and a rate~, which almost works: if I set rate~ @sync cycle, then the rate resets when the phasor does - if the rate multiplier changes at least once per cycle. If the multiplier is constant, it does not work. Any ideas on how to fix that? Are there other objects that are better suited?
Patch
----------begin_max5_patcher----------
695.3ocuWssaiBCD8YxWgEOtaJx1bIv9z9erppxgXQcEwDYbxlrUMe6KLFRR
aID2BgW.wvXNy4LWr40YNtKK1yKcQ+B8Gjiyqybb.S0FbZd1wcMaeZNqDbyU
x+awxWbmadkluWClyKXqVxjYsuPtccwVcNWCqhzXsTeHmC925mwI8gMbSP3B
eDziMudCSm9rPl8jhmpMdDrXgGdNhDB2hv0WoTO7o0HVAHTEkODhuHdDxSgS
ss2lMq9xbK48ZdYIKi+Ihi87GLmuAei.JhCfaIdgWmuAIcxW52fuYLg7X2Li
ZOyJEYRVt6bjqPp6kl99907K3bBsJGGfuBO6Nsd5qqXq4Zt5ItjszDh3ugDb
kR8edDg8BGbRuQZrPS7i.0HHr2R8QKyeEZ+iiSBkwP9O.Gd6pcJcz3bYZwF9
UHH9pDTqDYYb0kpPsob9NdNrRObq8TVdZZwVo9xFnN3OIhXx0IPCfO9zsNU.
x8NqWUrS7lhDO0LV2OxTxG2WsNEe+K1QOLU7FZt8ol7duamQRlBdOYC2hMDu
YteuDO9dS7zCo47oYBW.PXZbvsGpS7u27Vwz7ineWdPlh.MXRjfEFIH.j.BN
oOMX7R87+shk9kGx2U7Sg1zHRx4TX80NmUcuyfadlUVnNhBCmn4UvfJRBv5E
A8V9dStCqxMWH+3Og.HWa+8BRYwVUZaz1dhWzYvWwK0BISKJjW3TUIDhfdrS
M2Vfp+UhaBTazLHjhs.n5ACCmRV.T8YrFLPA1.z67oPsp4bUSBvjOCLdP.So
1TszMkm.jqO233q1TrsETCsEgXSWea3LLjroaLbL.x2l193w.IKmXN5kl1.7
GxrcVYZ1zfsYyNtprY4.nU6W9RA39h4viBo4Qe3QEemn0+PvBSUs8ltZussJ
yNi6iibMKsnBX4VQC1UH+1r+C.uiVs.
-----------end_max5_patcher-----------