Skip to content

Releases: salu133445/pypianoroll

Pypianoroll v1.0.4

13 Feb 18:49
Compare
Choose a tag to compare
  • Add method Track.binarize
  • Remove method StandardTrack.binarize
  • Fix a bug in Multitrack.trim (tempo and downbeat arrays now also get trimmed)
  • Track.standardize now clips the piano roll to [0, 127] before casting to uint8
  • Calculate tempo using harmonic mean in MIDI output (#15)
  • Show data types of arrays in Multitrack.__repr__ and Track.__repr__
  • Cast name, program and is_drum to proper types in MIDI input

Pypianoroll v1.0.3

09 Jan 07:39
Compare
Choose a tag to compare
  • Fix a bug in MIDI output (#14)

Pypianoroll v1.0.2

26 Dec 19:08
Compare
Choose a tag to compare
  • Fix indexing error in pypianoroll.Multitrack.set_resolution when some pianoroll is empty
  • Handle pypianoroll.BinaryTrack and pypianoroll.StandardTrack in pypianoroll.inputs.load
  • Handle pypianoroll.StandardTrack in pypianoroll.inputs.read
  • Remove arguments binarized and threshold from pypianoroll.inputs.read

Pypianoroll v1.0.1

26 Dec 10:57
Compare
Choose a tag to compare
  • Add backward compatibility for beat_resolution in pypianoroll.inputs.load (#11)

Pypianoroll v1.0.0

04 Nov 15:25
Compare
Choose a tag to compare

Pypianoroll v1.0.0 Release Notes

Key changes

  • Drop support for Python 2.7 and 3.5
  • Remove argument filename from Multitrack.__init__ (use pypianoroll.read and pypianoroll.load instead)
  • Rename module pypianoroll.utilities to pypianoroll.core
  • Support pathlib.Path as filenames
  • Support method chaining by returning self whenever possible
  • Add modules pypianoroll.inputs and pypianoroll.outputs for input and output interfaces
  • Add module pypianoroll.utils for utility functions
  • Add type hints
  • Follow duck typing for attributes (do not check attribute types when instantiate a object)
  • Drop dependency moviepy and support for animation
  • Make dependency matplotlib required

pypianoroll.core (previously pypianoroll.utilities)

  • Rename functions
    • core.assign_constant -> core.set_nonzeros
    • core.downsample -> core.set_resolution
    • core.trim_trailing_silence -> core.trim
  • Remove functions
    • core.check_pianoroll
    • core.copy
    • core.load (use pypianoroll.load instead)
    • core.parse (use pypianoroll.read instead)
    • core.save (use pypianoroll.save instead)
    • core.write (use pypianoroll.write instead)

pypianoroll.multitrack

  • Change Multitrack.__init__ signature
    • Reorder arguments
    • Make all arguments optional for flexibility
    • Rename argument beat_resolution to resolution
    • Remove argument filename (use pypianoroll.read and pypianoroll.load instead)
  • Change indexing behavior : Multitrack[i] returns Multitrack.tracks[i]
  • Rename methods
    • Multitrack.check_validity -> Multitrack.validate
    • Multitrack.get_active_length -> Multitrack.get_length
    • Multitrack.append_track -> Multitrack.append
    • Multitrack.assign_constant -> Multitrack.set_nonzeros
    • Multitrack.downsample -> Multitrack.set_resolution
    • Multitrack.merge_tracks -> Multitrack.blend
    • Multitrack.get_stacked_pianoroll -> Multitrack.stack
    • Multitrack.remove_empty_tracks -> Multitrack.remove_empty
    • Multitrack.trim_trailing_silence -> Multitrack.trim
  • Add methods
    • Multitrack.validate_type
    • Multitrack.is_valid
    • Multitrack.is_valid_type
  • Remove methods
    • Multitrack.is_binarized
    • Multitrack.load (use pypianoroll.load instead)
    • Multitrack.parse_midi (use pypianoroll.read instead)
    • Multitrack.parse_pretty_midi (use pypianoroll.from_pretty_midi instead)
    • Multitrack.remove_tracks

pypianoroll.track

  • Change Track.__init__ signature
    • Reorder arguments
    • Make all arguments optional for flexibility
  • Change indexing behavior : Track[i] returns Track.pianoroll[i]
  • Add StandardTrack class for standard track (piano roll of type uint8)
    • StandardTrack.set_nonzeros
    • StandardTrack.clip
    • StandardTrack.binarize
  • Add BinaryTrack class for binary track (piano roll of type bool)
    • BinaryTrack.set_nonzeros
  • Rename methods
    • Track.check_validity -> Track.validate
    • Track.get_active_length -> Track.get_length
    • Track.trim_trailing_silence -> Track.trim
  • Add methods
    • Track.validate_type
    • Track.is_valid
    • Track.is_valid_type
    • Track.standardize
  • Remove methods
    • Track.binarize
    • Track.is_binarized
    • Track.get_pianoroll_copy
    • Track.assign_constant

pypianoroll.visualization (new)

  • Remove argument filename in visualization.plot_track and visualization.plot_multitrack
  • Add argument ax for visualization.plot_track for plotting on an existing axes
  • Add argument axs for visualization.plot_multitrack for plotting on existing axes

pypianoroll.inputs (new)

  • Functions
    • inputs.load
    • inputs.from_pretty_midi
    • inputs.read

pypianoroll.outputs (new)

  • Functions
    • outputs.save
    • outputs.to_pretty_midi
    • outputs.write
  • Variable
    • outputs.DEFAULT_TEMPO

pypianoroll.utils (new)

  • Functions
    • utils.decompose_sparse
    • utils.reconstruct_sparse

Pypianoroll v0.5.3

07 Jan 10:30
Compare
Choose a tag to compare
  • Fix a bug in pypianoroll.visualization.plot_multitrack() with mode 'stacked' (#8)
  • Fix a bug in pypianoroll.metric._to_chroma() (#9)
  • Fix function name typo for pypianoroll.metric.n_pitch_classes_used()

Pypianoroll v0.5.2

24 Oct 08:39
Compare
Choose a tag to compare
  • Add Multitrack.downsample() and pypianoroll.downsample()
  • Fix label-grid misalignment issues in plots

Pypianoroll v0.5.0

13 Sep 19:50
Compare
Choose a tag to compare
  • Add pypianoroll.metric module
  • Support more options in pypianoroll.parse
  • Rename methods for Multitrack
    • get_maximal_length -> get_max_length
    • get_num_downbeat -> count_downbeat
    • get_stacked_pianorolls -> get_stacked_pianoroll
  • Improve the documentation (mostly docstrings)

Pypianoroll v0.4.0

18 May 08:18
Compare
Choose a tag to compare
  • Make Matplotlib and Moviepy optional
  • Add unit tests
  • Fix note off bugs in pypianoroll.Mutitrack.parse_pretty_midi()
  • Move all plotting functions to one file (pypianoroll/plot.py)
  • Remove normalization arguments from plotting functions (value range now infered from dtype)
  • Add argument dtype to pypianoroll.Track.assign_constant()

Pypianoroll v0.3.0

16 Apr 11:40
Compare
Choose a tag to compare
  • Fix downbeat loading bug
  • Fix wrong usage of np.issubdtype()
  • Fix wrong error types