Giter VIP home page Giter VIP logo

audiovisualizer-surgery's Introduction

java processing3 licence MIT video FFMPEG

Audio Visualizer : Surgery

I needed some audio visualizer to present the actual waveform for my music videos. As I am not using a professional video editor which is capable with this kind of plugins, I did not find any simple and easy to use solution to have a little waveform like display.

So I decided to code my own to export as a video, which I can overlay on the cover with my video editor.

This is a 360 x 64 example.
Small example

This audio visualizer is called Surgery, because it looks a bit like a oscilliscope in a hospital. Maybe I am going to code some others.

Requirements

Instructions and notes

  • Use the configuration as below.
  • Hit ESC or close the window to stop.
  • It will autostop when the soundFile ended, but it will run as long the history waveform is nulled. This extra space leaves some room for smoother video editing.

Configuration

In this program you can configure some options to influence the video produced and to be auto-saved.

The code has at the beginning a configuration section. The options are described below and summarized in the code itself. Default values are included.

  • renderSize
    To specify the render size set the resolution in the setup() method. For HD I use 1280 x 64 and set it in the size() method like below. You can use any height, but a smaller stripe looks better. Unfortunately this can not be a variable like the others due to Processing limitation.
    size(1280, 64);

  • fps
    How many frames per second does your video have? 30 fps looks smooth, but you can also use more like 60 or 120.

  • soundFile
    Filename of the sound file from which the waveform should be displayed. For simple access, place in the data directory and give a name like "data/song.wav".

  • videoFile
    Filename of the the video file to be exported. It should be written into the data directory an look like "data/export.mp4".

  • margin
    Keep a margin from top and bottom of the rendered lines.

  • antiAlias
    When drawing the lines, they are smoothed by antiAlias value. 2 would affect a 2x2 blurring.

  • doMask
    When the cursor ran from left to right, a mask is applied, when doMask is true. To disable use false.

  • colorMask
    When the cursor ran from left to right, this mask value is evaluated when doMask is true. It can be used to apply a color filter. It is applied to RRGGBBAA where R=red, G=green, B=blue, A=alpha and every value is hex coded.

  • doBlur
    When the cursor ran from left to right, a blur is applied with the strength of blurStrength. This is only applied if the value is true. To disable set to false.

  • blurStrength
    Blur is applied, when the cursor ran from left to right and doBlur is true. The entire window will be smoothed by this blurStrength value. 2 would affect a 2x2 blurring.

  • drawCursor
    A line cursor will be drawn to show current position, only if the value is true. To disable set to false.

  • cursorColor
    Color of the line cursor. Will only be drawn if drawCursor is true.

  • lineColor
    Color of the waveform.

  • backgroundColor
    Color of the background.

audiovisualizer-surgery's People

Contributors

markuszeller avatar

Stargazers

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