Code Monkey home page Code Monkey logo

live_visual's Introduction

Live Visual

Meta-programmable 3D (OpenGL) waveform visualizer written on top of ruby-processing. This should run anywhere JRuby does (including Windows), though I haven't actually tested it on anything but OSX and Linux.

Currently, I'm borrowing bits of the AsynchronousObject class and camera placement algorithms from Preston Lee's awesome ruby-processing Starfield simulation:

https://github.com/preston/Starfield

Reqirements:

  • ruby-processing gem
  • functioning opengl (glxgears working in Linux)
  • Soundflower or similar audio redirection software to work with audio other than Line-In

Requirements for Xbox360-controlled camera:

  • the latest procontroll Java library (installed wherever your ruby-processing gem lives): http://creativecomputing.cc/p5libs/procontroll/
  • newer version of libjinput-osx.jnilib for OSX support (included in this repo to save you the time I spent making this work)
  • working Xbox360 controller driver (OSX 10.8 instructions coming soon, since this was a giant PITA)

Controls:

  • movement: standard FPS controls on the 360 controller, L/R trigger for "barrell roll" motion
  • reset camera: A button on 360 controller

This is experimental code, and not a fully working application. It is intented to be run inside a ruby console with 'rp5 live', and doesn't actually "do" anything unless you actively create an object and add it to the drawing stack like so:

rp5 live live_visual.rb

irb(main):001:0> l = WaveformLine.new

irb(main):002:0> $app.drawings << l

You can make the waveform line repeat into the distance in 3D space:

irb(main):002:0> l.repeat = 32

irb(main):003:0> l.spacing = 120

Make the line multicolored:

irb(main):004:0> l.multicolor = true

You can also change the color scheme:

irb(main):004:0> l.color = [0,0,255]

irb(main):005:0> l.color_thresholds = {0=>[0, 0, 150], 10=>[0, 0, 255], 30=>[0, 95, 255], 60=>[0, 165, 255], 90=>[0, 255, 255], 120=>[255, 255, 255]}

live_visual's People

Contributors

10dot avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.