Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Can a single class be a collection of other classes/objects?

$
0
0

@arif wrote:

Hello,

I'm thinking about creating a synthesizer, where I want to layer together 3 different oscillators to produce one sound. Easy enough, have a class for each type of oscillator, and then in the ofApp::setup initiate the oscillator objects and sum them together in ofApp::audioOut - but this would only produce a monophonic synth. Only one 'voice' (of 3 oscillators) can be played at a time.

Can I then turn that into its own class named Voice that calls upon the 3 oscillator classes? so that I can have multiple instances of 3-Oscillator voice? If so, how do I do that?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles