Code Monkey home page Code Monkey logo

conjure's Introduction

conjure

Live

Conjure is a dynamic audio visualizer. Conjure utilizes the JavaScript Processing library, p5.js standard, sound, and dom libraries.

This project was created within the timeframe of a week, and I fully expect to be implementing more features and improvements over time.

Features

  • Users are able to play their own audio files, or demo the preloaded audio
  • Visual aspects can be modified through various slider inputs
  • A intuitive UI and pleasing experience allow users to start without issue
  • Press 'o' when the application is loaded for a secret song

Playing local audio

The preloaded audio can be played by pressing the spacebar, or local audio files can be loaded through the file input at the top left corner of the application.

Upon successful loading, the playback and visualization starts immediately. Loading other files while playback and visualization are occuring will stop the current audio, and load the new file.

Dynamic Visualization

The visualization consists of frequency bars lining the top and bottom of the application and the "eye" in the center.

This was accomplished by analyzing the audio data in the p5 canvas, interpreting each frequency, and then mapping them each to a drawn component. Color is mapped to the the amplitude of the audio at any given time, and then redrawn at each frame.

  for (i = 0; i < halos; i++) {
    rotate(4 * PI / halos);

    // Draw lines
    strokeWeight(1);

    stroke(halosColor);

    line(mapBass, bassRadius * 0.75 / 2, 0, bassRadius * 0.75);

    stroke(255, 255, 255);
    line(mapMid, midRadius / 2, 0, midRadius);

    stroke(halosColor);

    line(mapTreble, trebleRadius * 1.2 / 2, 0, trebleRadius * 1.2);

    // Draw points
    strokeWeight(2);
    stroke(255, 255, 255);

    point(mapBass, bassRadius * 1.5);
    point(mapMid, midRadius * 1.6);
    point(mapMid, midRadius * 1.4);
    point(mapTreble, trebleRadius * 0.9);
  }

Although numerous other libraries could have been used for this project, p5.js was ultimately chosen for its ease of use and robust processing ability.

Design

Conjure was designed with the user experience in mind. This means a clean, clutter-free interface that anyone would enjoy using. Considering the timeframe in which the project was created, I focused primarily on the core features and the styling of these visual components and features sequentially.

Technologies

Conjure is a project intended as a portfolio piece to be built in a relatively short timeframe. Because of this, technologies that are readily available were chosen in favor.

p5.js was chosen for its robust dom and sound libraries - used to create a consistent codebase. Readily available functions such as map, analyze, and the crucial fft object were paramount in analyzing and mapping audio signals to variables such as color, radius, height, and width.

Possible future features

  • Smoother color intensity transitions and controls
  • More color palettes
  • SoundCloud and Spotify integration

conjure's People

Contributors

frnklnchng 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.