cuthbertLab / music21j

Javascript port of music21 -- Toolkit for Computational Musicology
Other
147 stars 43 forks source link

Implement pitch.getEnharmonic(). #249

Open gregchapman-dev opened 8 months ago

gregchapman-dev commented 8 months ago

In _getEnharmonicHelper, p is self.clone(). Everything is done to p, which is then returned if not inPlace. If inPlace, everything is copied from p to self, which is then returned. I believe this works correctly. I actually prefer the pattern I used in getEnharmonic (post is either self or self.clone(), and you do everything to post, and return post); would you like that pattern in _getEnharmonicHelper?

gregchapman-dev commented 8 months ago

@mscuthbert Do you agree that _getEnharmonicHelper is actually correct? Or would you rather I follow getEnharmonic's pattern?

mscuthbert commented 3 months ago

Sorry not to reply -- I prefer your way of doing it.

gregchapman-dev commented 3 months ago

I can't tell for sure, do you want a change or not?