ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
GetId3\Module\Audio\Midi Class Reference

GetId3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //. More...

+ Inheritance diagram for GetId3\Module\Audio\Midi:
+ Collaboration diagram for GetId3\Module\Audio\Midi:

Public Member Functions

 analyze ()
 
 GeneralMIDIinstrumentLookup ($instrumentid)
 
 GeneralMIDIpercussionLookup ($instrumentid)
 
- Public Member Functions inherited from GetId3\Handler\BaseHandler
 __construct (GetId3Core $getid3, $call_module=null)
 
 analyze ()
 Analyze from file pointer. More...
 
 AnalyzeString (&$string)
 Analyze from string instead. More...
 
 saveAttachment (&$ThisFileInfoIndex, $filename, $offset, $length)
 

Data Fields

 $scanwholefile = true
 
const GETID3_MIDI_MAGIC_MTHD = 'MThd'
 
const GETID3_MIDI_MAGIC_MTRK = 'MTrk'
 

Additional Inherited Members

- Protected Member Functions inherited from GetId3\Handler\BaseHandler
 ftell ()
 
 fread ($bytes)
 
 fseek ($bytes, $whence=SEEK_SET)
 
 feof ()
 
 isDependencyFor ($module)
 
 error ($text)
 
 warning ($text)
 
- Protected Attributes inherited from GetId3\Handler\BaseHandler
 $getid3
 
 $data_string_flag = false
 
 $data_string = ''
 
 $data_string_position = 0
 
 $data_string_length = 0
 

Detailed Description

GetId3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //.

module for Midi Audio files

Author
James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g http://www.getid3.org

Definition at line 29 of file Midi.php.

Member Function Documentation

◆ analyze()

GetId3\Module\Audio\Midi::analyze ( )
Returns
boolean

Reimplemented from GetId3\Handler\BaseHandler.

Definition at line 44 of file Midi.php.

45 {
46 $info = &$this->getid3->info;
47
48 // shortcut
49 $info['midi']['raw'] = array();
50 $thisfile_midi = &$info['midi'];
51 $thisfile_midi_raw = &$thisfile_midi['raw'];
52
53 $info['fileformat'] = 'midi';
54 $info['audio']['dataformat'] = 'midi';
55
56 fseek($this->getid3->fp, $info['avdataoffset'], SEEK_SET);
57 $MIDIdata = fread($this->getid3->fp, $this->getid3->fread_buffer_size());
58 $offset = 0;
59 $MIDIheaderID = substr($MIDIdata, $offset, 4); // 'MThd'
60 if ($MIDIheaderID != self::GETID3_MIDI_MAGIC_MTHD) {
61 $info['error'][] = 'Expecting "'.Helper::PrintHexBytes(self::GETID3_MIDI_MAGIC_MTHD).'" at offset '.$info['avdataoffset'].', found "'.Helper::PrintHexBytes($MIDIheaderID).'"';
62 unset($info['fileformat']);
63
64 return false;
65 }
66 $offset += 4;
67 $thisfile_midi_raw['headersize'] = Helper::BigEndian2Int(substr($MIDIdata, $offset, 4));
68 $offset += 4;
69 $thisfile_midi_raw['fileformat'] = Helper::BigEndian2Int(substr($MIDIdata, $offset, 2));
70 $offset += 2;
71 $thisfile_midi_raw['tracks'] = Helper::BigEndian2Int(substr($MIDIdata, $offset, 2));
72 $offset += 2;
73 $thisfile_midi_raw['ticksperqnote'] = Helper::BigEndian2Int(substr($MIDIdata, $offset, 2));
74 $offset += 2;
75
76 for ($i = 0; $i < $thisfile_midi_raw['tracks']; $i++) {
77 while ((strlen($MIDIdata) - $offset) < 8) {
78 $MIDIdata .= fread($this->getid3->fp, $this->getid3->fread_buffer_size());
79 }
80 $trackID = substr($MIDIdata, $offset, 4);
81 $offset += 4;
82 if ($trackID == self::GETID3_MIDI_MAGIC_MTRK) {
83 $tracksize = Helper::BigEndian2Int(substr($MIDIdata, $offset, 4));
84 $offset += 4;
85 // $thisfile_midi['tracks'][$i]['size'] = $tracksize;
86 $trackdataarray[$i] = substr($MIDIdata, $offset, $tracksize);
87 $offset += $tracksize;
88 } else {
89 $info['error'][] = 'Expecting "'.Helper::PrintHexBytes(self::GETID3_MIDI_MAGIC_MTRK).'" at '.($offset - 4).', found "'.Helper::PrintHexBytes($trackID).'" instead';
90
91 return false;
92 }
93 }
94
95 if (!isset($trackdataarray) || !is_array($trackdataarray)) {
96 $info['error'][] = 'Cannot find MIDI track information';
97 unset($thisfile_midi);
98 unset($info['fileformat']);
99
100 return false;
101 }
102
103 if ($this->scanwholefile) { // this can take quite a long time, so have the option to bypass it if speed is very important
104 $thisfile_midi['totalticks'] = 0;
105 $info['playtime_seconds'] = 0;
106 $CurrentMicroSecondsPerBeat = 500000; // 120 beats per minute; 60,000,000 microseconds per minute -> 500,000 microseconds per beat
107 $CurrentBeatsPerMinute = 120; // 120 beats per minute; 60,000,000 microseconds per minute -> 500,000 microseconds per beat
108 $MicroSecondsPerQuarterNoteAfter = array ();
109
110 foreach ($trackdataarray as $tracknumber => $trackdata) {
111
112 $eventsoffset = 0;
113 $LastIssuedMIDIcommand = 0;
114 $LastIssuedMIDIchannel = 0;
115 $CumulativeDeltaTime = 0;
116 $TicksAtCurrentBPM = 0;
117 while ($eventsoffset < strlen($trackdata)) {
118 $eventid = 0;
119 if (isset($MIDIevents[$tracknumber]) && is_array($MIDIevents[$tracknumber])) {
120 $eventid = count($MIDIevents[$tracknumber]);
121 }
122 $deltatime = 0;
123 for ($i = 0; $i < 4; $i++) {
124 $deltatimebyte = ord(substr($trackdata, $eventsoffset++, 1));
125 $deltatime = ($deltatime << 7) + ($deltatimebyte & 0x7F);
126 if ($deltatimebyte & 0x80) {
127 // another byte follows
128 } else {
129 break;
130 }
131 }
132 $CumulativeDeltaTime += $deltatime;
133 $TicksAtCurrentBPM += $deltatime;
134 $MIDIevents[$tracknumber][$eventid]['deltatime'] = $deltatime;
135 $MIDI_event_channel = ord(substr($trackdata, $eventsoffset++, 1));
136 if ($MIDI_event_channel & 0x80) {
137 // OK, normal event - MIDI command has MSB set
138 $LastIssuedMIDIcommand = $MIDI_event_channel >> 4;
139 $LastIssuedMIDIchannel = $MIDI_event_channel & 0x0F;
140 } else {
141 // running event - assume last command
142 $eventsoffset--;
143 }
144 $MIDIevents[$tracknumber][$eventid]['eventid'] = $LastIssuedMIDIcommand;
145 $MIDIevents[$tracknumber][$eventid]['channel'] = $LastIssuedMIDIchannel;
146 if ($MIDIevents[$tracknumber][$eventid]['eventid'] == 0x08) { // Note off (key is released)
147
148 $notenumber = ord(substr($trackdata, $eventsoffset++, 1));
149 $velocity = ord(substr($trackdata, $eventsoffset++, 1));
150
151 } elseif ($MIDIevents[$tracknumber][$eventid]['eventid'] == 0x09) { // Note on (key is pressed)
152
153 $notenumber = ord(substr($trackdata, $eventsoffset++, 1));
154 $velocity = ord(substr($trackdata, $eventsoffset++, 1));
155
156 } elseif ($MIDIevents[$tracknumber][$eventid]['eventid'] == 0x0A) { // Key after-touch
157
158 $notenumber = ord(substr($trackdata, $eventsoffset++, 1));
159 $velocity = ord(substr($trackdata, $eventsoffset++, 1));
160
161 } elseif ($MIDIevents[$tracknumber][$eventid]['eventid'] == 0x0B) { // Control Change
162
163 $controllernum = ord(substr($trackdata, $eventsoffset++, 1));
164 $newvalue = ord(substr($trackdata, $eventsoffset++, 1));
165
166 } elseif ($MIDIevents[$tracknumber][$eventid]['eventid'] == 0x0C) { // Program (patch) change
167
168 $newprogramnum = ord(substr($trackdata, $eventsoffset++, 1));
169
170 $thisfile_midi_raw['track'][$tracknumber]['instrumentid'] = $newprogramnum;
171 if ($tracknumber == 10) {
172 $thisfile_midi_raw['track'][$tracknumber]['instrument'] = $this->GeneralMIDIpercussionLookup($newprogramnum);
173 } else {
174 $thisfile_midi_raw['track'][$tracknumber]['instrument'] = $this->GeneralMIDIinstrumentLookup($newprogramnum);
175 }
176
177 } elseif ($MIDIevents[$tracknumber][$eventid]['eventid'] == 0x0D) { // Channel after-touch
178
179 $channelnumber = ord(substr($trackdata, $eventsoffset++, 1));
180
181 } elseif ($MIDIevents[$tracknumber][$eventid]['eventid'] == 0x0E) { // Pitch wheel change (2000H is normal or no change)
182
183 $changeLSB = ord(substr($trackdata, $eventsoffset++, 1));
184 $changeMSB = ord(substr($trackdata, $eventsoffset++, 1));
185 $pitchwheelchange = (($changeMSB & 0x7F) << 7) & ($changeLSB & 0x7F);
186
187 } elseif (($MIDIevents[$tracknumber][$eventid]['eventid'] == 0x0F) && ($MIDIevents[$tracknumber][$eventid]['channel'] == 0x0F)) {
188
189 $METAeventCommand = ord(substr($trackdata, $eventsoffset++, 1));
190 $METAeventLength = ord(substr($trackdata, $eventsoffset++, 1));
191 $METAeventData = substr($trackdata, $eventsoffset, $METAeventLength);
192 $eventsoffset += $METAeventLength;
193 switch ($METAeventCommand) {
194 case 0x00: // Set track sequence number
195 $track_sequence_number = Helper::BigEndian2Int(substr($METAeventData, 0, $METAeventLength));
196 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['seqno'] = $track_sequence_number;
197 break;
198
199 case 0x01: // Text: generic
200 $text_generic = substr($METAeventData, 0, $METAeventLength);
201 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['text'] = $text_generic;
202 $thisfile_midi['comments']['comment'][] = $text_generic;
203 break;
204
205 case 0x02: // Text: copyright
206 $text_copyright = substr($METAeventData, 0, $METAeventLength);
207 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['copyright'] = $text_copyright;
208 $thisfile_midi['comments']['copyright'][] = $text_copyright;
209 break;
210
211 case 0x03: // Text: track name
212 $text_trackname = substr($METAeventData, 0, $METAeventLength);
213 $thisfile_midi_raw['track'][$tracknumber]['name'] = $text_trackname;
214 break;
215
216 case 0x04: // Text: track instrument name
217 $text_instrument = substr($METAeventData, 0, $METAeventLength);
218 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['instrument'] = $text_instrument;
219 break;
220
221 case 0x05: // Text: lyrics
222 $text_lyrics = substr($METAeventData, 0, $METAeventLength);
223 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['lyrics'] = $text_lyrics;
224 if (!isset($thisfile_midi['lyrics'])) {
225 $thisfile_midi['lyrics'] = '';
226 }
227 $thisfile_midi['lyrics'] .= $text_lyrics."\n";
228 break;
229
230 case 0x06: // Text: marker
231 $text_marker = substr($METAeventData, 0, $METAeventLength);
232 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['marker'] = $text_marker;
233 break;
234
235 case 0x07: // Text: cue point
236 $text_cuepoint = substr($METAeventData, 0, $METAeventLength);
237 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['cuepoint'] = $text_cuepoint;
238 break;
239
240 case 0x2F: // End Of Track
241 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['EOT'] = $CumulativeDeltaTime;
242 break;
243
244 case 0x51: // Tempo: microseconds / quarter note
245 $CurrentMicroSecondsPerBeat = Helper::BigEndian2Int(substr($METAeventData, 0, $METAeventLength));
246 if ($CurrentMicroSecondsPerBeat == 0) {
247 $info['error'][] = 'Corrupt MIDI file: CurrentMicroSecondsPerBeat == zero';
248
249 return false;
250 }
251 $thisfile_midi_raw['events'][$tracknumber][$CumulativeDeltaTime]['us_qnote'] = $CurrentMicroSecondsPerBeat;
252 $CurrentBeatsPerMinute = (1000000 / $CurrentMicroSecondsPerBeat) * 60;
253 $MicroSecondsPerQuarterNoteAfter[$CumulativeDeltaTime] = $CurrentMicroSecondsPerBeat;
254 $TicksAtCurrentBPM = 0;
255 break;
256
257 case 0x58: // Time signature
258 $timesig_numerator = Helper::BigEndian2Int($METAeventData{0});
259 $timesig_denominator = pow(2, Helper::BigEndian2Int($METAeventData{1})); // $02 -> x/4, $03 -> x/8, etc
260 $timesig_32inqnote = Helper::BigEndian2Int($METAeventData{2}); // number of 32nd notes to the quarter note
261 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['timesig_32inqnote'] = $timesig_32inqnote;
262 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['timesig_numerator'] = $timesig_numerator;
263 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['timesig_denominator'] = $timesig_denominator;
264 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['timesig_text'] = $timesig_numerator.'/'.$timesig_denominator;
265 $thisfile_midi['timesignature'][] = $timesig_numerator.'/'.$timesig_denominator;
266 break;
267
268 case 0x59: // Keysignature
269 $keysig_sharpsflats = Helper::BigEndian2Int($METAeventData{0});
270 if ($keysig_sharpsflats & 0x80) {
271 // (-7 -> 7 flats, 0 ->key of C, 7 -> 7 sharps)
272 $keysig_sharpsflats -= 256;
273 }
274
275 $keysig_majorminor = Helper::BigEndian2Int($METAeventData{1}); // 0 -> major, 1 -> minor
276 $keysigs = array(-7=>'Cb', -6=>'Gb', -5=>'Db', -4=>'Ab', -3=>'Eb', -2=>'Bb', -1=>'F', 0=>'C', 1=>'G', 2=>'D', 3=>'A', 4=>'E', 5=>'B', 6=>'F#', 7=>'C#');
277 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['keysig_sharps'] = (($keysig_sharpsflats > 0) ? abs($keysig_sharpsflats) : 0);
278 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['keysig_flats'] = (($keysig_sharpsflats < 0) ? abs($keysig_sharpsflats) : 0);
279 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['keysig_minor'] = (bool) $keysig_majorminor;
280 //$thisfile_midi_raw['events'][$tracknumber][$eventid]['keysig_text'] = $keysigs[$keysig_sharpsflats].' '.($thisfile_midi_raw['events'][$tracknumber][$eventid]['keysig_minor'] ? 'minor' : 'major');
281
282 // $keysigs[$keysig_sharpsflats] gets an int key (correct) - $keysigs["$keysig_sharpsflats"] gets a string key (incorrect)
283 $thisfile_midi['keysignature'][] = $keysigs[$keysig_sharpsflats].' '.((bool) $keysig_majorminor ? 'minor' : 'major');
284 break;
285
286 case 0x7F: // Sequencer specific information
287 $custom_data = substr($METAeventData, 0, $METAeventLength);
288 break;
289
290 default:
291 $info['warning'][] = 'Unhandled META Event Command: '.$METAeventCommand;
292 break;
293 }
294
295 } else {
296
297 $info['warning'][] = 'Unhandled MIDI Event ID: '.$MIDIevents[$tracknumber][$eventid]['eventid'].' + Channel ID: '.$MIDIevents[$tracknumber][$eventid]['channel'];
298
299 }
300 }
301 if (($tracknumber > 0) || (count($trackdataarray) == 1)) {
302 $thisfile_midi['totalticks'] = max($thisfile_midi['totalticks'], $CumulativeDeltaTime);
303 }
304 }
305 $previoustickoffset = null;
306
307 ksort($MicroSecondsPerQuarterNoteAfter);
308 foreach ($MicroSecondsPerQuarterNoteAfter as $tickoffset => $microsecondsperbeat) {
309 if (is_null($previoustickoffset)) {
310 $prevmicrosecondsperbeat = $microsecondsperbeat;
311 $previoustickoffset = $tickoffset;
312 continue;
313 }
314 if ($thisfile_midi['totalticks'] > $tickoffset) {
315
316 if ($thisfile_midi_raw['ticksperqnote'] == 0) {
317 $info['error'][] = 'Corrupt MIDI file: ticksperqnote == zero';
318
319 return false;
320 }
321
322 $info['playtime_seconds'] += (($tickoffset - $previoustickoffset) / $thisfile_midi_raw['ticksperqnote']) * ($prevmicrosecondsperbeat / 1000000);
323
324 $prevmicrosecondsperbeat = $microsecondsperbeat;
325 $previoustickoffset = $tickoffset;
326 }
327 }
328 if ($thisfile_midi['totalticks'] > $previoustickoffset) {
329
330 if ($thisfile_midi_raw['ticksperqnote'] == 0) {
331 $info['error'][] = 'Corrupt MIDI file: ticksperqnote == zero';
332
333 return false;
334 }
335
336 $info['playtime_seconds'] += (($thisfile_midi['totalticks'] - $previoustickoffset) / $thisfile_midi_raw['ticksperqnote']) * ($microsecondsperbeat / 1000000);
337
338 }
339 }
340
341 if (!empty($info['playtime_seconds'])) {
342 $info['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];
343 }
344
345 if (!empty($thisfile_midi['lyrics'])) {
346 $thisfile_midi['comments']['lyrics'][] = $thisfile_midi['lyrics'];
347 }
348
349 return true;
350 }
fseek($bytes, $whence=SEEK_SET)
static BigEndian2Int($byteword, $synchsafe=false, $signed=false)
Definition: Helper.php:374
static PrintHexBytes($string, $hex=true, $spaces=true, $htmlencoding='UTF-8')
Definition: Helper.php:36
GeneralMIDIpercussionLookup($instrumentid)
Definition: Midi.php:502
GeneralMIDIinstrumentLookup($instrumentid)
Definition: Midi.php:357
$info
Definition: example_052.php:80

References $info, GetId3\Lib\Helper\BigEndian2Int(), GetId3\Handler\BaseHandler\fread(), GetId3\Handler\BaseHandler\fseek(), GetId3\Module\Audio\Midi\GeneralMIDIinstrumentLookup(), GetId3\Module\Audio\Midi\GeneralMIDIpercussionLookup(), and GetId3\Lib\Helper\PrintHexBytes().

+ Here is the call graph for this function:

◆ GeneralMIDIinstrumentLookup()

GetId3\Module\Audio\Midi::GeneralMIDIinstrumentLookup (   $instrumentid)
Parameters
type$instrumentid
Returns
type

This is not a comment!

0 Acoustic Grand 1 Bright Acoustic 2 Electric Grand 3 Honky-Tonk 4 Electric Piano 1 5 Electric Piano 2 6 Harpsichord 7 Clavier 8 Celesta 9 Glockenspiel 10 Music Box 11 Vibraphone 12 Marimba 13 Xylophone 14 Tubular Bells 15 Dulcimer 16 Drawbar Organ 17 Percussive Organ 18 Rock Organ 19 Church Organ 20 Reed Organ 21 Accordian 22 Harmonica 23 Tango Accordian 24 Acoustic Guitar (nylon) 25 Acoustic Guitar (steel) 26 Electric Guitar (jazz) 27 Electric Guitar (clean) 28 Electric Guitar (muted) 29 Overdriven Guitar 30 Distortion Guitar 31 Guitar Harmonics 32 Acoustic Bass 33 Electric Bass (finger) 34 Electric Bass (pick) 35 Fretless Bass 36 Slap Bass 1 37 Slap Bass 2 38 Synth Bass 1 39 Synth Bass 2 40 Violin 41 Viola 42 Cello 43 Contrabass 44 Tremolo Strings 45 Pizzicato Strings 46 Orchestral Strings 47 Timpani 48 String Ensemble 1 49 String Ensemble 2 50 SynthStrings 1 51 SynthStrings 2 52 Choir Aahs 53 Voice Oohs 54 Synth Voice 55 Orchestra Hit 56 Trumpet 57 Trombone 58 Tuba 59 Muted Trumpet 60 French Horn 61 Brass Section 62 SynthBrass 1 63 SynthBrass 2 64 Soprano Sax 65 Alto Sax 66 Tenor Sax 67 Baritone Sax 68 Oboe 69 English Horn 70 Bassoon 71 Clarinet 72 Piccolo 73 Flute 74 Recorder 75 Pan Flute 76 Blown Bottle 77 Shakuhachi 78 Whistle 79 Ocarina 80 Lead 1 (square) 81 Lead 2 (sawtooth) 82 Lead 3 (calliope) 83 Lead 4 (chiff) 84 Lead 5 (charang) 85 Lead 6 (voice) 86 Lead 7 (fifths) 87 Lead 8 (bass + lead) 88 Pad 1 (new age) 89 Pad 2 (warm) 90 Pad 3 (polysynth) 91 Pad 4 (choir) 92 Pad 5 (bowed) 93 Pad 6 (metallic) 94 Pad 7 (halo) 95 Pad 8 (sweep) 96 FX 1 (rain) 97 FX 2 (soundtrack) 98 FX 3 (crystal) 99 FX 4 (atmosphere) 100 FX 5 (brightness) 101 FX 6 (goblins) 102 FX 7 (echoes) 103 FX 8 (sci-fi) 104 Sitar 105 Banjo 106 Shamisen 107 Koto 108 Kalimba 109 Bagpipe 110 Fiddle 111 Shanai 112 Tinkle Bell 113 Agogo 114 Steel Drums 115 Woodblock 116 Taiko Drum 117 Melodic Tom 118 Synth Drum 119 Reverse Cymbal 120 Guitar Fret Noise 121 Breath Noise 122 Seashore 123 Bird Tweet 124 Telephone Ring 125 Helicopter 126 Applause 127 Gunshot

Definition at line 357 of file Midi.php.

358 {
359 $begin = __LINE__;
360
494 return Helper::EmbeddedLookup($instrumentid, $begin, __LINE__, __FILE__, 'GeneralMIDIinstrument');
495 }
static EmbeddedLookup($key, $begin, $end, $file, $name)
@staticvar type $cache
Definition: Helper.php:1759

References GetId3\Lib\Helper\EmbeddedLookup().

Referenced by GetId3\Module\Audio\Midi\analyze().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GeneralMIDIpercussionLookup()

GetId3\Module\Audio\Midi::GeneralMIDIpercussionLookup (   $instrumentid)
Parameters
type$instrumentid
Returns
type

This is not a comment!

35 Acoustic Bass Drum 36 Bass Drum 1 37 Side Stick 38 Acoustic Snare 39 Hand Clap 40 Electric Snare 41 Low Floor Tom 42 Closed Hi-Hat 43 High Floor Tom 44 Pedal Hi-Hat 45 Low Tom 46 Open Hi-Hat 47 Low-Mid Tom 48 Hi-Mid Tom 49 Crash Cymbal 1 50 High Tom 51 Ride Cymbal 1 52 Chinese Cymbal 53 Ride Bell 54 Tambourine 55 Splash Cymbal 56 Cowbell 57 Crash Cymbal 2 59 Ride Cymbal 2 60 Hi Bongo 61 Low Bongo 62 Mute Hi Conga 63 Open Hi Conga 64 Low Conga 65 High Timbale 66 Low Timbale 67 High Agogo 68 Low Agogo 69 Cabasa 70 Maracas 71 Short Whistle 72 Long Whistle 73 Short Guiro 74 Long Guiro 75 Claves 76 Hi Wood Block 77 Low Wood Block 78 Mute Cuica 79 Open Cuica 80 Mute Triangle 81 Open Triangle

Definition at line 502 of file Midi.php.

503 {
504 $begin = __LINE__;
505
557 return Helper::EmbeddedLookup($instrumentid, $begin, __LINE__, __FILE__, 'GeneralMIDIpercussion');
558 }

References GetId3\Lib\Helper\EmbeddedLookup().

Referenced by GetId3\Module\Audio\Midi\analyze().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $scanwholefile

GetId3\Module\Audio\Midi::$scanwholefile = true

Definition at line 35 of file Midi.php.

◆ GETID3_MIDI_MAGIC_MTHD

const GetId3\Module\Audio\Midi::GETID3_MIDI_MAGIC_MTHD = 'MThd'

Definition at line 37 of file Midi.php.

◆ GETID3_MIDI_MAGIC_MTRK

const GetId3\Module\Audio\Midi::GETID3_MIDI_MAGIC_MTRK = 'MTrk'

Definition at line 38 of file Midi.php.


The documentation for this class was generated from the following file: