Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Enclosing several audio objects in one library

  1. #1
    Junior Member
    Join Date
    Sep 2019

    Enclosing several audio objects in one library


    My first post here, but I will introduce myself below question:

    How to enclose several synth objects in one class? It would be handy for constructing polysynths.

    And now introduction: I was interested with synths since 2008 (I was 13), and I always dreamed about building my own synth. This dream came true this year with PhatOne - fully analog synthesizer based on AS33xx series chips. Sounds very fat, and sometimes thin - better than I imagined. There is only one problem - tuning VCOs is good enough, but I want to design something easier to build.

    Last time I learned about Teensy board and it's audio capabilities. I decided to incorporate it into my project of synth, which I will design now, as I received teensy 3.2 and 4.0 boards.

    I must say that they are awesome and maybe they will become my basic devboards, instead Arduinos.

    Hope you'll like me on this forum

  2. #2
    Senior Member
    Join Date
    Feb 2015
    I have done something like this as members of a class:

    OscillatorTypeGoesHere *oscs[NUM_VOICES] = { &osc1, &osc2, &osc3, &osc4 };
    AudioEffectEnvelope *envelopes[NUM_VOICES] = { &env1, &env2, &env3, &env4 };
    Where osc1-4 and env1-4 come from the GUI tool. This allows you to iterate through all of your oscillators and envelopes and do any needed checks/updates, like so:

    void setAttack(float A_) {
                A = A_;
                for(int i=0; i<NUM_VOICES; i++) {
    Hope that helps, good luck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts