Toggle - Initial State
This may be a feature not a bug, but I think the initial state of the Toggle button is reversed from expectations. Upon patch initialization, the Toggle block outputs Value 2 rather than Value 1.
In the example below, when you turn on the Patchblock the LED's default state is ON, although I would expect that everything starts in the OFF position to avoid sudden audio events from scaring the neighbors.
AAIAAACIeJxjYGBfz36OAQL+/wchGJOBLSQ/PT0nlYHF3DLVkIGBiX0/hyADv4G1gbWhNYQ0tDZiBKpjYOBwzs8rKcrPKWZgSTOwMGVgYAQby2lgDYGGjEwMTAwMLD6uLkAlqcaGqUBt7Lc4QhlYwQoYAA4bG7g=
This issue is fixed by an edit to line 11 (add a negative sign):
<variable dtype="int32_t" name="state" value="-1" />
Since this change could break people's existing patch logic, the alternative is to specify in the Help file that the block starts with Input 2.
Comments (3)
-
-
- marked as enhancement
-
assigned issue to
I agree that this behaviour is unexpected and incorrect. Will roll this fix into a "patch breaking" release.
-
- changed status to resolved
Toggle block in forthcoming release will have expected behaviour, as well as RAM usage reduction.
- Log in to comment
This is definitely a bug, and regardless of whether or not it will break existing patches I think it needs to be fixed. The software is still in Beta so these kind of changes should be expected (hence the warnings that appear when blocks are different).
I recently made a patch where this caused a bit of an issue, so it'd be good to get it fixed :)