Loading...
Searching...
No Matches
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
void | del_aubio_notes (aubio_notes_t *o)
| delete notes detection object
void | aubio_notes_do (aubio_notes_t *o, const fvec_t *input, fvec_t *output)
| execute note detection on an input signal frame
uint_t | aubio_notes_set_silence (aubio_notes_t *o, smpl_t silence)
| set notes detection silence threshold
smpl_t | aubio_notes_get_silence (const aubio_notes_t *o)
| get notes detection silence threshold
smpl_t | aubio_notes_get_minioi_ms (const aubio_notes_t *o)
| get notes detection minimum inter-onset interval, in millisecond
uint_t | aubio_notes_set_minioi_ms (aubio_notes_t *o, smpl_t minioi_ms)
| set notes detection minimum inter-onset interval, in millisecond
smpl_t | aubio_notes_get_release_drop (const aubio_notes_t *o)
| get notes object release drop level, in dB
uint_t | aubio_notes_set_release_drop (aubio_notes_t *o, smpl_t release_drop)
| set note release drop level, in dB

## Detailed Description

Note detection object.

Definition in file notes.h.

## Typedef Documentation

## aubio_notes_t

typedef struct _aubio_notes_t aubio_notes_t

notes detection object

Examples
  examples/aubionotes.c.

Definition at line 35 of 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_release_drop()

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

get notes object release drop level, in dB

Parameters

  o | notes detection object as returned by new_aubio_notes()

Returns
  current release drop level, in dB

## 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_release_drop()

uint_t aubio_notes_set_release_drop | ( | aubio_notes_t * | o,
|  | smpl_t | release_drop )

set note release drop level, in dB

This function sets the release_drop_level parameter, in dB. When a new note is found, the current level in dB is measured. If the measured level drops under that initial level - release_drop_level, then a note-off will be emitted.

Defaults to 10, in dB.

Note
  This parameter was added in version 0.4.8. Results obtained with earlier versions can be reproduced by setting this value to 100, so that note-off will not be played until the next note.

Parameters

  o | notes detection object as returned by new_aubio_notes()
  release_drop | new release drop level, in dB

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.