Hi there,
related to this very first post here, I need to analyze the “global” loudness of a recording.
The Mean of the loudness could answer, I guess.
I’m afraid of blocking my system during the analysis (not from an object point of view as I use the not blocking attribute but more in the sense that my patch has to record in a buffer which is also the one from which I need to analyze. Then record. again etc. etc and I’m afraid of recording again while the analysis has not finished. Don’t want to use a double buffer or other circular tricks here)
On my M1 Max 64Go RAM, it takes 7s for analyzing 7 minutes of sound recorded at 44,1kHz. Crazy fast.
BUT I’m questioning myself about using fluid.loudness~ instead of buffer analysis to make it even faster.
Loudness analysis on the fly…
I parched a system that use this. Basically it takes the output of fluid.loudness~, sampling and accumulating values from it … big list… and then when the recording stops, it calculates mean, max, min.
Questions :
- Is that kind of approach gives a results similar to fluid.bufloudness~ ?
- for getting the best results, which sampling should I use (I use a speedlim at the output of fluid.bufloudness~, but the fluid.bufloudness~ itself got also its hopsize & windowsize) ?
The approach could be VERY much better here in that project.
I’ll do another post about some other features I’d like to analyze.
Best regards,
Julien
Hello again.
Accumulating a big list is fun. zl.group is your friend there.
Here is the code, not very different to the last post, and it does what you want. I hope this helps!
----------begin_max5_patcher----------
950.3ocyXtsbihCDF9Z6mBUb0tU43EcfS6U48XqoRIiUr0TfDERLwISMyy9J
jfj3IfLtLwN2.VMxz5q615uk+4xEAajGXp.v+B9OvhE+b4hEVSsFVzMdQPI8
PdAUYmVPtrrjIzAqbOSyNns1KYTQuwJpNeOWr6gZVt18xQYv0gq.QXT6MXTX
6Mj4J3aceI9V66Qt462EE0+lDMkbQASa8M7MixFcu0vVi+Z4x1KqtTHnG7w.
zw.LdJLPtULv8kGfnjyHOf+jYnjoTzcrOvvcQIqiQQwv9mTvErbYiv9XTOd0
LkIBP0bo3ggmw.IwTK4jL6MG+3nQ3GNH+nA4uOp3Loeth4bXP.3ayYnACWiS
NcU5Q.hPi.X3WP.iSWGiShSS7m7Gs1dRoVR1sibA6IyR3Cf+O.3ZO4ULDaoC
Y28AksNZ77JIYNn6wBIUOqH9RAnfI.2+RgY1J9KLPbTLN1C0jXK03LapERf9
JmIny.aznI0Uybh0Pspo7bntKW+J0odoF9kjZyb3kFruCRHq8teUx6XMyeBN
bNP0UWa3kKl2xayRxhbnOdaCGuwahWdwYeM3crdMz7RFfq.7xJYslJzf+pP1
rUX1ZGHeDPMcVDVp.OwEakOAX+fU+L.1Z5uGbuc7IE1wd9MCIqMTF+9lyHIi
DWSuQMmop3ZkItTvUZfhKxY.8dFv78z.iKqZL2pcCyKXz54u+GBtqifz2Emv
3QhS2pFwsvaCM6MQJY8yAmjHXZxDZoEStQsz9RwQIzgJfccl1wAA6ciAzsq8
kMMZsTbZP5JwPj9qCBRn27QEslVxzr5GXB5lB6BO77fbCUratky2UKapNGA8
tM8QYDWMZrujKJ8Kofd9dSjjMIwMXjUVK1q3F7bNcI1Gls5ZeBx4OVzv2ttW
P62f6UrBCofWk3t2IrYq.RSQgf62KqriHDX3DBSH2tuodiSnyHLc8pFnay+8
oIzUAzdHLO0AyAeJ9NAsnkxtOcDqV2ZEQ+i+qK6Ju09wA.kroNu+U2exBvaq
9sLklKrBuueRlScAfiDjmpmZ+w+o8zwKGY8VV83BVSFR3TgL7p.IbXHgWFjI
Sv0s+wOWblr8vJm1SgyfmZOlvoCmYWspyvgSbnOeW+GQhWcM9xhuSIS1u9tL
OgtVdpU8853oofT+p4xPZJD8A+3zFnUUlSmp5lr0EFYvuKsUOoqrC4B2vH6v
Z1O38ymXsPqMpfZiDXSscYEbH1cZifRooNTzv619x.mwkVIVgo8VUE0wgUId
4uV9+7J9tmN
-----------end_max5_patcher-----------
1 Like
I did that one before yours (no competition just for saying what I did ) :
----------begin_max5_patcher----------
1717.3ocyakzbaaCE9rzuBN7XGEEhMtzS9Ru01+.cxjghDVBIjDZHorcbl3e
6EKjRTKTBxDvswSjLff36881e.v+b9L+U7WnM9d+t2+3Ma1OmOalZJ4Dy5FO
yuL8krhzF0x7y3kkzpV+E5Oqk9RqZ9s7sd7csdsand0zlcE6WR0tRVUAsU88
AcSxxUeK9pu8o3AKT7D5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thanks a lot.
I guess what i did make sense too.
What do you think about this approach for analyzing if, globally, a sound recording is loud or not ?
About the values calculated, I’d like to normalize this between 0 & 1.
Could you tell me which values min and max can pop out the fluid.loudness~ ??
I’d also maybe offer one more approach, which can introduce you to the wonderful world of buffer processing (again).
----------begin_max5_patcher----------
1116.3ocuXsrihiCEcM7UXkU8LhNJ1w4AypZwrcVM8tQsJYHFvU4XGE6TO5V
c+sO9QRAUSnHABsPJOtXx8bN95y0guOeVvJ4KTU.3u.+GX1ruOe1LWHafYs2
OKnj7xZNQ4FVvZYYIUnCV3+NM8EsK9+PdgU1T1EuplpLCinYRw8blftV1Hbi
D0NBQSorQyoZ2yMpMJqv8zjqd3yYwA6GJSzMRXWFH506Xhs2WSWq8L.AiBiV
.v4w1SoP6QjID3q1exOlO2dXw0RTl3PhddZfFKMf4NjiwKsmRxtMzfRDCmCv
QygjTGGftoh3kWEGJoJEYK8HN743vjLTBNsehzAOeH8qUTO1BB.e8XNltrWN
h9.N5oENG4J27bDM0bDiCSWFklgmDRlOZR1tlBmOAjTPe1fhi3Xinhr9QvF6
m9YY7oX4FtjXJtO5hdIe1XqhySbUuotSoYWE2O0BwuPdjBz6nfRyJxEfRu8B
fHJ.kdOUvSDdCUAjabiaUylMz5tmy67ViOq6a7PWxmlNVwJNxUofRQgIKLF.
95lrIVt9aoQZH7WULEfI.IkJvJtb8iJvyL8N.AXxtIl7IZMmTA9TsrY6N9q+
wMWuRFqdgSbKofQN29akd8klZgqrwLRM.kjtW9dlIJjO2UcwDZiz1VcEB9Wy
MqLTF.CQ.kQPDEtJvCEesTS3fOYen+oclneQNYvRH9B6TBSOTByvSsELJNzj
oov+EO5lLdKHLDc6re2vaXEglIdDmozijlteReTMN8xnZLzQxLzMkpJyhc0O
A2onbS9cdu.tYwvN11c8q.nSNQu3DS1wwWlBfx7m7cduMRfcZCYzgtudsjKq
8fHJLMNAsDCgYo3rnjklUVVfXhuOXdNB6h+FwGX8Ra2q9zKT9k0eFEcyqX3x
lBgwdXeESWDvcdaTE6aTm85c6jUtafuiOWUkDBcYJCzr86D6FXxuERisFJTo
qojRKymLxBurkMscAxutsoQ+VAY8OG7aFAwiErn3ClYvd28jKDrZ41sb5Hcr
Yh9MrguUjUQpIkTMs9dpfrhSOj6C9cwi8dXti3tiSY4mZSEm7pYEIoofI2v3
TvCRwV9qgD1FvcborB.GYQohs0r+Fao4JhXauxT1kMgm50injdqNcIxssoe4
Oiw87rweu9njM0q6.c2hFvdy3BpRyDt8yd3fx8Cp24fAmIzPxDbBxT1PRz6Q
SIqnRZJvaUwX2qhrz0dXIt652Fsrtf5Z5EcU3z9dk.zY.p8uW..OEPgXGRiW
5LufKye6tqTCcXCdNrk+gXCleH1L6AcJw14lfwent4mT6fFFOUPyt40yBsN7
ecKmxGPlr6j7pyT2C4iyT5DjI3PrHx9M4PX6Pe5BnCcHRxOsCA72CNOiSleu
M6u9XbhNpoBop5IZspMYNHZZu9fe294Kb2xD9acupdPM8IV23wtHjZSSMsoi
VSsiVAuz9t5AkRShEMrVMxHNlT5ZcKLagPUQ75fqC+7eL++gqntat
-----------end_max5_patcher-----------
it certainly make sense once the microphone gain is set (for example in an installation
I don’t know why you would do that, as the values would be come abstracted, whereas loudness is using the conventional Loudness Units (which are dBs filtered to mimick the ear equal loudness curves).
But to reply: minimum you can see that by sending digital silence in (-157.226598 dB) and maximum there isn’t if you use digital gain (you can send beyond +1/-1) but if you come from a DAC I reckon a little higher than 0. dB
1 Like
It seems to work like perfectly
btw, I would love to work on a piece exclusively done using your lib.
1 Like