Search code examples
pythonattributeerrormusic21

music21 --> simplifyMultipleEnharmonics not available?


I'm trying to use the function pitch.simplifyMultipleEnharmonics(...): http://web.mit.edu/music21/doc/moduleReference/modulePitch.html#functions

but at line:

print music21.pitch.simplifyEnharmonics([pitch.Pitch('G3'),
                                         pitch.Pitch('C-4'),
                                         pitch.Pitch('D4')])

I get the error:

>>> 'module' object has no attribute 'simplifyMultipleEnharmonics'

... I'm using the latest version of music21 (just pip installed again).

... Is this function available only in an older version of music21?

Thanks very much for any help!


Solution

  • It's a new function for v3 which is the GitHub master branch so it's not in any of the releases yet. Sorry. Versioned docs are on the priority list to prevent problems like this.