0

enter image description here

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~?

Max N
  • 1,134
  • 11
  • 23
jens426
  • 1
  • 2
  • Sorry but I am not able to understand your question at all, could you please try to formulate it better? I am also not a native speaker, but phrases like "have do a get ..." or "out have to get" make absolutely no sense at all. – gilbertohasnofb Oct 23 '16 at 09:27

1 Answers1

0

[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.

umläute
  • 28,885
  • 9
  • 68
  • 122