Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

muspy.read unable to retrieve key_signatures #56

Open
raymondtoh94 opened this issue Feb 7, 2021 · 0 comments
Open

muspy.read unable to retrieve key_signatures #56

raymondtoh94 opened this issue Feb 7, 2021 · 0 comments

Comments

@raymondtoh94
Copy link

Some Midi file unable to retrieve the mode and root of the key_signatures.
This problem unable to allow us to transpose our tracks.

interval = song.key_signatures[0].root
    if song.key_signatures[0].mode == "major": #Convert to CMAJ
        if interval > 0:
            song.transpose(-interval)
            song.key_signatures[0].root = 0
    elif song.key_signatures[0].mode == "minor": #Convert to AMin
        if interval < 9:
            song.transpose(interval)
        elif interval > 9:
            song.transpose(-interval)
        song.key_signatures[0].root = 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant