Lookup table#

On this page, you will find an overview of functions, methods, and classes implemented in thebeat. Note that this list is not exhaustive. However, it should give a good impression of what is available.

For a complete overview make sure to take a look at the API reference.

Stimulus generation#

Keyword

Class

Function, method, attribute

Example

Accelerando

Sequence

change_tempo_linearly()

Add Gaussian noise

Sequence

add_noise_gaussian()

Change amplitude

SoundStimulus

change_amplitude()

Isochronous sequences with target speech stimulus

Change tempo

Sequence

change_tempo()

Concatenate

Sequence

‘+’ operator or concatenate_sequences()

Merging, concatenating, and repeating objects

Concatenate

SoundSequence

‘+’ operator or concatenate_soundsequences()

Merging, concatenating, and repeating objects

Concatenate

SoundStimulus

‘+’ operator or concatenate_soundstimuli()

Merging, concatenating, and repeating objects

Concatenate

Rhythm

‘+’ operator

Merging, concatenating, and repeating objects

Concatenate

Melody

‘+’ operator

Merging, concatenating, and repeating objects

Create from 1’s and 0’s

Sequence

from_binary_string()

Create from IOIs

Sequence

__init__()

Getting started

Create from Parselmouth object

SoundStimulus

from_parselmouth()

Create from fractions

Rhythm

from_fractions()

Create from integer ratios

Sequence

from_integer_ratios()

Merging, concatenating, and repeating objects

Create from integer ratios

Rhythm

from_integer_ratios()

Uneven rhythms

Create from note

SoundStimulus

from_note()

Create from note values

Rhythm

from_note_values()

Uneven rhythms

Create from onsets

Sequence

from_onsets()

From a list of onsets

Create from sound samples

SoundStimulus

__init__()

Create from txt file

Sequence

from_txt()

Create from wav file

SoundStimulus

from_wav()

Isochronous sequences with target speech stimulus

Create trial

SoundSequence

__init__()

Getting started

Generate isochronous

Sequence

generate_isochronous()

Isochronous sequences with target speech stimulus

Generate moraic seq

Sequence

generate_moraic_sequence()

Generate random

Melody

generate_random_melody()

Generate random

Rhythm

generate_random_rhythm()

Generate random (Poisson dist)

Sequence

generate_random_poisson()

Generate random (exponential dist)

Sequence

generate_random_exponential()

Generate random (normal dist)

Sequence

generate_random_normal()

Beat-finding using autocorrelations

Generate random (uniform dist)

Sequence

generate_random_uniform()

Plotting multiple sequences

Generate sound

SoundStimulus

generate()

Getting started

Generate stress-timed seq

Sequence

generate_stress_timed_sequence()

Generate white noise

SoundStimulus

generate_white_noise()

Merge (overlay)

Sequence

merge() merge_sequences()

Merging, concatenating, and repeating objects

Merge (overlay)

SoundSequence

merge() merge_soundsequences()

Merging, concatenating, and repeating objects

Merge (overlay)

SoundStimulus

merge() thebeat.utils.merge_soundstimuli()

Merging, concatenating, and repeating objects

Play sound

SoundSequence

play()

Getting started

Play sound

SoundStimulus

play()

Getting started

Play sound

Melody

synthesize_and_play()

Quantize

Sequence

quantize_iois()

Ritardando

Sequence

change_tempo_linearly()

Stop playing

SoundSequence

stop()

Stop playing

SoundStimulus

stop()

Getting started

Write to wav

SoundSequence

write_wav()

Getting started

Write to wav

Melody

synthesize_and_write()

Write wav with extra channels

SoundSequence

write_multichannel_wav()

Data analysis#

Keyword

Class

Function, method, attribute

Example

Autocorrelations DataFrame

Sequence

acf_df()

Beat-finding using autocorrelations

Autocorrelations values

Sequence

acf_values()

Beat-finding using autocorrelations

Coefficient of variation

Sequence

get_cov()

Cross-correlations DataFrame

Sequence

ccf_df()

Cross-correlations values

Sequence

ccf_values()

Duration

Sequence

duration

Duration (milliseconds)

SoundStimulus

duration_ms

Duration (seconds)

SoundStimulus

duration_s

Edit distance

Rhythm

edit_distance_rhythm()

Edit distance

Sequence

edit_distance_sequence()

Entropy

Sequence

get_rhythmic_entropy()

IOIs

Sequence

iois

IOIs as DataFrame

Sequence

get_ioi_df()

Exporting a DataFrame from a list of sequences

Integer ratios

Sequence

integer_ratios

Interval ratios

Sequence

interval_ratios_from_dyads

KS-test

Sequence

ks_test()

Onsets

Sequence

onsets

Phase differences

Sequence

get_phase_differences()

Round off onsets

Sequence

round_onsets()

Frame rounding

nPVI

Sequence

get_npvi()

ugof

Sequence

get_ugof_isochronous()

Data visualization#

Keyword

Class

Function, method, attribute

Example

Autocorrelations

Sequence

acf_plot()

Beat-finding using autocorrelations

Cross-correlations

Sequence

ccf_plot()

Event plot

Sequence

plot_sequence()

Plotting a single sequence

Event plot

SoundSequence

plot_sequence()

Plotting a single sequence

Event plot (multiple seqs)

Sequence

plot_multiple_sequences()

Plotting multiple sequences

Fourier transform

Sequence

fft_plot()

Beat-finding using Fourier transform

Interval ratios (density)

Sequence

plot_interval_ratios_density()

Interval ratios (histogram)

Sequence

plot_interval_ratios_histogram()

Musical notation

Rhythm

plot_rhythm()

Uneven rhythms

Musical notation

Melody

plot_melody()

Phase differences

Sequence

plot_phase_differences()

Plotting phase differences (circular plots)

Phase space plot

Sequence

phase_space_plot()

Recurrence plot

Sequence

recurrence_plot()

Saving and manipulating plots

Waveform

SoundSequence

plot_waveform()

Getting started

Waveform

SoundStimulus

plot_waveform()

Roving oddball