If I understand correctly fluid.buf2list
only outputs the samples from the first channel of a buffer? Is there a way to make it output all the channels (maybe prepended with the channel index), I only see the @startchan
attribute. Also the @numvalues
doesn’t seem to have any effect. If I choose @numvalues 1, I would expect it to only output the first value in the channel of the buffer.
Use case: I have a fluid.bufmfcc~
→ fluid.bufstats~
and now I want to get just the mean for every of the 13 coeffs to use for a dataset. If I get it correctly the fluid.bufmfcc~ fills a buffers with 1 coeff for every channel (so 13 channels, and n-samples for framelength), then fluid.bufstats~ should fill the buffer with also 13 channels and 7 samples per channel for the mean etc. So then I would like to for example roll out all the means of the 13 channels as a list.
For now I’ve made a workaround with an uzi
and peek
, but was wondering if I’m maybe overlooking something or that there are different objects to help achieve this task.
My workaround:
----------begin_max5_patcher----------
1133.3ocwXssiihCD8YxWAxOssTlVFHWf8s8aXebzpHC3P7LN1HrIcldzre6
quv0zPh6nIYenIMU4KUcpSU1T+bgGHkeFK.9+o+W88794BOOiHs.ul28.GQm
ynHgYX.V8wTbEXoUk5MBihkFcAMBKQUniXItZGlgRoXsNX+D30x1YD1H0JR9
iRr0T.fk9fTDq.3+OcKpL6.gUrqBmIsiJX6lUuBW5uEZ9YMT+LL7UX2jH4Fa
lm9suDEtEnE9qEKzOV5p6heSM6V2UhOa1aPoe1ADigohPJQHmDNBmzkCl0ku
pqtIYswUiL+DGecWcMX3RoBWVGrwC8.6IT7IbkfvYCrIO.prbfXuASQCKeia
Vn3kchHLqnvNQU3Sj142KEUobHoxapqLtK37lUf9kgmiqX0DioXEpBPMljIT
vT7IQIJyNYcDqUcODEaHAAgFnYyJCYXULrGhTg5BJO6637ADRUfnDyHrxJr.
yjHYis2oNGuGUSk61yYRA4ciEDn.9ozuuwBmTo1GLl+eUQPzNGnnhjyYZiXT
jPKtc6TgeSTW+r2YLifgJmXxJRfBVlQoP4j0hTTkNP0jc1Fo.RNmNVU27n38
xF0kDE0eLJJ4kyqrhTb3JyMkqTd7ZqsQiXWMypcmhSH2IPmFi1RDk1juNd4O
iXjiHIVRrgfPXmRaEpChrJNkNxesZNMglbEGOC+FIWdvrQCICpgSJaIQftnb
No.KjikIQEhwRDxeXA8AhpSaxg2IwGKoJuX7.TYGpBPhC72DMCrknMD.5qwO
LmdXwuQxunHnolVW95k04fiU7wZc2nd2r07VG85ZMqOQS9ifsOGMuAk8BFZg
Y7iGU4yFk+AgIewWfTvG1mvxwmGNRq.MqnUl4HhlpP2IhM5XiwGcPX64+q+w
8YY+sJSTLKrFLKrlbMXcOkij5iOsmKMPfK+i9OhF1tQrYq8XHaIWXzkmF8gS
jBhAOIz0GNKhFdeDUWvinXMUMLz.KgI1WtFdD8jvi2ouVTwqKuCPI7pYuKcH
CNIvBGleVGbSVB7YwRj9o9j6Hy6pPh49pNl+D.2ZOQOwQBCbySBZpem3GDcW
YQQtfNeFTxVkIHLwU9C7IARkX72coFdz8UwwVN1wZNqMfTR7sPmvjjemnyC4
NAi9juqyJVs1saEDEFM68Bza2K9JqnrVN4UBB9MBXVm8NJ5.coHaTORbK7X0
r3g9JCu3qtEc6kkNgn0XgORZu1jeItp8CecFu5+hEJgM28PM9kV+z.ofWWk0
RR5hp9icR0kukDV2Wv809qdXFoSgxOqcD3rUns2fGjUnSsczNfORzPeJkwKu
ocXs3vGkcD3J6nC4df3g67iGmc.snsC7iMOb6H3+edpolPrS1A7ghGwtxOzU
smwNZD11xLftuH46r8.ZGRJqHo0Rag2g8.7S0qhBJOEQunACS0JiE8FWSmVM
d23Z+1FudIZ0z90Ip0ucHJMKBstuB6ns9hlZp2lKZl4EMx7iMwb9FXdYyKMQ
g4ZZ4hes3+.IIzyD
-----------end_max5_patcher-----------
</code></pre>
I’ve found the [fluid.bufflatten~]
, which for now is good enough I think combined with a [zl.slice 13]
.
1 Like
Perhaps some fluid.bufselectevery~
might help in there too?
1 Like
or just the startframe numframes arguments of bufflatten?
1 Like
Yes, [fluid.bufflatten~ @numframes 1]
does the trick to get only the mean from every channel. Thanks, one object less haha
1 Like
I can make it work with a [fluid.bufselectevery~ @framehop 7]
, but then I still need a [fluid.bufflatten~]
afterwards because otherwise its still 13 individual channels. Unless I miss some other argument I could give it to also flatten the buffer. Anyway thanks for the suggestion, because didn’t know this object existed yet
This is what the @axis
attribute does, if I follow you correctly.
----------begin_max5_patcher----------
1839.3ocwY0rjahCD9r8SgJpbXlccbgj.LNmR18QXOlcKWBaYOJACTfXhyjJ
4Ye0O.FrEXvF6bXr8HIn6uu9G0p0OlNwJH9.MyB7AvmASl7ioSlnFRNvjh+e
h0dxg0gjL0xrVGueOMhaMSOGmdfqG+ERTDMDfKmgsQMdbvWduCrbvn78rnPJ
W8tfEClP3qegEsaUJcMWqKHezb6Y.nyB4WdP4mH641f+63KJNmW9lrkC9yoS
keLaj.BxDPruVffb+sADHv.RvKuVjXqvfmyCDI+U91szTPH46BA7ASnYwPQy
Rs8XoBRt1OPvHkh8bn3OD3eirmiE+xQ7mq5+7D+Zg3O+xmKjEQWGmGodXrAn
6VtxswQ7L1aT4THo4oCFQt1Hxd0Zs9637TFM05Rr0ROEa4qb.V3+PXqOEFBx
H6SBoY.BGvh1PO.dilFCHqSiyx.Ed4YBnAPyNl9oAugJgVJMSHEBmEGsx3Jp
yrCOX20WRM3E3ZtUX7CmnXQfpfeCQKnAG66gNGWib3xdZVFYG0P3BPGi3UNk
VP7umP0JmkUkZTGjtFAIpCqmGVauzIEfZThZEkvq.kQzuITty.41vb1l4A4a
QgrLN3iYhHx0TP.3ijCrriFQitrmwGx2gYNwYvbhshLP3E5si092tiJmDjy4
wQsZcCHQ6LiF7wLVohbYbZ5JZDIHT8j1CzE2QkUC5oxwgbJ+bDwYmd3p8CFn
GNbnVSeueWN3Iori4rpgA3fSE4tT4J5nS0BsuDHrGOP7kXQhU7vLRPOi.D2A
.Wn1r0AUjkc4iyJI1eEvZEeJKn9KiHEOXSoFoXG0tKnkyc6DnnwCnzCIofmd
5o2wPf2CfOC9C.9YveBdGS8aQ33vrx9CMRzSWEMdgtlZO+GoQNnSyrJe6rKZ
t8Fr0FpSpt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