MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / Spawn

Method Spawn

Source/Granulator.cpp:124–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void Grain::Spawn(Granulator* owner, double time, double pos, float speedMult, float lengthInMs, float vol, float width)
125{
126 mOwner = owner;
127 mPos = pos;
128 mSpeedMult = speedMult;
129 mStartTime = time;
130 mEndTime = time + lengthInMs;
131 mStartToEnd = mEndTime - mStartTime;
132 mStartToEndInv = 1.0 / mStartToEnd;
133 mVol = vol;
134 mStereoPosition = ofRandom(-width, width);
135 mDrawPos = ofRandom(1);
136}
137
138
139inline double Grain::GetWindow(double time)

Callers 1

SpawnGrainMethod · 0.45

Calls 1

ofRandomFunction · 0.85

Tested by

no test coverage detected