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
↓ 1 callers
Method
buffer_new_frame
Add a new frame to the buffer. This function is only required if a buffer is needed. Otherwise, extract_frame_features() will be suff
amt_tools/features/stream.py:121
↓ 1 callers
Method
calculate_feats
Get the features for a track within the dataset. Parameters ---------- data : dict or string if dict: Trac
amt_tools/datasets/common.py:212
↓ 1 callers
Function
cat_batched_notes
Concatenate two collections of batched notes. Parameters ---------- batched_notes : ndarray (N x 3) Array of note intervals an
amt_tools/tools/utils.py:167
↓ 1 callers
Method
center_pad
Pad the audio such that the first sample is located halfway through the first frame. Parameters ---------- a
amt_tools/features/waveform.py:98
↓ 1 callers
Function
clean_pitch_list
Remove null (zero-frequency) observations from the pitch list. Parameters ---------- pitch_list : list of ndarray (N x [...])
amt_tools/tools/utils.py:1273
↓ 1 callers
Method
divisor_pad
Pad audio such that it is divisible by the specified divisor. Parameters ---------- audio : ndarray Mono-c
amt_tools/features/common.py:115
↓ 1 callers
Method
download
Download the dataset to disk if possible. This is to be extended by a child class. Parameters ---------- save_dir :
amt_tools/datasets/common.py:532
↓ 1 callers
Function
extract_duration_jams
Extract the duration of audio associated with JAMS annotations. Parameters ---------- jam : JAMS object JAMS file data Re
amt_tools/tools/io.py:214
↓ 1 callers
Method
extract_frame_features
Acquire the next frame from the stream.
amt_tools/features/stream.py:90
↓ 1 callers
Method
extract_frame_features
Acquire the next frame of features from the stream. Returns ---------- features : ndarray Features for one
amt_tools/features/stream.py:718
↓ 1 callers
Function
extract_notes_jams
Extract all MIDI notes within a JAMS file. Parameters ---------- jam : JAMS object JAMS file data Returns ----------
amt_tools/tools/io.py:158
↓ 1 callers
Function
extract_pitch_list_jams
Extract a pitch list from JAMS annotations. Parameters ---------- jam : JAMS object JAMS file data _times : ndarray or Non
amt_tools/tools/io.py:360
↓ 1 callers
Function
filter_notes
Remove notes with nominal pitch outside the supported range of an instrument profile and notes with intervals entirely outside of specified b
amt_tools/tools/utils.py:641
↓ 1 callers
Function
filter_pitch_list
Remove pitch observations (MIDI) outside the supported range of a profile. Parameters ---------- pitch_list : list of ndarray (N x [
amt_tools/tools/utils.py:1420
↓ 1 callers
Method
finalize
Log the averaged results using TensorBoardX and reset the results tracking. Parameters ---------- writer : tensorboa
amt_tools/evaluate.py:513
↓ 1 callers
Method
forward
Perform the main processing steps for Onsets & Frames (V1). Parameters ---------- feats : Tensor (B x C x T x F)
amt_tools/models/onsetsframes.py:94
↓ 1 callers
Method
get_buffered_frames
Retrieve the currently buffered frames. Returns ---------- features : dict Dictionary containing a frame
amt_tools/features/stream.py:206
↓ 1 callers
Function
get_current_time
Determine the current system time. Parameters ---------- decimals : int Number of digits to keep when rounding Returns
amt_tools/tools/utils.py:3970
↓ 1 callers
Method
get_default_key
Default key describing estimates in the event no key was provided.
amt_tools/transcribe.py:215
↓ 1 callers
Method
get_elapsed_time
Determine the cumulative amount of time elapsed during the (potentially more than one) active phase of the stream. Parameter
amt_tools/features/stream.py:569
↓ 1 callers
Method
get_expected_frames
Determine the number of frames the module will return for a piece of audio. This is the default behavior. It can be overridd
amt_tools/features/common.py:41
↓ 1 callers
Method
get_expected_frames
Determine the number of frames we expect from provided audio. Parameters ---------- audio: ndarray Mono-ch
amt_tools/features/combo.py:30
↓ 1 callers
Method
get_fret
Get the fret for a given MIDI pitch and string. Parameters ---------- midi_pitch : int MIDI pitch to query
amt_tools/tools/instrument.py:181
↓ 1 callers
Method
get_jams_path
Get the path to the annotations of a track. Parameters ---------- track : string GuitarSet track name
amt_tools/datasets/GuitarSet.py:144
↓ 1 callers
Method
get_midi_path
Get the path to the annotations of a track. Parameters ---------- track : string MAPS track name
amt_tools/datasets/MAPS.py:201
↓ 1 callers
Method
get_sample_range
Determine the range of audio samples which will produce features with a given number of frames. This is the default behavior
amt_tools/features/common.py:68
↓ 1 callers
Method
get_sample_range
Determine the range of audio samples which will produce features with a given number of frames. Parameters ---------
amt_tools/features/vqt.py:136
↓ 1 callers
Method
get_sample_rate
Gather sample rates from inner modules, making sure they are equal. Returns ---------- sample_rate : int or float
amt_tools/features/combo.py:152
↓ 1 callers
Method
get_tracks
Get the tracks associated with a dataset partition. Parameters ---------- split : string Name of the parti
amt_tools/datasets/common.py:397
↓ 1 callers
Method
get_tracks
Get the tracks associated with a dataset partition. Parameters ---------- split : string Name of the parti
amt_tools/datasets/MAPS.py:32
↓ 1 callers
Method
get_tracks
amt_tools/datasets/combo.py:32
↓ 1 callers
Method
get_wav_path
Get the path to the audio of a track. Parameters ---------- track : string GuitarSet track name R
amt_tools/datasets/GuitarSet.py:124
↓ 1 callers
Method
get_wav_path
Get the path to the audio of a track. Parameters ---------- track : string MAPS track name Return
amt_tools/datasets/MAPS.py:181
↓ 1 callers
Method
increment_frame_count
Increase the frame count by one.
amt_tools/tools/visualize.py:179
↓ 1 callers
Function
multi_pitch_to_pitch_list
Convert a multi pitch array into a pitch list. Array of corresponding times does not change and is assumed to be managed outside of the f
amt_tools/tools/utils.py:1023
↓ 1 callers
Function
normalize_activations
Normalizes an array of activations using infinity norm. Parameters ---------- activations : ndarray Provided activations
amt_tools/tools/utils.py:2870
↓ 1 callers
Function
notes_to_hz
Convert note pitches from MIDI to Hertz. Array of corresponding intervals does not change and is assumed to be managed outside of the fun
amt_tools/tools/utils.py:536
↓ 1 callers
Function
notes_to_midi
Convert note pitches from Hertz to MIDI. Array of corresponding intervals does not change and is assumed to be managed outside of the fun
amt_tools/tools/utils.py:561
↓ 1 callers
Function
notes_to_offsets
Obtain the offsets of loose MIDI note groups in multi pitch format. Parameters ---------- pitches : ndarray (N) Array of pitch
amt_tools/tools/utils.py:2508
↓ 1 callers
Function
notes_to_onsets
Obtain the onsets of loose MIDI note groups in multi pitch format. Parameters ---------- pitches : ndarray (N) Array of pitche
amt_tools/tools/utils.py:2329
↓ 1 callers
Function
pitch_list_to_hz
Convert pitch list from MIDI to Hertz. Array of corresponding times does not change and is assumed to be managed outside of the function.
amt_tools/tools/utils.py:1065
↓ 1 callers
Function
pitch_list_to_midi
Convert pitch list from Hertz to MIDI. Array of corresponding times does not change and is assumed to be managed outside of the function.
amt_tools/tools/utils.py:1101
↓ 1 callers
Function
pitch_list_to_multi_pitch
Convert a MIDI pitch list into a multi pitch array. Parameters ---------- pitch_list : list of ndarray (N x [...]) Array of MI
amt_tools/tools/utils.py:1740
↓ 1 callers
Function
pitch_list_to_stacked_pitch_list
Convert a pitch list into a dictionary of stacked pitch lists. Parameters ---------- times : ndarray (N) Time in seconds of be
amt_tools/tools/utils.py:1464
↓ 1 callers
Function
plot_guitar_tablature
Static function for plotting guitar tablature organized as notes by string. TODO - this does not scale well for big note groups Paramete
amt_tools/tools/visualize.py:822
↓ 1 callers
Function
plot_pianoroll
Static function for plotting a 2D pitch activation map or pianoroll. Parameters ---------- multi_pitch : ndarray (F x T) Discr
amt_tools/tools/visualize.py:1045
↓ 1 callers
Function
plot_pitch_list
Static function for plotting pitch contours (pitch_list). Parameters ---------- times : ndarray (N) Time in seconds of beginni
amt_tools/tools/visualize.py:588
↓ 1 callers
Function
plot_stacked_pitch_list
Static function for plotting pitch contours (pitch_list). Parameters ---------- stacked_pitch_list : dict Dictionary containin
amt_tools/tools/visualize.py:681
↓ 1 callers
Function
plot_tfr
Static function for plotting any time-frequency representation. Parameters ---------- tfr : ndarray (F x T) Time-frequency rep
amt_tools/tools/visualize.py:421
↓ 1 callers
Function
plot_waveform
Static function for plotting a 1D waveform. Parameters ---------- samples : ndarray Waveform samples to plot times : ndarr
amt_tools/tools/visualize.py:269
↓ 1 callers
Method
post_proc
Perform necessary post-processing steps for the transcription model. Parameters ---------- batch : dict Di
amt_tools/models/common.py:139
↓ 1 callers
Method
post_proc
Calculate loss and finalize model output. Parameters ---------- batch : dict Dictionary including model ou
amt_tools/models/onsetsframes.py:138
↓ 1 callers
Method
pre_proc
This method can be overridden in order to insert extra steps. Parameters ---------- raw_output : dict Dict
amt_tools/transcribe.py:223
↓ 1 callers
Method
pre_proc
Perform necessary pre-processing steps for the transcription model. Parameters ---------- batch : dict Dic
amt_tools/models/common.py:84
↓ 1 callers
Function
print_time
Print a time to the console. Parameters ---------- t : float Arbitrary time label : string or None (Optional) Label
amt_tools/tools/utils.py:3991
↓ 1 callers
Method
process_track
Combines pre_proc(), estimate(), and write(), and returns output in a dictionary. Parameters ---------- raw_output :
amt_tools/transcribe.py:279
↓ 1 callers
Method
query_active
Determine if the stream has finished. (Default behavior) Returns ---------- active : bool Flag indicating
amt_tools/features/stream.py:98
↓ 1 callers
Method
query_active
Determine if the stream is currently active. Returns ---------- active : bool Flag indicating the stream h
amt_tools/features/stream.py:541
↓ 1 callers
Function
query_dict
Determine if a dictionary has an entry for a specified key. TODO - can use this many places (e.g. datasets) to be safe and neat Paramet
amt_tools/tools/utils.py:3856
↓ 1 callers
Method
query_finished
Determine if the stream has finished. Returns ---------- finished : bool Flag indicating the stream was te
amt_tools/features/stream.py:555
↓ 1 callers
Method
query_frame_buffer_full
Determine if the buffer is full. Returns ---------- frame_buffer_full : bool Flag indicating the buffer is
amt_tools/features/stream.py:191
↓ 1 callers
Method
remove_overlapping
Remove any tracks contained in the given splits from the initial dataset partition, should they exist. Parameters --
amt_tools/datasets/MAPS.py:130
↓ 1 callers
Method
reset
Reset the waveform visualizer.
amt_tools/tools/visualize.py:405
↓ 1 callers
Method
reset
Reset the TFR visualizer.
amt_tools/tools/visualize.py:572
↓ 1 callers
Method
reset
Reset the stacked pitch list visualizer.
amt_tools/tools/visualize.py:810
↓ 1 callers
Method
reset
Reset the guitar tablature visualizer.
amt_tools/tools/visualize.py:1033
↓ 1 callers
Method
reset_state
Zero-out the tracked state.
amt_tools/transcribe.py:548
↓ 1 callers
Function
run_offline
Perform inference in an offline fashion. Parameters ---------- track_data : dict Dictionary containing relevant features for a
amt_tools/inference.py:12
↓ 1 callers
Function
run_online
TODO - no loss entry in predictions causes whole dict to be interpreted as loss Perform inference in an mock-online fashion. Parameters
amt_tools/inference.py:89
↓ 1 callers
Function
run_single_frame
Perform inference on a single frame. TODO - this is all repeat code of run_offline - only difference is lack of dict_unsqueeze Parameter
amt_tools/inference.py:50
↓ 1 callers
Method
select_device
Choose the device to use when opening the microphone stream. Parameters ---------- idx : int or None (Optional)
amt_tools/features/stream.py:355
↓ 1 callers
Method
set_verbose
Simple helper function to set a new verbose flag. Parameters ---------- verbose : bool Whether to print an
amt_tools/evaluate.py:356
↓ 1 callers
Method
set_weights
Update the class weighting. Parameters ---------- weights : ndarray (N) or None (optional) Class weights f
amt_tools/models/common.py:234
↓ 1 callers
Function
slice_pitch_list
Retain pitch observations within a time window. Parameters ---------- times : ndarray (N) Time in seconds of beginning of each
amt_tools/tools/utils.py:1126
↓ 1 callers
Function
stacked_multi_pitch_to_logistic
View stacked multi pitch arrays as a set of individual activations. Parameters ---------- stacked_multi_pitch : ndarray (S x F x T)
amt_tools/tools/utils.py:2227
↓ 1 callers
Function
stacked_multi_pitch_to_tablature
Collapse stacked multi pitch arrays into a single class representation. Parameters ---------- stacked_multi_pitch : ndarray (S x F x
amt_tools/tools/utils.py:2095
↓ 1 callers
Function
stacked_pitch_list_to_stacked_multi_pitch
Convert a stacked MIDI pitch list into a stack of multi pitch arrays. This function assumes that all pitch lists are relative to the same
amt_tools/tools/utils.py:1922
↓ 1 callers
Method
stop_streaming
Stop streaming the audio.
amt_tools/features/stream.py:81
↓ 1 callers
Method
stop_streaming
Stop streaming audio from the microphone. Parameters ---------- pause : bool Whether to pause the stream i
amt_tools/features/stream.py:439
↓ 1 callers
Method
stop_streaming
Stop streaming the audio.
amt_tools/features/stream.py:706
↓ 1 callers
Method
stop_thread
Indicate that the thread should stop running. Only call this if you are completely finished with the thread, since it cannot be start
amt_tools/features/stream.py:597
↓ 1 callers
Function
tablature_to_stacked_multi_pitch
Convert a tablature representation into a stacked multi pitch array. Array of corresponding times does not change and is assumed to be ma
amt_tools/tools/utils.py:1988
↓ 1 callers
Function
tensor_to_array
Simple helper function to convert a PyTorch tensor into a NumPy array in order to keep code readable. Parameters ---------- data
amt_tools/tools/utils.py:3412
↓ 1 callers
Function
threshold_activations
Performs binary thresholding on an array of activations. Parameters ---------- activations : ndarray Provided activations
amt_tools/tools/utils.py:2896
↓ 1 callers
Method
to_decibels
Convert features to decibels (dB) units. This is the default behavior. It can be overridden. Parameters ----------
amt_tools/features/common.py:181
↓ 1 callers
Function
transpose_batched_notes
Switch the axes of batched notes. Parameters ---------- batched_notes : ndarray (3 x N) or (N x 3) Array of note intervals and
amt_tools/tools/utils.py:226
↓ 1 callers
Function
write_results
Write result dictionary to a text file. Parameters ---------- results : dictionary Dictionary containing results of tracks arr
amt_tools/evaluate.py:219
Method
__getitem__
Retrieve the (potentially randomly sliced) item associated with the selected index. Parameters ---------- index : in
amt_tools/datasets/common.py:173
Method
__init__
Initialize estimators and instantiate. Parameters ---------- estimators : list of Estimator Estimators to
amt_tools/transcribe.py:96
Method
__init__
Initialize parameters for the estimator. Parameters ---------- See Estimator class for others... inhibition
amt_tools/transcribe.py:378
Method
__init__
Initialize parameters for the estimator. Parameters ---------- See StackedNoteTranscriber class...
amt_tools/transcribe.py:521
Method
__init__
Initialize parameters for the estimator. Parameters ---------- See Estimator class... notes_key : string or
amt_tools/transcribe.py:857
Method
__init__
Initialize parameters for the estimator. Parameters ---------- See Estimator class... multi_pitch_key : str
amt_tools/transcribe.py:952
Method
__init__
Initialize parameters for the estimator. Parameters ---------- See Estimator class... tablature_key : strin
amt_tools/transcribe.py:1102
Method
__init__
Initialize parameters for the estimator. Parameters ---------- See Estimator class... stacked_key : string
amt_tools/transcribe.py:1153
Method
__init__
Initialize parameters for the estimator. Parameters ---------- See MultiPitchWrapper class... multi_pitch_k
amt_tools/transcribe.py:1272
Method
__init__
Initialize parameters for the evaluator. Parameters ---------- See Evaluator class... evaluators : list of
amt_tools/evaluate.py:540
Method
__init__
Initialize parameters for the evaluator. Parameters ---------- See Evaluator class for others... average_sl
amt_tools/evaluate.py:733
Method
__init__
Initialize parameters for the evaluator. Parameters ---------- See StackedEvaluator class...
amt_tools/evaluate.py:863
Method
__init__
Initialize parameters for the evaluator. Parameters ---------- See StackedEvaluator class for others... off
amt_tools/evaluate.py:911
← previous
next →
101–200 of 459, ranked by callers