Live data from Hacker News

Show HN: AutoMIDIFlip – An automatic MIDI flipper

automidiflip.com

11–20 of 35 posts

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#11
post #2

I wrote AutoMIDIFlip based on the #midiflip challenge going around Twitter right now - basically, take a MIDI file, flip it so that the intervals are preserved but in the opposite direction, and see what it sounds like. It actually has some surprisingly good results. Andrew Huang did the first one manually, as can be seen in the YouTube video linked on the front page. I figured I could write code to automatically do…

The Flipped version of the William Tell Overture is missing most of the tracks. When I open the Original in Garage Band (macOS), it has 8 tracks (including an empty piano track). But the flipped version only has 1 track (trumpets). It looks to me like AutoMIDIFlip actually combined all of the tracks together (which of course means the instrumentation is now wrong).

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#12
post #11
post #2

I wrote AutoMIDIFlip based on the #midiflip challenge going around Twitter right now - basically, take a MIDI file, flip it so that the intervals are preserved but in the opposite direction, and see what it sounds like. It actually has some surprisingly good results. Andrew Huang did the first one manually, as can be seen in the YouTube video linked on the front page. I figured I could write code to automatically do…

The Flipped version of the William Tell Overture is missing most of the tracks. When I open the Original in Garage Band (macOS), it has 8 tracks (including an empty piano track). But the flipped version only has 1 track (trumpets). It looks to me like AutoMIDIFlip actually combined all of the tracks together (which of course means the instrumentation is now wrong).

Thanks for the report! Things should be fixed now. :)

Technically, it's probably GarageBand that's wrong here, but I've changed AutoMIDIFlip so that GarageBand should be happy.

What was happening is that the original file is a Format 0 MIDI file. Internally, a Format 0 file only ever has one track, so all the instruments have to go into one track. That's okay because in MIDI, the channel numbers are stored per-note, so it still manages to work out. Each channel can only play one instrument at a time, though you can play multiple notes at once.

It seems that when GarageBand opens a Format 0 file, it automatically splits out that one track into (I'm guessing) 16 tracks, one for each channel. It also sounds like GarageBand makes no distinction between tracks and channels, so you can only have one instrument per track.

Prior to the change I just made, AutoMIDIFlip would always set the format field in the header to 1, so that it would output a Format 1 file; this was necessary so that it could add the three empty attribution tracks to the file. Everything else should have worked as before, but when GarageBand opens a Format 1 file, it will keep the layout of the tracks as specified in the MIDI file rather than splitting them into channels.

Because of this, and because GarageBand doesn't have the distinction between tracks and channels, GarageBand was losing the instrumentation data that was in the original MIDI file.

I've changed AutoMIDIFlip now so that it doesn't set the format field differently; if you give it a Format 0 file, you'll get a Format 0 file back. Because you can't add more tracks in that kind of file, it will append a short attribution - "(auto-flipped with automidiflip.com)" - to the title of the song instead.

Again, thanks for the report!

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#14
post #2

I wrote AutoMIDIFlip based on the #midiflip challenge going around Twitter right now - basically, take a MIDI file, flip it so that the intervals are preserved but in the opposite direction, and see what it sounds like. It actually has some surprisingly good results. Andrew Huang did the first one manually, as can be seen in the YouTube video linked on the front page. I figured I could write code to automatically do…

I can't seem to play any of the example MIDI files from the homepage on my Mac, using either VLC or Quicktime. Are there any special tricks I need to do in order to get these playing?

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#15
post #14
post #2

I wrote AutoMIDIFlip based on the #midiflip challenge going around Twitter right now - basically, take a MIDI file, flip it so that the intervals are preserved but in the opposite direction, and see what it sounds like. It actually has some surprisingly good results. Andrew Huang did the first one manually, as can be seen in the YouTube video linked on the front page. I figured I could write code to automatically do…

I can't seem to play any of the example MIDI files from the homepage on my Mac, using either VLC or Quicktime. Are there any special tricks I need to do in order to get these playing?

I don't really know much about playing MIDIs on a Mac, unfortunately, as I'm a PC person. The only options I know of are paid; for example, GarageBand (https://www.apple.com/mac/garageband/) can open and play MIDIs. I also know there's a player called Sweet MIDI Player, but it seems very expensive.

There's a possibility you might be able to find TiMidity++ using brew.sh or similar. If you find it, you could try that - it's a command-line program, though. You'll also need a GM SoundFont to use it - you can find a list at http://www.synthfont.com/links_to_soundfonts.html . Note that the page links both to GM SoundFonts and single-instrument SoundFonts - you want a GM (General MIDI) one if possible, as that will have all the instruments included in General MIDI.

I've been looking for some good MIDI players for Mac myself as I know other people who are looking for them. I'll let you know if I come up with anything!

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#17
post #2

I wrote AutoMIDIFlip based on the #midiflip challenge going around Twitter right now - basically, take a MIDI file, flip it so that the intervals are preserved but in the opposite direction, and see what it sounds like. It actually has some surprisingly good results. Andrew Huang did the first one manually, as can be seen in the YouTube video linked on the front page. I figured I could write code to automatically do…

I'm curious if some of the dissonance comes from basing everything off the root note of the key, rather than each chord in a phrase? I'd be interested to hear the results on a piece following this algorithm in comparison.

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#18
post #5

Are MIDIs still being used by any popular services, apps, OSs, etc?

Midi's are also used in streetorgans. (Which sounds way too 'computerized' in my opinion. Example[1]) [1] https://youtu.be/U9dxscRz5ek

I prefer this one (no MIDI in action to see, though): https://www.youtube.com/watch?v=fnb7EqfykF4

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#19
This is the concept of 'Invertible Counterpoint'. Which is the extreme discipline of writing harmonies whos roles can be reversed and still sound good. i.e the bassline becomes the melody vice versa.

http://www.music.ucsb.edu/faculty/rothfarb/courses/103/inver...

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#20
post #18

Earlier quoted context omitted.

Midi's are also used in streetorgans. (Which sounds way too 'computerized' in my opinion. Example[1]) [1] https://youtu.be/U9dxscRz5ek

I prefer this one (no MIDI in action to see, though): https://www.youtube.com/watch?v=fnb7EqfykF4

Ha! Nice! (After all the system used is a precursor of midi.)
Post reply on HN