Visual Corpus Exploration Patch

Hello @Alisa

You know this patch is already done in SC as part of the tutorial series done by @tedmoore ?

The final patch is available for download in the last youtube comments (or here. To query 5 items and get them to play sequentially, I have modified the mouseMoveAction: function (lines 115 to 124) to this:

		FluidPlotter(dict:dict,mouseMoveAction:{
			arg view, x, y;
			[x,y].postln;
			point.setn(0,[x,y]);
			~tree.kNearest(point,5,{
				arg nearest;
				if(nearest != previous){
					nearest.postln;
					view.highlight_(nearest);
					fork{
						nearest.do{
							arg near;
							~play_slice.(near.asInteger);
							0.3.wait;
						}
					};
					previous = nearest;
				}
			});
		});

Now this is dirty as it doesn’t retrieve the actual slice duration, but that should get you going :slight_smile:

1 Like