Skip to content

A beat reactive music visualizer that's based around the Julia set fractal.

Notifications You must be signed in to change notification settings

Spudd86/julia-vis

Repository files navigation

A Music Visualizer
------------------

A beat reactive visualizer that's based around the Julia set fractal.

## Compiling

Standard autotools build. From a fresh checkout

	./autogen.sh
	./configure
	make

### Pre-requisites

On windows you will need mingw or mingw-w64 and msys or msys2, it's 
been a long time since I've built on Windows so it may be broken. The 
likely best choice is mingw-w64 and msys2, which I think get's you a
package manager to help install thre prerequisites

Everywhere you will need to have installed and findable by `pkg-config`
SDL 1.2 and one of the supported audio libraries.

On Linux I recommend building against pulseaudio, on Windows you will need the portaudio library.

You will also need autotools installed.

### Setting up on Windows

 1. Install msys2
 2. Open an msys2 terminal
 3. install needed packages.
	pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-SDL mingw-w64-ucrt-x86_64-portaudio
	pacman -S pkgconf make autotools
   a. Optional, install gstreamer just in case you can't get the sdl version to capture audio
	pacman -S mingw-w64-ucrt-x86_64-gstreamer mingw-w64-gst-plugins-bad mingw-w64-gst-plugins-base mingw-w64-gst-plugins-good mingw-w64-gst-plugins-ugly
 4. navigate in the terminal to the directory where you have the source code, or just clone from git in the msys terminal
	git clone https://github.com/Spudd86/julia-vis.git
	cd julia-vis
 5. compile and run
	MSYSTEM=UCRT64 /bin/bash -l
	NOCONFIGURE=1 ./autogen.sh
	./configure --host=mingw-w64-ucrt-x86_64
	make
	bin/sdl-test -w 1024
   a. If that doesn't capture audio usefully and you installed GStreamer
	./configure --host=mingw-w64-ucrt-x86_64 --enable-gst
	make
	./demo-gst.sh


### Setting up on Linux

Install the needed development packages, on Debian/Ubuntu:
	sudo apt install gcc autotools-dev libpulse-dev libsdl1.2-dev

## Notes

Parts of this codebase have been heavily optimized, some of that optimization was done a decade ago, so it may or may not matter for modern
systems. It was also originally written to run as fast as possible on a computer that was old in 2008. Other parts were written as an 
experiment, not all of it was ever cleaned up.

There are known bugs, the pulseaudio part crashes on shutdown, I have no idea why, it didn't used to do that and I haven't changed it, nor
can I work out what I'm doing wrong, but since it only goes wrong when the program is already shutting down it's low priority.

There is also a bug in the new span based osciliscope renderer, sometimes it makes a big rectangle where it shouldn't, this is high priority
to fix before I start working on the acceleration structure that will hopefully actually make this new one faster than the old one, at
least on a multicore machine.

And probably more I've forgotten about, and others I don't know about.

Note:

src/opengl/glx_gen.{c,h}
was generated with glGenLoad like this:
	lua  LoadGen.lua gen -style pointer_c -spec=glX -ext OML_sync_control -ext ARB_create_context -ext EXT_swap_control -ext SGI_swap_control


src/opengl/glx_gen.{c,h}
was generated with glGenLoad like this:
	lua  LoadGen.lua 14 -style pointer_c -spec=gl -version 1.4 -extfile <filename>

where <filename> names a file with these contents:
ARB_vertex_buffer_object
ARB_debug_output
EXT_framebuffer_object
ARB_framebuffer_object
ARB_shading_language_100
ARB_shader_objects
ARB_vertex_shader
ARB_vertex_program
ARB_fragment_shader
ARB_pixel_buffer_object
ARB_texture_rg

for opengl 1.3 we would need these extenions
ARB_texture_mirrored_repeat
ARB_window_pos
EXT_blend_color
EXT_blend_minmax
EXT_blend_subtract

glBlendEquation went in in 1.1

About

A beat reactive music visualizer that's based around the Julia set fractal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published