Live data from Hacker News

Show HN: AutoMIDIFlip – An automatic MIDI flipper

automidiflip.com

21–30 of 35 posts

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#21
post #5

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

What are "MIDIs"? MIDI is a singular mass noun, like USB or Firewire.

The MIDI protocol is still dominant in the professional field for which it was designed: controlling electronic musical instruments.

By "MIDIs" I presume you don't mean MIDI but rather so-called "MIDI Files" (SMF) and the "General MIDI" (GM) spec. This junk was originally designed for consumer-level products like Casio keyboards. General MIDI eventually devolved into the ghetto of cell phone ringtones and other trash. But don't confuse this with MIDI proper, which is a long-lived professional specification controlling often very sophisticated (and costly) devices.

Dave Smith -- largely regarded as the founder of MIDI, lamented this recently too. See 00:25 here: https://www.youtube.com/watch?v=RnemYKi8Tb4

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#22
post #12
post #11

Earlier quoted context omitted.

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,…

Excellent explanation!! Thank you!

Do you know why it's possible to have different channels on the same track in MIDI? It's kind of cool to save channel information per-note, but do people really use this to have multiple instruments on one track?

Like GarageBand, it seems most DAW associate a channel with a track and not individual notes. What was the use case originally?

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#23
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?

For VLC you can find explanations here:

https://wiki.videolan.org/Midi/

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#24
post #22
post #12

Earlier quoted context omitted.

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,…

Excellent explanation!! Thank you! Do you know why it's possible to have different channels on the same track in MIDI? It's kind of cool to save channel information per-note, but do people really use this to have multiple instruments on one track? Like GarageBand, it seems most DAW associate a channel with a track and not individual notes. What was the use case originally?

The use case originally was a single MIDI line [1] connecting all the keyboards in a studio. Most people couldn't afford more than sixteen keyboards/samplers/drum machines, so running everything through a single MIDI output made sense.

It didn't take long for multi-output MIDI interfaces to appear, but until they did everything went out of a single port, and the software worked to suit, with the channel setting on each track being used to select a playback device.

[1] Technically the single line went through multiple MIDI thru connectors. But it was still the same stream of information.

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#25
post #13

Interesting, flipping Bach's Prelude in C Minor gives it a more major sound. Also inversion is a fairly common technique in writing developments so some fugues will sound quite similar.

The official way to invert intervals is to subtract the range from 9 (3rd becomes 6th, 2nd becomes 7th, etc) and flip the character (major minor, aug dim, octaves and unisons don't change.)

The range is defined by the relationship to the key root, so you need to know the key to do this properly.

You can invert at other intervals, which creates inversion plus transposition. See e.g.

https://www.teoria.com/en/articles/BWV885/

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#26
post #22

Earlier quoted context omitted.

Excellent explanation!! Thank you! Do you know why it's possible to have different channels on the same track in MIDI? It's kind of cool to save channel information per-note, but do people really use this to have multiple instruments on one track? Like GarageBand, it seems most DAW associate a channel with a track and not individual notes. What was the use case originally?

The use case originally was a single MIDI line [1] connecting all the keyboards in a studio. Most people couldn't afford more than sixteen keyboards/samplers/drum machines, so running everything through a single MIDI output made sense. It didn't take long for multi-output MIDI interfaces to appear, but until they did everything went out of a single port, and the software worked to suit, with the channel setting on ea…

I've played around with various USB MIDI devices and while its possible to eg create multiple virtual devices, they tend to create one which simply streams a series of notes (with channel as part of the note).

MIDI messages tend to be 3 bytes[1]. For example, a "Note On" message is 0x9Z 0xKK 0xVV where 9 is the "Note On" command, Z is the MIDI channel (since its 4 bits, you can have 16 channels), KK is the key/note (up to 128 [2]) and VV is the velocity (up to 128 different values).

[1] excluding system messages and the channel pressure command which has only 2 bytes

[2] the most significant bit is always 0 for data bytes. If its 1 (like in the first of the messages byte) it is treated as a command byte.

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#27
post #22

Earlier quoted context omitted.

Excellent explanation!! Thank you! Do you know why it's possible to have different channels on the same track in MIDI? It's kind of cool to save channel information per-note, but do people really use this to have multiple instruments on one track? Like GarageBand, it seems most DAW associate a channel with a track and not individual notes. What was the use case originally?

The use case originally was a single MIDI line [1] connecting all the keyboards in a studio. Most people couldn't afford more than sixteen keyboards/samplers/drum machines, so running everything through a single MIDI output made sense. It didn't take long for multi-output MIDI interfaces to appear, but until they did everything went out of a single port, and the software worked to suit, with the channel setting on ea…

In addition to this, it's important to note that in a .mid file (or, more accurately, a Standard MIDI File), a track is deliberately quite similar to a stream of MIDI data. There are some changes, obviously (among other things, timing information is stored as a delta per-event, and the addition of Meta Events displace the MIDI Reset command) but all of these can be dealt with just before the events are sent out, to my knowledge.

Because events in a track in a Standard MIDI File are stored more-or-less the same way they'd be sent down the wire, that includes the channel information. The sender doesn't need to have any concept of channels in order to send the events stored in a SMF.

(Yes, this does mean that you can have notes on different tracks that are on the same channel. That's actually useful sometimes when using a DAW, especially for solos and drum parts.)

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#28
If anyone is wondering how to play a MIDI file on a modern PC without a soundcard that implements the MIDI protocol natively (i.e. pretty much everyone), you need VLC (and on Windows, you need VLC 3.0 nightly build - https://nightlies.videolan.org/build/win64/vlc-3.0.0-2017020... ), plus the soundfont from here: http://www.schristiancollins.com/generaluser.php . Then, just configure it as explained in the wiki - https://wiki.videolan.org/Midi/ .

Re: Show HN: AutoMIDIFlip – An automatic MIDI flipper

#30
post #28

If anyone is wondering how to play a MIDI file on a modern PC without a soundcard that implements the MIDI protocol natively (i.e. pretty much everyone), you need VLC (and on Windows, you need VLC 3.0 nightly build - https://nightlies.videolan.org/build/win64/vlc-3.0.0-2017020... ), plus the soundfont from here: http://www.schristiancollins.com/generaluser.php . Then, just configure it as explained in the wiki - http…

Built in Windows Media Player on Windows 10 plays MIDIs fine.
Post reply on HN