eftychia: Tine, damper, and hammer of lowest note on Fender-Rhodes piano, in action (rhodes)
Add MemoryShare This Entry
posted by [personal profile] eftychia at 09:21pm on 2011-02-27

Whoops. I just spent a chunk of my day that I had set aside for writing music, writing about writing music instead of writing music. Derailed myself again. Oh well, it's written now so I should go ahead and post it:

What is it about MIDI and "understandble only if already known" documentation patterns? There's a lot of writing about MIDI on the web, and most of it seems to be the same just-enough-to-get-started info over and over, explanations of one nitty-gritty advanced technique written in a way that makes no sense unless you already know a bunch of intermediate-level stuff I can't find anywhere (or are using one specific synthesizer), and so-called "tutorials" that advertise what MIDI is and can do but don't actually say how to do any of it.

The good news: I finally did find a way to get a downloaded Soundfont file to have some effect other than just taking up disk space, and didn't have to configure a whole new MIDI player to do so[1]. But the annoyance on the other side of that coin is that after a couple days of Googling various relevant phrases and downloading likely-looking tools, I still haven't found any way of listing which program numbers and pitch numbers are mapped to what sounds in the Soundfont file other than by generating a MIDI file that plays each instrument in turn and jotting down notes like, "Program 31 sounds like it might be supposed to be a sitar." This gets even more fun when a percussion or special-effect patch is encoded as a melody instrument, and each "pitch" makes a different sound. Wheee. Shouldn't there be some command I can type that produces a list of the sounds in the Soundfont and their mappings? I'll still need to listen to them to see whether I like that engineer's version of a doumbek, or a hammered dulcimer or whatever, but with such a command I would be at least able to narrow down the hunt. Have any of you got such a tool that you can point me to? There's got to be one ... right?


Next question -- or cluster of related questions: The documentation for abc2midi refers to 'programs', 'channels', 'voices', and 'tracks'. AFAICT from more general MIDI "tutorials" and references (see first paragraph *grrr*), either 'track' isn't especially meaningful or is something that comes up in MIDI files (gosh, like what I'm creating!) but not in live streams of MIDI commands being produced by a human playing a MIDI controller right then (which some of the docs focus on) ... and AFAICT from the abc2midi documentation, abc2midi kinda blurs 'track', 'voice', and 'channel' somewhat ...? Okay, I need to reread the abc2midi docs again more slowly. ('Voice' is an ABC and sheet-music thing, apparently not directly related to MIDI except in that abc2midi maps each voice to a MIDI channel unless you specifically ask it to map each note of a chord in one voice to a separate channel so you can do microtonal chords[2]. I'm not really sure I understand how 'voice' and 'track' do or don't interact here.) ... Wait, where was I?

When I first read about the General MIDI instruments, I recall seeing that those are pretty much always found in "bank 0" (or is the counting 1-based instead of 0-based? MIDI developers, manufacturers, users, and writers seem to disagree about ordinals in other places, so maybe it's both?) -- anyhow, in "the first bank" of sounds. At the same time as I was learning that, I was also reading about how abc2midi puts things in channel 0 by default (until you start using multiple voices), but with the "%%MIDI channel" directive (or an extra parameter on the "%%MIDI program" directive) you can use a different channel ... and that channel 10 was for percussion sounds. So I thought "bank" and "channel" were synonyms. I was wrong, as I found out through the logical ramifications of things I read later. Now I'm seeing in web pages about Soundfonts that a Soundfont can contain multiple banks of sounds, and a vague bit about how multiple Soundfonts can be installed at once and selected between by switching banks. I'm also noticing the absence of any select-bank directive in abc2midi.

So the next question is, is there an easy way to assign different voices in an ABC file to use sounds from different banks? And related to that, can I get QuickTime to recognize a bank select command as meaning to switch between the default General MIDI sounds and the sounds in a Soundfont that I've installed? It'd be great to be able to leave the General MIDI instruments as the default (whether I use the ones that came with QuickTime or download a different set) and select specialized sounds as needed using commands within the MIDI file rather than changing Preferences for different tunes. (And related to that, is there any way of attaching a Soundfont to a MIDI file[4] so that it'll play correctly on someone else's computer when I email it to them, or will I need to generate an MP3, Ogg Vorbis, or WAV file -- by recording the MIDI played through QuickTime using an audio-device-capture app -- and send the audio file instead of the MIDI file?)


I've got more MIDI questions to ask, but the others are still a bit nebulous, so I'll ask 'em when I've learned enough to be sure they make sense. I'm probably already risking tl;dr with this entry anyhow ...

[1] I play MIDI files through QuickTime on a Mac (or Timidity under Linux, or Windows Media Player in XP ... but for several months it's been just the Mac and QuickTime). It turns out that QuickTime will use a Soundfont file if you first copy that file to ~/Library/Audio/Sounds/Banks/ and then go to the QuickTime control panel in the Preferences app, switch to the Advanced tab, and select the newly installed Soundfont in the "Synthesizer" pull-down list in that pane. Of course, if you want to play something using the General MIDI default sounds later, you have to go back to Preferences and select "QuickTime Music Synthesizer" again (especially if the Soundfont you installed only has a couple of instruments in it and all the other instrument numbers produce silence). You do not want to know how long it took me to find that basic detail of what to do with a Soundfont file, among all the pages telling me how great Soundfonts are or where to download them.

[2] Well you see, abc2midi implements microtones by means of MIDI pitch-bend commands ... which affect an entire channel at a time. So if you wanted to play a chord consisting of E half-flat, G half-flat, and B half-flat, you could get abc2midi to just bend an entire Em chord down a quarter-tone (and apparently, applying a quarter-tone accidental to any note in the chord would do that -- I'm not sure whether applying the accidental to each note explicitly would generate the correct resut or add up to making it a D-half-sharp chord ...). But if you want to play E natural, G natural, and B half-flat, you have to tell abc2midi to put each note in a separate channel so that the half-flat pitch bend only affects the B. And the fact that I learned more about how pitch bend works in MIDI and how MIDI channels are used from reading the one-paragraph description of the "%%MIDI makechordchannels" directive than in all my reading of other MIDI tutorials up to that point, says a lot about the stuff I complained about at the very start of this entry. (Armed with the knowledge gleaned from abc2midi's "%%MIDI makechordchannels", I was then able to make more sense of some of the general MIDI docs when I read them again, but the underlying concepts should have been described better in the first place.) But note that I still haven't figured out how to do a smooth, guitar-style string bend on a sustained note in a MIDI file, especially not from within abc2midi[3]. I know it must be possible, because you can do it live on a MIDI keyboard by moving the pitch-bend wheel (or touching the felt strip, if you've got that instead) while a key is held down. But even when I try inserting MIDI control messages by hand, it doesn't do what I expect.

[3] I've approximated it using a long string of 64th-notes with wee microtonal adjustments between them, all under a slur, but with many instrument sounds (including the General MIDI guitar sounds) there's a bit of a machine-gun effect. It can sound cool (or ugly, depending), but it doesn't sound like a string-bend. I've also tried inserting portamento commands, but haven't managed anything useful that way either, so far.

[4] A small Soundfont file containing just one or two unusual instruments that tune needs, relying on the GM instruments for everything else, that is. 'Cause attaching a multi-megabyte Soundfont with a complete set of instruments would start eating away at the advantage of sending a MIDI instead of an MP3 in the first place.

There are no comments on this entry. (Reply.)

Links

January

SunMonTueWedThuFriSat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24
 
25
 
26
 
27
 
28
 
29
 
30
 
31