Get network metadata for debugging/visualization.
- Returns
- Map of property names to string representations
Subclasses can override to expose internal state:
- Particle count, average velocity
- Modal frequencies, decay times
- Waveguide delay lengths etc.
Reimplemented from MayaFlux::Nodes::NodeNetwork.
Definition at line 305 of file ModalNetwork.cpp.
306{
308
309 metadata[
"fundamental"] = std::to_string(
m_fundamental) +
" Hz";
310 metadata["spectrum"] = [this]() {
313 return "HARMONIC";
315 return "INHARMONIC";
317 return "STRETCHED";
319 return "CUSTOM";
320 default:
321 return "UNKNOWN";
322 }
323 }();
325
326 double avg_amplitude = 0.0;
327 for (
const auto& mode :
m_modes) {
328 avg_amplitude += mode.amplitude;
329 }
330 avg_amplitude /=
m_modes.size();
331 metadata["avg_amplitude"] = std::to_string(avg_amplitude);
332
333 return metadata;
334}
@ STRETCHED
Piano-like stiffness: f, 2.01f, 3.02f, 4.04f...
@ INHARMONIC
Bell-like: f, 2.76f, 5.40f, 8.93f, 13.34f...
@ CUSTOM
User-provided frequency ratios.
@ HARMONIC
Integer harmonics: f, 2f, 3f, 4f...
std::vector< ModalNode > m_modes
double m_decay_multiplier
virtual std::unordered_map< std::string, std::string > get_metadata() const
Get network metadata for debugging/visualization.
References CUSTOM, MayaFlux::Nodes::NodeNetwork::get_metadata(), HARMONIC, INHARMONIC, m_decay_multiplier, m_fundamental, m_modes, m_spectrum, and STRETCHED.