With the following program, I get a big list out of print~
.
I want to a get the second value from this list.
How to get this second value and print it with print and not print~
?
With the following program, I get a big list out of print~
.
I want to a get the second value from this list.
How to get this second value and print it with print and not print~
?
[print~]
will always print the entire signal-block (in your case 128 values).
to get a specific sample, you could instead use a table, feed the monitored signal into it, and retrieve the value(s) you are interested:
...
|
[tabsend~ $0-foo]
[table $0-foo 128]
[2(
|
[tabread $0-foo]
|
[print]
note: unlike with [print~]
, which will only generate output at the next signal block, this will output the data immediately (that is: it will take the signal data from the last signal block).
to get the next signal-block, you can replace the lower part of the suggested solution with something like the following:
[bang~] [2(
| |
| [r $0-next] |
| | |
[spigot] [t b f]
| | |
[t f b] [1( |
| | | |
| [0( [s $0-next] |
| | |
| [s $0-next] |
| |
[float ]
|
[tabread $0-foo]
|
...
(the patch uses [s/r $0-next]
to avoid cross-over connection lines in the ascii graphics; in practice you probably want to use straight connections instead)
it's probably best to encapsulate the entire thing into an abstraction.