Fluid.bufnmf~ "Machine Learning Filter"

I did all that, but I guess there was some other initialization issue. I also loaded a preanalyzed 499 (@iterations 1000!, which I did when I went out to the post office), so don’t know if that was part of the problem as I didn’t use the decomposition part of your patch.

I did 1000 and got very, very faint results so maybe the buffer object is limited, or maybe the nmf process has a limit. For 500, do you get similar sounding results in both patches?

I see the problem, I had to reinstantiate the poly~ after changing the voice count.

The sound is similar, and not as interesting as the 127 voice version I think. At 499 voices it just sounds like a really subtle lpg or something, just fading the volume out.

Plus with the 127 voice version you could get a cool sound by getting the filter pretty “low” then scrambling the voices, to create filterbank-y type sounds.

I also got a crash for my troubles too (not sure if it’s yours or Max’s though)

filter crash.zip (32.6 KB)

Is the crash on my version? Any reproducible bug?

As for the idea, I would probably go dirty, like 25 ranks 25 iterations.

As for real-time, remember my demo patch entitled ‘becauseIcan’ - it is real-time on short buffers. See this thread

The crash happened when I was doing something random, so I don’t remember exactly (not reproducible).

It was your patch.

I remember getting the patch you posted in that thread working before, but now all it does is spam this to the Max window:

fluid.bufnmf~: Buffer given for resynthbuf doesn't exist.

edit: It looks like there’s an issue with fluid.bufnmf~ and polybuffer~ now. I added a comment to the other thread, but the patch works fine if I change the buffers to normal buffer~s, but obviously the rest of the patch doesn’t work then.

The crash is

Thread 41 Crashed:: Built-in Output
0   play~                         	0x000000011ab5d1e6 playN_perform_local64 + 3061
1   com.cycling74.MaxAudioAPI     	0x00000001187a50ec dspchain_tick + 405
2   com.cycling74.MaxAudioAPI     	0x00000001187b7040 plugrunner_tick + 197
3   com.cycling74.MaxAudioAPI     	0x00000001187b7f2a plugrunner_process + 213
4   com.cycling74.MaxAudioAPI     	0x00000001187d1db5 patchernode_process + 292

So, could be Max (because that’s their object) or possibly us, if there’s still somewhere I’m writing to memory that I oughtn’t. If it keeps happening / you’re able to isolate it, do let us know.

2 Likes

Here’s the updated filter patch.

I did some messing with the patch from the last time it was posted, to see if I can do the fading in/out a bit better, but it’s too tidy or elegant. I’m certain there’s a proper mc. solution to this problem (“fading in” lots of channels, one at a time), but I haven’t found it yet.

For now this is the patch as it was last posted, but working for alpha04.


----------begin_max5_patcher----------
6478.3oc6cs0iaqjb9Y6eEDZ2mBlUae+xI4AuYCxlGxkM3r.AA9rvfRhyL7X
JRAIpw1mEq+smtYSIQJolpZpVimiyX.qQh25pqt995KUwp+au8MSlU84rMSR
9gj2m7l272d6adSygrG3Ms+9MSVl944EoaZtrIKy1rI8grI24NWc1mqaN98U
qWlVmbeQUZMkbWx84EY0eYUVxmReJ6tjOsNud+MUjWlMuZaYycRZO3pz54Ol
W9vGVmMu1IQLNYJiooLjhfnXB+tDr.Mkq0ZImq3ZpzdHLcJ5tDJeJJ4u19vJ
2tLuzH.a5VB4KZjzpY+7uSO4vEVssd2UhaOp6PVw2IHSlj7Wsm4u+12Z+3Nf
5p4UKWlYpkGqqvSS9WLJfkqp1jkjtcQd0jATBxlZG19IwnPZ+w9p58Uk02mN
Oqq72q5iOs5S4S5b2ax+kl6lXzfmUsf5bwkoKat3I+aYEOkUmOOcxHzL9rhV
mspvVWFPcnPGaSH0VkBS0ngHAXEPIOKlAkYexTZmTWWkTmuLa8Ea5IX8TBBg
vDBR1VkY7fqrDQ3U1thlQRcUw15nwbv.weJa8l7pxNOn2LIc0pNG9MctEqh4
mqZdPp61en7R2gP6Oz5rmx2c+78GMcsQAUazNaW6LA+rfM4vioZQ15xs4Mhh
6fllnVQpowvZ5tYUKTooMa2oOnx4M1RXDyQo39ifdPOaZrennZ9GyVzUjmTs
JqLub05rMF.eZcqru+zKxtOcaQ8G5B2vjom876.ym8j6ge+g04oE6q.OrNeQ
UoUH50RXO7th68I3FiFLuako4JJSWcla1XzXTKdN4FSkb6lYoqsMTyJx5XzY
LwqpJ5ep82WQ180smdUdY4QZw5pU9O457Gdbf6cVk4jKG5Y2blMeXao6revX
ST+gMltm5ecoEEsH19O9OmVla5hKyhZaptn8mLqL0TQeby70UEE8puty7zYN
yBiM97rOkun9wlBpqwf4xyWsyHZx9V4E4Ojsot+w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G+RZ3BHhX5ezQkIoThC6PvXLM9B3eZc
V1HjvFsmcOyf5FskcfIwW39eyJJp9zvRmsG3M4+RKolceagqQcR4Gmq+Byn.
jNlErB2v+wMZbdTq.aWNKa8exLBffUtVSQTSyO2zkFuQRwcYyhh.t1MfBqDN
7LcBS1N2.wDLgfpashksC7ynu0i2d1MExlz0msFsYUa5yqIq981+9a++.yFS
XwB
-----------end_max5_patcher-----------

Perhaps you could go a step further and analyse some features of each rank, then filter by some criteria of feature?

Possibly a terrible sounding idea - but I’d be interested to see it, just not code it up right now.

Yeah that’s a good idea, though I’ve not worked on this patch for a bit. I just wanted to have the forum version “working” with the new syntax.

Could rank them by centroid or something similar, then fade them out in a more “realistic” manner.

Or with some creative ordering, could probably even simulate resonance by having higher centroid peaks near the cutoff point as you roll things down.

1 Like

My thought was SFM or roughness, something to make the sound go from brittle -> smooth and back.

1 Like

something is on the way to help that… stay tuned!

2 Likes