Skip to content

remove_invalid() makes object even more invalid #49

@cifkao

Description

@cifkao

Check this out:

>>> m = muspy.Music(tracks=[muspy.Track(notes=[
    muspy.Note(time=-2, pitch=58, duration=19, velocity=99),
    muspy.Note(time=-1, pitch=65, duration=20, velocity=65),
    muspy.Note(time=0, pitch=67, duration=23, velocity=65),
])])
>>> m.remove_invalid()
Music(metadata=Metadata(schema_version='0.0'), resolution=24, tracks=[Note(time=0, pitch=67, duration=23, velocity=65)])

The valid note somehow gets added to the track list, and the track itself gets removed.

Not sure why this is happening, but #47 seems to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions