Giter Site home page Giter Site logo

danielguardado / visual-journey Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 27.53 MB

An audio visualizer app that provides a 3d environment for users to experience their music in.

Home Page: http://visualjourney.io/

HTML 10.01% JavaScript 81.20% CSS 8.79%
audio visuals music mp3 webpack

visual-journey's Introduction

Visual-Journey

Demo

Background and Overview

Wouldn't it be great to experience your music in a completely different way? Visuals and music go hand in hand, Visual Journey is a 3d audio visualizer that will be made using THREE.js, using the frequency information from an mp3 to generate unique patterns based on the mp3 being played.

Functionality and MVPs

  • Users will have a modal with instruction on how to use the app
  • Users will have the ability to select a demo mp3 file.
  • Users will have the ability to select any mp3 file from their machine.
  • Users will have visuals generated based on the mp3 file they have chosen.

Wireframe

Wireframe

Technology

  • THREE.js a js library and api in order to create and display 3d graphics using WebGL.
  • Web Audio Api to control textures based on music playing.
  • CSS
  • HTML
  • Webpack

Architechture

  • /dist
  • /src
    • music
      • demoMusic.mp3
    • models
      • model1
      • model2
    • index.js
    • /js
      • darkmode.js
      • geometry.js
      • sound.js
      • util.js
      • colors.js
      • index.js
      • modal.js
    • /scss
  • Index.html
  • .gitignore
  • node_modules
  • package.json
  • package.lock.json
  • postcss.config.js
  • README.md
  • webpack.common.js
  • webpack.dev.js
  • webpack.prod.js

Implementation Timeline

  • Research and Getting environment set up, creating Three.js scene (8/17/2020)
  • Start showing some visuals and graphics in the scene (8/18/2020)
  • Start Implementing Audio into scene. (8/19/2020)

Code

Web Audio API

  • Implemented an audio data analyzer using JavaScript’s web audio API in order to receive an array of all the audio frequencies. Developed algorithms to separate the frequencies into 1/4ths and then calculate the average frequency at each point in time to generate real time modulations, rotations and distortions of objects in three.js.
analyser.getByteFrequencyData(dataArray);
//spliting the data array into 2 pieces upper half and lower half
const lowerHalf = dataArray.slice(0, dataArray.length / 2);
const upperHalf = dataArray.slice(dataArray.length / 2 + 1, dataArray.length);
//creating subsections of 1/4 for sound frequencies
const lowerHalfFreq = lowerHalf.slice(0, lowerHalf.length / 2);
const lowerUpperHalfFreq = lowerHalf.slice(
  lowerHalf.length / 2,
  lowerHalf.length
);
const upperLowerFreqHalf = upperHalf.slice(0, upperHalf.length / 2);
const upperUpperFreqHalf = upperHalf.slice(
  upperHalf.length / 2 + 1,
  upperHalf.length
);

Color/Dark Mode

  • Constructed a dynamic dark/color mode feature implementing DOM manipulation to change the styles on certain elements when the user interacts with the Dark Mode/Color Mode button.
const darkMode = dark.addEventListener("click", () => {
  background.style.background = "black";
  dark.style.display = "none";
  color.style.display = "block";
  li.forEach((el) => {
    el.style.color = "white";
  });
  music.style.color = "white";
  instructions.style.color = "white";
  instructions.style.border = "3px solid white";
});

const colorMode = color.addEventListener("click", () => {
  background.style.background =
    "linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab)";
  dark.style.display = "block";
  color.style.display = "none";
  li.forEach((el) => {
    el.style.color = "black";
  });
  music.style.color = "black";
  instructions.style.color = "black";
  instructions.style.border = "3px solid black";
});

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.