aubio: notes/notes.h File Reference

aubio 0.4.7

Typedefs | Functions
notes.h File Reference

Note detection object. More...

Go to the source code of this file.

## Typedefs
typedef struct _aubio_notes_t | aubio_notes_t
| notes detection object

## Functions
aubio_notes_t * | new_aubio_notes (const char_t *method, uint_t buf_size, uint_t hop_size, uint_t samplerate)
| create notes detection object More...
void | del_aubio_notes (aubio_notes_t *o)
| delete notes detection object More...
void | aubio_notes_do (aubio_notes_t *o, const fvec_t *input, fvec_t *output)
| execute note detection on an input signal frame More...
uint_t | aubio_notes_set_silence (aubio_notes_t *o, smpl_t silence)
| set notes detection silence threshold More...
smpl_t | aubio_notes_get_silence (const aubio_notes_t *o)
| get notes detection silence threshold More...
smpl_t | aubio_notes_get_minioi_ms (const aubio_notes_t *o)
| get notes detection minimum inter-onset interval, in millisecond More...
uint_t | aubio_notes_set_minioi_ms (aubio_notes_t *o, smpl_t minioi_ms)
| set notes detection minimum inter-onset interval, in millisecond More...

## Detailed Description

Note detection object.

Definition in file notes.h.

## Function Documentation

## ◆ aubio_notes_do()

void aubio_notes_do | ( | aubio_notes_t * | o,
|  | const fvec_t * | input,
|  | fvec_t * | output
| ) |  |

execute note detection on an input signal frame

Parameters

  o | note detection object as returned by new_aubio_notes()
  input | input signal of size [hop_size]
  output | output notes, fvec of length 3

The notes output is a vector of length 3 containing:

- 0. the midi note value, or 0 if no note was found
- 1. the note velocity
- 2. the midi note to turn off

Examples:
  examples/aubionotes.c.

## ◆ aubio_notes_get_minioi_ms()

smpl_t aubio_notes_get_minioi_ms | ( | const aubio_notes_t * | o | ) |

get notes detection minimum inter-onset interval, in millisecond

Parameters

  o | notes detection object as returned by new_aubio_notes()

Returns
  current minimum inter onset interval

## ◆ aubio_notes_get_silence()

smpl_t aubio_notes_get_silence | ( | const aubio_notes_t * | o | ) |

get notes detection silence threshold

Parameters

  o | notes detection object as returned by new_aubio_notes()

Returns
  current silence threshold

## ◆ aubio_notes_set_minioi_ms()

uint_t aubio_notes_set_minioi_ms | ( | aubio_notes_t * | o,
|  | smpl_t | minioi_ms
| ) |  |

set notes detection minimum inter-onset interval, in millisecond

Parameters

  o | notes detection object as returned by new_aubio_notes()
  minioi_ms | new inter-onset interval

Returns
  0 on success, non-zero otherwise

Examples:
  examples/aubionotes.c.

## ◆ aubio_notes_set_silence()

uint_t aubio_notes_set_silence | ( | aubio_notes_t * | o,
|  | smpl_t | silence
| ) |  |

set notes detection silence threshold

Parameters

  o | notes detection object as returned by new_aubio_notes()
  silence | new silence detection threshold

Returns
  0 on success, non-zero otherwise

Examples:
  examples/aubionotes.c.

## ◆ del_aubio_notes()

void del_aubio_notes | ( | aubio_notes_t * | o | ) |

delete notes detection object

Parameters

  o | notes detection object to delete

Examples:
  examples/aubionotes.c.

## ◆ new_aubio_notes()

aubio_notes_t* new_aubio_notes | ( | const char_t * | method,
|  | uint_t | buf_size,
|  | uint_t | hop_size,
|  | uint_t | samplerate
| ) |  |

create notes detection object

Parameters

  method | notes detection type as specified in specdesc.h
  buf_size | buffer size for phase vocoder
  hop_size | hop size for phase vocoder
  samplerate | sampling rate of the input signal

Returns
  newly created aubio_notes_t

Examples:
  examples/aubionotes.c.