Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cwitkowitz/amt-tools
/ functions
Functions
459 in github.com/cwitkowitz/amt-tools
⨍
Functions
459
◇
Types & classes
72
↓ 17 callers
Method
update
Update the internal state of the visualizer and the plot.
amt_tools/tools/visualize.py:217
↓ 10 callers
Method
dataset_name
Retrieve an appropriate tag, the class name, for the dataset. Returns ---------- tag : str Name of the chi
amt_tools/datasets/common.py:516
↓ 9 callers
Method
get_midi_tuning
Determine the instruments tuning in MIDI. Returns ---------- midi_tuning : list of int MIDI pitch of lowes
amt_tools/tools/instrument.py:148
↓ 9 callers
Method
load
Load the ground-truth from memory or generate it from scratch. Parameters ---------- track : string Name o
amt_tools/datasets/MAPS.py:61
↓ 8 callers
Method
__init__
Initialize parameters common to all evaluators and instantiate. Parameters ---------- unpack_key : string or None (o
amt_tools/evaluate.py:293
↓ 8 callers
Method
get_num_samples_required
Determine the number of samples required to extract one full frame of features. Returns ---------- num_samples_requi
amt_tools/features/common.py:99
↓ 8 callers
Method
get_range_len
Determine how many discrete pitches can be played by the instrument. Returns ---------- range_len : int Nu
amt_tools/tools/instrument.py:49
↓ 7 callers
Method
__init__
Initialize parameters common to all estimators and instantiate. Parameters ---------- profile : InstrumentProfile (i
amt_tools/transcribe.py:175
↓ 7 callers
Function
initialize_figure
Create a new figure and display it. Parameters ---------- figsize : tuple (x, y) or None (Optional) Size of plot window in inc
amt_tools/tools/visualize.py:47
↓ 7 callers
Method
set_patterns
Simple helper function to set new patterns. Parameters ---------- patterns : list of string or None (optional)
amt_tools/evaluate.py:344
↓ 6 callers
Method
finalize_output
Convert loss-friendly output into actual symbolic transcription. Parameters ---------- raw_output : Tensor (child cl
amt_tools/models/common.py:283
↓ 6 callers
Method
get_gt_dir
Get the path for the ground-truth directory or a track's ground-truth. Parameters ---------- track : string or None
amt_tools/datasets/common.py:458
↓ 6 callers
Function
multi_pitch_to_stacked_multi_pitch
Convert a multi pitch array into a stacked representation. Parameters ---------- multi_pitch : ndarray (F x T) Discrete pitch
amt_tools/tools/utils.py:1962
↓ 6 callers
Method
train
Reset the hidden and cell state every time the model is put into evaluation mode. Parameters ---------- mode : bool
amt_tools/models/onsetsframes.py:608
↓ 5 callers
Method
__init__
Initialize parameters common to all visualizers. Parameters ---------- figsize : tuple (x, y) or None (Optional)
amt_tools/tools/visualize.py:151
↓ 5 callers
Function
append_results
Combine two results dictionaries. This function is more general than the signature suggests. Parameters ---------- tracked_resul
amt_tools/evaluate.py:143
↓ 5 callers
Function
average_results
Obtain the average across all tracked results for each metric in a results dictionary. Parameters ---------- results : dictionar
amt_tools/evaluate.py:109
↓ 5 callers
Method
evaluate
Evaluate an estimate with respect to a reference. Parameters ---------- estimated : object Estimate releva
amt_tools/evaluate.py:438
↓ 5 callers
Function
get_active_pitch_count
Count the number of active pitches in each frame of a pitch list. Parameters ---------- pitch_list : list of ndarray (N x [...])
amt_tools/tools/utils.py:1352
↓ 5 callers
Method
post_update
Perform any steps after updating the plot.
amt_tools/tools/visualize.py:231
↓ 5 callers
Method
pre_update
Perform any steps prior to updating the plot.
amt_tools/tools/visualize.py:224
↓ 5 callers
Method
query_figure_update
Determine if the figure should be updated during this iteration of update(). Returns ---------- plot_update : bool
amt_tools/tools/visualize.py:191
↓ 5 callers
Method
set_save_dir
Simple helper function to set and create a new save directory. Parameters ---------- save_dir : string or None (opti
amt_tools/evaluate.py:328
↓ 5 callers
Function
validate
Implements the validation or evaluation loop for a model and dataset partition. Optionally save predictions and log results. Parameters
amt_tools/evaluate.py:52
↓ 5 callers
Method
write
Write the results dictionary to a text file if a save directory was specified. Parameters ---------- results : dicti
amt_tools/evaluate.py:452
↓ 4 callers
Method
__init__
Initialize the model and establish parameter defaults in function signature. Parameters ---------- See Transcription
amt_tools/models/onsetsframes.py:22
↓ 4 callers
Method
change_device
Change the device and load the model onto the new device. Parameters ---------- device : string, int or None, option
amt_tools/models/common.py:59
↓ 4 callers
Method
features_name
Retrieve an appropriate tag, the class name, for the module. Returns ---------- tag : str Name of the chil
amt_tools/features/common.py:311
↓ 4 callers
Method
get_elapsed_time
Determine the amount of time elapsed since the start of streaming. Parameters ---------- decimals : int Nu
amt_tools/features/stream.py:228
↓ 4 callers
Method
get_feats_dir
Get the path for the features directory or a track's features. Parameters ---------- track : string or None
amt_tools/datasets/common.py:482
↓ 4 callers
Method
get_loss
Perform the loss calculation at the output layer. Parameters ---------- estimated : Tensor (see child class for expe
amt_tools/models/common.py:268
↓ 4 callers
Method
get_num_channels
Sum number of feature channels from inner modules. Returns ---------- num_channels : int Number of indepen
amt_tools/features/combo.py:192
↓ 4 callers
Function
multi_pitch_to_onsets
Obtain a representation detailing where discrete pitches become active. Parameters ---------- multi_pitch : ndarray (F x T) Di
amt_tools/tools/utils.py:2381
↓ 4 callers
Method
process_audio
Get the VQT features for a piece of audio. Parameters ---------- audio : ndarray Mono-channel audio
amt_tools/features/vqt.py:167
↓ 4 callers
Method
reset
Reset the visualizer.
amt_tools/tools/visualize.py:254
↓ 4 callers
Function
sort_batched_notes
Sort an array of batch-friendly notes by the specified attribute. Parameters ---------- batched_notes : ndarray (N x 3) Array
amt_tools/tools/utils.py:2685
↓ 3 callers
Method
__init__
Initialize parameters for the audio streaming interface. Parameters ---------- See FeatureStream class for others...
amt_tools/features/stream.py:641
↓ 3 callers
Method
__init__
Initialize the dataset and establish parameter defaults in function signature. Parameters ---------- See Transcripti
amt_tools/datasets/MAESTRO.py:19
↓ 3 callers
Method
__init__
Initialize parameters common to all output layers as model fields and instantiate layers as a PyTorch processing Module. Par
amt_tools/models/common.py:207
↓ 3 callers
Function
apply_func_stacked_representation
Recursively apply a function to the contents of each slice in a stacked representation. TODO - this can be probably be used in many places to
amt_tools/tools/utils.py:3326
↓ 3 callers
Method
average_slice_results
Average results split by slices of a stacked representation. Parameters ---------- _results : dict Results
amt_tools/evaluate.py:751
↓ 3 callers
Method
download
This is to be extended by a child class. Parameters ---------- save_dir : string Directory in which to sav
amt_tools/datasets/MAESTRO.py:150
↓ 3 callers
Method
estimate
Obtain the estimate from the raw output. Parameters ---------- raw_output : dict Dictionary containing raw
amt_tools/transcribe.py:244
↓ 3 callers
Function
estimate_hop_length
Estimate hop length of a semi-regular but non-uniform series of times. Adapted from mir_eval pull request #336. Parameters --------
amt_tools/tools/utils.py:3197
↓ 3 callers
Method
frame_pad
Pad the audio to fill out the final frame. Parameters ---------- audio : ndarray Mono-channel audio
amt_tools/features/common.py:141
↓ 3 callers
Function
get_dynamic_y_bounds
Compute new y-axis boundaries for a dynamic plot. Parameters ---------- ax : matplotlib AxesSubplot Axis for which to get the
amt_tools/tools/visualize.py:112
↓ 3 callers
Method
get_hop_length
Gather hop lengths from inner modules, making sure they are equal. Returns ---------- hop_length : int or float
amt_tools/features/combo.py:172
↓ 3 callers
Method
get_times
Determine the time, in seconds, associated with each frame. Parameters ---------- audio: ndarray Mono-chan
amt_tools/features/vqt.py:197
↓ 3 callers
Method
model_name
Retrieve an appropriate tag, the class name, for the model. Returns ---------- tag : str Name of the child
amt_tools/models/common.py:187
↓ 3 callers
Function
notes_to_batched_notes
Convert loose note groups into batch-friendly storage. Parameters ---------- pitches : ndarray (N) Array of pitches correspond
amt_tools/tools/utils.py:135
↓ 3 callers
Function
notes_to_multi_pitch
Convert loose MIDI note groups into a multi pitch array. Parameters ---------- pitches : ndarray (N) Array of pitches correspo
amt_tools/tools/utils.py:1665
↓ 3 callers
Method
post_proc
Perform post-processing steps. Parameters ---------- feats : ndarray Calculated features Returns
amt_tools/features/common.py:203
↓ 3 callers
Method
process_track
Calculate the results, write them, and track them within the evaluator. Parameters ---------- estimated : dict
amt_tools/evaluate.py:483
↓ 3 callers
Method
query_devices
Obtain a collection of available input and output devices. Parameters ---------- verbose : bool Flag for p
amt_tools/features/stream.py:331
↓ 3 callers
Method
reset_results
Reset tracked results to empty dictionary.
amt_tools/evaluate.py:368
↓ 3 callers
Method
run_on_batch
Perform all processing steps of the transcription model on a batch. Parameters ---------- batch : dict Dic
amt_tools/models/common.py:151
↓ 3 callers
Method
set_save_dirs
Update the save directories for all of the estimators. Parameters ---------- save_dir : string Directory u
amt_tools/transcribe.py:130
↓ 3 callers
Function
sort_notes
Sort a collection of notes by the specified attribute. Parameters ---------- pitches : ndarray (N) Array of pitches correspond
amt_tools/tools/utils.py:2713
↓ 3 callers
Function
sort_pitch_list
Sort a pitch list by frame time. Parameters ---------- times : ndarray (N) Time in seconds of beginning of each frame N
amt_tools/tools/utils.py:2749
↓ 3 callers
Method
start_streaming
Begin streaming the audio.
amt_tools/features/stream.py:694
↓ 3 callers
Function
train
Implements the training loop for an experiment. Parameters ---------- model : TranscriptionModel Model to train train_load
amt_tools/train.py:19
↓ 3 callers
Method
write
Specify the protocol for writing the estimates. Parameters ---------- estimate : object Estimate for a tra
amt_tools/transcribe.py:257
↓ 3 callers
Function
write_and_print
Write text to a file and optionally the console. Parameters ---------- file : TextIOWrapper File open in write mode text :
amt_tools/tools/io.py:537
↓ 2 callers
Method
__init__
Initialize the profile and establish parameter defaults in function signature. Parameters ---------- See InstrumentP
amt_tools/tools/instrument.py:70
↓ 2 callers
Method
available_splits
Obtain a list of possible splits. Currently, the splits are by piano, in accordance with the default organization of the dataset.
amt_tools/datasets/MAPS.py:222
↓ 2 callers
Method
average_results
Return the average of the currently tracked results. Returns ---------- average : dictionary Dictionary wi
amt_tools/evaluate.py:375
↓ 2 callers
Function
batched_notes_to_notes
Convert batch-friendly notes into loose note groups. Parameters ---------- batched_notes : ndarray (N x 3) Array of note inter
amt_tools/tools/utils.py:474
↓ 2 callers
Function
cat_pitch_list
Concatenate two pitch lists, appending observations with new times and blending observations with preexisting times. This function assumes th
amt_tools/tools/utils.py:1161
↓ 2 callers
Method
close
Close the visualizer's figure, if it exists.
amt_tools/tools/visualize.py:241
↓ 2 callers
Function
extract_stacked_notes_jams
Extract MIDI notes spread across slices (e.g. guitar strings) from JAMS data into a dictionary. Parameters ---------- jam : JAMS obj
amt_tools/tools/io.py:90
↓ 2 callers
Function
extract_stacked_pitch_list_jams
Extract pitch lists spread across slices (e.g. guitar strings) from JAMS annotations into a dictionary. Parameters ---------- jam :
amt_tools/tools/io.py:256
↓ 2 callers
Function
filter_notes_by_duration
Remove notes from a collection which have a duration less than a threshold TODO - add to tools and make same function for batched notes to us
amt_tools/transcribe.py:39
↓ 2 callers
Method
get_default_key
Provide the default key to use in the event no key was provided.
amt_tools/evaluate.py:392
↓ 2 callers
Function
get_dynamic_x_bounds
Compute new x-axis boundaries for a dynamic plot. Parameters ---------- ax : matplotlib AxesSubplot Axis for which to get the
amt_tools/tools/visualize.py:78
↓ 2 callers
Method
get_early_ds_count
Utility function to calculate the number of downsamples required before processing the top-octave, given the VQT parameters, based
amt_tools/features/vqt.py:64
↓ 2 callers
Method
get_expected_frames
Determine the number of frames the module will return for a piece of audio. Parameters ---------- audio : nd
amt_tools/features/hvqt.py:60
↓ 2 callers
Method
get_feature_size
Helper function to access dimensionality of features. Returns ---------- feature_size : int Dimensionality
amt_tools/features/mel.py:98
↓ 2 callers
Method
get_feature_size
Helper function to access dimensionality of features. Returns ---------- feature_size : int Dimensionality
amt_tools/features/vqt.py:229
↓ 2 callers
Method
get_midi_range
Obtain the instrument's range of MIDI pitches. Returns ---------- pitch_range : ndarray Ascending array of
amt_tools/tools/instrument.py:34
↓ 2 callers
Method
get_num_dofs
Determine how many degrees of freedom (e.g. strings) are present on the instrument. Returns ---------- num_dofs : in
amt_tools/tools/instrument.py:87
↓ 2 callers
Method
get_num_dofs
Determine how many degrees of freedom (e.g. strings) are present on the instrument. Returns ---------- num_dofs : in
amt_tools/tools/instrument.py:132
↓ 2 callers
Method
get_track_data
Get the features and ground truth for a track within a time interval. Parameters ---------- track_id : string
amt_tools/datasets/common.py:297
↓ 2 callers
Method
get_track_dir
Get the parent directory (piano) where the track is located. Parameters ---------- track : string MAPS tra
amt_tools/datasets/MAPS.py:159
↓ 2 callers
Method
load
Get the ground truth for a track. If it has already been saved, load it. If the ground-truth does not exist yet, initialize a new dic
amt_tools/datasets/common.py:410
↓ 2 callers
Function
log_results
Log results using TensorBoardX. Parameters ---------- results : dictionary Dictionary containing results of tracks arranged by
amt_tools/evaluate.py:179
↓ 2 callers
Function
multi_pitch_to_offsets
Obtain a representation detailing where discrete pitch activity ceases. Parameters ---------- multi_pitch : ndarray (F x T) Di
amt_tools/tools/utils.py:2555
↓ 2 callers
Function
pattern_match
Simple helper function to see if a query matches a list of strings, even if partially. Parameters ---------- query : string St
amt_tools/evaluate.py:255
↓ 2 callers
Method
query_finished
Determine if the stream has finished. Returns ---------- finished : bool Flag indicating there are no fram
amt_tools/features/stream.py:761
↓ 2 callers
Method
reset_results
Reset tracked results of each evaluator in the collection.
amt_tools/evaluate.py:556
↓ 2 callers
Method
reset_state
Specify the protocol for resetting the state of the estimator.
amt_tools/transcribe.py:272
↓ 2 callers
Method
reset_state
Reset the hidden and cell state to None.
amt_tools/models/onsetsframes.py:600
↓ 2 callers
Method
reset_stream
Clear everything related to any previous streams.
amt_tools/features/stream.py:392
↓ 2 callers
Method
reset_stream
Initialize parameters for the audio streaming interface. Parameters ---------- audio : ndarray Mono-channe
amt_tools/features/stream.py:674
↓ 2 callers
Method
set_save_dir
Simple helper function to set and create a new save directory. Parameters ---------- save_dir : string or None (opti
amt_tools/transcribe.py:197
↓ 2 callers
Method
unpack
Attempt to unpack data relevant to the evaluator from the provided estimates/ground-truth. Note: This method can be overridden in or
amt_tools/evaluate.py:399
↓ 1 callers
Method
__init__
Initialize parameters for the CQT. Parameters ---------- See VQT class...
amt_tools/features/cqt.py:12
↓ 1 callers
Function
array_to_tensor
Simple helper function to convert a NumPy array into a PyTorch tensor in order to keep code readable. Parameters ---------- data
amt_tools/tools/utils.py:3438
↓ 1 callers
Method
available_splits
Get the supported partitions for the dataset.
amt_tools/datasets/common.py:508
↓ 1 callers
Method
available_splits
amt_tools/datasets/combo.py:54
↓ 1 callers
Method
buffer_empty_frame
Prime the buffer with an empty frame. Returns ---------- features : dict Dictionary containing a frame o
amt_tools/features/stream.py:156
next →
1–100 of 459, ranked by callers