sample.h File Reference

Real and complex buffers. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _fvec_t
 Buffer for real values. More...
struct  _cvec_t
 Buffer for complex data. More...

Typedefs

typedef _fvec_t fvec_t
 Sample buffer type.
typedef _cvec_t cvec_t
 Spectrum buffer type.

Functions

fvec_tnew_fvec (uint_t length, uint_t channels)
 fvec_t buffer creation function
void del_fvec (fvec_t *s)
 fvec_t buffer deletion function
smpl_t fvec_read_sample (fvec_t *s, uint_t channel, uint_t position)
 read sample value in a buffer
void fvec_write_sample (fvec_t *s, smpl_t data, uint_t channel, uint_t position)
 write sample value in a buffer
smpl_tfvec_get_channel (fvec_t *s, uint_t channel)
 read channel vector from a buffer
void fvec_put_channel (fvec_t *s, smpl_t *data, uint_t channel)
 write channel vector into a buffer
smpl_t ** fvec_get_data (fvec_t *s)
 read data from a buffer
cvec_tnew_cvec (uint_t length, uint_t channels)
 cvec_t buffer creation function
void del_cvec (cvec_t *s)
 cvec_t buffer deletion function
void cvec_write_norm (cvec_t *s, smpl_t data, uint_t channel, uint_t position)
 write norm value in a complex buffer
void cvec_write_phas (cvec_t *s, smpl_t data, uint_t channel, uint_t position)
 write phase value in a complex buffer
smpl_t cvec_read_norm (cvec_t *s, uint_t channel, uint_t position)
 read norm value from a complex buffer
smpl_t cvec_read_phas (cvec_t *s, uint_t channel, uint_t position)
 read phase value from a complex buffer
void cvec_put_norm_channel (cvec_t *s, smpl_t *data, uint_t channel)
 write norm channel in a complex buffer
void cvec_put_phas_channel (cvec_t *s, smpl_t *data, uint_t channel)
 write phase channel in a complex buffer
smpl_tcvec_get_norm_channel (cvec_t *s, uint_t channel)
 read norm channel from a complex buffer
smpl_tcvec_get_phas_channel (cvec_t *s, uint_t channel)
 write phase channel in a complex buffer
smpl_t ** cvec_get_norm (cvec_t *s)
 read norm data from a complex buffer
smpl_t ** cvec_get_phas (cvec_t *s)
 read phase data from a complex buffer


Detailed Description

Real and complex buffers.

This file specifies fvec_t and cvec_t buffers types, which are used throughout aubio to store real and complex data. Complex values are stored in terms of phase and norm.


Function Documentation

smpl_t** cvec_get_norm ( cvec_t s  ) 

read norm data from a complex buffer

Note that this function is not used in the aubio library, since the same result can be obtained with vec->norm. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to read from

smpl_t* cvec_get_norm_channel ( cvec_t s,
uint_t  channel 
)

read norm channel from a complex buffer

Note that this function is not used in the aubio library, since the same result can be obtained with vec->norm[channel]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to read from
channel channel to read from

smpl_t** cvec_get_phas ( cvec_t s  ) 

read phase data from a complex buffer

Note that this function is not used in the aubio library, since the same result can be obtained with vec->phas. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to read from

smpl_t* cvec_get_phas_channel ( cvec_t s,
uint_t  channel 
)

write phase channel in a complex buffer

Note that this function is not used in the aubio library, since the same result can be obtained with vec->phas[channel]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to read from
channel channel to read from

void cvec_put_norm_channel ( cvec_t s,
smpl_t data,
uint_t  channel 
)

write norm channel in a complex buffer

Note that this function is not used in the aubio library, since the same result can be obtained by assigning vec->norm[channel]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to write to
data norm vector of [length] samples to write in s->norm[channel]
channel channel to write to

void cvec_put_phas_channel ( cvec_t s,
smpl_t data,
uint_t  channel 
)

write phase channel in a complex buffer

Note that this function is not used in the aubio library, since the same result can be obtained by assigning vec->phas[channel]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to write to
data phase vector of [length] samples to write in s->phas[channel]
channel channel to write to

smpl_t cvec_read_norm ( cvec_t s,
uint_t  channel,
uint_t  position 
)

read norm value from a complex buffer

Note that this function is not used in the aubio library, since the same result can be obtained with vec->norm[channel][position]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to read from
channel channel to read from
position sample position to read from

smpl_t cvec_read_phas ( cvec_t s,
uint_t  channel,
uint_t  position 
)

read phase value from a complex buffer

Note that this function is not used in the aubio library, since the same result can be obtained with vec->phas[channel][position]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to read from
channel channel to read from
position sample position to read from

void cvec_write_norm ( cvec_t s,
smpl_t  data,
uint_t  channel,
uint_t  position 
)

write norm value in a complex buffer

Note that this function is not used in the aubio library, since the same result can be obtained by assigning vec->norm[channel][position]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to write to
data norm value to write in s->norm[channel][position]
channel channel to write to
position sample position to write to

void cvec_write_phas ( cvec_t s,
smpl_t  data,
uint_t  channel,
uint_t  position 
)

write phase value in a complex buffer

Note that this function is not used in the aubio library, since the same result can be obtained by assigning vec->phas[channel][position]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to write to
data phase value to write in s->phas[channel][position]
channel channel to write to
position sample position to write to

void del_cvec ( cvec_t s  ) 

cvec_t buffer deletion function

Parameters:
s buffer to delete as returned by new_cvec()

void del_fvec ( fvec_t s  ) 

fvec_t buffer deletion function

Parameters:
s buffer to delete as returned by new_fvec()

smpl_t* fvec_get_channel ( fvec_t s,
uint_t  channel 
)

read channel vector from a buffer

Note that this function is not used in the aubio library, since the same result can be obtained with vec->data[channel]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to read from
channel channel to read from

smpl_t** fvec_get_data ( fvec_t s  ) 

read data from a buffer

Note that this function is not used in the aubio library, since the same result can be obtained with vec->data. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to read from

void fvec_put_channel ( fvec_t s,
smpl_t data,
uint_t  channel 
)

write channel vector into a buffer

Note that this function is not used in the aubio library, since the same result can be obtained by assigning vec->data[channel]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to write to
data vector of [length] values to write
channel channel to write to

smpl_t fvec_read_sample ( fvec_t s,
uint_t  channel,
uint_t  position 
)

read sample value in a buffer

Note that this function is not used in the aubio library, since the same result can be obtained using vec->data[channel][position]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to read from
channel channel to read from
position sample position to read from

void fvec_write_sample ( fvec_t s,
smpl_t  data,
uint_t  channel,
uint_t  position 
)

write sample value in a buffer

Note that this function is not used in the aubio library, since the same result can be obtained by assigning vec->data[channel][position]. Its purpose is to access these values from wrappers, as created by swig.

Parameters:
s vector to write to
data value to write in s->data[channel][position]
channel channel to write to
position sample position to write to

cvec_t* new_cvec ( uint_t  length,
uint_t  channels 
)

cvec_t buffer creation function

This function creates a cvec_t structure holding two arrays of size [length/2+1] * channels, corresponding to the norm and phase values of the spectral frame. The length stored in the structure is the actual size of both arrays, not the length of the complex and symetrical vector, specified as creation argument.

Parameters:
length the length of the buffer to create
channels the number of channels in the buffer

fvec_t* new_fvec ( uint_t  length,
uint_t  channels 
)

fvec_t buffer creation function

Parameters:
length the length of the buffer to create
channels the number of channels in the buffer


Generated on Wed Oct 11 17:36:54 2006 for aubio by  doxygen 1.4.7