ofxTonic

Tonic 音频合成库的 Open Frameworks Addon。Tonic 是一个高效的、纯 C++ 的修补工具,具有令人耳目一新的简洁语法。「Open Frameworks Addon for the Tonic audio synthesis Library. Tonic is an efficient, pure C++ patching tool with a refreshingly crisp and simple syntax.」

  • 所有者: TonicAudio/ofxTonic
  • 平台: iOS, Mac
  • 许可证: The Unlicense
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

ofxTonic

The Tonic audio synthesis Library, wrapped for openFrameworks. Tonic is a high performance, pure C++ audio patching tool with a refreshingly crisp and simple syntax.

For info on Tonic, see:
https://github.com/TonicAudio/Tonic

Watch a video tutorial at https://www.youtube.com/watch?v=ppf3b8BC6yU

The code contained in the src/ folder of this repository is copied directly from this commit in the main Tonic repository:
a2c2546ec9923ad79296b06e181a2b6fff69394d

Note: we are currently reviving and updating Tonic. We need to update the
examples here to make them work in openFrameworks 0.9.3.
We have tested this fork on XCode (OSX) and QtCreator (Linux) and the examples
were running fine:
https://github.com/jeonghopark/ofxTonic/tree/a292ea983b4f22f0e2e33c3b4d19b54ada7daf28
We will port back those changes soon.

Supported Platforms

XCode projects for now. Full PC, Linux support should be easy and arriving soon (hopefully), but hasn't been tested yet.

Example


// ofApp.h

#pragma once

#include "ofMain.h"
#include "ofxTonic.h"

using namespace Tonic;

class ofApp : public ofBaseApp{

    ofxTonicSynth synth;

public:
    void setup();
    void update();
    void draw();
    void audioRequested (float * output, int bufferSize, int nChannels);
};

// ofApp.cpp

#include "ofApp.h"

void ofApp::setup() {
    // set up a stereo output in oF
    ofSoundStreamSettings settings;
    settings.numOutputChannels = 2;
    settings.setOutListener(this);
    ofSoundStreamSetup(settings);

    // create a sine wave we'll use for some vibrato
    SineWave vibratoOsc = SineWave().freq(10);

    // plug that frequency generator into the frequency slot of the main audio-producing sine wave
    SineWave tone = SineWave().freq(400 + 20 * vibratoOsc);

    // set the synth's final output generator
    synth.setOutputGen( tone );
}

void ofApp::update() { }

void ofApp::draw() { }

void ofApp::audioRequested (float * output, int bufferSize, int nChannels) {
    synth.fillBufferOfFloats(output, bufferSize, nChannels);
}

主要指标

概览
名称与所有者TonicAudio/ofxTonic
主编程语言C++
编程语言C++ (语言数: 3)
平台iOS, Mac
许可证The Unlicense
所有者活动
创建于2013-06-28 00:11:29
推送于2016-03-30 18:23:46
最后一次提交2016-03-30 14:07:07
发布数0
用户参与
星数90
关注者数13
派生数20
提交数37
已启用问题?
问题数8
打开的问题数5
拉请求数5
打开的拉请求数1
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?