Rythm.js icon indicating copy to clipboard operation
Rythm.js copied to clipboard

Downloading Library

Open JustinDCole opened this issue 4 years ago • 3 comments

Hello,

I'm struggling to download this library. I'm trying to create a audio visualizer that's reactive to sound and lights up certain colors like a LED strip onto a set of squares in a div element that I wrote in my HTML script.

What's the best way to download Rhythm for it to work successfully?

//////////////

February 3, 2021

I keep launching my file on the Live Server. I check console log, and I keep seeing the error Rythm is not a constructor, even though I've uploaded the library half a dozen times. What's wrong?

Here's the repo (If it's not the first thing that pops up, then it's a branch named "rythm.js"): https://github.com/JustinDCole/UpdatedAudioVisualizer/blob/rhythm.js/Microphone.js

**I'm not uploading a song or audio file. I want to use the audio the audioContext processes from the microphone in the computer.

//////////////////////////////

I changed the error previously, just didn't update it on Github. Its spelled Rythm, and it's still coming up as an error. I also tried window.Rythm.

JustinDCole avatar Jan 31 '21 14:01 JustinDCole

Hello @JustinDCole ! As stated in the getting started part of the doc you have two main way to use Rythm.js

If you are using either npm or yarn and ES6 Modules

  • install the dependency (with npm i or yarn add)
  • then in your javascript file use import Rythm from 'rythm.js' to get the lib.

If you are using plain javascript and HTML

  • Add the according javascript script tag using one of the CDN that host the library :
 <script type="text/javascript" src="https://unpkg.com/rythm.js/rythm.js"></script>
  • Then you can use rythm like this in your javascript file :
var rythm = new Rythm()
rythm.setMusic('path/to/sample.mp3')
rythm.start()

Hope it helps !

Okazari avatar Feb 01 '21 08:02 Okazari

Hello,

I'm struggling to download this library. I'm trying to create a audio visualizer that's reactive to sound and lights up certain colors like a LED strip onto a set of squares in a div element that I wrote in my HTML script.

What's the best way to download Rhythm for it to work successfully?

JustinDCole avatar Feb 03 '21 16:02 JustinDCole

Hello Justin, you are just misspelling the library name Rythm with the english correct spelling Rhythm https://github.com/JustinDCole/UpdatedAudioVisualizer/blob/rhythm.js/Rhythm.js#L5

You should use new Rythm() and it should work as expected :+1:

Okazari avatar Feb 03 '21 16:02 Okazari

Closing since there is no activity

Okazari avatar Apr 11 '23 07:04 Okazari