Skip to content

Conversation

@tremblap
Copy link
Member

but still gets the error "WARNING: FluidDataSetQuery received fewer parameters than expected"

linked to core PR

@tremblap tremblap requested a review from weefuzzy June 12, 2025 16:08
@tremblap tremblap marked this pull request as draft June 12, 2025 16:10
@tremblap
Copy link
Member Author

ok no luck - when I s.dumpOSC(true) i get the message I expect:
[ "/cmd", "FluidDataSetQuery", "FluidDataSetQuery/new", 2 ]
but the c++ still moans it doesn't get enough. There is only one param to that object (its name)
it must be a c++ problem but I don't know how to look for it...

@tremblap
Copy link
Member Author

it works! The error was in core - one small casting :)

test code:

// Create a DataSet with known data
s.dumpOSC(true)

(

var dict = Dictionary.newFrom([
	"cols",5,
	"data",Dictionary.newFrom(
		100.collect{
			arg i;
			var point = 5.collect{
				arg j;
				j+(i/100);
			};
			[i,point];
		}.flatten
	)
]);

//the integer part of the value is the dimension, and the fractional part is the identifier.
~ds = FluidDataSet(s).load(dict).print;

~tmpbuf = Buffer.alloc(s,5);
)


// Prepare a FluidDataSetQuery object
(
~query = FluidDataSetQuery(s);
~out = FluidDataSet(s);

//prepare a more complex query
~query.clear;
~query.filter(0,">",0.03);
~query.and(1,"<",1.05);
~query.or(2,">",2.98);
~query.addRange(2,3); // addRange will add 3 columns starting at column index 2
~query.transform(~ds, ~out);

// Check the results
~out.print;
)

// this works
(
{
	var trig = Impulse.kr(1);
	var success = ~query.kr(trig, ~ds, ~out);
	SendReply.kr(success, '/done');
	PulseCount.kr(success).poll(2);
	Silent.ar
}.play;

OSCdef(\jobdone, {\yay.postln}, '/done');
)

~out.clear; ~out.print
~out.print

@tremblap tremblap marked this pull request as ready for review June 17, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant