How to use the new "define block..." block of Snap 8.0.0 dev


How would I compose the block consisting of several expression, i.e. how would I combine / append them?


Can you send me the link to 8.0 dev please.

after some using and messing around, define reports what the block is reports. I believe this is what it does.

You define a block like this

Although, I'd wait for snap 8.0 to be released before making any projects using it.

Thx, but how would I provide a list of „set tempo…“, „play note…“ elements — without having to compose them via drag and drop that is…?

In the define block, the first input (not the var) is the block spec, like, the text on the block. To define an input, you put an underscore _. When creating the block definition (the code of the block), you use the input variables as the inputs. The order you put them in, is the order they appear in the spec (the order of the underscores). Setting the input types, requires the set [slots v] of block (block) to (list ...) block.

If you don't understand all this, just grab a block, and put it in the [] of block () block, and look at all the attributes of it.

I'd also not worry about it now, since this could change. Remember, you shouldn't be using the dev version for creating projects, otherwise your project might not load in snap when 8.0 releases. Things can change. What's in the dev version is not final.

Thx again for clarification. I am wondering how to programmatically convert a list of ringed commands/predicates/functions into a (ringed) sequence of commands/predicates/functions.

That is how would I convert
list(ringed(set tempo...) / (ringed(play note...)
ringed(set tempo.../ play note...)

Just JOIN the list of blocks.