cutSample | R Documentation |

Cut a part out of a Sample object.

```
cutSample(s, start, end)
## S3 method for class 'Sample'
s[i]
```

`s` |
a Sample object, or a string giving the name of a wav file. |

`start` |
the start position in seconds. |

`end` |
the end position in seconds. |

`i` |
a vector of integers giving the numbers of the columns in the waveform matrix to be used. |

Only the intersection of [`start`

,`end`

] with [0,`duration(s)`

] is returned. Similarly, in the second form the intersection of `v`

with `1:sampleLength(s)`

is returned.

the specified part of the given sample as a new Sample object.

Author: Matthias Heymann [aut], Stefan Langenberg [cre] (<https://orcid.org/0000-0001-5817-5469>)

Maintainer: Stefan Langenberg <langenberg@uni-bonn.de>

`sound`

for direct access to the waveform matrix,

`cutSampleEnds`

and `noSilence`

for special cutoff techniques.

```
## Not run:
s <- appendSample(Sine(330,1),Sine(440,1))
play(cutSample(s,.8,1.8))
play(s[(44100*.8):(44100*1.8)]) # the same
## End(Not run)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.