Documentation ¶
Overview ¶
Package streamer provides the time-scale modification methods as Streamers, to be used with the beep library (https://github.com/faiface/beep)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StereoBuffer ¶
type StereoBuffer [][2]float64
A StereoBuffer is a representation of a stereo audio buffer which implements the buffer interface.
If buffer is a StereoBuffer, the value at buffer[i][0] is the value of the left channel of the i-th sample, and buffer[i][1] is the value of the right channel of the i-th sample.
func (StereoBuffer) Channels ¶
func (s StereoBuffer) Channels() int
Channels returns the number of channels of the buffer (always 2 for a StereoBuffer).
func (StereoBuffer) Len ¶
func (s StereoBuffer) Len() int
Len returns the number of samples of each channel of the buffer.
func (StereoBuffer) Sample ¶
func (s StereoBuffer) Sample(channel int, index int) float64
Sample returns the index-th sample of the channel-th channel of the buffer.
func (StereoBuffer) SetSample ¶
func (s StereoBuffer) SetSample(channel int, index int, value float64)
SetSample sets the index-th sample of the channel-c channel of the buffer to value.
func (StereoBuffer) Slice ¶
func (s StereoBuffer) Slice(from int, to int) multichannel.Buffer
Slice returns a Buffer containing only the audio samples between from (included) and to (excluded) for each channel. It is the equivalent of buffer[from:to], if buffer is a mono-channel buffer represented by a slice.
type TSMStreamer ¶
type TSMStreamer struct {
// contains filtered or unexported fields
}
A TSMStreamer is a beep.Streamer that changes the speed of a wrapped Streamer without changing its pitch.
func New ¶
func New(t *tsm.TSM, inputStreamer beep.Streamer) TSMStreamer
New creates a new TSMSTreamer, which changes the speed of the inputStreamer using the TSM procedure t.
func (TSMStreamer) Err ¶
func (s TSMStreamer) Err() error
Err propagates the wrapped Streamer's errors.