wavesongs.objs.syllable#

Store and compute acoustica features from syllables.

Classes

Syllable([file_id, proj_dirs, obj, tlim, ...])

Object class to store, characterize, and compare syllables.

class wavesongs.objs.syllable.Syllable(file_id: AnyStr | None = None, proj_dirs: ProjDirs | None = None, obj: Any = None, tlim: Tuple[float] = (0, 60), sr: int = 44100, no_syllable: int = 0, id: AnyStr = 'syllable', metadata: Dict = {}, type: AnyStr = '', duration: int | None = None)[source]#

Object class to store, characterize, and compare syllables. See __init__(). Song

Parameters:
  • proj_dirs (ProjDirs | None) – Object to manage project directories

  • song (Syllable | Song | None) – Object

  • params (dict | None) – Diccionary with all or some constat of the physical model motor gestures

  • tlim (tuple) – Time range

  • flim (tuple) – Frequency range

  • sr (int) – Sample rate

  • no_syllable (int) – Sylalble number in song

  • id (str) – Type of the object, “syllable” or “synth-syllable”

  • info (dict) – Audio metadata about the audio.

  • type (str) – A short description about the part, theme or trill, and the behaviour of the fundamental frequency: plane, up, down, up-down, down-up, and complex. Template: “{part}-{behaviour}”. Example: theme-up

Raises:

asdasd232

Note

adasds

Warning

12qsdad

Examples

>>>
__init__(file_id: AnyStr | None = None, proj_dirs: ProjDirs | None = None, obj: Any = None, tlim: Tuple[float] = (0, 60), sr: int = 44100, no_syllable: int = 0, id: AnyStr = 'syllable', metadata: Dict = {}, type: AnyStr = '', duration: int | None = None)[source]#

_summary_

Parameters:
  • file_id (Optional[AnyStr], optional) – _description_. Defaults to None.

  • proj_dirs (Optional[ProjDirs], optional) – _description_. Defaults to None.

  • obj (Any, optional) – _description_. Defaults to None.

  • tlim (Tuple[float], optional) – _description_. Defaults to (0, 60).

  • sr (int, optional) – _description_. Defaults to 44100.

  • no_syllable (int, optional) – _description_. Defaults to 0.

  • id (AnyStr, optional) – _description_. Defaults to “syllable”.

  • metadata (Dict, optional) – _description_. Defaults to {}.

  • type (AnyStr, optional) – _description_. Defaults to “”.

  • duration (Optional[int], optional) – _description_. Defaults to None.

Raises:

Exception – _description_

acoustical_features(NN: int = 512, ff_method: Literal['yin', 'pyin'] = 'yin', umbral_FF: int = 1, flim: Tuple[float] = (1000.0, 20000.0), Nt: int = 10, center: bool = False, overlap: float = 0.5, llambda: float = 1.5, n_mfcc: int = 4, n_mels: int = 4, stft_window: AnyStr = 'hann') None[source]#

Coputing acoustical tempo-spectral variables

Parameters:
  • NN (int)

  • llambda (float)

  • overlap (float)

  • center (bool = False)

  • umbral_FF (int)

  • ff_method (str)

  • Nt (int)

  • n_mfcc (int)

  • n_mels (int)

  • stft_window (str)

Return type:

None

Examples

>>>
solve(z: List[float] = {'a0': 0.11, 'b0': -0.1, 'b1': 1, 'b2': 0}, params: Dict = {'C': 343, 'Ch': 1.43e-10, 'L': 0.025, 'MB': 10000.0, 'MG': 20, 'RB': 5000000.0, 'Rh': 24000.0, 'gm': 40000.0, 'r': 0.65}, order: int = 2, method: Literal['best', 'fast'] = 'best') Syllable[source]#
Parameters:
  • z (List[float])

  • params (dict)

  • order (int)

Returns:

synth

Return type:

Syllable

Examples

>>>
synth_scores(synth: Syllable, order: int = 2) Syllable[source]#
Parameters:
  • synth (Sylllable)

  • order (int)

Example

synth : Syllable

export_mg(dataframe: bool = False, export_curves: bool = True) DataFrame | None[source]#
Returns:

synth

Return type:

Syllable

Examples

>>>
play() Audio[source]#

Examples

>>>
write_audio(bit_depth: int = 16) None[source]#

Examples

>>>
export_curves()[source]#

_summary_

Returns:

_description_

Return type:

_type_

import_curves()[source]#

_summary_

Returns:

_description_

Return type:

_type_