I made some scripts in FAUST taking inspiration from the examples of the library for physical modelling. The implementation works in faustide but when I import it in HISE I don't hear any sound when I trigger gate.
import("stdfaust.lib");
declare name "Door Knock Model";
declare description "Physical model of a door knock sound";
declare author "Mighty23)";
declare version "0.1b";
//==================== GUI Parameters ======================
freq = hslider("v:[0]Main/h:[0]Tone/[0]frequency [style:knob]", 600, 400, 2000, 0.1) : si.smoo;
woodDensity = hslider("v:[0]Main/h:[0]Tone/[1]woodDensity [style:knob]", 0.7, 0.1, 1, 0.01) : si.smoo;
hardness = hslider("v:[0]Main/h:[1]Strike/[0]strikeHardness [style:knob]", 0.8, 0.2, 1, 0.01) : si.smoo;
impact = hslider("v:[0]Main/h:[1]Strike/[1]impactIntensity [style:knob]", 0.7, 0.1, 1, 0.01) : si.smoo;
gain = hslider("v:[0]Main/h:[2]Level/[0]gain [style:knob]", 0.8, 0, 1, 0.01) : si.smoo;
gate = button("v:[0]Main/h:[2]Level/[1]gate");
//==================== Impact Sound Generator ======================
exciter = pm.strikeModel(
1200 + (hardness * 4000), // Higher HP cutoff for sharper attack
3000 + (hardness * 6000), // Higher LP cutoff
0.0005 + (0.005 * (1-hardness)), // Sharper attack
impact * 4, // Doubled impact boost
gate
) * 3; // Additional exciter gain boost
//==================== Door Body Resonator ======================
process = exciter : body : *(gain * 4) <: _,_ // Increased final gain, output in stereo
with {
// Combined resonator using parallel modes with increased gain
body = _ <: par(i, 6, resonator(i)) :> _;
resonator(i) = pm.modeFilter(
freq * freqRatio(i),
decay(i),
amplitude(i)
);
// Frequency ratios tuned for door knock character
freqRatio(0) = 1.0; // fundamental knock
freqRatio(1) = 1.47; // close ratio for solid thud
freqRatio(2) = 2.09; // door resonance
freqRatio(3) = 2.56; // wood grain texture
freqRatio(4) = 3.12; // high knock character
freqRatio(5) = 3.89; // additional texture
// Very short decay times for knock character
decay(i) = select6(i,
0.015 * (1 - (hardness * 0.3)), // fundamental
0.012 * (1 - (hardness * 0.3)), // rapid decay for impact
0.025 * woodDensity, // door resonance
0.008 * (1 - hardness), // quick texture
0.006 * (1 - hardness), // quick high knock
0.004 * woodDensity // very quick texture
);
// Increased amplitudes for stronger output
amplitude(i) = select6(i,
2.0 * woodDensity, // doubled fundamental
1.4 * woodDensity, // solid thud
0.8 * woodDensity, // strong door resonance
0.4 * (1-hardness), // textured
0.3 * hardness, // knock brightness
0.2 * (1-hardness)
);
// Utility function for 6-way selection
select6(i,a,b,c,d,e,f) = ba.take(i+1, (a,b,c,d,e,f));
};
HiseSnippet 2359.3oc4Y07baabEGTxPNhwoItSNzdaGM8.oCME.E0GVppVx5CaNwxVinrZmIiF0k.KD2QfXQ.VHIlL4Rmdn+KjSs+azaY5sdq+KzKcZu0K8b66sKAIH3GVRM0oYB7LjD699Zee76sOY10RVfKy8r3.dXHSZXTX1CiDNr3XQjQghG2MjYT3AlM6FHauSaJOvnwtFE9QlGPikrHhdom0MjFGybMJTX1miKTX96Ynd9mO8YTeZfCavRFFmH3NrWx6vkCV8vs9Ttu+9TW1w7NYnt9VMbDA6H7EIf8LqokQH04B54rWQQxlwz3Ez31FEdj4SVdYapq2pd1KY+jVtdNrkV0Zk5qVit7ZddqZYWeI2U8pCF4b64xkhnlRpjECB8YB2tMaKtJPqfS3w7V9L7Eailfl0KarSatuaemSL3pLy3plU6p9XyC3t79qOvk8QpMHC3HqSqvLSyjruElTgLlz8zlzCMa5DwCkC1Asm22rQ.DA8nPrIqono0nv2Xti.HHPVsC8B19QvK8YnzJVVUHvGk2vKIvQxEADQvqDR1qCJUt3WVb9heUQR9s77F6dnZhD99rnwtMlNDMMFKEjzoEKpB4RpeBqOgvweXe5b2Lepi9TmgPQPi.t70grduuuv2E8U3uGMBXzysA+5MM1kJoXPo2Z.cgrHIGMmB6xtDJCzgn4M2kEegTDBEBiD+fLGgahOUNb5DVn0aCveLTLDCTAwbY2rEh2hbLqolicSMwGZdHW5zd713LiwFAO0+KrwdUlef4dddLG4.C7dl6+qtqkg2b0Oep50UVJjTk5+o8VIP3xHpkYw7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