MayaFlux 0.3.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 215 of file ModalNetwork.cpp.

216{
217 position = std::clamp(position, 0.0, 1.0);
218
219 if (m_spatial_distribution.empty()) {
221 }
222
223 initialize_exciter(strength);
224
225 for (size_t i = 0; i < m_modes.size(); ++i) {
226 double spatial_amp = std::sin((i + 1) * M_PI * position);
227 spatial_amp = std::abs(spatial_amp);
228
229 m_modes[i].amplitude = m_modes[i].initial_amplitude * strength * spatial_amp;
230 }
231}
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, and m_spatial_distribution.

+ Here is the call graph for this function: