VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtForestSoundCreator.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
14 
16 
17 #include <vrvCore/DtDe.h>
18 #include <vrvCore/DtUniqueID.h>
19 
20 namespace makVrv
21 {
38  {
39  public:
46  {
47  std::unique_ptr<DtProceduralSound> sc(new DtProceduralSound(de, id));
48 
49  DtProceduralSoundLayer& rural = sc->addLayer("rural");
50  rural.addClip(
52  "$(SHARED_DATA_DIR)/Audio/soundscapes/Ambient/RuralFarmlandCowsBirds.wav"),
53  1.0f);
54  rural.setFixedParallelEvents(3);
55  rural.setGainRange(0.15f, 1.0f);
56  rural.setPitchRange(0.95f, 1.05f);
57 
58  return sc.release();
59  }
60  };
61 
62 } // namespace makVrv
Abstract factory interface for creating a named DtProceduralSound.
Definition: DtProceduralSoundCreator.h:53
DtProceduralSound * create(DtDe &de, DtUniqueID id) override
Construct the &quot;Forest&quot; procedural sound.
Definition: DtForestSoundCreator.h:45
virtual void setGainRange(float minGain, float maxGain)
Linear gain range for randomly triggered events [0.0, 1.0]. Quieter events simulate sources further f...
virtual void setPitchRange(float minPitch, float maxPitch)
Pitch ratio range for randomly triggered events. 1.0 = original pitch. e.g. [0.92, 1.08] for natural variation. Pitch is implemented as a fractional sample-rate ratio (nearest-neighbor resampling); no FFT or high-quality resampler is used.
virtual void setFixedParallelEvents(int count)
Set the exact number of clip instances that must be playing at all times. After each PCM chunk is adv...
Contains makVrv::DtDe class.
Default procedural sound creator for the &quot;Forest&quot; key.
Definition: DtForestSoundCreator.h:37
Composes multiple DtProceduralSoundLayer pools into one streaming ambient sound.
Definition: DtProceduralSound.h:61
Contains vrvUtil::DtDePathConfiguration class.
Contains makVrv::DtProceduralSound class.
virtual bool addClip(const std::string &wavFile, float weight=1.0f, float decibelsDb=0.0f)
Load a WAV clip and add it to this layer&#39;s pool.
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
virtual std::string resolvePath(const std::string &directory) const
Resolve a directory by replacing , , . variables with the appropriate values.
virtual const DtDePathConfiguration & dePathConfiguration() const
Return the DtDePathConfiguration.
Contains makVrv::DtUniqueID type.
One pool of randomly-triggered WAV clips that can be mixed into a DtProceduralSound.
Definition: DtProceduralSoundLayer.h:37
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
Contains makVrv::DtProceduralSoundCreator abstract base class.

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)