Live recording / rendering into plot?

Hi, I’m trying to record and analyse an input signal, so that it also displays the segments in real time.
Basically, I’m trying to recreate the CataRT tutorial #4. Has anyone tried something similar?
Thanks!

Here is a rather crude approach, where instead of analysing a fixed corpus, the corpus is a rolling window of time (by default 4000ms). The basic principle of analysis, normalisation, kdtree, plotting follows on, except for the fact that tht process dynamically updates as the buffer gets filled. The next approach (which if I find the time will be a bit later today :P) would be to instead have a fluid.dataset~ that has slices appended to it over time from a long buffer. This would involve some more ergonomics, such as storing the audio, probably in a massive buffer to avoid cropping sections and copying to new buffers.


----------begin_max5_patcher----------
2618.3oc6bs0jipaD9YO+J3PkGmwERhqoxCadHukj+.6I0TxfrG1ECTfXtrm
53e6QHIvfMWjAiGWIyV0tdEBPc+ota0cqV7GOrReSx6jbcs+p120Vs5OdX0J
9kJuvJY6U56wu6Ggy42l9lBJMIV+QQWIEzHBk9QJQ7Nz2fi2oq8ejcGFvelj
M+3IupGIEmg2SnjrmIw3MQ7GzP1Wbw9vX1KjOTf5Gf5+RX7tmyH9Twv3Zs13
QMngM+Gyp+sdbYuGAkIdQkW7Oe3gx+4QEYy2vuR1ljs+Pub51nDLU+wA+OQg
47e6DQbz6hqs5mqMgFkbJvPvvVbt2te91Vd0MEa2RxhYnNer8SxRKx0m.nDS
diQ3UjMk7NmvzS0BXym9zmIA6HWtjgU0irMIllG9K9C.PqGTnn7dq4n+dVHN
ReLwEfkS4OdBYGT+hKMeQjLIdHAD1HGFQdkjkGxzBNd2qzwooMt7pFORIJ9i
D9Kx8w5KEFKtjU8kxHuFV87F0WEmwXmR3sHSvsuaape70jDvlZKBqky4ymRR
hOyUhR4oXewCWNAW08Q.hKWYHDm3+X5ZbDeXhE6hR7+IInIkomjRhCiSyH4j
XJldBgqGP1hKhnO2ZVEtty92JIuN6ryo4U56xBCRhKIhVSCkWtZ39NaNWLy2
jY32QLNsiGlINxvjd5LmwjE4avYkyRRCWvpNoIIQs6p94hHaoxtSCiiOAEoI
o82YV3tWF3Y2jv5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3JIuwhR4JsNZGX8IztmH1Q65sf6Hwe6Jb0KgiLUjiD1Bk9YwacKKaTfxeJM
..qE0WGOk84Z70Ug7TSAbE68u.fa0vqg4OdiEisTtTTg+OeIX9i7hv9+faz2
GhRSjJeaNKKFxZpVjNmznD5wcBsy7vLPMZ5INZedv5e5oJMgWuhQsNMTwIuR
hnejGE5SNuTHnujQxeIIJPyXM5xATf4zJaU4mzSnm0H0s5TPDZxtcQ8+44r4
VT20I37p7caU904xYw9rs1yzd.1+.yzW8GWllB+WpzKr5joZJ7sdjoJiqGWv
nA1ZUGpkRiRRRqKVmQ+Ti0U8C1loQi9ETUvykAUMRcUe8X5pJmTxzlFFFi+I
4s+BJ+RULgtflbNXIzL6gyy2lFg+fYbBWDDlTZ9U6eG5mD8z+jMu+Od5es9M
7qpJDLDl.ll8awWSWnM5BPD9szNKvB.5zU8kvz4A6zJLs9N4KMBV3roBUGIO
EFHf4UXfrTXf7tBiCRgww5JLN.SEFH30XJBpBKAgWgQxVgApMwzNLoEcfAcO
vf4MKphdVy3ItVbrpC7mBG2yb74l3N4DBUNlmbxfN4TAc9IBp+SCzomDHdTK
8cBfd3Oe3+l1wYXL
-----------end_max5_patcher-----------

Hi James, Thanks for your response, wasn’t expecting a direct solution. This is pretty nice!
I manage to do something similar, modifying 2D corpus explorer patches. It is of course a bit heavy and unstable.
The next issue is that every time the dict gets dumped into the object, the orientation of the plot and the data changes, so is not that easy to see which are the new points added to the corpus.
But I guess there is also a solution laying around somewhere already?
Also looking forward to your next steps!

The reason it changes each analysis is two fold:

  1. The source audio changes (due to the looping)
  2. UMAP is randomly seeded each time it reduces any data

So even if you had exactly the same data and slices, UMAP will give you different orientations of a similar shape. This could be solved if we had a @randomseed parameter but we don’t right now.