422678c8bf45574bb7c8a87ba434c455f9f7b877,magenta/music/chord_inference.py,,sequence_note_pitch_vectors,#Any#Any#,148
Before Change
pitch_class = note.pitch % 12
start_frame = min(start_frame, num_frames - 1)
end_frame = max(end_frame, 0)
if start_frame >= end_frame:
x[start_frame, pitch_class] += note.end_time - note.start_time
else:
After Change
A numpy array with shape `[num_frames, 12]` where each row is a unit-
normalized pitch class vector for the corresponding frame in `sequence`.
if isinstance(seconds_per_frame, numbers.Number):
// Construct array of frame boundary times.
num_frames = int(math.ceil(sequence.total_time / seconds_per_frame))
frame_boundaries = seconds_per_frame * np.arange(1, num_frames)
else:
frame_boundaries = sorted(seconds_per_frame)
num_frames = len(frame_boundaries) + 1
x = np.zeros([num_frames, 12])
for note in sequence.notes:
if note.is_drum:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: tensorflow/magenta
Commit Name: 422678c8bf45574bb7c8a87ba434c455f9f7b877
Time: 2018-07-26
Author: iansimon@users.noreply.github.com
File Name: magenta/music/chord_inference.py
Class Name:
Method Name: sequence_note_pitch_vectors
Project Name: has2k1/plotnine
Commit Name: 6ae8c5f4bcf78256d15adbc9091cd8701de478cf
Time: 2013-10-11
Author: austinogilvie@gmail.com
File Name: ggplot/geoms/geom_abline.py
Class Name: geom_abline
Method Name: plot_layer
Project Name: CellProfiler/CellProfiler
Commit Name: f3e6f09e2a915766454b6ab2a9b0e4cf73d4572e
Time: 2013-06-10
Author: leek@broadinstitute.org
File Name: cellprofiler/modules/identifytertiaryobjects.py
Class Name: IdentifyTertiaryObjects
Method Name: run