Easier way to concatenate datasets

In my larger analysis patch I have 4 datasets which I then stitch together at the end of the process. At the moment this requires me dumping through various temp datasets, which is clunky as it is, but this post is more about having to specify a range in order to combine things. Considering that it has to go through a bunch of steps I need to keep track of those things, but also how large the datasets are at each step of the way to change the addrange message that needs to prepend things. This is possible programmatically, but gets a bit message in terms of the message formation and legibility.

I’ll add to that by saying that I couldn’t figure out how to concatenate datasets from the help/reference files. It was only when I looked at Example 11 that I figured out you have to specify a range to join. A handy feature, no doubt, but it should perhaps be an optional argument, and if none is given it concatenates the whole dataset.

So the first part of the request is to be able to specify more than two datasets to join (I’m sure I’ve mentioned this before, perhaps in person). So something like:
transformjoin datasetA datasetB datasetC datasetZ datasetCombined and fluid.datasetquery~ will just parse it such that the final named dataset is where they are going.

The second part is just to be able to send a message like that, sans addrange or anything else. If the amount of rows vary in the datasets, it can throw up an error like all the buffer-based objects do when you try to use the wrong weights etc…

transformjoin is low-level, yes. Ideal opportunity for abstractions that wrap higher level functionality. Here’s the start of one for merging a list of datasets. Obvious next additions would be error-checking, and being able to set the output dataset name by attribute


----------begin_max5_patcher----------
3245.3oc6c01aihjD9yI+JP91OlC0u+xnSmz8869ErZUD1PRXVL3CvyjYVs2
u8q5FrCXC1jX.6YmVilD4tASUOcUUW8SWM4Ot+tEKydMpXg2m79Uu6t6Ot+t
6rMYZ3t5Oe2h0AutJInvdYKVksdcTZ4hGp5qL50Ra64QEQkdAIIdEYayWAeo
0WQbns+rke9uiw7csltccbZRTo8KE+ViYaK20Jpt0MAkqdIN84GyiVUVIpBI
0G8fGVfr+ha+EA9o2uYtm+796M+3gKTkJ9VZ4KQkwq7xCRCyV6EFTFzoZwFG
0hHEU5CeLTqznuBR2QZUoWh2RukcpGj2gdPqaspoxusIpRIVr3AuEKCRed+u
89s9UYExm+fmxpvrJ8k7A02v3Uk9eIN5qcpZ3wYHByvFAliXVYUwLehHF4wn
bPXh7B2tdSm5BpScgzotPN0vzIGZpUUlPYTUg9hFb5QQ23sNJ+4HH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Xk91fg9wX2J
9ohK1vtH1PM+7UsioiojJ1yPmCexoyg5JsNGcNN5bbz43nywQmiiNGGcNN5b
bz43nywUZctRqyUZctRqyUZcWLcNq5hXiqP4GQmgJq6Lz4Pmb5bHbgiNGGcN
N5bbz43nywQmiiNGGcNN5bbz43nywUcNtpywUcNtpywUcNWHcNK6hXC17Smy
NlNthz4L8u3qvBW043nywQmiiNGGcNN5bbz43nywQmiiNGGcNtpywUcNtpyw
UcNtpy48+ZI+6wPRQc8JPh+Nd83bVRb186lyB0U.XskfCLyNiqRO8uLj7B5P
2IyO+U6n14j7WY+BZOCREPbnaQMbbbrZRS2g9BK7lqvQH9PePFqm29aQSeSK
0VZN3uCIXo8smDVgs+pwm1eG1+1EZtZ1EIrL5.PEFaDfEFeHOIwX7jjC4Iol
sgZ5vGpIB9IFpoyfvxGtvREmxtjLCBqb3BKSfOgvhuLgEgGfEmVbRokPpV.h
zHlUAAse3RMQQCItm8E7373Nbn.cxQM9IMwPWHxHFDxLFA+vH8fdVnQ4YgdG
ViiviBeV0BOBOKq.eViK7nff3gffX7XnVb1fdTiRhI3gEJPOZOqyGK3zwDwU
oDSrICKDj8eZTjtyZ2xOBHpxB8f8Nz7TNXOCOX+BOduB6eeBObOBsK9pu8F7
9+79+Or+7M3A
-----------end_max5_patcher-----------
1 Like

That definitely helps, though it seems like nothing would be lost from just having no-range being specified (the classic “-1”) taking the whole dataset by default. (e.g. just being able to do transformjoin A B C with no other arguments).