Can a software generate a "midi" track from a song of musical notes of different instruments thanks to some filters?


Everybody knows those goofy special graphical effects generated by media player when you listen to a song. I never really liked them because they seem random and don't seem to synchronize with the music track tempo at all.

In a concert, sometimes you see light effects switching on and off, synchronized with some instrument tempo, it seems they're either wired to the instruments or controlled by some guy.

I wonder if a software could do the same if you "circle" a certain part of the song which has a single musical note which is repeated in the song, so that the software can scan through the entire song to find similar notes to generate a tempo file, so that I can then wire this to some light effects or some 3D thing.

I know how to make C++ application, I was taught the physics of signals and how electronic filters work (I also remember a little about fourier series), but I've no ideas what sort of libraries exists and if there are algorithms dedicated to this kind of thing.

So the goal of that application would be to identify more or less similar parts of a given part of a song. In a sense it works a little like voice recognition software.

Are there (open source) C++ signal processing libraries doing this type of stuff, am I the first guy to think about this, and how hard is it to do ?


Posted 2014-05-25T15:25:50.250

Reputation: 169

Question was closed 2014-06-01T14:56:27.463

This is interesting. My thought was to build a standard library of pre-trainned sounds so that you don't have to pinpoint the individuals. – Yadli – 2014-05-28T03:08:07.843

yeah you'd have to do that for each song though, but often notes are played on top of others... not to mention guitar solos and occasional notes. I still wish there was way to recognize and isolate one sound in particular, filter it get its amplitude, and wire it some visual effect of some sort. I guess there are many ways to transform sound into light... – jokoon – 2014-05-28T09:03:36.010

1This question appears to be off-topic because it is about programming and really belongs on StackOverflow. It has nothing to do with Sound Design. – AJ Henderson – 2014-05-28T14:52:16.510

This also is not a particularly new concept and you are overcomplicating it, it mostly just involves looking for regular peaks in the audio (beats) and syncing with them. Generally, just looking at the average high point and looking for when that average is exceeded ends up corresponding to the beat. – AJ Henderson – 2014-05-28T14:53:55.680

beats are not enough, some tunes might have some longer period... – jokoon – 2014-05-28T21:51:33.390

@AJHenderson No, to detect a tone is much more difficult than to detect a beat. Like OP said when multiple sound mix together even a human will have trouble splitting things out. – Yadli – 2014-05-31T01:42:10.107

@Yadli - yes, but the OP is asking about tempo. My point was that he is overcomplicating it by trying to do it on a note. He just needs beat, which will give tempo. – AJ Henderson – 2014-05-31T02:01:24.600

@AJHenderson Yes if that is the case, onr might only need the spectrum guided by tempo. – Yadli – 2014-05-31T02:24:42.350

@jokoon How about trying some VJ solutions? – Yadli – 2014-05-31T02:25:28.333

tempo is nice, but many songs often have additional notes which don't have a particular tempo... BTW I'm asking this question for amateur purposes, I don't have money in this. I'm curious and I never saw CG video synchronized with music, and I think it would fit for some electronic/techno songs, and maybe for other songs which have good beats. You can maybe contact me on reddit (same nickname). – jokoon – 2014-05-31T09:35:08.040



DJ software like Native Instruments Traktor is pretty good at guessing the tempo by analysing a music track. It can also send out a MIDI clock signal that can be used to sync lights or something to.

Ableton Live and some other programs can do Audio-To-Midi, with varying success: it works better on simple soundfiles and much worse on full musical songs with lots of instruments.

These solutions are all proprietary unfortunately, but creating pattern recognition for audio is very much possible, just be prepared to really dive into the world of signal processing and audio analysis. Complicated stuff (any pattern recognition on complex signals is).


Posted 2014-05-25T15:25:50.250

Reputation: 2 853