Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sampleLength

Get the length of a PTSample


Description

Gets the length (in samples = bytes) of an audio fragment stored as a PTSample.

Usage

## S4 method for signature 'PTSample'
sampleLength(sample)

Arguments

sample

A PTSample object for which the length needs to be returned.

Details

PTSamples are 8 bit mono audio fragments. This method returns the length of this fragment expressed as number of samples (which also equals the number of bytes).

Value

Returns a numeric value representing the number of samples (bytes) the PTSample object sample is composed of.

Author(s)

Pepijn de Vries

See Also

Examples

data("mod.intro")

## Show the length of the second sample in mod.intro
sampleLength(PTSample(mod.intro, 2))

ProTrackR

Manipulate and Play 'ProTracker' Modules

v0.3.7
GPL-3
Authors
Pepijn de Vries [aut, cre, dtc]
Initial release
2020-02-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.