当前位置: 首页>>代码示例>>C++>>正文


C++ Delay类代码示例

本文整理汇总了C++中Delay的典型用法代码示例。如果您正苦于以下问题:C++ Delay类的具体用法?C++ Delay怎么用?C++ Delay使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Delay类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: handle_delay

void handle_delay(int, short, void* arg)
{
    Delay* delay = reinterpret_cast<Delay*>(arg);
    delay->function();
    event_free(delay->timer);
    delete delay;
}
开发者ID:jmlvanre,项目名称:mesos,代码行数:7,代码来源:libevent.cpp

示例2: START_TEST

END_TEST

START_TEST ( test_Delay )
{
  Delay* d = new Delay(2, 4);
  
  fail_unless (d->hasRequiredAttributes());

  delete d;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:10,代码来源:TestRequiredAttributes.cpp

示例3: START_TEST

END_TEST

START_TEST ( test_Delay )
{
  Delay* d = new Delay(2, 4);
  
  fail_unless (!(d->hasRequiredElements()));

  d->setMath(SBML_parseFormula("a+b"));

  fail_unless (d->hasRequiredElements());

  delete d;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:14,代码来源:TestRequiredElements.cpp

示例4: m_Time

Reverb::Reverb() :
m_Time(0),
m_Feedback(0.2),
m_Randomness(0.01),
m_Bypass(true)
{
	// set up the delay vec
	for (int i=0; i<NUM_DELAYS; i++)
	{
		Delay *pDelay = new Delay;
		pDelay->SetLeftDelay(RandFloat(MIN_DELAYTIME,MAX_DELAYTIME));
		pDelay->SetRightDelay(RandFloat(MIN_DELAYTIME,MAX_DELAYTIME));
		pDelay->SetBypass(false);
		m_DelayVec.push_back(pDelay);
	}
}
开发者ID:original-male,项目名称:spiralsynthmodular,代码行数:16,代码来源:Reverb.C

示例5: START_TEST

END_TEST


START_TEST ( test_Event_parent_NULL )
{
    SBMLDocument *d = new SBMLDocument(2, 4);
    Model *m = d->createModel();
    Event *c = m->createEvent();
    EventAssignment *ea = c->createEventAssignment();
    Trigger *t = new Trigger(2, 4);
    t->setMath(new ASTNode());
    Delay *dy = new Delay(2, 4);
    dy->setMath(new ASTNode());
    c->setTrigger(t);
    c->setDelay(dy);

    fail_unless(c->getAncestorOfType(SBML_MODEL) == m);
    fail_unless(c->getTrigger()->getParentSBMLObject() == c);
    fail_unless (c->getDelay()->getSBMLDocument() == d);
    fail_unless(ea->getAncestorOfType(SBML_EVENT) == c);

    Event *c1 = c->clone();
    delete d;

    fail_unless(c1->getAncestorOfType(SBML_MODEL) == NULL);
    fail_unless(c1->getParentSBMLObject() == NULL);
    fail_unless (c1->getSBMLDocument() == NULL);

    fail_unless(c1->getEventAssignment(0)->getAncestorOfType(SBML_MODEL) == NULL);
    fail_unless(c1->getEventAssignment(0)->getAncestorOfType(SBML_EVENT) == c1);
    fail_unless(c1->getEventAssignment(0)->getParentSBMLObject() != NULL);
    fail_unless(c1->getEventAssignment(0)->getSBMLDocument() == NULL);

    fail_unless(c1->getTrigger()->getAncestorOfType(SBML_MODEL) == NULL);
    fail_unless(c1->getTrigger()->getAncestorOfType(SBML_EVENT) == c1);
    fail_unless(c1->getTrigger()->getParentSBMLObject() != NULL);
    fail_unless(c1->getTrigger()->getSBMLDocument() == NULL);

    fail_unless(c1->getDelay()->getAncestorOfType(SBML_MODEL) == NULL);
    fail_unless(c1->getDelay()->getAncestorOfType(SBML_EVENT) == c1);
    fail_unless(c1->getDelay()->getParentSBMLObject() != NULL);
    fail_unless(c1->getDelay()->getSBMLDocument() == NULL);

    delete c1;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:45,代码来源:TestSBMLParentObject.cpp

示例6: strcat

int ModuleController::delay(const char   *path, 
							const char   *types, 
							lo_arg       **argv, 
							int          argc,
							void         *data, 
							void         *user_data)
{
	ModuleController *mc = (ModuleController *)user_data;
    
    char p[64] = "/ModuleManager/EF/Delay/Tile";
    strcat(p, &argv[1]->s);
    
    if (argv[0]->i) {//argv[0] = 1:モジュール生成 0:モジュール解放
        for (std::list<Delay*>::iterator iter = mc->delayList.begin(); iter != mc->delayList.end(); iter++) {
            Delay *delay = (*iter);
            if (strcmp(p,delay->OSCAddr)==0) {
                if (delay->tID == atoi(&argv[1]->s)) {
                    printf("err: Creating Delay\n");
                    return 0;
                }
            }
        }
        
        Delay *delay = new Delay(mc->st, p);
        delay->setTID(atoi(&argv[1]->s));
        delay->mColor = 6;
        delay->sendSetMdtkn();
        mc->delayList.push_back(delay);
        printf("create Delay\n");
		
    }else {
        for (std::list<Delay*>::iterator iter = mc->delayList.begin(); iter != mc->delayList.end(); iter++) {
            Delay* delay = (*iter);
            if (strcmp(p,delay->OSCAddr)==0) {
                delete delay;
                mc->delayList.remove(delay);
                printf("delete Delay\n");
            }
        }
    }
    return 0;
}
开发者ID:MusashiNakajima,项目名称:System_cpp_Mac,代码行数:42,代码来源:ModuleController.cpp

示例7: MyApp

	MyApp(){
		// Allocate 200 ms in the delay line
		delay.maxDelay(0.2);

		tmr.period(4);
		tmr.phaseMax();

		// Configure a short cosine grain
		src.set(1000, 0.8, 0.04, 0.25);

		// Set up low-pass filter
		lpf.type(gam::LOW_PASS);
		lpf.freq(2000);
	}
开发者ID:LancePutnam,项目名称:Gamma,代码行数:14,代码来源:echo.cpp

示例8: getInstantiation

int Submodel::convertTimeAndExtentWith(const ASTNode* tcf, const ASTNode* xcf, const ASTNode* klmod)
{
  if (tcf==NULL && xcf==NULL) return LIBSBML_OPERATION_SUCCESS;
  Model* model = getInstantiation();
  if (model==NULL) {
    //getInstantiation sets its own error messages.
    return LIBSBML_OPERATION_FAILED;
  }
  ASTNode tcftimes(AST_TIMES);
  ASTNode tcfdiv(AST_DIVIDE);
  if (tcf != NULL) {
    tcftimes.addChild(tcf->deepCopy());
    tcfdiv.addChild(tcf->deepCopy());
  }
  ASTNode rxndivide(AST_DIVIDE);
  if (klmod != NULL) {
    ASTNode rxnref(AST_NAME);
    rxndivide.addChild(rxnref.deepCopy());
    rxndivide.addChild(klmod->deepCopy());
  }
  List* allElements = model->getAllElements();
  for (ListIterator iter = allElements->begin(); iter != allElements->end(); ++iter)
  {
    SBase* element = static_cast<SBase*>(*iter);
    assert(element != NULL);
    ASTNode* ast1 = NULL;
    ASTNode* ast2 = NULL;
    Constraint* constraint = NULL;
    Delay* delay = NULL;
    EventAssignment* ea = NULL;
    InitialAssignment* ia = NULL;
    KineticLaw* kl = NULL;
    Priority* priority = NULL;
    RateRule* rrule = NULL;
    Rule* rule = NULL;
    Submodel* submodel = NULL;
    Trigger* trigger = NULL;
    string cf = "";
    //Reaction math will be converted below, in the bits with the kinetic law.  But because of that, we need to handle references *to* the reaction:  even if it has no kinetic law, the units have changed, and this needs to be reflected by the flattening routine.
    if (rxndivide.getNumChildren() != 0 && element->getTypeCode()==SBML_REACTION && element->isSetId()) {
      rxndivide.getChild(0)->setName(element->getId().c_str());
      for (ListIterator iter = allElements->begin(); iter != allElements->end(); ++iter)
      {
        SBase* subelement = static_cast<SBase*>(*iter);
        subelement->replaceSIDWithFunction(element->getId(), &rxndivide);
      }
    }

    //Submodels need their timeConversionFactor and extentConversionFactor attributes converted.  We're moving top-down, so all we need to do here is fix the conversion factor attributes themselves, pointing them to new parameters if need be.
    if ((tcf !=NULL || xcf != NULL) && element->getTypeCode()==SBML_COMP_SUBMODEL) {
      submodel = static_cast<Submodel*>(element);
      if (tcf != NULL) {
        if (submodel->isSetTimeConversionFactor()) {
          createNewConversionFactor(cf, tcf, submodel->getTimeConversionFactor(), model);
          submodel->setTimeConversionFactor(cf);
        }
        else {
          submodel->setTimeConversionFactor(tcf->getName());
        }
      }
      if (xcf != NULL) {
        if (submodel->isSetExtentConversionFactor()) {
          createNewConversionFactor(cf, xcf, submodel->getExtentConversionFactor(), model);
          submodel->setExtentConversionFactor(cf);
        }
        else {
          submodel->setExtentConversionFactor(xcf->getName());
        }
      }
    }
    if (tcf==NULL) {
      if (klmod !=NULL && element->getTypeCode()==SBML_KINETIC_LAW) {
        kl = static_cast<KineticLaw*>(element);
        if (kl->isSetMath()) {
          ast1 = new ASTNode(AST_TIMES);
          ast1->addChild(klmod->deepCopy());
          ast1->addChild(kl->getMath()->deepCopy());
          kl->setMath(ast1);
          delete ast1;
        }
      }
    }
    else {
      // All math 'time' and 'delay' csymbols must still be converted.
      // Also, several constructs are modified directly.
      switch(element->getTypeCode()) {
        //This would be a WHOLE LOT SIMPLER if there was a 'hasMath' class in libsbml.  But even so, it would have to
        // handle the kinetic laws, rate rules, and delays separately.
      case SBML_KINETIC_LAW:
        //Kinetic laws are multiplied by 'klmod'.
        kl = static_cast<KineticLaw*>(element);
        ast1 = kl->getMath()->deepCopy();
        convertCSymbols(ast1, &tcfdiv, &tcftimes);
        if (klmod !=NULL) {
          kl = static_cast<KineticLaw*>(element);
          if (kl->isSetMath()) {
            ast2 = new ASTNode(AST_TIMES);
            ast2->addChild(klmod->deepCopy());
            ast2->addChild(ast1);
            kl->setMath(ast2);
//.........这里部分代码省略.........
开发者ID:copasi,项目名称:copasi-dependencies,代码行数:101,代码来源:Submodel.cpp

示例9: Value


//.........这里部分代码省略.........
    Processor* arp_free_frequency = createMonoModControl("arp_frequency", true, false);
    Processor* arp_frequency = createTempoSyncSwitch("arp", arp_free_frequency,
                                                     beats_per_second, false);
    Processor* arp_octaves = createMonoModControl("arp_octaves", true);
    Processor* arp_pattern = createMonoModControl("arp_pattern", true);
    Processor* arp_gate = createMonoModControl("arp_gate", true);
    arp_on_ = createBaseControl("arp_on");
    arpeggiator_ = new Arpeggiator(voice_handler_);
    arpeggiator_->plug(arp_frequency, Arpeggiator::kFrequency);
    arpeggiator_->plug(arp_octaves, Arpeggiator::kOctaves);
    arpeggiator_->plug(arp_pattern, Arpeggiator::kPattern);
    arpeggiator_->plug(arp_gate, Arpeggiator::kGate);

    addProcessor(arpeggiator_);
    addProcessor(voice_handler_);

    // Delay effect.
    Processor* delay_free_frequency = createMonoModControl("delay_frequency", false, false);
    Processor* delay_frequency = createTempoSyncSwitch("delay", delay_free_frequency,
                                                       beats_per_second, false);
    Processor* delay_feedback = createMonoModControl("delay_feedback", false, true);
    Processor* delay_wet = createMonoModControl("delay_dry_wet", false, true);
    Value* delay_on = createBaseControl("delay_on");

    Clamp* delay_feedback_clamped = new Clamp(-1, 1);
    delay_feedback_clamped->plug(delay_feedback);

    SmoothFilter* delay_frequency_smoothed = new SmoothFilter();
    delay_frequency_smoothed->plug(delay_frequency, SmoothFilter::kTarget);
    delay_frequency_smoothed->plug(&utils::value_half, SmoothFilter::kHalfLife);
    FrequencyToSamples* delay_samples = new FrequencyToSamples();
    delay_samples->plug(delay_frequency_smoothed);

    Delay* delay = new Delay(MAX_DELAY_SAMPLES);
    delay->plug(voice_handler_, Delay::kAudio);
    delay->plug(delay_samples, Delay::kSampleDelay);
    delay->plug(delay_feedback_clamped, Delay::kFeedback);
    delay->plug(delay_wet, Delay::kWet);

    BypassRouter* delay_container = new BypassRouter();
    delay_container->plug(delay_on, BypassRouter::kOn);
    delay_container->plug(voice_handler_, BypassRouter::kAudio);
    delay_container->addProcessor(delay_feedback_clamped);
    delay_container->addProcessor(delay_frequency_smoothed);
    delay_container->addProcessor(delay_samples);
    delay_container->addProcessor(delay);
    delay_container->registerOutput(delay->output());

    addProcessor(delay_container);

    // Reverb Effect.
    Processor* reverb_feedback = createMonoModControl("reverb_feedback", false, true);
    Processor* reverb_damping = createMonoModControl("reverb_damping", false, true);
    Processor* reverb_wet = createMonoModControl("reverb_dry_wet", false, true);
    Value* reverb_on = createBaseControl("reverb_on");

    Clamp* reverb_feedback_clamped = new Clamp(-1, 1);
    reverb_feedback_clamped->plug(reverb_feedback);

    Reverb* reverb = new Reverb();
    reverb->plug(delay, Reverb::kAudio);
    reverb->plug(reverb_feedback_clamped, Reverb::kFeedback);
    reverb->plug(reverb_damping, Reverb::kDamping);
    reverb->plug(reverb_wet, Reverb::kWet);

    BypassRouter* reverb_container = new BypassRouter();
开发者ID:hztirf,项目名称:helm,代码行数:67,代码来源:helm_engine.cpp

示例10: delay

{
	Delay<float, ipl::Trunc, Domain1> delay(4);
	//assert(delay.size() == 4);

	delay.zero();

	// Test normal filtering (delaying) operation
	assert(0 == delay(1));
	assert(0 == delay(2));
	assert(0 == delay(3));
	assert(0 == delay(4));
	assert(1 == delay(5));
	assert(2 == delay(6));

	assert(6 == delay.read(1));
	assert(5 == delay.read(2));
	assert(4 == delay.read(3));
	assert(3 == delay.read(4));
}
开发者ID:LancePutnam,项目名称:Gamma,代码行数:19,代码来源:utDelay.cpp

示例11: assert


//.........这里部分代码省略.........
      delete math;
    }
    const ReactantList* left = reaction->GetLeft();
    for (size_t lnum=0; lnum<left->Size(); lnum++) {
      const Variable* nthleft = left->GetNthReactant(lnum);
      double nthstoich = left->GetStoichiometryFor(lnum);
      SpeciesReference* sr = sbmlmod->createReactant();
      sr->setSpecies(nthleft->GetNameDelimitedBy(cc));
      sr->setStoichiometry(nthstoich);
    }
    const ReactantList* right = reaction->GetRight();
    for (size_t rnum=0; rnum<right->Size(); rnum++) {
      const Variable* nthright = right->GetNthReactant(rnum);
      double nthstoich = right->GetStoichiometryFor(rnum);
      SpeciesReference* sr = sbmlmod->createProduct();
      sr->setSpecies(nthright->GetNameDelimitedBy(cc));
      sr->setStoichiometry(nthstoich);
    }
    //Find 'modifiers' and add them.
    vector<const Variable*> subvars = formula->GetVariablesFrom(formstring, m_modulename);
    for (size_t v=0; v<subvars.size(); v++) {
      if (subvars[v] != NULL && subvars[v]->GetType() == varSpeciesUndef) {
        if (left->GetStoichiometryFor(subvars[v]) == 0 &&
            right->GetStoichiometryFor(subvars[v]) == 0) {
          ModifierSpeciesReference* msr = sbmlmod->createModifier();
          msr->setSpecies(subvars[v]->GetNameDelimitedBy(cc));
        }
      }
    }
  }

  //Events
  size_t numevents = GetNumVariablesOfType(allEvents);
  for (size_t ev=0; ev < numevents; ev++) {
    const Variable* eventvar = GetNthVariableOfType(allEvents, ev);
    const AntimonyEvent* event = eventvar->GetEvent();
    Event* sbmlevent = sbmlmod->createEvent();
    sbmlevent->setId(eventvar->GetNameDelimitedBy(cc));
    if (eventvar->GetDisplayName() != "") {
      sbmlevent->setName(eventvar->GetDisplayName());
    }
    Trigger* trig = sbmlevent->createTrigger();
    ASTNode* ASTtrig = parseStringToASTNode(event->GetTrigger()->ToSBMLString());
    trig->setMath(ASTtrig);
    delete ASTtrig;
    const Formula* delay = event->GetDelay();
    if (!delay->IsEmpty()) {
      ASTtrig = parseStringToASTNode(delay->ToSBMLString());
      Delay* sbmldelay = sbmlevent->createDelay();
      sbmldelay->setMath(ASTtrig);
      delete ASTtrig;
    }
      
    long numasnts = static_cast<long>(event->GetNumAssignments());
    for (long asnt=numasnts-1; asnt>=0; asnt--) {
      //events are stored in reverse order.  Don't ask...
      EventAssignment* sbmlasnt = sbmlmod->createEventAssignment();
      sbmlasnt->setVariable(event->GetNthAssignmentVariableName(asnt, cc));
      ASTNode* ASTasnt = parseStringToASTNode(event->GetNthAssignmentFormulaString(asnt, '_', true));
      sbmlasnt->setMath(ASTasnt);
      delete ASTasnt;
    }
  }

  //Interactions
  size_t numinteractions = GetNumVariablesOfType(allInteractions);
  for (size_t irxn=0; irxn<numinteractions; irxn++) {
    const Variable* arxnvar = GetNthVariableOfType(allInteractions, irxn);
    const AntimonyReaction* arxn = arxnvar->GetReaction();
    Reaction* rxn = sbmlmod->getReaction(arxn->GetRight()->GetNthReactant(0)->GetNameDelimitedBy(cc));
    if (rxn != NULL) {
      for (size_t interactor=0; interactor<arxn->GetLeft()->Size(); interactor++) {
        ModifierSpeciesReference* msr = rxn->createModifier();
        msr->setSpecies(arxn->GetLeft()->GetNthReactant(interactor)->GetNameDelimitedBy(cc));
        msr->setName(arxnvar->GetNameDelimitedBy(cc));
      }
    }
  }

  //Unknown variables (turn into parameters)
  size_t numunknown = GetNumVariablesOfType(allUnknown);
  for (size_t form=0; form < numunknown; form++) {
    const Variable* formvar = GetNthVariableOfType(allUnknown, form);
    Parameter* param = sbmlmod->createParameter();
    param->setId(formvar->GetNameDelimitedBy(cc));
    if (formvar->GetDisplayName() != "") {
      param->setName(formvar->GetDisplayName());
    }
    switch(formvar->GetConstType()) {
    case constVAR:
      param->setConstant(true);
      break;
    case constCONST:
      param->setConstant(false);
      break;
    case constDEFAULT:
      break;
    }
  }
}
开发者ID:dchandran,项目名称:evolvenetworks,代码行数:101,代码来源:module-sbml.cpp

示例12: reset

	// re-initialize all member variables;
	inline void reset(double __sr, int __vs) { 
		__exception = 0;
		vectorsize = __vs;
		samplerate = __sr;
		m_y_1 = 0;
		m_history_2 = 0;
		m_history_3 = 0;
		m_history_4 = 0;
		m_history_5 = 0;
		m_history_6 = 0;
		m_history_7 = 0;
		m_history_8 = 0;
		m_history_9 = 0;
		m_y_10 = 0;
		m_delay_11.reset("m_delay_11", 96000);
		m_delay_12.reset("m_delay_12", 96000);
		m_resonance_13 = 0;
		m_cutoff_14 = 2250;
		m_window_15 = 100;
		m_mix_16 = 0.5;
		m_blur_17 = 0.25;
		m_ratio_18 = 0.5;
		m_window_19 = 100;
		m_ratio_20 = 2;
		samples_to_seconds = (1 / samplerate);
		m_phasor_21.reset(0);
		m_delta_22.reset(0);
		m_sah_23.reset(0);
		m_sah_24.reset(0);
		m_delta_25.reset(0);
		m_sah_26.reset(0);
		m_sah_27.reset(0);
		m_delta_28.reset(0);
		m_sah_29.reset(0);
		m_sah_30.reset(0);
		m_delta_31.reset(0);
		m_sah_32.reset(0);
		m_sah_33.reset(0);
		m_phasor_34.reset(0);
		m_delta_35.reset(0);
		m_sah_36.reset(0);
		m_sah_37.reset(0);
		m_delta_38.reset(0);
		m_sah_39.reset(0);
		m_sah_40.reset(0);
		m_delta_41.reset(0);
		m_sah_42.reset(0);
		m_sah_43.reset(0);
		m_delta_44.reset(0);
		m_sah_45.reset(0);
		m_sah_46.reset(0);
		genlib_reset_complete(this);
		
	};
开发者ID:ninodewit,项目名称:DPF-Max-Gen,代码行数:55,代码来源:gen_exported.cpp

示例13: perform

	// the signal processing routine;
	inline int perform(t_sample ** __ins, t_sample ** __outs, int __n) { 
		vectorsize = __n;
		const t_sample * __in1 = __ins[0];
		t_sample * __out1 = __outs[0];
		if (__exception) { 
			return __exception;
			
		} else if (( (__in1 == 0) || (__out1 == 0) )) { 
			__exception = GENLIB_ERR_NULL_BUFFER;
			return __exception;
			
		};
		double expr_226 = safediv(((m_tone_4 * 2) * 3.1415926535898), 48000);
		double sin_217 = sin(expr_226);
		double clamp_218 = ((sin_217 <= 1e-05) ? 1e-05 : ((sin_217 >= 0.99999) ? 0.99999 : sin_217));
		// the main sample loop;
		while ((__n--)) { 
			const double in1 = (*(__in1++));
			double mix_229 = (m_y_2 + (clamp_218 * (in1 - m_y_2)));
			double mix_215 = mix_229;
			m_cycle_7.freq(m_rate_6);
			double cycle_221 = m_cycle_7(__sinedata);
			double cycleindex_222 = m_cycle_7.phase();
			double add_220 = (cycle_221 + 1);
			double mul_219 = (add_220 * 0.5);
			double mul_223 = (m_depth_5 * mul_219);
			double mstosamps_214 = (mul_223 * (samplerate * 0.001));
			double mix_230 = (mstosamps_214 + (0.999 * (m_smth_1 - mstosamps_214)));
			double mix_213 = mix_230;
			double tap_225 = m_delay_3.read_linear(mix_213);
			double out1 = tap_225;
			double y0_next_227 = mix_215;
			double smth_next_228 = mix_213;
			m_delay_3.write(mix_215);
			m_y_2 = y0_next_227;
			m_smth_1 = smth_next_228;
			m_delay_3.step();
			// assign results to output buffer;
			(*(__out1++)) = out1;
			
		};
		return __exception;
		
	};
开发者ID:ninodewit,项目名称:SHIRO-Plugins,代码行数:45,代码来源:gen_exported.cpp

示例14: reset

	// re-initialize all member variables;
	inline void reset(double __sr, int __vs) { 
		__exception = 0;
		vectorsize = __vs;
		samplerate = __sr;
		m_smth_1 = 0;
		m_y_2 = 0;
		m_delay_3.reset("m_delay_3", 44100);
		m_tone_4 = 6000;
		m_depth_5 = 1;
		m_rate_6 = 5;
		m_cycle_7.reset(samplerate, 0);
		genlib_reset_complete(this);
		
	};
开发者ID:ninodewit,项目名称:SHIRO-Plugins,代码行数:15,代码来源:gen_exported.cpp

示例15: perform

	// the signal processing routine;
	inline int perform(t_sample ** __ins, t_sample ** __outs, int __n) { 
		vectorsize = __n;
		const t_sample * __in1 = __ins[0];
		const t_sample * __in2 = __ins[1];
		t_sample * __out1 = __outs[0];
		t_sample * __out2 = __outs[1];
		if (__exception) { 
			return __exception;
			
		} else if (( (__in1 == 0) || (__in2 == 0) || (__out1 == 0) || (__out2 == 0) )) { 
			__exception = GENLIB_ERR_NULL_BUFFER;
			return __exception;
			
		};
		t_sample rsub_999 = (1 - m_bandwidth_22);
		t_sample expr_1051 = safepow(0.001, safediv(1, (m_revtime_19 * 44100)));
		t_sample expr_1052 = safediv((m_roomsize_20 * 44100), 340);
		t_sample mul_988 = (expr_1052 * 0.63245);
		t_sample expr_1043 = (-safepow(expr_1051, mul_988));
		t_sample mul_990 = (expr_1052 * 0.81649);
		t_sample expr_1045 = (-safepow(expr_1051, mul_990));
		t_sample mul_989 = (expr_1052 * 0.7071);
		t_sample expr_1044 = (-safepow(expr_1051, mul_989));
		t_sample mul_991 = (expr_1052 * 1);
		t_sample expr_1050 = (-safepow(expr_1051, mul_991));
		t_sample mul_985 = (expr_1052 * 0.000527);
		int int_984 = int(mul_985);
		t_sample mul_925 = (m_spread_21 * -0.380445);
		t_sample add_924 = (mul_925 + 931);
		t_sample rsub_921 = (1341 - add_924);
		t_sample mul_934 = (int_984 * rsub_921);
		t_sample mul_953 = (m_spread_21 * 0.376623);
		t_sample add_952 = (mul_953 + 931);
		t_sample rsub_949 = (1341 - add_952);
		t_sample mul_960 = (int_984 * rsub_949);
		t_sample add_914 = (expr_1052 + 5);
		t_sample expr_1046 = safepow(expr_1051, add_914);
		t_sample mul_920 = (expr_1052 * 0.41);
		t_sample add_917 = (mul_920 + 5);
		t_sample expr_1049 = safepow(expr_1051, add_917);
		t_sample mul_919 = (expr_1052 * 0.3);
		t_sample add_916 = (mul_919 + 5);
		t_sample expr_1048 = safepow(expr_1051, add_916);
		t_sample mul_918 = (expr_1052 * 0.155);
		t_sample add_915 = (mul_918 + 5);
		t_sample expr_1047 = safepow(expr_1051, add_915);
		t_sample mul_927 = (m_spread_21 * -0.568366);
		t_sample add_923 = (mul_927 + 369);
		t_sample rsub_922 = (add_924 - add_923);
		t_sample mul_941 = (int_984 * rsub_922);
		t_sample mul_983 = (expr_1052 * 0.110732);
		t_sample mul_969 = (m_spread_21 * 0.125541);
		t_sample add_951 = (mul_969 + 369);
		t_sample rsub_950 = (add_952 - add_951);
		t_sample mul_967 = (int_984 * rsub_950);
		t_sample add_926 = (mul_927 + 159);
		t_sample mul_948 = (int_984 * add_926);
		t_sample add_968 = (mul_969 + 159);
		t_sample mul_976 = (int_984 * add_968);
		// the main sample loop;
		while ((__n--)) { 
			const t_sample in1 = (*(__in1++));
			const t_sample in2 = (*(__in2++));
			t_sample mul_846 = (in2 * m_dry_24);
			t_sample mul_858 = (in1 * m_dry_24);
			t_sample mul_848 = ((in1 + in2) * 0.707);
			t_sample mix_1070 = (mul_848 + (rsub_999 * (m_history_5 - mul_848)));
			t_sample mix_998 = mix_1070;
			t_sample tap_888 = m_delay_17.read_linear(mul_988);
			t_sample mul_884 = (tap_888 * expr_1043);
			t_sample mix_1071 = (mul_884 + (m_damping_18 * (m_history_4 - mul_884)));
			t_sample mix_886 = mix_1071;
			t_sample tap_900 = m_delay_16.read_linear(mul_990);
			t_sample mul_896 = (tap_900 * expr_1045);
			t_sample mix_1072 = (mul_896 + (m_damping_18 * (m_history_3 - mul_896)));
			t_sample mix_898 = mix_1072;
			t_sample tap_894 = m_delay_15.read_linear(mul_989);
			t_sample mul_890 = (tap_894 * expr_1044);
			t_sample mix_1073 = (mul_890 + (m_damping_18 * (m_history_2 - mul_890)));
			t_sample mix_892 = mix_1073;
			t_sample tap_996 = m_delay_14.read_linear(mul_991);
			t_sample mul_987 = (tap_996 * expr_1050);
			t_sample mix_1074 = (mul_987 + (m_damping_18 * (m_history_1 - mul_987)));
			t_sample mix_994 = mix_1074;
			t_sample tap_933 = m_delay_13.read_linear(mul_934);
			t_sample mul_931 = (tap_933 * 0.625);
			t_sample tap_959 = m_delay_12.read_linear(mul_960);
			t_sample mul_957 = (tap_959 * 0.625);
			t_sample add_878 = (mix_994 + mix_898);
			t_sample add_876 = (mix_892 + mix_886);
			t_sample add_871 = (add_878 + add_876);
			t_sample mul_854 = (add_871 * 0.5);
			t_sample sub_875 = (add_878 - add_876);
			t_sample mul_857 = (sub_875 * 0.5);
			t_sample sub_877 = (mix_994 - mix_898);
			t_sample sub_874 = (mix_892 - mix_886);
			t_sample sub_873 = (sub_877 - sub_874);
			t_sample mul_856 = (sub_873 * 0.5);
			t_sample add_872 = (sub_877 + sub_874);
//.........这里部分代码省略.........
开发者ID:DISTRHO,项目名称:DPF-Max-Gen,代码行数:101,代码来源:gen_exported.cpp


注:本文中的Delay类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。