Giter Site home page Giter Site logo

ragnaringi / harpa-lights Goto Github PK

View Code? Open in Web Editor NEW

This project forked from owenhindley/harpa-lights

0.0 2.0 0.0 550.14 MB

A collection of games, audio visualisers and other adventures running on the lights of Harpa Concert Hall & Conference Center, Reykjavik, Iceland.

Processing 0.10% Java 0.06% JavaScript 20.33% CSS 0.16% HTML 21.11% GLSL 0.28% ApacheConf 0.01% PHP 0.01% Shell 21.80% Makefile 4.90% C++ 17.27% Groff 4.79% C 7.72% Assembly 1.44% Pure Data 0.07%

harpa-lights's Introduction

The Harpa Lights project

A collection of games, audio visualisers and other adventures for the lights of Harpa (http://harpa.is)

This repository builds on the work done for Harpa PONG+ (see the old repo here: https://github.com/owenhindley/harpapong).

Project development led by (Owen Hindley)

Project concept & production by Atli Bollason

What's in the repo?

This repo contains the following:

  • A Render server; takes input from the other modules & sends out DMX
  • A 'Screensaver' server for music-driven visualisers
  • A number of sound-reactive visualisers contributed by the team
  • A PONG game server
  • A Breakout game server (work in progress)
  • A Queue manager
  • A front-end site with a mobile paddle controller & instructional splash page

Currently everything is built for node v4+, running on OSX.

Windows users should be able to get up and running, but will have to go their own way when installing some of the more exotic node-modules and their dependencies, namely node-canvas / Cairo.

Why is it here?

Harpa is a public building in Reykjavík, Iceland, and it's the hope of the founders of this project that by publishing what we've done already open-source, it will enable and encourage more artists to get involved with the project and / or submit their own concepts for the lights of this landmark building. More information about calls for projects here.

Getting Started / Installation

Getting up & running with the repo depends on what you want to do. See below:

Creating a music-reactive visualiser

  • Either download the standalone visualiser here or this repository and open up /dev/visualiser-creator

  • Run npm install

  • To run the visualiser tester ( you could even call it a visualiser visualiser ) do the following :

    • If you have Grunt installed, use the included Gruntfile.js which will run an http-server on 127.0.0.1:8080. Instructions for installing grunt here
    • If you'd rather not, you can simply run an HTTP-server from within this folder and view index.html
  • Replace the included MP3 with one of your own if you wish.

  • By default, the audio will play, and the tempo counter will start.

  • Clone visualisers/HarpaTestVisualiser.js, look at how it works, and create your own.

  • We have two channels, normalised 1-0. 1 is volume, 2 is 'beat value', which will peak at 1 on every 'beat'.

  • This simulates the input from the audio analysis code, which will also include FFT data (documentation coming soon)

To Submit a Visualiser

If you have push access to the repository, then please just add your custom class to the dev/visualiser-server/visualisers/[cool name here]/ folder and email Owen to let him know it's up there.

Otherwise please just zip up the creator tool with your code working inside and send it across to Owen who will incorporate it in the final build!

Running the render-server

You'll only need to do this if you're actually doing an installation in Harpa and need to output DMX.

  • Download the repository
  • (OSX - install Homebrew [optional, but it's much simpler than installing things manually, see below])
  • Install Cairo & its dependencies here
  • run npm install inside the dev/render-server folder
  • open a web browser, go to 127.0.0.1:8088?method=getCanvas, and you should see the web debugging view, with the PONG logo running in the background + sparkles.

If you get to this point, it means the render server is up and running, great!

Blank windows? That's because the render server is set to 'Screensaver Mode' in the Scheduler. Check render-server/scheduler/Scheduler.js and ensure that this.times has one entry only - MODE_GAME. This class allows you to specify games, screensavers etc to run at different times.

In Game mode, you have two classes HarpaGameViewPong.js and HarpaScoreViewPong.js which maintain a pair of canvases for the large and small facades, respectively. You can go ahead and edit these classes to create your own games, see below.

In Screensaver mode, the render server listens to incoming low-level network connections from the visualiser-server, which happens via zero mq.

If you wanted, you could create another application (e.g. written in C++) that implemented the same zeromq interface to take the place of the visualiser server to extend the system further. Go crazy!

Creating a game for Harpa

The repository comes with two games - PONG and Breakout (all trademarks belong to their respective owners).

We've run PONG successfully on two occasions, Breakout has yet to be shown publicly.

If you want to create your own game, download the repository, examine game-server and queue-server, specifically how they transmit the canvas data back to the render-server, as this is what you'll need to emulate.

(more detailed instructions coming when I have time)

Project Credits

The story so far; thanks to all who've contributed:

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.