Skip to content
an implementation of ofxBeat in Cinder.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
include
samples/Basic
src
README.md
cinderblock.xml

README.md

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();
You can’t perform that action at this time.