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::Network::NodeNetwork.
Definition at line 306 of file ModalNetwork.cpp.
307{
309
310 metadata[
"fundamental"] = std::to_string(
m_fundamental) +
" Hz";
311 metadata["spectrum"] = [this]() {
314 return "HARMONIC";
316 return "INHARMONIC";
318 return "STRETCHED";
320 return "CUSTOM";
321 default:
322 return "UNKNOWN";
323 }
324 }();
326
327 double avg_amplitude = 0.0;
328 for (
const auto& mode :
m_modes) {
329 avg_amplitude += mode.amplitude;
330 }
331 avg_amplitude /=
m_modes.size();
332 metadata["avg_amplitude"] = std::to_string(avg_amplitude);
333
334 return metadata;
335}
std::vector< ModalNode > m_modes
double m_decay_multiplier
@ 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...
virtual std::unordered_map< std::string, std::string > get_metadata() const
Get network metadata for debugging/visualization.
References CUSTOM, MayaFlux::Nodes::Network::NodeNetwork::get_metadata(), HARMONIC, INHARMONIC, m_decay_multiplier, m_fundamental, m_modes, m_spectrum, and STRETCHED.