Sunday, January 15, 2012

Project Visual: Summary and remaining reports

Since the last post we have been very busy. The plugin system itself is working, loading and managing plugins nicely, but apart from that we have also integrated OpenGL through OpenTK. This means it is now possible to draw anything using OpenGL and it will be displayed on a canvas in Stoffi. We did run in to some technical difficulties with loading plugins at first, and when that was done we had some problems getting the plugin assembly to draw.

What was Project Visual
Project Visual set out to become a plugin based visualizer for Stoffi. We wanted anyone with C# skills to be able to make a visualizer.

OpenGL was desired due to being platform independent. There were several ideas for future development as well, but this was at the heart of it. Visualizers can be fun, but why not give the creativity to you, the user?

During the development of Project Visual the focus slightly changed from being just on a plugin based visualizer to being on a plugin system that could be used to make it possible to develop plugins for other parts of Stoffi as well.

Though we have succeeded in both making a general plugin system which in the future might mean that users can code their own parts of Stoffi, the visualizer is perhaps not as fancy as i set out to make it.

Here is where you will find the visualizer in Stoffi.

Making a Visualizer
Anyonw who wants to code a visualizer could do so with the current system. All you have to do is create a C# project, hook it up to a provided DLL, inherit class in said DLL and just implement a Refresh function. In this function it is now possible to draw anything using OpenGL, and it will be displayed on a canvas. But what is a visualizer if it's just pretty images? Shouldn't it move to the music? Indeed it should, which is why we provide the raw FFT data. Though not filtered in any way, this 1024 array of floats is a good base for building a visualizer. You could indeed code your own filters for this data as well.
When a visualizer is done it just have to be packaged into an SPP (Stoffi Plugin Package) file and either put in the plugin folder or dragged into Stoffi, and it will be loaded.

Just look how pretty it is.
(Please note that this was whipped together in a matter
of minutes with limited previous knowledge of OpenGL.)

The Future
At present it is only possible to get FFT data when playing local files, and not for YouTube. This is because they are not played in the same way. We consider this high priority and more of an issue compared to other future features.

There are several interesting ideas for the future of this feature. Of course you can probably look forward to being able to program other kinds of plugins in the future, but the visualizer alone holds some interesting future possibilities.

First of all the visualizer system should provide some functions which will enable you to make basic, but interesting, visualizers without being a C# or openGL guru. Second, it should provide some nice filters for the data. The idea is that we want to make it simple for as many as possible to make cool visualizers.

There are some interesting possibilities in making interactivity possible. Imagine being able to play a game inside Stoffi, or make your own music based game, with the comparatively easy to use tools provided. This also brings up the future idea of looking ahead in the data. This will mean analyzing a song ahead of time, which should bring interesting possibilities not only to interactive visualizers, but to visualizers in general.