< Back to IRCAM Forum

Mubu.knn range search and time value

Hi all,

I have 2 questions concerning the mubu.knn object

1 - Is it somehow possible to do a “range search” with mubu.knn? For example, I have a segmented buffer, for each segment I have the “durration” and “max loudness” values, I would like to know all segments that have “duration”> to 1000ms and -10 db > “max loudness” > -40 db. Using only “weights” and “radius” adjusments is not so practical in this case… Or should I be looking at an other object or other method for this task?

2 - How can i take in to account the [time] column with the knn object (to take into consideration the position of the segment within the buffer)? In the mubu track which is beeing refer in the mubu.knn, should i have an extra colmumn that replicates those values, in the mubu track which searching?

Thanks for you help!

ben

Hi Ben,

ad 1: no, that’s more like a database query (check out the sqlite binding in Max’s js, that might help), but you’re not the first one to think of such possibilities for preselection from a corpus

ad 2: that’s on our list to be able to do that like with imubu right now (you can choose time, duration, index, buffer as a data column for visualisation)
your workaround is correct to copy the data to a column, check out pipo.const to reserve space for that

Cheers…
…Diemo

Thanks for the reply,

Concerning Max’s js, I’ve never learned js and don’t have the time now, but I guess I’ll have to dive into it at one point! (allthough more preselection options in the mubu.knn would be nice :slight_smile: )

Concerning the extra time column, i’ve got that working nicely with pipo:const ! I use the “get” message on the mubu.track every time the mubu.process outputs a new index, change the last value in the list and then use “set” to reset the whole list of that index. Out of curiosity, is there a way to access a value in a mubu track by it’s index and column name? It would make certain manipulations a easier.

Ben

check out mubu.track with @matrixcol

cool, that works. I hadn’t seen such an attribute in any help patch but I just realized it was in the mubu reference pdf…