Am Tue, 14 Mar 2017 14:53:06 -0700 schrieb Henry Baker <hbaker1@pipeline.com>:
I've always wanted to use Google to search for pieces of melodies as well as chords.
The idea would be to type in a short midi sequence, and Google would find it (or a close match) in another midi file. More advanced: Google would find the sequence in mp3 files, mp4 files, etc.
Perhaps Google has already done this?
Perhaps Google has been screwed by the music industry? After all, who wants to make it trivial for copyright lawyers to find musical precedents for every big hit song?
--- Another thought that's been in the back of my mind for at least 20 years: *midi sound "compression"*. The idea isn't to get the greatest compression, but to get the best musical approximation from a .wav file.
As you know, a digital midi player basically cues up a finite-length "sound" from a "sound font" to be added into the output at the time and volume specified by the midi note. There are additional complexities, but this gives you a minimal midi player.
[Mathematically, the sound output .wav file is a *polynomial*, where the sample "A" is the coefficient of A*x^t, and the sample A appears at time t. A midi score of one octave is a polynomial in 13 variables: 12 notes and the time "t". A sound font contains 12 polynomials in "t" which provide the samples for that particular note. The score is "played" by evaluating the score at the 12 different note polynomials.
Note variables are C,B,B_,A,A_,G,G_,F,E,E_,D,D_; time variable is t.
(%i1) a; 2 (%o1) a2 T + a1 T + a0 [rather short 440 A sample] (%i2) b; 2 (%o2) b2 T + b1 T + b0 [rather short B sample] (%i3) c; 3 (%o3) c2 T + c1 T + c0 [rather short C sample] (%i4) LittleLamb; 9 8 7 6 5 4 3 2 (%o4) B T + B T + B T + C T + C T + C T + B T + A T + B T + C (%i5) LittleLamb,A=a,B=b,C=c; 6 3 5 3 4 3 3 (%o5) T (c2 T + c1 T + c0) + T (c2 T + c1 T + c0) + T (c2 T + c1 T + c0) + c2 T 9 2 8 2 7 2 + T (b2 T + b1 T + b0) + T (b2 T + b1 T + b0) + T (b2 T + b1 T + b0) 3 2 2 2 2 + T (b2 T + b1 T + b0) + T (b2 T + b1 T + b0) + T (a2 T + a1 T + a0) + c1 T + c0 (%i6) ratsimp(%,T); 11 10 9 8 (%o6) b2 T + (b2 + b1) T + (c2 + b2 + b1 + b0) T + (c2 + b1 + b0) T 7 6 5 4 + (c2 + c1 + b0) T + (c1 + c0) T + (c1 + c0 + b2) T + (c0 + b1 + a2) T 3 2 + (c2 + b2 + b0 + a1) T + (b1 + a0) T + (c1 + b0) T + c0 (%i7) ]
A Midi sound compression algorithm would be given an a priori "sound font" file which is an a priori "dictionary" of sounds. The sound compression algorithm would be charged with figuring out which sequence of these sounds at what volumes would produce the closest sound to the given sound file.
Does this program exist?
Maybe this is the direction you have in mind: https://www.researchgate.net/publication/3424227_A_Unified_Approach_to_Conte... Dirk