<commit_before>//
//  Generator.h
//  Tonic
//
//  Created by <NAME> on 1/23/13.
//
//

/*+++++++++++++++++++++ License ++++++++++++++++++++

Use this code for whatever you want. There are NO 
RESTRICTIONS WHATSOVER. Modify it, repackage it, 
sell it, get rich from it, whatever. Go crazy. If 
you want to make mehappy, contribute to this 
project, but feel free to just use the code as a 
starting point for whatever you like.

Note that Tonic is heavily indebted to STK
https://ccrma.stanford.edu/software/stk/

++++++++++++++++++++++++++++++++++++++++++++++++++*/

#ifndef __Tonic__Generator__
#define __Tonic__Generator__

#include <iostream>
#include "TonicFrames.h"

namespace Tonic {

  namespace Tonic_{

    class Generator_{
      
    public:
      Generator_();
      virtual ~Generator_();
      
      virtual void tick( TonicFrames& frames, const SynthesisContext_ &context );
      
      // override point for defining generator behavior
      // subclasses should implment to fill frames with new data
      virtual void computeSynthesisBlock( const SynthesisContext_ &context ) = 0;
      
      // mutex for swapping inputs, etc
      void lockMutex();
      void unlockMutex();
      
      
      // set stereo/mono - changes number of channels in synthesisBlock_
      void setIsStereo( bool stereo );
      inline bool isStereo(){ return stereo_; };
      
    protected:
      
      bool            stereo_;
      TonicFrames     synthesisBlock_;<commit_msg>computeSynthesisBlock should be a protected member<commit_after>//
//  Generator.h
//  Tonic
//
//  Created by <NAME> on 1/23/13.
//
//

/*+++++++++++++++++++++ License ++++++++++++++++++++

Use this code for whatever you want. There are NO 
RESTRICTIONS WHATSOVER. Modify it, repackage it, 
sell it, get rich from it, whatever. Go crazy. If 
you want to make mehappy, contribute to this 
project, but feel free to just use the code as a 
starting point for whatever you like.

Note that Tonic is heavily indebted to STK
https://ccrma.stanford.edu/software/stk/

++++++++++++++++++++++++++++++++++++++++++++++++++*/

#ifndef __Tonic__Generator__
#define __Tonic__Generator__

#include <iostream>
#include "TonicFrames.h"

namespace Tonic {

  namespace Tonic_{

    class Generator_{
      
    public:
      Generator_();
      virtual ~Generator_();
      
      virtual void tick( TonicFrames& frames, const SynthesisContext_ &context );
      
      // mutex for swapping inputs, etc
      void lockMutex();
      void unlockMutex();
      
      
      // set stereo/mono - changes number of channels in synthesisBlock_
      void setIsStereo( bool stereo );
      inline bool isStereo(){ return stereo_; };
      
    protected:
      
      // override point for defining generator behavior
      // subclasses should implment to fill frames with new data
      virtual void computeSynthesisBlock( const SynthesisContext_ &context ) = 0;
      
      bool            stereo_;
      TonicFrames     synthesisBlock_;
{'fraction_non_alphanumeric': 0.13111480865224626, 'fraction_numerical': 0.003993344425956739, 'mean_word_length': 2.7669172932330826, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7282228', 'n_tokens_mistral': 906, 'n_tokens_neox': 824, 'n_words': 300}