FluidBufNMF argument `resynthMode` is redundant
FluidBufNMF's argument resynthMode is currently used to specify whether or not the object should perform resynthesis after decomposition and write it into the buffer specified by resynth. Because a buffer needs to be specified by resynth, this is enough to indicate to the object that resynthesis should occur, therefore resynthMode is redundant.
I propose that we remove the resynthMode argument from the class definition in SuperCollider. The class definition can simply check if resynth is a buffer or nil, and if it is a buffer pass "resynthMode = 1" to the client.
I understand that this will break parity with the other CCEs and I still think it makes sense to do. I'm happy to implement if agreement is reached.
Thanks for reporting. An esm loader is needed to be implemented. I'll fix this later.
After taking another look, I'm not quite sure about how this should be implemented.
ts-node has given a good example https://github.com/TypeStrong/ts-node/blob/3a2848c9968f03f7b05e57e833ca256b52ab4e18/src/esm.ts but it involves many experimental features and immature specs. https://github.com/TypeStrong/ts-node/issues/1007
We should expect TypeScript supporting ESM first then consider what we should follow. This should be covered in TypeScript 4.6 (ideally). https://github.com/microsoft/TypeScript/issues/46452
If anyone has a better solution please let me know :)