Reply To: translate msp [line~] into gen~ [counter]
There most certainly is a counter operator in gen~, although it was not among the early basic list of operators. It counts samples, of course. About the only differences you’ll notice is that you’ll have to add the "reset on next" count stuff yourself, and the additions of modes of counting [up/down/updown] are left as an "exercise to the genner."
In connection to a little piece of gen~ mischief I was putting together, I realized that it would be very useful to have something in the toolbox that would smooth an input over N samples – which I think is basically what you have in mind. Implementing it proved a more challenging task than I initially assumed. While I languished in the Slough of Despond, I mentioned my suffering to Emmanuel Jourdan [who is owed a drink by quite a number of you by now, and many more by me personally], who kindly suggested that I consider something like this (which you should paste into an empty gen~ object):
----------begin_max5_patcher---------- 746.3ocyXssbaBCD8Y3qfgGabb0JD25z9P+A5OPmNcvFZsx.BOfbpSyj+8Bq fDm5VirsfvKlYWjkN6Q6Udz1xcU49rZWmO37UGKqGssrPUsJr5jsbKR1uNOo FWlqH6Wkqtycg5Uxr8RTcdhb8ldshcEk6j4YR7u.cZUpjOrMScdttNeq6U7T bSZ13aoP+trscK4he98pr0R0eAhhVRV3PCwGdAn.YI44M5GkBoHo.OA2OWwS xO.SbQOjnGr7Z9uwkCzkjVsOYa29yhqiOZVCuXWgCXDNgLLm.j31GgdWJm.i Nm7QSvE.6Dbge7R+F+BJEcOnsByS2i2YDpvaXpvG8J78muTwMFgJnCRELxr2 q3lOYl7E.LHazmB0e9lt3ViPEmJ0YbHZ8sl+71wXCuVVV8fIHj3SUJgfDBig EVYAyWeCi0tQzvtGLLRIXF2rw6MASDdJlHPEgL6yfllkKSLAa3epvDFC63hg 9Gdgy2vDtvPETFLJwG66zibobAYJ3BpScQYobiS48YUNewoNoXady3OlnE8g 6PWQQfpir4IG0Xq+OGFxw17vch6SG+PDbKcy4h+dNVDUs5eMOTWtqZc+cYmy syK.KMqVxEIRdo3v0Pd0h1vSSyDGRKE7zskbgrtuRZPq8CpZnGJ8xAwqSVkm gz4+9JzjFf+kgehJSWiqauzXfehFFPz.FfAgiVNDroCOTMvyLCNwSGb7z41h Nc3goCd7lL7nysEkLcvQmXcJLc3Q6fc3Lxd1zST6GegfEAinOKLBIO0x.BuF 7CPrp2tww.704B.NyxWcErhQCH.wOJ7Fge7RBtT7SA1yRuQFPzEgeJAPfefz Hf+PcS3BSRFkHMiGml7aw51b64b6BXygrP7iGBAAKoGKRA7iE.pOtFJMB28w 5V7+pLuij7hQiqKydrN1lZLkjsaaF8rtCfnY0LX1ckUshAKPQtPIhy93VkcO ue8dnljplgsjMSZsqRM9z9n.W61y4I6+.fONAQL -----------end_max5_patcher-----------
Perhaps it may prove to be as instructive to you as it was to me.
Rock on, B.