All Projects → victorqribeiro → Radio

victorqribeiro / Radio

Licence: mit
A simple javascript web radio visualizer

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Radio

JetTunes-Desktop-Music-Player
Material design music player made with javafx
Stars: ✭ 36 (-55%)
Mutual labels:  audio-visualizer, audio-player
Audiomotion.js
High-resolution real-time spectrum analyzer and music player using Web Audio and Canvas APIs.
Stars: ✭ 177 (+121.25%)
Mutual labels:  audio-visualizer, audio-player
Waveform Playlist
Multitrack Web Audio editor and player with canvas waveform preview. Set cues, fades and shift multiple tracks in time. Record audio tracks or provide audio annotations. Export your mix to AudioBuffer or WAV! Project inspired by Audacity.
Stars: ✭ 919 (+1048.75%)
Mutual labels:  audio-visualizer, audio-player
songturtle
🐢 Play, slow down, and loop sections of audio files in the browser 🐢
Stars: ✭ 26 (-67.5%)
Mutual labels:  audio-visualizer, audio-player
RecPlayer-iOS
A simple iOS application that records audio and plays it back. (+some animations)
Stars: ✭ 21 (-73.75%)
Mutual labels:  audio-visualizer, audio-player
Xr3player
🎧 🎼 Advanced JavaFX Media Player
Stars: ✭ 472 (+490%)
Mutual labels:  audio-visualizer, audio-player
Play
Play audio files from terminal.
Stars: ✭ 12 (-85%)
Mutual labels:  audio-visualizer, audio-player
Libanimation Old
Wobbly windows and animations logic split out from Compiz
Stars: ✭ 65 (-18.75%)
Mutual labels:  animations
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+1375%)
Mutual labels:  animations
Androidanimationinterpolator
Based on Article: https://blog.mindorks.com/understanding-interpolators-in-android-ce4e8d1d71cd
Stars: ✭ 65 (-18.75%)
Mutual labels:  animations
React Typist
Typing animations with React
Stars: ✭ 1,092 (+1265%)
Mutual labels:  animations
Flutter swipe action cell
A flutter UI package provides ListView leading and trailing swipe action menu.
Stars: ✭ 65 (-18.75%)
Mutual labels:  animations
Highway
Highway - A Modern Javascript Transitions Manager
Stars: ✭ 1,185 (+1381.25%)
Mutual labels:  animations
Fountain Of Colors
Music visualizer for Rainmeter
Stars: ✭ 65 (-18.75%)
Mutual labels:  audio-visualizer
Photoviewslider
📷 A simple photo browser for Android applications.
Stars: ✭ 78 (-2.5%)
Mutual labels:  animations
React Native Spline Interpolate
Spline interpolation for React Native animations
Stars: ✭ 65 (-18.75%)
Mutual labels:  animations
Abmediaview
Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.
Stars: ✭ 79 (-1.25%)
Mutual labels:  audio-player
Ease
It's magic.
Stars: ✭ 1,213 (+1416.25%)
Mutual labels:  animations
Bibleify Desktop
🖥️Simple & fast bible app with dramatized audio built with Electron, React, Rematch & Realm
Stars: ✭ 70 (-12.5%)
Mutual labels:  audio-player
Vanta
Animated 3D backgrounds for your website
Stars: ✭ 1,162 (+1352.5%)
Mutual labels:  animations

Web Radio - Visualizer

groupImg

A simple javascript web radio (visualizer).

Listen here.

About

This repo is a ongoing project that I've always wanted to do; some nice visualizations accompanied of good music. Growing up playing with computers I always loved demo scenes and this is nothing but a homage to that era.

Radios

BoxUK

Classic Rock Florida

Do you have a web radio? Join the project!

How to contribute an animation

Before submitting a animation, think about how it will look on many devices (mobile, desktop, tablet...) and account for it. If you need to make a multiplication or division, think about if you have to do it every frame or just one time; if just one time, do it on the constructor method, instead of doing it everytime on the show method.

There are a set of varibles pre defined to draw.

  • c - The canvas context where you will be drawing
  • radio.analyser.fftSize - Sets how much data you want from the audio
  • radio.data - Array that contains the audio's frequency (fft) to interact with
  • w - Screen's width
  • w2 - Half of screen's width - center of screen in the x axis
  • h - Screen's height
  • h2 - Half of screen's height - center of screen in the y axis

Update: since I added the WebGL support, you now have to define what kind of context your animation needs - 2d or webgl.

This is the template for a animation class, you must implement the show method. Feel free to create any other auxiliary methods.

class Animation {

  constructor(){
  
  }
  
  show(){
  
  }

}

Inside the constructor you should define the size of the radio.analyser.fftSize. The value must be a power of 2 and between 32 and 2048. This is how much data you want from the audio, to create your animation. The result of the analyse will be stored in the radio.data attribute. If you choose a fftSize of 32, result.data will have a lenght of 32. You can read more about it here.

So, you constructor now will look like this:

constructor() {
  this.context = '2d'; // or 'webgl' if you want to write a shader animation.
  radio.analyser.fftSize = 32;
  radio.update(); // very import to call update after altering a radio's attribue.
}

That's all you need to get the data you want to draw with. After that, just make your animation at the show method. Don't forget to clear the canvas right at the beggining of the method, otherwise it will draw on top of the last screen (you can use that to create cool effects, if you want).

show(){

  c.clearRect(0,0,w,h); /* clear the screen, from (0,0) to (w,h) */
  
  for(let i = 0; i < radio.data.length; i++){
    /* draw n boxes increment it's x position by 20 */
    /* with their height defined by the radio.data[i] */
    c.fillRect( 20 * i, h2 , 10, radio.data[i] );
  }
}

If you need to update any aspect of your animation, I suggest creating a update method in your Animation class and calling it at the end of your show method

update() {
  //update code goes here 
}

show() {
  //animation code goes here
  this.update();
}

If you take a look at the other Animations you'll see it's pretty simple to implement your own. After you submit your animation, I'll add it to the main script, where it will be called along with the others. Right now they each got a 7 seconds screen time before a new one is called.

To Do

Add more stations - I'll maybe add a option for anyone add their own stations ou audio - but the visualization part is the important one in this project

Add more visualizations - Like old school demo scenes, winamp plugins (rember those?)...

Add support to webgl - I don't know how to program shaders, but as soon as someone submit one, I'll add support to it. Each Animation class should have a context attribute, specifying the context it should be rendered.

Migrate it to its own server with its own domain

Thanks

Eric Andersson - https://github.com/andeeric
BigWings - https://www.shadertoy.com/view/MdfBRX

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].