Giter Site home page Giter Site logo

mrblueblue / moodmusic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zfisch/moodmusic

0.0 2.0 0.0 266 KB

Natural Language Processing that turns messages into music and visuals.

Home Page: http://moodmusic.io

License: MIT License

JavaScript 90.18% HTML 1.62% CSS 8.20%

moodmusic's Introduction

Mood Music

###Turning the Twitter stream into music.

Mood Music uses the excellent Sentiment Library by Anrew Sliwinski and the Web Audio API to generate music and color based on the Twitter stream.

Running Locally

To get started, you must first register your own Twitter application and create a config.js with your API keys. See config.example.js for more details.

After having set up your API keys, you can grab the needed dependencies:

npm install

And then serve the application:

nvm use iojs
node app.js

Go to 127.0.0.1:3000 in your browser to see the app in action!

App Structure

├── app.js                         # Express server
├── server.js                      # Server entry point file
├── public/                        # Static files to be served
└── client/                        # Application source
    ├── index.js                   # Client entry point    
    ├── components/                # React components folder
    │   └── App.jsx                # Main React component
    ├── utils/                     # Utility funcitons
    │   └── createAudioContext.js  # Wraps component in AudioContext component
    └── config/                    # Configuration files
        ├── colors.js              # Configs for colors
        └── music.js               # Configs for notes, frequencies, etc.

React Client

The main React component is App.jsx. Instead of using mixins, the component is wrapped in a higher-order component that passes down the HTML5 Audio context and methods. This is done in the createAudioContext function.

io.js Server

Server code is written in ES6 and is run by io.js. Mainly, I just wanted to use destructuring 😃.

moodmusic's People

Contributors

mrblueblue avatar zfisch avatar

Watchers

 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.