Wrap up auxiliary stuff inside a class

Greetings,

I recently found that I was often reduplicating a lot of code just to get things flowing, I decided to write some little “hander” or wrapper type classes. These will create in and out busses and buffers for interfacing on the server. It can wrap up most Fluid objects - I’m using it mostly for FluidNormalize. It makes it really easy to chain them together in the language (see lines 91-105 of FluidMLPRegressorHandler.sc).

There’s also one for FluidMLPRegressor that has a normalizer built in on either side of it (which I was also finding myself doing a lot of).

Thoughts, suggestions, pull requests welcome.

T

2 Likes

Thanks for sharing @tedmoore – it’s really useful for us to see where the boilerplate builds up, and what tactics folk come up with for dealing with it. Longer-term, I’d hope to be able to make a certain amount of it disappear, but this is really handy.

2 Likes

…and wait to hear his album: good composer, good improviser, good coder, is there anything the man hasn’t got?

1 Like

Love me some boilerplate!

Useful for my own coding too to see where I might extend.

image

2 Likes

OK, this SC coding is very good for my SC chops - discovering a lot of things I did not know I did not know… good ol’ DK in action again… thanks for sharing!

1 Like