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


C++ ParameterPtr::get_value方法代码示例

本文整理汇总了C++中ParameterPtr::get_value方法的典型用法代码示例。如果您正苦于以下问题:C++ ParameterPtr::get_value方法的具体用法?C++ ParameterPtr::get_value怎么用?C++ ParameterPtr::get_value使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ParameterPtr的用法示例。


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

示例1: create_generator_from_node

GeneratorPtr Session::create_generator_from_node(TiXmlElement* element, Region* region){
    fsom::DebugStream << "Attempting to create generator"<<std::endl;
    GeneratorPtr gen = GeneratorPtr(new Generator(Generator::GEN_Sine,dspCreationStruct(region)));
    
    TiXmlElement* basicInfoElement = element->FirstChildElement("BasicInfo");
    if(basicInfoElement){
	fsom::DebugStream << "Generator basic info found"<<std::endl;
	int genType,noiseState;
	std::string path = basicInfoElement->Attribute("Path"); 
	basicInfoElement->QueryIntAttribute("GenType",&genType);
	basicInfoElement->QueryIntAttribute("NoiseState",&noiseState);
	Generator::GeneratorType type = Generator::GeneratorType(genType);
	gen->set_generator_voice(type);
	gen->set_noise_state(noiseState);
	gen->set_file_path(path);
	fsom::DebugStream << "noise state for gen set to "<<noiseState<<std::endl;
	fsom::DebugStream << "gen type = "<<genType<<std::endl;
	
	
	
    }
    
    TiXmlElement * child = element->FirstChildElement("Parameter");
    while(child){
      fsom::DebugStream << "Parameter in generator found"<<std::endl;
      ParameterPtr p = create_parameter_from_node(child, region);
      gen->get_parameter(p->get_name())->set_value(p->get_value());
      child = child->NextSiblingElement("Parameter");
    }
    
    return gen;
}
开发者ID:spearse,项目名称:FSOM,代码行数:32,代码来源:Session.cpp

示例2: create_module_from_node

SynthesisModulePtr Session::create_module_from_node(TiXmlElement* element, Region* region){
  fsom::DebugStream << "Attempting to create module from node"<<std::endl;
   TiXmlElement* basicInfoElement = element->FirstChildElement("BasicInfo");
   SynthesisModulePtr module;
  if(basicInfoElement){
   fsom::DebugStream << "Module basic info found"<<std::endl;
   std::string name = basicInfoElement->Attribute("Type");
   module = SynthesisModuleManager::get_instance().create(name,dspCreationStruct(region)); 
    TiXmlElement * child = element->FirstChildElement("Parameter");
    while(child){
      fsom::DebugStream << "Parameter in module found"<<std::endl;
      ParameterPtr p = create_parameter_from_node(child, region);
      module->get_parameter(p->get_name())->set_value(p->get_value());
      child = child->NextSiblingElement("Parameter");
    }
   
   
   return module;
  }
  
  ///WARNING POSSIBLE TO RETURN WITHOUT A VALUE 
  //   SynthesisModulePtr 
  
  
}
开发者ID:spearse,项目名称:FSOM,代码行数:25,代码来源:Session.cpp

示例3: create_effect_from_node

DSPEffectPtr Session::create_effect_from_node(TiXmlElement* element,Region* region){

  assert(element);
  std::string typeName = element->Attribute("name");
  DSPEffectPtr t =  DSPManager::get_instance().create(typeName,dspCreationStruct(region));
  assert(t);
  TiXmlElement * meta = element->FirstChildElement("MetaData");
  //TODO streamline this process of loading, specific function for loading dspeffect and region meta needed

  const char* tut = meta->Attribute("TutorialLink"); 
  
  t->register_meta("TutorialLink");
  t->set_meta("TutorialLink",std::string(tut));

  TiXmlElement * child = element->FirstChildElement("Parameter");
  while(child){
    ParameterPtr p = create_parameter_from_node(child, region);
    t->get_parameter(p->get_name())->set_value(p->get_value());
    t->get_parameter(p->get_name())->set_breakpoints(p->get_breakpoints());
    child = child->NextSiblingElement("Parameter");
  }
  fsom::DebugStream  << "Loaded effect:" << typeName << std::endl;
  return t;
  
}
开发者ID:spearse,项目名称:FSOM,代码行数:25,代码来源:Session.cpp

示例4: load_region_parameters

void Session::load_region_parameters(TiXmlElement* element,Region* region){
      TiXmlElement * child = element->FirstChildElement("Parameter");
   
      while(child){
  
	    ParameterPtr p = create_parameter_from_node(child, region);
	    region->get_parameter(p->get_name())->set_value(p->get_value());
	    region->get_parameter(p->get_name())->set_breakpoints(p->get_breakpoints());
	    child = child->NextSiblingElement("Parameter");
      }
  
}
开发者ID:spearse,项目名称:FSOM,代码行数:12,代码来源:Session.cpp


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