From a4d5575ae5ce56b804ad89f3fe345e390de548c2 Mon Sep 17 00:00:00 2001 From: Ian Simon Date: Wed, 26 Jul 2023 14:36:06 -0700 Subject: [PATCH] fix lint errors PiperOrigin-RevId: 551318275 --- note_seq/__init__.py | 2 +- note_seq/abc_parser.py | 2 +- note_seq/abc_parser_test.py | 2 +- note_seq/alignment/align_fine.py | 2 +- note_seq/alignment/align_fine_lib.py | 2 +- note_seq/audio_io.py | 2 +- note_seq/audio_io_test.py | 2 +- note_seq/chord_inference.py | 4 ++-- note_seq/chord_inference_test.py | 2 +- note_seq/chord_symbols_lib.py | 2 +- note_seq/chord_symbols_lib_test.py | 2 +- note_seq/chords_encoder_decoder.py | 2 +- note_seq/chords_encoder_decoder_test.py | 2 +- note_seq/chords_lib.py | 2 +- note_seq/chords_lib_test.py | 2 +- note_seq/constants.py | 2 +- note_seq/drums_encoder_decoder.py | 2 +- note_seq/drums_encoder_decoder_test.py | 2 +- note_seq/drums_lib.py | 2 +- note_seq/drums_lib_test.py | 2 +- note_seq/encoder_decoder.py | 2 +- note_seq/encoder_decoder_test.py | 2 +- note_seq/events_lib.py | 2 +- note_seq/events_lib_test.py | 2 +- note_seq/lead_sheets_lib.py | 2 +- note_seq/lead_sheets_lib_test.py | 2 +- note_seq/melodies_lib.py | 2 +- note_seq/melodies_lib_test.py | 4 ++-- note_seq/melody_encoder_decoder.py | 2 +- note_seq/melody_encoder_decoder_test.py | 2 +- note_seq/melody_inference.py | 2 +- note_seq/melody_inference_test.py | 2 +- note_seq/midi_io.py | 2 +- note_seq/midi_io_test.py | 2 +- note_seq/midi_synth.py | 2 +- note_seq/musicnet_io.py | 2 +- note_seq/musicnet_io_test.py | 2 +- note_seq/musicxml_parser.py | 6 +++--- note_seq/musicxml_parser_test.py | 2 +- note_seq/musicxml_reader.py | 2 +- note_seq/notebook_utils.py | 4 ++-- note_seq/performance_controls.py | 2 +- note_seq/performance_controls_test.py | 2 +- note_seq/performance_encoder_decoder.py | 2 +- note_seq/performance_encoder_decoder_test.py | 2 +- note_seq/performance_lib.py | 2 +- note_seq/performance_lib_test.py | 2 +- note_seq/pianoroll_encoder_decoder.py | 2 +- note_seq/pianoroll_encoder_decoder_test.py | 2 +- note_seq/pianoroll_lib.py | 2 +- note_seq/pianoroll_lib_test.py | 2 +- note_seq/protobuf/__init__.py | 2 +- note_seq/protobuf/compare.py | 2 +- note_seq/protobuf/generate_pb2_py.sh | 2 +- note_seq/protobuf/generator_pb2.py | 2 +- note_seq/protobuf/install_protoc.sh | 2 +- note_seq/protobuf/music_pb2.py | 2 +- note_seq/sequences_lib.py | 4 ++-- note_seq/sequences_lib_test.py | 2 +- note_seq/testing_lib.py | 2 +- note_seq/version.py | 2 +- setup.py | 2 +- update_pip.sh | 2 +- 63 files changed, 69 insertions(+), 69 deletions(-) diff --git a/note_seq/__init__.py b/note_seq/__init__.py index 8176671..3f5d25d 100644 --- a/note_seq/__init__.py +++ b/note_seq/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/abc_parser.py b/note_seq/abc_parser.py index 866543d..dc03c0c 100644 --- a/note_seq/abc_parser.py +++ b/note_seq/abc_parser.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/abc_parser_test.py b/note_seq/abc_parser_test.py index 8d8a065..0a6284f 100644 --- a/note_seq/abc_parser_test.py +++ b/note_seq/abc_parser_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/alignment/align_fine.py b/note_seq/alignment/align_fine.py index a7f3180..06f4eea 100644 --- a/note_seq/alignment/align_fine.py +++ b/note_seq/alignment/align_fine.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/alignment/align_fine_lib.py b/note_seq/alignment/align_fine_lib.py index 988a0e6..7244f2c 100644 --- a/note_seq/alignment/align_fine_lib.py +++ b/note_seq/alignment/align_fine_lib.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/audio_io.py b/note_seq/audio_io.py index 21d8299..85bbf97 100644 --- a/note_seq/audio_io.py +++ b/note_seq/audio_io.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/audio_io_test.py b/note_seq/audio_io_test.py index 7da514d..dd28404 100644 --- a/note_seq/audio_io_test.py +++ b/note_seq/audio_io_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chord_inference.py b/note_seq/chord_inference.py index d0cc79a..436e944 100644 --- a/note_seq/chord_inference.py +++ b/note_seq/chord_inference.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -104,7 +104,7 @@ def _key_chord_transition_distribution( if key_1 != key_2: # Key change. Chord probability depends only on key and not previous # chord. - mat[i, j] = (key_change_prob / 11) + mat[i, j] = key_change_prob / 11 mat[i, j] *= key_chord_distribution[key_2, chord_index_2] else: diff --git a/note_seq/chord_inference_test.py b/note_seq/chord_inference_test.py index 5b2207d..bf4f449 100644 --- a/note_seq/chord_inference_test.py +++ b/note_seq/chord_inference_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chord_symbols_lib.py b/note_seq/chord_symbols_lib.py index 6150ac7..e05346a 100644 --- a/note_seq/chord_symbols_lib.py +++ b/note_seq/chord_symbols_lib.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chord_symbols_lib_test.py b/note_seq/chord_symbols_lib_test.py index 270f78a..d56d6ef 100644 --- a/note_seq/chord_symbols_lib_test.py +++ b/note_seq/chord_symbols_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chords_encoder_decoder.py b/note_seq/chords_encoder_decoder.py index be8c024..4967a5a 100644 --- a/note_seq/chords_encoder_decoder.py +++ b/note_seq/chords_encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chords_encoder_decoder_test.py b/note_seq/chords_encoder_decoder_test.py index 0066abc..6693d4f 100644 --- a/note_seq/chords_encoder_decoder_test.py +++ b/note_seq/chords_encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chords_lib.py b/note_seq/chords_lib.py index 17a6e2b..147af9f 100644 --- a/note_seq/chords_lib.py +++ b/note_seq/chords_lib.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chords_lib_test.py b/note_seq/chords_lib_test.py index 4a09a73..2bb4f7a 100644 --- a/note_seq/chords_lib_test.py +++ b/note_seq/chords_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/constants.py b/note_seq/constants.py index e02352b..af41f84 100644 --- a/note_seq/constants.py +++ b/note_seq/constants.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/drums_encoder_decoder.py b/note_seq/drums_encoder_decoder.py index a149282..27b06b7 100644 --- a/note_seq/drums_encoder_decoder.py +++ b/note_seq/drums_encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/drums_encoder_decoder_test.py b/note_seq/drums_encoder_decoder_test.py index 3c765fb..858fd09 100644 --- a/note_seq/drums_encoder_decoder_test.py +++ b/note_seq/drums_encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/drums_lib.py b/note_seq/drums_lib.py index 4d7527c..03fdbff 100644 --- a/note_seq/drums_lib.py +++ b/note_seq/drums_lib.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/drums_lib_test.py b/note_seq/drums_lib_test.py index b716bb2..458c076 100644 --- a/note_seq/drums_lib_test.py +++ b/note_seq/drums_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/encoder_decoder.py b/note_seq/encoder_decoder.py index b213d5a..d78f8a7 100644 --- a/note_seq/encoder_decoder.py +++ b/note_seq/encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/encoder_decoder_test.py b/note_seq/encoder_decoder_test.py index 6e789ce..34ae635 100644 --- a/note_seq/encoder_decoder_test.py +++ b/note_seq/encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/events_lib.py b/note_seq/events_lib.py index 3800f36..70051ea 100644 --- a/note_seq/events_lib.py +++ b/note_seq/events_lib.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/events_lib_test.py b/note_seq/events_lib_test.py index ddf07ce..ce20fd7 100644 --- a/note_seq/events_lib_test.py +++ b/note_seq/events_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/lead_sheets_lib.py b/note_seq/lead_sheets_lib.py index f5e2f69..e37959f 100644 --- a/note_seq/lead_sheets_lib.py +++ b/note_seq/lead_sheets_lib.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/lead_sheets_lib_test.py b/note_seq/lead_sheets_lib_test.py index 3219a25..b2afc3c 100644 --- a/note_seq/lead_sheets_lib_test.py +++ b/note_seq/lead_sheets_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/melodies_lib.py b/note_seq/melodies_lib.py index fe02e4d..3a4cb7a 100644 --- a/note_seq/melodies_lib.py +++ b/note_seq/melodies_lib.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/melodies_lib_test.py b/note_seq/melodies_lib_test.py index bfc6e65..155f652 100644 --- a/note_seq/melodies_lib_test.py +++ b/note_seq/melodies_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -224,7 +224,7 @@ def testFromNotesPolyphonicWithIgnorePolyphonicNotes(self): melody.from_quantized_sequence(quantized_sequence, search_start_step=0, instrument=0, ignore_polyphonic_notes=True) - expected = ([19] + [NO_EVENT] * 3 + [19] + [NO_EVENT] * 11) + expected = [19] + [NO_EVENT] * 3 + [19] + [NO_EVENT] * 11 self.assertEqual(expected, list(melody)) self.assertEqual(16, melody.steps_per_bar) diff --git a/note_seq/melody_encoder_decoder.py b/note_seq/melody_encoder_decoder.py index 495f626..67d845e 100644 --- a/note_seq/melody_encoder_decoder.py +++ b/note_seq/melody_encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/melody_encoder_decoder_test.py b/note_seq/melody_encoder_decoder_test.py index 766b6ee..495a6c7 100644 --- a/note_seq/melody_encoder_decoder_test.py +++ b/note_seq/melody_encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/melody_inference.py b/note_seq/melody_inference.py index 679d5d8..70d3652 100644 --- a/note_seq/melody_inference.py +++ b/note_seq/melody_inference.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/melody_inference_test.py b/note_seq/melody_inference_test.py index b7dd870..abb2723 100644 --- a/note_seq/melody_inference_test.py +++ b/note_seq/melody_inference_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/midi_io.py b/note_seq/midi_io.py index 46daa5d..269f02c 100644 --- a/note_seq/midi_io.py +++ b/note_seq/midi_io.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/midi_io_test.py b/note_seq/midi_io_test.py index 95d3995..c1b9374 100644 --- a/note_seq/midi_io_test.py +++ b/note_seq/midi_io_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/midi_synth.py b/note_seq/midi_synth.py index f325d13..a3867a3 100644 --- a/note_seq/midi_synth.py +++ b/note_seq/midi_synth.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/musicnet_io.py b/note_seq/musicnet_io.py index 4c2c39f..ea28eac 100644 --- a/note_seq/musicnet_io.py +++ b/note_seq/musicnet_io.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/musicnet_io_test.py b/note_seq/musicnet_io_test.py index 3a62102..94ebd39 100644 --- a/note_seq/musicnet_io_test.py +++ b/note_seq/musicnet_io_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/musicxml_parser.py b/note_seq/musicxml_parser.py index 4e04015..f6d0ec7 100644 --- a/note_seq/musicxml_parser.py +++ b/note_seq/musicxml_parser.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -738,7 +738,7 @@ def _parse_pitch(self, xml_pitch): # Check if this is a semitone alter (i.e. an integer) or microtonal (float) alter_semitones = int(alter) # Number of semitones - is_microtonal_alter = (alter != alter_semitones) + is_microtonal_alter = alter != alter_semitones # Visual pitch representation alter_string = '' @@ -851,7 +851,7 @@ def parse_duration(self, is_in_chord, is_grace_note, duration): self.midi_ticks = self.duration self.midi_ticks *= (constants.STANDARD_PPQ / self.state.divisions) - self.seconds = (self.midi_ticks / constants.STANDARD_PPQ) + self.seconds = self.midi_ticks / constants.STANDARD_PPQ self.seconds *= self.state.seconds_per_quarter self.time_position = self.state.time_position diff --git a/note_seq/musicxml_parser_test.py b/note_seq/musicxml_parser_test.py index b115f97..02f46bd 100644 --- a/note_seq/musicxml_parser_test.py +++ b/note_seq/musicxml_parser_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/musicxml_reader.py b/note_seq/musicxml_reader.py index bfa0701..013ff56 100644 --- a/note_seq/musicxml_reader.py +++ b/note_seq/musicxml_reader.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/notebook_utils.py b/note_seq/notebook_utils.py index f2b4983..4570eed 100644 --- a/note_seq/notebook_utils.py +++ b/note_seq/notebook_utils.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -164,7 +164,7 @@ def _sequence_to_pandas_dataframe(sequence): fig.quad(top='top', bottom='bottom', left='start_time', right='end_time', line_color='black', fill_color=color, fill_alpha='fill_alpha', source=source) - fig.select(dict(type=bokeh.models.HoverTool)).tooltips = ( + fig.select(dict(type=bokeh.models.HoverTool)).tooltips = ( # pylint: disable=use-dict-literal {'pitch': '@pitch', 'program': '@program', 'velo': '@velocity', diff --git a/note_seq/performance_controls.py b/note_seq/performance_controls.py index fc3c054..d73f2fe 100644 --- a/note_seq/performance_controls.py +++ b/note_seq/performance_controls.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/performance_controls_test.py b/note_seq/performance_controls_test.py index 9072609..36d1037 100644 --- a/note_seq/performance_controls_test.py +++ b/note_seq/performance_controls_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/performance_encoder_decoder.py b/note_seq/performance_encoder_decoder.py index c9a13dd..b670a4f 100644 --- a/note_seq/performance_encoder_decoder.py +++ b/note_seq/performance_encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/performance_encoder_decoder_test.py b/note_seq/performance_encoder_decoder_test.py index 2e03201..f5347f3 100644 --- a/note_seq/performance_encoder_decoder_test.py +++ b/note_seq/performance_encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/performance_lib.py b/note_seq/performance_lib.py index c8c5ca3..a4b1e53 100644 --- a/note_seq/performance_lib.py +++ b/note_seq/performance_lib.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/performance_lib_test.py b/note_seq/performance_lib_test.py index d2fe647..02bca14 100644 --- a/note_seq/performance_lib_test.py +++ b/note_seq/performance_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/pianoroll_encoder_decoder.py b/note_seq/pianoroll_encoder_decoder.py index ce2d387..db04019 100644 --- a/note_seq/pianoroll_encoder_decoder.py +++ b/note_seq/pianoroll_encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/pianoroll_encoder_decoder_test.py b/note_seq/pianoroll_encoder_decoder_test.py index ebd0ac6..3ef8487 100644 --- a/note_seq/pianoroll_encoder_decoder_test.py +++ b/note_seq/pianoroll_encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/pianoroll_lib.py b/note_seq/pianoroll_lib.py index 8aa8671..56be941 100644 --- a/note_seq/pianoroll_lib.py +++ b/note_seq/pianoroll_lib.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/pianoroll_lib_test.py b/note_seq/pianoroll_lib_test.py index a1aabdc..4940d89 100644 --- a/note_seq/pianoroll_lib_test.py +++ b/note_seq/pianoroll_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/__init__.py b/note_seq/protobuf/__init__.py index 5d5d76d..c97725d 100644 --- a/note_seq/protobuf/__init__.py +++ b/note_seq/protobuf/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/compare.py b/note_seq/protobuf/compare.py index b03bca9..9da68d9 100644 --- a/note_seq/protobuf/compare.py +++ b/note_seq/protobuf/compare.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/generate_pb2_py.sh b/note_seq/protobuf/generate_pb2_py.sh index 8674c5b..31a8042 100755 --- a/note_seq/protobuf/generate_pb2_py.sh +++ b/note_seq/protobuf/generate_pb2_py.sh @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/generator_pb2.py b/note_seq/protobuf/generator_pb2.py index bacd322..19b7a9f 100644 --- a/note_seq/protobuf/generator_pb2.py +++ b/note_seq/protobuf/generator_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/install_protoc.sh b/note_seq/protobuf/install_protoc.sh index 6100609..8dddb32 100755 --- a/note_seq/protobuf/install_protoc.sh +++ b/note_seq/protobuf/install_protoc.sh @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/music_pb2.py b/note_seq/protobuf/music_pb2.py index 8000a69..9ca3ce7 100644 --- a/note_seq/protobuf/music_pb2.py +++ b/note_seq/protobuf/music_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/sequences_lib.py b/note_seq/sequences_lib.py index 1311648..2cb1a13 100644 --- a/note_seq/sequences_lib.py +++ b/note_seq/sequences_lib.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -1834,7 +1834,7 @@ def frames_from_times(start_time, end_time): """Converts start/end times to start/end frames.""" # Will round down because note may start or end in the middle of the frame. start_frame = int(start_time * frames_per_second) - start_frame_occupancy = (start_frame + 1 - start_time * frames_per_second) + start_frame_occupancy = start_frame + 1 - start_time * frames_per_second # check for > 0.0 to avoid possible numerical issues if (min_frame_occupancy_for_label > 0.0 and start_frame_occupancy < min_frame_occupancy_for_label): diff --git a/note_seq/sequences_lib_test.py b/note_seq/sequences_lib_test.py index e905e8d..386a0c8 100644 --- a/note_seq/sequences_lib_test.py +++ b/note_seq/sequences_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/testing_lib.py b/note_seq/testing_lib.py index 0d234d5..7b753d7 100644 --- a/note_seq/testing_lib.py +++ b/note_seq/testing_lib.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/version.py b/note_seq/version.py index e10e6ca..ba107e2 100644 --- a/note_seq/version.py +++ b/note_seq/version.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/setup.py b/setup.py index bbe3823..e7b5def 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/update_pip.sh b/update_pip.sh index 6fcc96a..c4da20f 100644 --- a/update_pip.sh +++ b/update_pip.sh @@ -1,4 +1,4 @@ -# Copyright 2022 The Magenta Authors. +# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.