POV-Ray : Newsgroups : povray.binaries.animations : Animate a MIDI file Server Time
5 Jul 2024 08:39:01 EDT (-0400)
  Animate a MIDI file (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: dan B hentschel
Subject: Animate a MIDI file
Date: 3 Jan 2005 10:00:02
Message: <web.41d95965acb6c853a3fcf12a0@news.povray.org>
Well, here's what I did with my Christmas vacation. I got to thinking that
it wouldn't be too difficult to parse a MIDI file into a POV .inc and then
use the note on-off events to synchronize an animation to the music. I
ended up using the technique to produce a background movie for the DVD menu
system I created for the Japanese Anime, "Piano". Here is a small portion
of that movie.

I wrote a Perl script that takes a .mid file as an input, and creates a .inc
file as output. I have tried it with several different MIDI files with
varying success. Sometimes the timing is a bit off. Is it worth my time to
clean this up and make it available? Would anyone like to use it? For now,
I've gotten what I wanted from it. So if there's no interest, I'll probably
move on to another project.

Let me know what you think!

 - dan B hentschel

Video is in DivX format. My apologies to those who are not able to see it.


Post a reply to this message


Attachments:
Download 'piano_small.avi.dat' (694 KB)

From: Dave VanHorn
Subject: Re: Animate a MIDI file
Date: 4 Jan 2005 15:36:52
Message: <41dafe64$1@news.povray.org>
Cute!  I'm not sure what I'd use it for, but I like it!

Why not web it?


Post a reply to this message

From: Tom Galvin
Subject: Re: Animate a MIDI file
Date: 4 Jan 2005 17:57:14
Message: <41db1f4a$1@news.povray.org>
dan B hentschel wrote:
> 
> I wrote a Perl script that takes a .mid file as an input, and creates a .inc
> file as output. I have tried it with several different MIDI files with
> varying success. Sometimes the timing is a bit off. Is it worth my time to
> clean this up and make it available? Would anyone like to use it? 

I like it.  Would you care to share it on the wiki?

http://povray.tirnalong.com


Post a reply to this message

From: Paolo Gibellini
Subject: Re: Animate a MIDI file
Date: 5 Jan 2005 03:40:04
Message: <41dba7e4$1@news.povray.org>
Cool!
How does your perl script work?
;-)
Paolo


Post a reply to this message

From: dan B hentschel
Subject: Re: Animate a MIDI file
Date: 7 Jan 2005 10:25:00
Message: <web.41dea8eee38e401da3fcf12a0@news.povray.org>
"Dave VanHorn" <dva### [at] cedarnet> wrote:
> Cute!  I'm not sure what I'd use it for, but I like it!
>
> Why not web it?

Ok, so I spent a few working on it, and I feel that it's pretty well
documented, and pretty extensible at this point. Whip together a
shake-n-bake web page, and here you go:

http://www.hentschels.com/povray.htm

 - dan B hentschel


Post a reply to this message

From: dan B hentschel
Subject: Re: Animate a MIDI file
Date: 7 Jan 2005 10:25:00
Message: <web.41dea930e38e401da3fcf12a0@news.povray.org>
Tom Galvin <tom### [at] impnospamorg> wrote:
> dan B hentschel wrote:
> >
> > I wrote a Perl script that takes a .mid file as an input, and creates a .inc
> > file as output. I have tried it with several different MIDI files with
> > varying success. Sometimes the timing is a bit off. Is it worth my time to
> > clean this up and make it available? Would anyone like to use it?
>
> I like it.  Would you care to share it on the wiki?
>
> http://povray.tirnalong.com

You're welcome to list it there if you like. See my previous post for web
location of source files.

 - dan B hentschel


Post a reply to this message

From: dan B hentschel
Subject: Re: Animate a MIDI file
Date: 7 Jan 2005 10:40:00
Message: <web.41deac40e38e401da3fcf12a0@news.povray.org>
"Paolo Gibellini" <p.g### [at] teinoscom> wrote:
> Cool!
> How does your perl script work?
> ;-)
> Paolo

Well, the best way to see that would be to look at the script, itself, now
located on my web page. Here's a quick rundown:

1) Make use of code someone else wrote, in this case, the MIDI Perl module
written by Sean M. Burke, and available from CPAN.
2) Calculate note on-off events in terms of seconds, rather than the "ticks"
unit used in MIDI files.
3) Add enough bugs such that the calculation in step 2 is frustratingly
close to correct, but very slightly off.
4) Output note on-off events to a large POVRay include file with multiple
arrays, and arrays of arrays.
5) Write a handful of macros to parse these arrays to glean meaningful
information.
6) Fudge with the framerate/duration of the resulting animation such that
the bugs mentioned in step 3 are not a problem any more.

There you go. :-) Obviously, I don't really like steps 3/6, so if anyone
wants to take a look at it and recommend a fix for me, that would be great.
I may revisit it agian in the future if I get the motivation, but for now
I'm itching for a new project.

 - dan B hentschel


Post a reply to this message

From: Jaime Medina
Subject: Re: Animate a MIDI file
Date: 12 Jan 2005 13:31:35
Message: <41e56d07$1@news.povray.org>
I use Mimic to do that, what programs do you use?

Regards,

Jaime Medina

Have you seen my animation?
http://jaimemedina.com/TV/

Your comments will be appreciated



"dan B hentschel" <dan### [at] alumritedu> wrote in message 
news:web.41d95965acb6c853a3fcf12a0@news.povray.org...
  Well, here's what I did with my Christmas vacation. I got to thinking 
that
  it wouldn't be too difficult to parse a MIDI file into a POV .inc and 
then
  use the note on-off events to synchronize an animation to the music. I
  ended up using the technique to produce a background movie for the DVD 
menu
  system I created for the Japanese Anime, "Piano". Here is a small 
portion
  of that movie.

  I wrote a Perl script that takes a .mid file as an input, and creates 
a .inc
  file as output. I have tried it with several different MIDI files with
  varying success. Sometimes the timing is a bit off. Is it worth my 
time to
  clean this up and make it available? Would anyone like to use it? For 
now,
  I've gotten what I wanted from it. So if there's no interest, I'll 
probably
  move on to another project.

  Let me know what you think!

   - dan B hentschel

  Video is in DivX format. My apologies to those who are not able to see 
it.


Post a reply to this message


Attachments:
Download 'iso-8859-1' (3 KB)

From: dan B hentschel
Subject: Re: Animate a MIDI file
Date: 14 Jan 2005 15:00:01
Message: <web.41e8242ce38e401db31e6d870@news.povray.org>
"Jaime Medina" <mai### [at] jaimemedinacom> wrote:
> I use Mimic to do that, what programs do you use?
>

Hmm.. I did a search, and wasn't able to come up with anything in the POV
newsgroups for Mimic. Is that a different render suite? Or is it a POV
utility? As for what programs I use:

1) Perl (scripting language)
2) POVRay

Maybe I don't understand your queston?

 - dan B hentschel


Post a reply to this message

From: VAXHeadroom
Subject: Re: Animate a MIDI file
Date: 22 Jan 2005 09:55:01
Message: <web.41f26843e38e401d227697780@news.povray.org>
"dan B hentschel" <dan### [at] alumritedu> wrote:
> Well, here's what I did with my Christmas vacation. I got to thinking that
> it wouldn't be too difficult to parse a MIDI file into a POV .inc and then
> use the note on-off events to synchronize an animation to the music. I
> ended up using the technique to produce a background movie for the DVD menu
> system I created for the Japanese Anime, "Piano". Here is a small portion
> of that movie.
>
> I wrote a Perl script that takes a .mid file as an input, and creates a .inc
> file as output. I have tried it with several different MIDI files with
> varying success. Sometimes the timing is a bit off. Is it worth my time to
> clean this up and make it available? Would anyone like to use it? For now,
> I've gotten what I wanted from it. So if there's no interest, I'll probably
> move on to another project.
>
> Let me know what you think!
>
>  - dan B hentschel
>
> Video is in DivX format. My apologies to those who are not able to see it.

I'm sitting waiting for my daughter to get out of ballet class, and thought,
hmmm, I've really wanted to be able to do an animation from MIDI - brief
hunt
on the internet and BINGO! ;)  And you basically just did it!  I'm going to
try to re-write it into POV script and add handling for continuous
controllers.
I'll post it when I'm done!


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.