Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 

Cinder-Beat

a implementation of ofxBeat in Cinder.

Description

This repository is the block that has ported ofxBeat to Cinder.

Install

Download or check out this repository into your Cinder/blocks directory, then use Tinderbox to create a new project using Beat.

Usage

Include the header and create instance of BeatRef in your .cpp file:

#include "Beat.hpp"
class BeatTemplateApp : public App {
  public:
	void setup() override;
	void mouseDown( MouseEvent event ) override;
	void update() override;
	void draw() override;
    
    BeatRef mBeat;
};

Create and setup at setup():

void BeatTemplateApp::setup()
{
    mBeat = Beat::create();
    mBeat->setup();
}

Call update method at update():

void BeatTemplateApp::update()
{
    mBeat->update(getElapsedSeconds() * 0.001f);
}

Then you're ready to get Kick, Snare or Hihat:

float kick = mBeat->getKick();
float snare = mBeat->getSnare();
float hihat = mBeat->getHihat();

You can also get Volume using getVolume():

float volume = mBeat->getVolume();

About

an implementation of ofxBeat in Cinder.

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages