MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ excite_at_position()

void MayaFlux::Nodes::Network::ModalNetwork::excite_at_position ( double  position,
double  strength = 1.0 
)

Excite modes based on normalized strike position.

Parameters
positionNormalized position (0.0 = node, 1.0 = antinode)
strengthOverall excitation strength

Amplitude distribution follows spatial mode shapes:

  • Position 0.5 excites all modes equally (center strike)
  • Position 0.0 or 1.0 excites odd modes only (edge strike)
  • Intermediate positions create physical strike distributions

Definition at line 254 of file ModalNetwork.cpp.

255{
256 position = std::clamp(position, 0.0, 1.0);
257
258 if (m_spatial_distribution.empty()) {
260 }
261
262 initialize_exciter(strength);
263
264 for (size_t i = 0; i < m_modes.size(); ++i) {
265 double spatial_amp = std::sin((i + 1) * M_PI * position);
266 spatial_amp = std::abs(spatial_amp);
267
268 m_modes[i].amplitude = m_modes[i].initial_amplitude * strength * spatial_amp;
269 }
270}
std::optional< glm::vec3 > position
Definition Decoder.cpp:93
void compute_spatial_distribution()
Compute spatial amplitude distribution.
void initialize_exciter(double strength)
Initialize exciter for new excitation event.
std::vector< double > m_spatial_distribution

References compute_spatial_distribution(), initialize_exciter(), m_modes, m_spatial_distribution, and position.

+ Here is the call graph for this function: