Multiple initialization errors (mubu.knn, mubu.record~, pipo~ yin) in a real-time k-NN patch

Diogo Lop3s's icon

Hello everyone,

I’m building a real-time timbre matching (k-NN) patch with MuBu/PiPo and I’m running into several initialization errors that seem interrelated. I’ve tried various combinations of addbuffer , @numbuffers , addtrack , and weights , but the problems persist.

MuBu version: 1.11.0
Max version: 9.1.2

Errors I’m getting:

  1. mubu.knn: no buffers included
    Even after sending weights 1 1 1 1 1 1 1 1 1 1 1 1 1 before refer , exclude , and update , getincluded still returns 0 . The container has buffers and the mfcc track was created with addtrack mfcc @matrixcols 13 .

  2. mubu.record~: cannot connect to track audio (or [audio] )
    I created the track with addtrack audio @matrixcols 1 and use mubu.record~ corpus_ex1 audio . I’ve tried both [audio] and audio (without brackets), but the error persists.

  3. mubu: invalid buffer index -480 in buffer message
    Even with mubu corpus_ex1 @numbuffers 1 and bufferindex 0 , the error keeps appearing when I try to record or play back.

  4. pipo~: error in PiPo chain: input stream domain is zero (yin needs sliced audio frames as input)
    The chain is pipo~ slice:yin @slice.size 1761 @slice.hop 256 @yin.minfreq 50 . Is slice.size 1761 compatible with hop 256 , or does the hop have to be 100 for yin to work?

What I’ve already tried:

  • Creating the container with @numbuffers 1 .

  • Sending addbuffer , addtrack audio , addtrack mfcc .

  • Setting weights before include /exclude .

  • Using a delay between container creation and refer .

  • Increasing slice.hop to 256 to reduce CPU load.

Questions:

  1. What is the recommended exact initialization order for a patch that records the corpus and does k-NN in the same container?

  2. Is the no buffers included error a known bug in mubu.knn , or is there a step I’m missing?

  3. Does mubu.record~ expect the track name as a positional argument (audio ) or with brackets ([audio] )? What is the correct convention?

  4. Does pipo.yin require a specific slice.hop to work?

Any help would be greatly appreciated. I can provide a minimal patch that reproduces the problem if needed.

Best,

Diogo