1j01 / midiflip

🎹 MIDI music mayhem - flip, transpose, and arbitrarily remap pitches in MIDI files
https://1j01.github.io/midiflip/
40 stars 7 forks source link

Add option to keep approximate note range #1

Closed ThePython10110 closed 11 months ago

ThePython10110 commented 11 months ago

"It would be good to be able to look at the original song as a whole in order to transpose notes back to reasonable ranges like Automatic MIDI Inverter does... (You can only look at and change a single note at a time with the current API.)"

I don't know how easy this would be, but I would do it this way:

  1. Keep track of the highest/lowest note in a channel as they are processed
  2. Calculate which octave would be closest.
  3. Go through again and transpose it to the closest octave.

This way, not much needs to be changed (it just needs another pass). And then of course another command line option for that (it wouldn't affect percussion).

ThePython10110 commented 11 months ago

I just decided to do it myself.

1j01 commented 10 months ago

I'm glad you were able to implement it. However, you're not meant to overwrite the authorship information when forking a project. If you read the license, it says "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." You can add your name like "Copyright 2017 by Isaiah Odhner, and 2023 by ThePython10110" if you want.

ThePython10110 commented 10 months ago

Sorry about that. I'm incredibly new to this kind of thing. I'll fix it as soon as I have time.