Realtime Animusic like project, 2 scenes, still in early stages

Hey all, I don’t know how far this is going to go, but, here’s a couple of scenes that I’ve been working on the past few days. This project is in the very early stages so pretty much everything is proxy. I threw a few instruments in since I already had them modeled.

This is reading a midi file and animating the lights / instruments based on the data read in.

I plan on adding more effects like particles, maybe some ice shattering effects for the Echo song, but, who knows what will pop into my head.

Anyway, hope you enjoy it, and I hope you enjoy the ABC song for the first time since you were a kid :slight_smile:

http://web.mac.com/nathanwardenlee/Unity/Midi/Midi.html

Thanks,
Nathan

Error :S

I love it, but what is it for?

Hi Londy, you may want to take a look again, I think I posted this right before it finished uploading… oops :slight_smile:

Thanks Seraphim, it’s just for fun right now :slight_smile: I love animusic and my friend and I wanted to try this for ourselves. So it’s really just a hobbyist side project, and of course, looking to make a good portfolio piece :wink:

Finally posting an update…

In this update:

  • The Grand Piano scene is mostly done.

  • Several songs to choose from for the Grand Piano scene.

  • The Grand Piano scene has several songs now that show that it implements most of the necessary Midi features such as tempo change, namely in Moonlight Sonata.

  • Can hide pretty much all of the interface while the song is playing

  • Added a playback control with the standard play, pause, stop, and loop features. Can also scrub the playback.

  • Started adding some proxy instruments and instrument functionality into the Echo and ABC scene. Namely, string vibration, rotation, and sliding (such as a violin bow).

  • Now a streaming web player so you can load individual scenes so that it doesn’t take so long to load the whole thing.

http://web.mac.com/nathanwardenlee/Unity/Midi/Midi.html

Hope somebody enjoys this :slight_smile:
Nathan

Nathan,

I’ve just run the ABC song over the web. That is awesome!!

I assume you developed a MIDI file reader and event generator framework for Unity. Can you tell us about your technique and/or share some of your code?

-Kaya

Thanks Kaya,

Your assumption is correct. Basically, I’m reading in the data and storing it in classes to make it more readable. Then I calculate out the event times which is probably one of the most difficult things to do since you have to account for tempo changes.

I have two methods for making things work in the system:
#1 is I build an animation curve for the “Behaviour” and position, rotate, vibrate a string, or whatever based on an empty game object that moves on the y axis between 0 and 1
#2 is that I send an event through a Messaging system.

Both methods so far are invaluable as they both have very distinct uses. Animation curves are essential for having accurate movements when they need to have quick movements such as the balls and birds moving up and down. Events are used for more loose behaviors that shouldn’t follow an exact curve. These will probably be seen in the next update I post. For now, there’s only one thing that are using events and that’s the bows on the Cello/Viola/Violins. Them moving back and forth are based on events instead of animation curves since they need to change movement every note played.

I may end up at least releasing the Midi file reading code, especially since it isn’t 100% compatible with all Midi files in hopes that maybe someone would like to chip in. But, if I do release some of the code it may be a while since I’m still in the testing stages.

Thanks for your interest in it and for taking the time to comment :slight_smile:
Nathan

Well I know it’s been a while, but, here it is… the MIDI reader source code. It only works with Speedy MIDI or SynthFont, but I can’t remember with which format it works (I think it was SynthFont). Both are free apps.

If you can improve the code to read any MIDI file, please share it on this thread :slight_smile:

http://web.mac.com/nathanwardenlee/Unity/Midi/MidiReader.zip

Thanks a bunch,
Nathan

Thanks for the code Nathan, but could you also provide and example scene with an example of how to access the generated values by your script? Also how do you tell it which midi-file (source) to use?

Or maybe you could point me into the right direction as how to accomplish this? I’m pretty new to csharp coding and accessing it from javascript.

i too would love if you could provide an example of how to use this midi reader

None of the links work anymore…are you still on this project?