We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Music Video: Midi File Visualization
Page Index Toggle Pages: 1
Music Video: Midi File Visualization (Read 3946 times)
Music Video: Midi File Visualization
Sep 16th, 2009, 5:52am
 
I'm currently working on a minimalistic music video and wrote a code that visualises midi events from a file.

reduktion.ch/index.php?id=Sub&subid=Midi

The visualisation in this version is a mere example. I'm not posting this because I think my sketch is particularly innovative/intelligent/beautiful ... but because it might be of interest from a technical point of view. As far as I know, no processing library supports accessing midi events from midi files at the time.

Bug: minim library is used to play a mp3 file. However after some time it stopps abruptly. Any ideas?
Re: Music Video: Midi File Visualization
Reply #1 - Sep 16th, 2009, 6:07am
 
I went to Reduktion - Parallelaktion page and after a while, I got some errors in the Java console:
Code:
==== JavaSound Minim Error ====
==== Unable to return a SourceDataLine: unsupported format - PCM_SIGNED 16000.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian

=== Minim Error ===
=== Couldn't load the file organ.mp3

Exception in thread "Animation Thread" java.lang.NullPointerException
at midiVidClip8.setup(midiVidClip8.java:46)
at processing.core.PApplet.handleDraw(PApplet.java:1402)
at processing.core.PApplet.run(PApplet.java:1327)
at java.lang.Thread.run(Unknown Source)
Note: went there with a computer with no sound card...
I will try it at home where I do have a sound card!
Re: Music Video: Midi File Visualization
Reply #2 - Sep 16th, 2009, 8:57am
 
Hmmm ... I didn't think of the possibility of a computer with no sound card. Thanks for the error message! I hope it works at home!
Re: Music Video: Midi File Visualization
Reply #3 - Sep 16th, 2009, 6:46pm
 
That's cute!
Re: Music Video: Midi File Visualization
Reply #4 - Mar 11th, 2010, 1:06am
 
Very nice little keyboard there!  Smiley

Note: I see an error in the console at the end/loop point of the music:

Couldn't rewind using reset (Stream closed), will try reloading the file.

This causes a slight, but noticeable delay in the loop.

-spxl
Re: Music Video: Midi File Visualization
Reply #5 - Mar 15th, 2010, 6:02pm
 
OMG i LOVE this.  Cheesy Cheesy Cheesy  faved. <3  Grin
Re: Music Video: Midi File Visualization
Reply #6 - Mar 17th, 2010, 9:53am
 
Heh, that was fun. The keys on the keybord tend to fuse together and look like a single huge key sometimes, tho.
Re: Music Video: Midi File Visualization
Reply #7 - Mar 17th, 2010, 10:40am
 
i had a dream about this last night, no joke!  XD
Re: Music Video: Midi File Visualization
Reply #8 - Mar 24th, 2010, 12:56am
 
Thanks for the feedback!  Smiley
(Skum: I hope it wasn’t a nightmare.)

I uploaded a new version (http://www.reduktion.ch/index.php?id=Sub&subid=Midi), that hopefully reduces the delay between sound and picture. I also replaced the mp3 file with a low quality aif, since minim seems to have problems looping mp3s (or is it my mp3 encoder).

I didnt’t try to fix the vanishing of the lines. It’s the P3D renderer, I suppose.

Page Index Toggle Pages: 1