Midi | How to determine the difference between various String instruments (violin, cello, bass)

I am trying to render a flash midi file (using the external midi-to-flash library)

Is there any way to tell the difference between violin, viola, cello and double bass in a midi file. I get these values ​​for the tools (ignore the numbers):

1 flute 13

2 Oboe 15

3 Clarinet 14

4 Bassoon 16

5 French horn 18

6 Pipe 17

7 Timpani 26

8 String Ensemble 1 3

9 String Ensemble 1 3

10 String Ensemble 1 3

11 String Ensemble 1 3

12 String Ensemble 1 3

13 Acoustic grand piano 5

14 Acoustic Piano 5

15 Acoustic Piano 5

16 Acoustic Piano 5

As you can see, all strings get the same String Ensemble value ...

one way to do this is to request each note if it is high (65>) or low (50 <), etc., and thereby deciding approximately the type of instrument (for a particular note). but since these values ​​are random and inaccurate, this does not make them correct (especially since different instruments still have common note pitch values).

  • Is it written (cello, violin ...) somewhere in the midi file?

  • Is there any way to accept this?

  • I have 5 line tracks. can we assume (for example) that the first 2 are violins, the third is Cello, etc.? or are they all mixed?

+4
source share
1 answer

In short, no.

What you see is just General MIDI patches . However, how these instruments sound depends on the synthesizer that generates the sound, and are not defined by MIDI. You can completely choose completely different tools than the patches shown.

Thus, 41 is defined as a violin, 42 is a viola, 43 is a cello and 44 double bass. But don't expect them to always be used that way.

As for the 1st / 2nd violin, it depends on how the person decided to create the MIDI file, and there is no programmatic way to find this. For example, if the patch for the tool is the same, I would expect that all use of this tool will be on the same channel. If the software that they used for some reason decided to break it. (For example, if the original estimate is split.)

I believe that there is a place in the MIDI file for the names of tracks, etc., but you will not see them in every MIDI file, and they are free-form names, so they will not be marked in any way, use it programmatically.

MIDI is intended only for controlling synthesizers and is not intended to represent musical appreciation, as we people understand.

+5
source

All Articles