/* -*- c -*- */ /* TiMidity++ -- MIDI to WAVE converter and player Copyright (C) 1999-2002 Masanao Izumo Copyright (C) 1995 Tuukka Toivonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef ___MID_DEFS_ #define ___MID_DEFS_ #ifdef DEFINE_GLOBALS /* #define MID_OFFICIAL_NAME */ static unsigned char *mid_charset = (unsigned char *)"あ"; /* このソースコードの日本語コードが * 変わっても,この「あ」のコードも * 変わるから OK. */ char *mid2name(int mid) { int i; static char buff[64]; char *icode; static struct manufacture_id_t { int id; char *name; } manufacture_id_table[] = { {0x00, "Undefined"}, {0x01, "Sequential Circuits"}, #if 0 {0x02, "Big Briar"}, #else {0x02, "IDP"}, #endif {0x03, "Voyetra/Octave Plateau"}, {0x04, "Moog Music"}, {0x05, "Passport Designs"}, {0x06, "Lexicon"}, {0x07, "Kurzweil"}, {0x08, "Fender"}, {0x09, "Gulbransen"}, {0x0A, "AKG Acoustics"}, {0x0B, "Voyce Music"}, {0x0C, "Waveframe"}, {0x0D, "ADA"}, {0x0E, "Garfield Electronics"}, {0x0F, "Ensoniq"}, {0x10, "Oberheim"}, {0x11, "Apple Computer"}, {0x12, "Grey Matter"}, {0x13, "Digidesign"}, {0x14, "Palm Tree Instruments"}, {0x15, "J L Cooper"}, {0x16, "Lowrey"}, {0x17, "Adams-Smith"}, {0x18, "E-mu Systems"}, {0x19, "Harmony Systems"}, {0x1A, "ART"}, {0x1B, "Baldwin"}, {0x1C, "Eventide"}, {0x1D, "Inventronics"}, {0x1E, "Key Concepts"}, {0x1F, "Clarity"}, {0x20, "Passac"}, {0x21, "SIEL"}, {0x22, "Synthaxe"}, {0x23, "Stepp"}, {0x24, "Hohner"}, {0x25, "Twister"}, {0x26, "Solton"}, {0x27, "Jellinghaus"}, {0x28, "Southworth"}, {0x29, "PPG"}, {0x2A, "JEN"}, {0x2B, "Solid State Logic"}, {0x2C, "Audio Veritrieb"}, {0x2D, "Hinton Instruments"}, {0x2E, "Soundtracs"}, {0x2F, "Elka"}, {0x30, "Dynacord"}, {0x33, "Clavia Digital Instruments"}, {0x34, "Audio Architecture"}, {0x39, "Soundcraft Electronics"}, {0x3B, "Wersi"}, {0x3C, "Avab Electronik"}, {0x3D, "Digigram"}, {0x3E, "Waldorf Electronics"}, {0x40, "カワイ"}, #ifdef MID_OFFICIAL_NAME {0x41, "ローランド"}, #else {0x41, "GS"}, #endif {0x42, "コルグ"}, #if MID_OFFICIAL_NAME {0x43, "ヤマハ"}, #else {0x43, "XG"}, #endif {0x44, "カシオ"}, {0x45, "モリダイラ楽器"}, {0x46, "カミヤスタジオ"}, {0x47, "アカイ"}, {0x48, "日本ビクター"}, {0x49, "明創社"}, {0x4A, "星野楽器"}, {0x4B, "富士通"}, {0x4C, "ソニー"}, {0x4D, "日伸音波"}, {0x4E, "ティアック"}, {0x50, "松下電器"}, {0x51, "フォステック"}, {0x52, "ズーム"}, {0x53, "緑電子"}, {0x54, "松下通信工業"}, {0x55, "鈴木楽器製作所"}, {0x7D, "Non-Commercial"}, #if MID_OFFICIAL_NAME {0x7E, "Non-Realtime"}, #else {0x7E, "GM"}, #endif {0x7F, "Realtime"}, {-1, NULL} }; if(mid == 0) return NULL; for(i = 1; manufacture_id_table[i].id != -1; i++) if(mid == manufacture_id_table[i].id) break; if(manufacture_id_table[i].id == -1) return NULL; switch(mid_charset[0]) { case 0xa4: icode = "EUC"; break; case 0x82: icode = "SJIS"; break; case 0x1b: icode = "JIS"; break; default: icode = NULL; break; } code_convert(manufacture_id_table[i].name, buff, sizeof(buff), icode, NULL); return buff; } #else extern char *mid2name(int mid); #endif #endif /* ___MID_DEFS_ */