Dimensionality reduction (mixing the rational and irrational)

Ok, I took a stab at “manually” creating a timeness metric.

This time I’m using actual values extracted from a larger corpus. I’m taking the overall duration, time centroid, derivative of loudness for samples 0-256, derivative of loudness for samples 0-4410, and derivative of loudness for the whole file.

I started playing with this “intuitively” by trying to weigh different bits of this together, and then trying to merge them.

I started with just the derivatives. I first thought to put the most amount of weight on the first time window, but then thought that it wouldn’t best represent the overall file, so at the moment I’m weighing them like this:
expr ($f1 * 0.25) + ($f2 * 0.25) + ($f3 * 0.5)

I then normalized the duration and time centroid by the maximum duration in this particular corpus. I weigh the normalized centroid with the overall duration, with the centroid itself having the most weight (80%), with my thinking being that that single number probably best represents how long something sounds. I’m weighing it against the overall duration as that would have an impact too. So that gives me:
expr ($f1 * 0.2) + ($f2 * 0.8)

The next bit was a bit tricky as I wanted to take the value I got from mashing the centroid and duration together (which are grounded in units of time) and have those impacted by the derivatives.

For this particular corpus the derivatives (when weighed together as per above) range from -1.051384 to 5.505389. My thinking here is that if the file is going down more than it goes up, which would correspond with a negative/low derivative value, that I would want to bring the overall timeness metric down. And the opposite would be the case for a positive/high derivative.

Since the ranges here vary a bit, I’m only giving a bit of weight to the derivative here with:
expr ($f1 * 0.99) + ($f2 * 0.01)

Finally I take the overall timeness and normalize that back up to 0.0 to 1.0 so for this particular corpus, I now have a ‘timeness’ metric between 0.0 and 1.0 which corresponds to how much timeness-ness each file has.

I had asked @Angie for some help with bits of this and she added an insightful “oh, you’re doing whatever you want”, when I was massaging the numbers, and that’s definitely the case here!

I also massaged and assessed things based on a corpus of struck objects with fairly quick decays (relatively speaking), so no clue if these numbers would hold up with samples with vastly different morphologies.

////////////////////////////////////////////////////////////////////////////////////////////////////////////

I set up a separate part of the patch that handles playback and did some comparing and testing and I have to say the numbers kind of hold up. I mean, it is largely the time centroid with a bit of “pepper” from the other stats (in varying degrees) so that makes sense.

Sadly, I can’t query the samples on the timeness metric with how the patch is setup. I guess I can reanalyze everything and then use timeness to choose which file to play back. That would make it easier to test whether a timeness of 1.0 sounds longer than one which is 0.9.

I did notice that loudness plays a big part of this. Meaning, I may have a file with timeness value of 0.35 which actually sounds shorter than one with 0.25, if it is quieter. That is, the sound drops out of the “plainly audible” range more quickly if it starts off quieter. If I crank the volume up, the sound is indeed longer (or timeness-lier to use the technical term), but that doesn’t quite hold true in a real-world sense.

This makes me think that it may be useful to try to incorporate loudness as part of the aggregate timeness metric. For the most part these files will be queried and have their loudness compensated, so these kinds of differences would make less of a difference in context, but it may be useful to add a bit of that to this.

////////////////////////////////////////////////////////////////////////////////////////////////////////////

Would love any input on the idea or specific steps here.

_timeness.txt.zip (42.4 KB)


----------begin_max5_patcher----------
2718.3oc0b01aihqE9ys+JrhtqzN6lIWrMXfQiFo62t+G1tphj3lxrDHhWZ6
tq1+62isAhIwPgDSybizjT7Ar84wm2sY966uaw5r23EKPeA8an6t6uu+t6jM
IZ3t5quaw9n21jDUHusEax1ummVtXohVI+sxl1ODkyQkYn7nWQEkQkEOj90s
U4QkwYoeC80MvikmEuE9yhmyxKQa44wu.WsmuMtZe6ku9bVBG8TbB+aMiRRb
JeSVUpbnH0MdHmW.cor6erycfatk3sx4V15u+YrGqo2Rq1GmlvKkLD9XiYUk
Ms5zLFQkadNNc2i47MkJXB6gW4rD46PVEp8w2mtDQ8XBZT5JGzuK5g+496Ee
s7JA2GVTFCD3EEOrXgIdyyN7FyekWOrFySvYDGKyYoY46iRh+KNBVMqRJiRK
Q5bK5knjJoTkXjge.vGDvR2wGT1nC3PsC3PH9BHfQcV4RO9Ay7Whv9jYYg+U
d7tmA1dGu7YdNpQa5e2nKgdMt7YklCP3E9WdHML7mLbev.rN6gT7OocyFQP2
2U6x0DFisj.HfffDnKitho+gDBxdXpD+clELtAxPQo.Z0.aMHOfqAN+D5yHg
jYK4GRIxFydgmGkjz1GFAVpIXywNvFUo3R8gezDMoNTgJqTr00e1zbMCc+75
nB9VDzLzcs2ymFDa5WnyD54FXGzy2Q.dD+fUAcM6A50Dxr.djUHPvpCxbg95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