Details on AniMidi
Jun. 27th, 2010 12:52 pmI haven't really been working on any of my programming projects for a while, mostly due to the amount of homework I've got right now.
However, this being Sunday, I have a little bit of time to work on other stuff.
So, I'm going to describe some of the things that my AniMidi project will require.
(maybe I'll get motivated and start working on it again...)
The end-goal that AniMidi has is to provide end-users (intended to be just above your average user) with virtual instruments to play your note-based music files.
(primarily MIDI files, though not limited to them)
This means that I have a fairly linear process for getting the music in one side and producing the (hopefully impressive) visuals out the other side:
My primary concern is going to be in parsing the music files down to the individual note commands and making sure that the timing is always bang on.
I've been reading up on the MIDI file specification (as MIDI is also the name given to the wire-protocol used for digital instruments to talk to each other and has no timing information), and am still a little confused as to the timing part.
I've actually got a fairly thick book on the subject that I'm currently borrowing from the university library called "Beyond MIDI", and it goes into great detail on quite a number of note-based music representations, including Csound, Music Macro Language, and almost a dozen other formats and dialects.
(it's a good thing it's a four-month loan period, it's a tough slog!)
Once I figure out how to parse the music files down to an internal representation, it's a short step from there to the animation curves needed to control the instruments.
Well, fairly short, anyway.
If you've ever watched any of the Animusic videos, you'll have noticed that many instruments have common "striking" implements (ie, picks, hammers, drum sticks, etc.) that move around depending on which note they're supposed to hit.
All the work I've done so far has only had one "striker" per note, though I should eventually implement this common striker stuff as it really adds to the visual interest.
(plus, certain instruments really don't look right if each note has its own striker)
Anyway, the part I'm most concerned about is timing, as MIDI specifies more than one way to set it, and it can even be changed in the middle of a piece!
However, this being Sunday, I have a little bit of time to work on other stuff.
So, I'm going to describe some of the things that my AniMidi project will require.
(maybe I'll get motivated and start working on it again...)
The end-goal that AniMidi has is to provide end-users (intended to be just above your average user) with virtual instruments to play your note-based music files.
(primarily MIDI files, though not limited to them)
This means that I have a fairly linear process for getting the music in one side and producing the (hopefully impressive) visuals out the other side:
- The user provides a music file in any supported format.
- The music file is scanned to determine which instruments are used.
- As the music file is scanned, a list of note-control messages are stored in a separate place, in such a way so as to make it really easy to control the instruments in real-time.
- As there may be more than one virtual instrument object that claims to match each instrument in the file, a decision must be made as to which ones to use. For instance, one virtual instrument may look more classical in nature and the other may look more futuristic, so the one that more closely matches the rest of the instruments should be chosen.
- Suggest a (fairly) random layout for the instruments based on the common type, including backgrounds.
- Allow the user to completely change everything if they want. (kind of like an "Advanced Layout" button)
- Play the music and virtual instruments together.
- Profit?
My primary concern is going to be in parsing the music files down to the individual note commands and making sure that the timing is always bang on.
I've been reading up on the MIDI file specification (as MIDI is also the name given to the wire-protocol used for digital instruments to talk to each other and has no timing information), and am still a little confused as to the timing part.
I've actually got a fairly thick book on the subject that I'm currently borrowing from the university library called "Beyond MIDI", and it goes into great detail on quite a number of note-based music representations, including Csound, Music Macro Language, and almost a dozen other formats and dialects.
(it's a good thing it's a four-month loan period, it's a tough slog!)
Once I figure out how to parse the music files down to an internal representation, it's a short step from there to the animation curves needed to control the instruments.
Well, fairly short, anyway.
If you've ever watched any of the Animusic videos, you'll have noticed that many instruments have common "striking" implements (ie, picks, hammers, drum sticks, etc.) that move around depending on which note they're supposed to hit.
All the work I've done so far has only had one "striker" per note, though I should eventually implement this common striker stuff as it really adds to the visual interest.
(plus, certain instruments really don't look right if each note has its own striker)
Anyway, the part I'm most concerned about is timing, as MIDI specifies more than one way to set it, and it can even be changed in the middle of a piece!