Read and write sample values
Name | Type | Opt | Description |
---|---|---|---|
buffer-object-name | symbol | Obligatory. Names the buffer~ object whose sample memory is used by peek~ for reading and writing. | |
buffer-channel | int | opt | Following the buffer~ name, you can type in a number to specify the channel in a multi-channel buffer~ to use for subsequent reading or writing operations. The default is 1. |
clipping-enable-flag (0 or 1) | int | opt | An optional third argument after buffer name and channel can be used to enable clipping. If the third argument is a one, then -1.0 to 1.0 clipping is enabled. You can also change this setting using the | message.
int | sample-index [int] |
In left inlet: A sample index into the associated buffer~ object's sample memory. The value stored in the buffer~ at that index is sent out the peek~ object's outlet. However, if a value has just been received in the middle inlet, peek~ stores that value in the buffer~ at the specified sample index, rather than sending out a number. If the number received in the left inlet specifies a sample index that does not exist in the buffer~ object's currently allocated memory, nothing happens. In middle inlet: Converted to . |
(inlet2) | buffer-channel [int] |
In right inlet: A channel (from 1 to 4) specifying the channel of a multi-channel buffer~ to be used for subsequent reading or writing operations. |
float | sample-index/buffer-channel [float] |
In left inlet: Converted to In right inlet: Converted to . |
.
(inlet1) | sample-index [float] |
In middle inlet: A sample value to be stored in the associated buffer~. The next sample index received in the left inlet causes the sample value to be stored at the index. |
list | sample-index value and buffer-channel [list] |
In left inlet: The second number is stored in the associated buffer~ at the sample index specified by the first number. If a third number is present in the , it sets the channel of a multi-channel buffer~ in which the value will be stored. Otherwise, the most recently set channel is used. Note that for , , and , if the message refers to a sample index that does not exist in the buffer~ object's sample memory, nothing happens. You can ensure that memory is allocated to the buffer~ by reading an existing file into it, by typing in a duration argument, or by setting its memory allocation with the message. |
clip | clipping-enable-flag (0 or 1) [int] |
In left inlet: The word | , followed by a non-zero number, enables -1.0 to 1.0 clipping. Clipping is enabled by default. Clipping can be disabled with the message .
(mouse) | Double-clicking on peek~ opens an editing window where you can view the contents of its associated buffer~ object. | |
set | buffer-object-name [symbol] |
In left inlet: The word buffer~ object, associates peek~ with that newly named buffer~ object. | , followed by the name of a