chrishowie.com

OpenVP

Yet another monolithic update

by Chris on Sep.02, 2009, under Computer, Games, OpenVP, Personal

I need to get into the habit of blogging more often. I haven’t even been twittering much lately…

You’ve probably noticed the visual update to my blog by now. I got tired of the default Wordpress theme. I had to tweak this one a bit to get it to behave the way I want, but overall it’s pretty nice. A few weeks ago I added the live chat widget as well, which so far has attracted comments from exactly two people. Come on, I know there’s more of you out there!

My new job is going well. The current project I’m working on is a migration script to fix some datetimes that may have been incorrectly converted to GMT. If you’ve done any programming around timezone conversions, you’ll know it’s a blast! … Ok, it’s not that bad. It’s actually kind of fun, in a weird way.

On the “my projects” front, I’ve converted the OpenVP Subversion repository to two separate Git repositories, and created a third for the metadata pipeline project. Check them out on Gitorious.

I’ve started playing Black & White on my lunch break. The voice acting is a little iffy, but the gameplay is good after you figure out what you’re doing. (Which, ironically, doesn’t happen until you leave the tutorial island.) Oh, and I got the Metroid Prime Trilogy for Wii. I’ve only played the first on GameCube, but absolutely loved it. Can’t wait to tackle the two sequels.

That’s all for now.

5 Comments more...

Git and Banshee.OpenVP fun

by Chris on May.07, 2009, under Banshee, C#, Computer, OpenVP, Programming

Well it’s hacking season again. With GNOME’s switch from Subversion to Git complete, which means Banshee now uses Git too, it gave me an excuse to finally learn it. This was not fun. But having toughed it out, I can definitely say that I love it.

Now that Banshee is using Git, Aaron is starting work on a branch off of the 1.4 series to incorporate my visualization patch. Wielding my new Git tool belt, I was off and hacking. Taking Gabriel’s branch allowing replacement of source widgets, I rebased that from master to stable-vis, fixed the merge conflicts, and started hacking away at Banshee.OpenVP. Unfortunately, not all the pieces I needed were there yet. So I added them and pushed them up to Gitorious. Neat.

Now Banshee.OpenVP looks like this:

14 Comments more...

More visualizations

by Chris on Jan.29, 2009, under Banshee, OpenVP

I spent some of Tuesday porting some of my older OpenVP visualizations from XML-serialized scripted effect presets to “real” preset classes, and committed them to Banshee.OpenVP. The results:

10 Comments more...

Finished visualization pipeline

by Chris on Jan.21, 2009, under Banshee, C#, OpenVP

Hopefully, anyway.

I spent some time this last week (probably over 15 hours total) giving the Banshee visualization pipeline another overhaul. In the process of doing this I finally filed a bug I found in the spectrum GStreamer element that I’ve been trying to work around for a long time.

Even though Sebastian was able to fix this specific bug, another crept up, which he did fix, but it became apparent to me that using the spectrum element was the wrong approach. I won’t go into too many details, but it made disabling and re-enabling the pipeline incredibly tricky and required a buffer of spectrum slices that had to be synchronized with a mutex since it was being accessed by three threads.

Sebastian gave me some pointers on using libgstfft directly, and this has reduced the amount of code required to do spectrum analysis while making it less laggy and less of a hack.

I’m told this patch (and possibly Banshee.OpenVP) will be going into Banshee 1.6. Sweet.

Mandatory screen shot of the new code and of the new Voiceprint visualization in Banshee.OpenVP:

Update 2009-01-22: I had to revise the patch to fix a segfault caused by a race and to eliminate some timing issues with thawing synchronization. The link to the patch has been updated.

3 Comments more...

Christmas break plans

by Chris on Dec.19, 2008, under Computer, OpenVP, Personal

It’s that time of the year again… when I get to relax after completing finals. It looks like I’m going to pass everything too, which is a pretty big deal since I literally cannot fail any class I’m enrolled in and still graduate in May. So now that I have some time to myself, here’s what I plan to do:

  • Prototype a web application for a Moodle-based tutoring system that I’ve been developing for my university. This really isn’t “me stuff” but I enjoy a good PHP+JavaScript+AJAX coding session.
  • Try to work some more on OpenVP. I recently looked at some of the old visualizations I wrote for Winamp 2’s Advanced Visualization Studio plugin. Wow… OpenVP has some ground to cover. My goal is to port some of my better visualizations (which are loads better than I remembered them being) to OpenVP for the very first release as part of Banshee.
  • Try this again and report the results to C.J..
  • Try the newest PulseAudio with the Flash 10 beta. Hopefully the problems I’ve been having were resolved by now.
  • Ship my defective laptop display back to the eBay seller for a replacement. According to him, having two defective pixels doesn’t qualify for a Dell warranty replacement (four are required — the ‘tards), but he is going to replace it with another from his stock. Seems like a nice guy. He’s got a store on eBay if you feel like browsing.
  • Probably some other stuff I forgot already.
2 Comments more...

More optimization

by Chris on Oct.10, 2008, under Banshee, C#, OpenVP

Not creative enough to think of a better title right now…

I just spent almost two hours hacking away at the Banshee visualization pipeline again and made one very important optimization: when the callback function is null (which happens when nobody in managed land is listening for visualization data) the visualization pipeline is effectively disabled. The only element that remains active is a queue, which provides a 5-second buffer so that visualization can be quickly resumed.

The patch is now over at GNOME’s Bugzilla, just waiting. Waiting for Aaron to commit it. Waiting for a chance to prove it’s all grown up now. Hoping to bring joy to audio enthusiasts all around the globe.

Yeah, I did watch Tommy Boy recently. … Why?

5 Comments more...

Optimizing the visualization pipeline

by Chris on Oct.09, 2008, under Banshee, C#, OpenVP

So apparently the visualization stuff in Banshee has been disabled since it’s a CPU hog. I don’t know why I didn’t notice it during testing (and I did check) but there seems to be a five-fold increase in CPU utilization with the visualization pipeline running. For me, this is an increase from 1-3% to 10-12% on dual-core 2.6GHz amd64.

After ruling out a few things I discovered the root cause. In OpenVP, PCM and spectrum data are represented as 32-bit floats, which means that the pipeline needs to convert whatever the audio format is into this one. Along the way it resamples the stream too, to provide a consistent frame rate of consistent-size slices. 512 samples 60 times per second is 30720 samples/sec. If anyone can show me a song found in the wild encoded at this rate I’ll give you… well, nothing, since I’m a college student and couldn’t afford to give you this pencil I have sitting on my desk.

Anywho, the conversion to float cannot be avoided but the resampling can be. By setting it to the more common 44100Hz sample rate CPU usage dropped to 4-6%. It’s pretty cheap to convert formats and throw duplicate data around, but interpolating data is a lot more expensive.

At some point the vis pipeline will be smart enough to split music into chunks of a size depending on the current sample rate. Until then this patch should be good enough. (I hope.)

Leave a Comment more...

Almost there

by Chris on Aug.24, 2008, under Banshee, C#, OpenVP

After a few hours of hacking using a wigdet that Michael and a few others pointed me at, I now have a working Banshee.OpenVP extension!

Much work still remains to be done, but what I have is a pretty stable foundation. Both the OpenVP 0.0.1 branch and Banshee.OpenVP are available over at the Google Code repo. They should both be stable enough to test, but since the build system isn’t in place yet I’m not asking the general public to try it out yet. But if you know your way around MD, autotools, and Banshee you might be able to get it working. (Please don’t ask for help with that part yet. If you get it working and hit a bug please let me know though.)

1 Comment more...

Ok, I guess not

by Chris on Aug.22, 2008, under Banshee, C#, OpenVP

Banshee.OpenVP is on hold indefinitely until a stable GTK+ widget providing an OpenGL context is available. All of the wrappers I have tried have serious issues that prevent this project from even making minimal headway.

2 Comments more...

Upcoming goodness

by Chris on Aug.21, 2008, under Banshee, C#, OpenVP

I’ve been working with several Banshee people this week and we finally got my patch committed. All this patch does is provide a managed event that acts as a PCM and spectrum data source. While simple, it is a required building block for the upcoming OpenVP extension.

Right now I am getting ready for the 0.0.1 release of OpenVP. The version number is intentionally scary; the API is far from stable and will be changing rapidly. The purpose of this release is to provide a stable target for the Banshee extension. Hopefully getting this in Banshee will generate interest in OpenVP, as well as giving Banshee some cool eye-candy. Everybody wins!

My understanding is that after OpenVP 0.0.1 is released and the Banshee.OpenVP extension is finished (it’s proof-of-concept quality right now) it will be absorbed into the Banshee source tree and maintained over there. Which means it will likely come with Banshee 1.4 by default. Awesome.

(Oh, and OpenVP has migrated from my personal Subversion repository over to its own Google Code project.)

1 Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact me so I can take care of it!

Links

Links to friends' blogs, and a few other sites of mine.