<commit_before>//
//  ControlStepper.h
//  Tonic 
//
//  Created by <NAME> on 3/25/13.
//  Copyright (c) 2013 <NAME>. All rights reserved.
//

/*+++++++++++++++++++++ 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__ControlStepper__
#define __Tonic__ControlStepper__

#include "ControlGenerator.h"

namespace Tonic {
  
  namespace Tonic_ {

    class ControlStepper_ : public ControlGenerator_{
      
    protected:
      
      ControlGenerator start;
      ControlGenerator end;
      ControlGenerator step;
      ControlGenerator trigger;
      int direction;
      bool hasBeenTriggered;
      
      void computeOutput(const SynthesisContext_ & context);
      
    public:
      ControlStepper_();
      ~ControlStepper_();
      void setStart(ControlGenerator arg){start = arg;}
      void setEnd(ControlGenerator arg){end = arg;}
      void setStep(ControlGenerator arg){step = arg;}
      void setTigger(ControlGenerator arg){trigger = arg;}
    };
    
  }
  
  //! On trigger, outputs a value beginning at start, and incrementing by step toward end, then back again.
  // Currently it steps up and down. In the future an option may be added to snap back to the beginning.
  
  class ControlStepper : public TemplatedControlGenerator<Tonic_::ControlStepper_>{
    
  public:
  
  createControlGeneratorSetters(ControlStepper, start, setStart);
  createControlGeneratorSetters(ControlStepper, end, setEnd);<commit_msg>removed variable no longer necessary<commit_after>//
//  ControlStepper.h
//  Tonic 
//
//  Created by <NAME> on 3/25/13.
//  Copyright (c) 2013 <NAME>. All rights reserved.
//

/*+++++++++++++++++++++ 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__ControlStepper__
#define __Tonic__ControlStepper__

#include "ControlGenerator.h"

namespace Tonic {
  
  namespace Tonic_ {

    class ControlStepper_ : public ControlGenerator_{
      
    protected:
      
      ControlGenerator start;
      ControlGenerator end;
      ControlGenerator step;
      ControlGenerator trigger;
      int direction;
      
      void computeOutput(const SynthesisContext_ & context);
      
    public:
      ControlStepper_();
      ~ControlStepper_();
      void setStart(ControlGenerator arg){start = arg;}
      void setEnd(ControlGenerator arg){end = arg;}
      void setStep(ControlGenerator arg){step = arg;}
      void setTigger(ControlGenerator arg){trigger = arg;}
    };
    
  }
  
  //! On trigger, outputs a value beginning at start, and incrementing by step toward end, then back again.
  // Currently it steps up and down. In the future an option may be added to snap back to the beginning.
  
  class ControlStepper : public TemplatedControlGenerator<Tonic_::ControlStepper_>{
    
  public:
  
  createControlGeneratorSetters(ControlStepper, start, setStart);
  createControlGeneratorSetters(ControlStepper, end, setEnd);
{'fraction_non_alphanumeric': 0.12243243243243243, 'fraction_numerical': 0.004864864864864865, 'mean_word_length': 3.475211608222491, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6327256', 'n_tokens_mistral': 1087, 'n_tokens_neox': 1028, 'n_words': 349}