//----------------------------------------------------------------------------- // C700::C700 //----------------------------------------------------------------------------- C700::C700(AudioUnit component) : AUInstrumentBase(component, 0, 1) , mEfx(NULL) { CreateElements(); Globals()->UseIndexedParameters(kNumberOfParameters); mEfx = new C700Kernel(); mEfx->SetPropertyNotifyFunc(PropertyNotifyFunc, this); mEfx->SetParameterSetFunc(ParameterSetFunc, this); //プリセット名テーブルを作成する mPresets = new AUPreset[NUM_PRESETS]; for (int i = 0; i < NUM_PRESETS; ++i) { const char *pname; pname = C700Kernel::GetPresetName(i); mPresets[i].presetNumber = i; CFMutableStringRef cfpname = CFStringCreateMutable(NULL, 64); mPresets[i].presetName = cfpname; CFStringAppendCString( cfpname, pname, kCFStringEncodingASCII ); } //デフォルト値を設定する for ( int i=0; i<kNumberOfParameters; i++ ) { Globals()->SetParameter(i, C700Kernel::GetParameterDefault(i) ); } #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher(this); #endif }
OSStatus MT32Synth::RestoreState(CFPropertyListRef inData) { MusicDeviceBase::RestoreState(inData); synth->setOutputGain(Globals()->GetParameter(kGlobalVolumeParam)); synth->setReverbOutputGain(Globals()->GetParameter(kReverbGainParam)); synth->setReverbEnabled(Globals()->GetParameter(kReverbEnabledParam) == 1.0); sendMIDI(0xC1, Globals()->GetParameter(kInstrumentParam), 0x00, 0x00); return noErr; }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // SinSynth::SinSynth // // This synth has No inputs, One output //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SinSynth::SinSynth(AudioUnit inComponentInstance) : AUMonotimbralInstrumentBase(inComponentInstance, 0, 1) { CreateElements(); Globals()->UseIndexedParameters(1); // we're only defining one param Globals()->SetParameter (kGlobalVolumeParam, 1.0); }
/** * Interpret should take the element and perform the interpretation in a * universal way. * @param element The element to interpret. * @return the interpreted element. */ Element Strine_::Interpret(Element element) { element = element.Interpret(Globals()); while(element.Type() == Types::PROCESSING) { element = element.Interpret(Globals()); } return element; }
OSStatus HSPad::GenerateWavetables() { wavetable->generateWavetables(Globals()->GetParameter(kParameter_HarmonicBandwidth), Globals()->GetParameter(kParameter_HarmonicProfile), // Harmonic bandwidth scale Globals()->GetParameter(kParameter_HarmonicsAmount), Globals()->GetParameter(kParameter_HarmonicsCurveSteepness), Globals()->GetParameter(kParameter_HarmonicsBalance), kHarmonicsCompensation); return noErr; }
MT32Synth::MT32Synth(ComponentInstance inComponentInstance) : MusicDeviceBase(inComponentInstance, 0, 8) { CreateElements(); Globals()->SetParameter(kGlobalVolumeParam, 2.111); Globals()->SetParameter(kInstrumentParam, 0.0); Globals()->SetParameter(kReverbEnabledParam, 1.0); Globals()->SetParameter(kReverbGainParam, 1.0); synth = NULL; lastBufferData = NULL; }
//----------------------------------------------------------------------------- OSStatus C700::Render( AudioUnitRenderActionFlags & ioActionFlags, const AudioTimeStamp & inTimeStamp, UInt32 inNumberFrames) { OSStatus result = AUInstrumentBase::Render(ioActionFlags, inTimeStamp, inNumberFrames); CallHostBeatAndTempo(NULL, &mTempo); mEfx->SetTempo( mTempo ); //バッファの確保 float *output[2]; AudioBufferList& bufferList = GetOutput(0)->GetBufferList(); int numChans = bufferList.mNumberBuffers; if (numChans > 2) return -1; output[0] = (float*)bufferList.mBuffers[0].mData; output[1] = numChans==2 ? (float*)bufferList.mBuffers[1].mData : NULL; //パラメータの反映 for ( int i=0; i<kNumberOfParameters; i++ ) { if (mParameterHasChanged[i]) { mEfx->SetParameter(i, Globals()->GetParameter(i)); mParameterHasChanged[i] = false; if (i == kParam_alwaysDelayNote) { // 遅延時間の変更をホストに通知 PropertyChanged(kAudioUnitProperty_Latency, kAudioUnitScope_Global, 0); } } } mEfx->SetSampleRate( GetOutput(0)->GetStreamFormat().mSampleRate ); mEfx->Render(inNumberFrames, output); return result; }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // TremoloUnit::TremoloUnit //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TremoloUnit::TremoloUnit(AudioUnit component) : AUEffectBase(component) { // This method, defined in the AUBase superclass, ensures that the required audio unit // elements are created and initialized. CreateElements (); // Invokes the use of an STL vector for parameter access. // See AUBase/AUScopeElement.cpp Globals () -> UseIndexedParameters (kNumberOfParameters); // During instantiation, sets up the parameters according to their defaults. // The parameter defaults should correspond to the settings for the default preset. SetParameter ( kParameter_Frequency, kDefaultValue_Tremolo_Freq ); SetParameter ( kParameter_Depth, kDefaultValue_Tremolo_Depth ); SetParameter ( kParameter_Waveform, kDefaultValue_Tremolo_Waveform ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); #endif }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // karoke::karoke //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ karoke::karoke(AudioUnit component) : AUEffectBase(component, false) { CreateElements(); CAStreamBasicDescription streamDescIn; streamDescIn.SetCanonical(NUM_INPUTS, false); // number of input channels streamDescIn.mSampleRate = GetSampleRate(); CAStreamBasicDescription streamDescOut; streamDescOut.SetCanonical(NUM_OUTPUTS, false); // number of output channels streamDescOut.mSampleRate = GetSampleRate(); Inputs().GetIOElement(0)->SetStreamFormat(streamDescIn); Outputs().GetIOElement(0)->SetStreamFormat(streamDescOut); Globals()->UseIndexedParameters(kNumberOfParameters); SetParameter(kParam_One, kDefaultValue_ParamOne ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); #endif mLeftFilter = new FirFilter(200); mLeftFilter->setCoeffecients(lp_200, 200); mRightFilter = new FirFilter(200); mRightFilter->setCoeffecients(lp_200, 200); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // HSPad::Initialize //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ OSStatus HSPad::Initialize() { OSStatus ret = noErr; ret = AUMonotimbralInstrumentBase::Initialize(); if (ret != noErr) return ret; SetNotes(kNumNotes, kMaxActiveNotes, mHSNotes, sizeof(HSNote)); wavetable = new HSWavetable(kNumWavetables, GetOutput(0)->GetStreamFormat().mSampleRate, kNumSamplesPerWavetable, Globals()->GetParameter(kParameter_HarmonicBandwidth), Globals()->GetParameter(kParameter_HarmonicProfile), // Harmonic bandwidth scale Globals()->GetParameter(kParameter_HarmonicsAmount), Globals()->GetParameter(kParameter_HarmonicsCurveSteepness), Globals()->GetParameter(kParameter_HarmonicsBalance), kHarmonicsCompensation); if (0 == parameterListener) { ret = AUListenerCreate(MyEventListenerProc, this, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode, 0.5, ¶meterListener); if (ret != noErr) { return ret; } } for (int i=0; i<kNumParametersThatAreRelevantToWavetable; i++) { AudioUnitParameter parameter; parameter.mAudioUnit = GetComponentInstance(); parameter.mParameterID = kParametersThatAreRelevantToWavetable[i]; parameter.mScope = kAudioUnitScope_Global; parameter.mElement = 0; ret = AUListenerAddParameter(parameterListener, this, ¶meter); if (ret != noErr) { return ret; } } return ret; }
mt@_RenderGlobals::mt@_RenderGlobals() { this->getMt@Globals(); this->setRendererAxis(); this->setRendererUnit(); this->defineGlobalConversionMatrix(); }
void InitPhases() { g = Globals(); g.phase1_level0P0 = GEN::MakePtr(new Phase1_Level0(g.P0)); g.phase1_level0P1 = GEN::MakePtr(new Phase1_Level0(g.P1)); g.phase1_level0P0->SetNextPhase(g.phase1_level0P1); g.phase1_level0P1->SetNextPhase(GEN::MakePtr(new Phase1_Level1)); }
OSStatus AUPinkNoise::Render( AudioUnitRenderActionFlags &ioActionFlags, const AudioTimeStamp & inTimeStamp, UInt32 nFrames) { AUOutputElement* outputBus = GetOutput(0); outputBus->PrepareBuffer(nFrames); // prepare the output buffer list AudioBufferList& outputBufList = outputBus->GetBufferList(); AUBufferList::ZeroBuffer(outputBufList); // only render if the on parameter is true. Otherwise send the zeroed buffer if (Globals()->GetParameter(kParam_On)) { for (UInt32 i=0; i < outputBufList.mNumberBuffers; i++) mPink->Render((Float32*)outputBufList.mBuffers[i].mData, nFrames, Globals()->GetParameter(kParam_Volume)); } return noErr; }
AUPinkNoise::AUPinkNoise(AudioUnit component) : AUBase(component, 0, 1), mPink (NULL) { CreateElements(); Globals()->UseIndexedParameters(kNumberOfParameters); SetParameter(kParam_Volume, kAudioUnitScope_Global, 0, kDefaultValue_Volume, 0); SetParameter(kParam_On, kAudioUnitScope_Global, 0, 1, 0); }
AKSampler_Plugin::AKSampler_Plugin(AudioUnit inComponentInstance) : AUInstrumentBase(inComponentInstance, 0, 1) // 0 inputs, 1 output , AKCoreSampler() { presetFolderPath = nil; presetName = nil; CreateElements(); Globals()->UseIndexedParameters(kNumberOfParams); initForTesting(); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ÇPROJECTNAMEÈ::ÇPROJECTNAMEÈ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ÇPROJECTNAMEÈ::ÇPROJECTNAMEÈ(AudioUnit component) : AUEffectBase(component) { CreateElements(); Globals()->UseIndexedParameters(kNumberOfParameters); SetParameter(kParam_One, kDefaultValue_ParamOne ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); #endif }
//_____________________________________________________________________________ // OSStatus AUPannerBase::GetParameter( AudioUnitParameterID inParamID, AudioUnitScope inScope, AudioUnitElement inElement, Float32 & outValue) { if (inScope != kAudioUnitScope_Global) return kAudioUnitErr_InvalidScope; outValue = Globals()->GetParameter(inParamID); return noErr; }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // AUPulseDetector::AUPulseDetector // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AUPulseDetector::AUPulseDetector(AudioUnit component) : AUEffectBase(component), mChildObject(NULL) { CreateElements(); CAStreamBasicDescription monoDesc; monoDesc.SetAUCanonical (1, false); monoDesc.mSampleRate = 44100.; GetOutput(0)->SetStreamFormat(monoDesc); GetInput(0)->SetStreamFormat(monoDesc); Globals()->UseIndexedParameters (5); Globals()->SetParameter (kPulseThreshold, kPulseThresholdDefault); Globals()->SetParameter (kPulseLength, kPulseLengthDefault); Globals()->SetParameter (kPulseRestTime, kPulseRestTimeDefault); Globals()->SetParameter (kDoPulseDetection, kDoPulseDetectionDefault); Globals()->SetParameter (kWritePulseStats, 0); mPulseTimeStats = new PulseTS[kPulseTSSize]; #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); #endif }
AKFlanger_Plugin::AKFlanger_Plugin(AudioUnit inComponentInstance) : AUEffectBase(inComponentInstance) , AudioKitCore::ModulatedDelay(kFlanger) , feedback(kFlangerDefaultFeedback) { CreateElements(); Globals()->UseIndexedParameters(kNumberOfParams); SetParameter(kModFrequency, kAudioUnitScope_Global, 0, kFlangerDefaultModFreqHz, 0); SetParameter(kModDepth, kAudioUnitScope_Global, 0, kFlangerDefaultDepth, 0); SetParameter(kFeedback, kAudioUnitScope_Global, 0, kFlangerDefaultFeedback, 0); SetParameter(kDryWetMix, kAudioUnitScope_Global, 0, kFlangerDefaultMix, 0); }
//_____________________________________________________________________________ // OSStatus AUPannerBase::SetParameter( AudioUnitParameterID inParamID, AudioUnitScope inScope, AudioUnitElement inElement, Float32 inValue, UInt32 inBufferOffsetInFrames) { if (inScope != kAudioUnitScope_Global) return kAudioUnitErr_InvalidScope; Globals()->SetParameter(inParamID, inValue); return noErr; }
void TestWindow::MessageReceived(BMessage *message) { if( message ) { switch(message->what) { case TERM_SETTINGS_MSG: { if( !mTermWin.IsValid() ) { MakeTermSettings(); } } break; case ADD_TEST_MSG: { if( addpos && addpos->LayoutParent() ) { TestView* newView = new TestView("AddedTest"); newView->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,1) ); addpos->LayoutParent()->AddLayoutChild(newView, ArpNoParams, addpos); root->SetWindowLimits(); } } break; case REMOVE_TEST_MSG: { ArpBaseLayout* rempos = addpos ? addpos->PreviousLayoutSibling() : 0; if( rempos && rempos->LayoutName() ) { if( strcmp(rempos->LayoutName(), "AddedTest") == 0 ) { rempos->LayoutRemoveSelf(); delete rempos; root->SetWindowLimits(); } } } break; case ARP_PREF_MSG: { if( root ) root->UpdateGlobals(message); // Because we are just using a generic BWindow, the object // won't correctly handle changes to its global settings. //if( mTermSet.IsValid() ) mTermSet.SendMessage(message); } break; case PREFERENCES_MSG: { if( !mPrefWin.IsValid() ) { PrefWindow* pWindow = new PrefWindow(BMessenger(this),Globals()->GlobalValues()); if( pWindow ) { mPrefWin = pWindow; pWindow->Show(); } } } default: inherited::MessageReceived(message); } } }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // HSPad::HSPad // // This synth has No inputs, One output //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HSPad::HSPad(ComponentInstance inComponentInstance) : AUMonotimbralInstrumentBase(inComponentInstance, 0, 1) { CreateElements(); Globals()->UseIndexedParameters(kNumberOfParameters); Globals()->SetParameter(kParameter_Volume, kDefaultValue_Volume); Globals()->SetParameter(kParameter_HarmonicsAmount, kDefaultValue_HarmonicsAmount); Globals()->SetParameter(kParameter_HarmonicsCurveSteepness, kDefaultValue_HarmonicsCurveSteepness); Globals()->SetParameter(kParameter_HarmonicsBalance, kDefaultValue_HarmonicsBalance); Globals()->SetParameter(kParameter_HarmonicBandwidth, kDefaultValue_HarmonicBandwidth); Globals()->SetParameter(kParameter_HarmonicProfile, kDefaultValue_HarmonicProfile); Globals()->SetParameter(kParameter_TouchSensitivity, kDefaultValue_TouchSensitivity); Globals()->SetParameter(kParameter_AttackTime, kDefaultValue_AttackTime); Globals()->SetParameter(kParameter_ReleaseTime, kDefaultValue_ReleaseTime); parameterListener = 0; wavetable = 0; }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Tremolo::Tremolo //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tremolo::Tremolo(AudioUnit component) : AUEffectBase(component) { CreateElements(); Globals()->UseIndexedParameters(kNumberOfParameters); SetParameter(kParameter_Frequency, kDefaultValue_Tremolo_Freq); SetParameter(kParameter_Depth, kDefaultValue_Tremolo_Depth); SetParameter(kParameter_Waveform, kDefaultValue_Tremolo_Waveform); SetAFactoryPresetAsCurrent(kPresets[kPreset_Default]); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher(this); #endif }
Convolver2::Convolver2(AudioUnit component) : AUEffectBase(component) { CreateElements(); Globals()->UseIndexedParameters(NUM_PARAMS); editor = NULL; core = new Convolver2Core(NUM_PARAMS, VERSION, DEF_PRODUCT); Float64 srate; if(DispatchGetProperty(kAudioUnitProperty_SampleRate, kAudioUnitScope_Global, 0, &srate) != kAudioUnitErr_InvalidProperty) { core->setParameter(PRM_SAMPLE_RATE, srate, true); } #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher(this); #endif }
//----------------------------------------------------------------------------- OSStatus C700::NewFactoryPresetSet(const AUPreset &inNewFactoryPreset) { UInt32 chosenPreset = inNewFactoryPreset.presetNumber; if ( chosenPreset < (UInt32)NUM_PRESETS ) { mEfx->SelectPreset(chosenPreset); char cname[32]; CFStringGetCString(inNewFactoryPreset.presetName, cname, 32, kCFStringEncodingASCII); //mEfx->setProgramName(cname); SetAFactoryPresetAsCurrent(inNewFactoryPreset); for ( UInt32 i=0; i<kNumberOfParameters; i++ ) { Globals()->SetParameter(i, mEfx->GetParameter(i)); } return noErr; } return kAudioUnitErr_InvalidPropertyValue; }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // FullBacano::FullBacano //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FullBacano::FullBacano (AudioUnit component) : AUEffectBase (component) { /* ofstream logFile; logFile.open ("debugLog.raw"); logFile << "Writing this to a file.\n"; logFile.close(); */ CreateElements (); Globals () -> UseIndexedParameters (kNumberOfParameters); SetParameter ( // 1 kParameter_Frequency, kDefaultValue_FullBacano_Freq ); SetParameter ( // 2 kParameter_Bacaneria, kDefaultValue_FullBacano_Bacaneria ); SetParameter ( // 2 kParameter_Ganancia, kDefaultValue_FullBacano_Ganancia ); SetParameter ( // 3 kParameter_LaMondaEnElVolco, kDefaultValue_FullBacano_LaMondaEnElVolco ); // code for setting default values for the audio unit parameters SetAFactoryPresetAsCurrent ( // 1 kPresets [kPreset_Default] ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); #endif }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // TremoloUnit::TremoloUnit //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // The constructor for new TremoloUnit audio units TremoloUnit::TremoloUnit (AudioUnit component) : AUEffectBase (component) { // This method, defined in the AUBase superclass, ensures that the required audio unit // elements are created and initialized. CreateElements (); // Invokes the use of an STL vector for parameter access. // See AUBase/AUScopeElement.cpp Globals () -> UseIndexedParameters (kNumberOfParameters); // During instantiation, sets up the parameters according to their defaults. // The parameter defaults should correspond to the settings for the default preset. SetParameter ( kParameter_Frequency, kDefaultValue_Tremolo_Freq ); SetParameter ( kParameter_Depth, kDefaultValue_Tremolo_Depth ); SetParameter ( kParameter_Waveform, kDefaultValue_Tremolo_Waveform ); // Also during instantiation, sets the preset menu to indicate the default preset, // which corresponds to the default parameters. It's possible to set this so a // fresh audio unit indicates the wrong preset, so be careful to get it right. SetAFactoryPresetAsCurrent ( kPresets [kPreset_Default] ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); #endif }
bool mt@_RenderGlobals::getMt@Globals() { logger.debug("mt@_RenderGlobals::get@Globals"); MSelectionList @GlobalsList; @GlobalsList.add("@Globals"); if( @GlobalsList.length() == 0 ) { logger.debug("@Globals not found. Stopping."); return false; } MObject node; @GlobalsList.getDependNode(0, node); MFnDependencyNode @Globals(node); renderGlobalsMobject = node; try{ if(!getInt(MString("translatorVerbosity"), @Globals, this->translatorVerbosity)) throw("problem reading @Globals.translatorVerbosity"); switch(this->translatorVerbosity) { case 0: logger.setLogLevel(Logging::Info); break; case 1: logger.setLogLevel(Logging::Error); break; case 2: logger.setLogLevel(Logging::Warning); break; case 3: logger.setLogLevel(Logging::Progress); break; case 4: logger.setLogLevel(Logging::Debug); break; } // ------------- automatically created attributes start ----------- // // ------------- automatically created attributes end ----------- // if(!getFloat(MString("filtersize"), @Globals, this->filterSize)) throw("problem reading @Globals.filtersize"); if(!getFloat(MString("gamma"), @Globals, this->gamma)) throw("problem reading @Globals.gamma"); if(!getInt(MString("samplesX"), @Globals, this->samplesX)) throw("problem reading @Globals.samplesX"); if(!getInt(MString("samplesY"), @Globals, this->samplesY)) throw("problem reading @Globals.samplesY"); if(!getInt(MString("minSamples"), @Globals, this->minSamples)) throw("problem reading @Globals.minSamples"); if(!getInt(MString("maxSamples"), @Globals, this->maxSamples)) throw("problem reading @Globals.maxSamples"); if(!getInt(MString("bitdepth"), @Globals, this->bitdepth)) throw("problem reading @Globals.bitdepth"); if(!getInt(MString("translatorVerbosity"), @Globals, this->translatorVerbosity)) throw("problem reading @Globals.translatorVerbosity"); if(!getInt(MString("rendererVerbosity"), @Globals, this->rendererVerbosity)) throw("problem reading @Globals.rendererVerbosity"); if(!getInt(MString("tilesize"), @Globals, this->tilesize)) throw("problem reading @Globals.tilesize"); if(!getInt(MString("threads"), @Globals, this->threads)) throw("problem reading @Globals.threads"); if(!getInt(MString("geotimesamples"), @Globals, this->geotimesamples)) throw("problem reading @Globals.geotimesamples"); if(!getInt(MString("xftimesamples"), @Globals, this->xftimesamples)) throw("problem reading @Globals.xftimesamples"); if(!getInt(MString("maxTraceDepth"), @Globals, this->maxTraceDepth)) throw("problem reading @Globals.maxTraceDepth"); if(!getBool(MString("createDefaultLight"), @Globals, this->createDefaultLight)) throw("problem reading @Globals.createDefaultLight"); if(!getBool(MString("detectShapeDeform"), @Globals, this->detectShapeDeform)) throw("problem reading @Globals.detectShapeDeform"); if(!getString(MString("optimizedTexturePath"), @Globals, this->optimizedTexturePath)) throw("problem reading @Globals.optimizedTexturePath"); if(!getString(MString("basePath"), @Globals, this->basePath)) throw("problem reading @Globals.basePath"); if(!getString(MString("imagePath"), @Globals, this->imagePath)) throw("problem reading @Globals.imagePath"); int id = 0; if(!getEnum(MString("imageFormat"), @Globals, id, this->imageFormatString)) throw("problem reading @Globals.imageFormat"); if(!getBool(MString("exportSceneFile"), @Globals, this->exportSceneFile)) throw("problem reading @Globals.exportSceneFile"); if(!getString(MString("exportSceneFileName"), @Globals, this->exportSceneFileName)) throw("problem reading @Globals.exportSceneFileName"); if(!getString(MString("imageName"), @Globals, this->imageName)) throw("problem reading @Globals.imageName"); if(!getBool(MString("adaptiveSampling"), @Globals, this->adaptiveSampling)) throw("problem reading @Globals.adaptiveSampling"); if(!getBool(MString("doMotionBlur"), @Globals, this->doMb)) throw("problem reading @Globals.doMotionBlur"); if(!getBool(MString("doDof"), @Globals, this->doDof)) throw("problem reading @Globals.doDof"); if(!getFloat(MString("sceneScale"), @Globals, this->sceneScale)) throw("problem reading @Globals.sceneScale"); this->sceneScaleMatrix.setToIdentity(); this->sceneScaleMatrix.matrix[0][0] = this->sceneScale; this->sceneScaleMatrix.matrix[1][1] = this->sceneScale; this->sceneScaleMatrix.matrix[2][2] = this->sceneScale; }catch(char *errorMsg){ logger.error(errorMsg); this->good = false; return false; } return true; }