# HG changeset patch -- Bitbucket.org # Project Armstrong # URL http://bitbucket.org/paniq/armstrong/overview # User tzhau # Date 1244759320 -7200 # Node ID 29f9f6e28626113918e07bb46cb6a7735ee3731a # Parent 617eef7ebbe4f1d7abcd4dce58335af991ddda08 Superfm fix (thanks bitbucket) --- a/src/plugins/lunar/fx/zephod_superfm/zephod_superfm.cpp +++ b/src/plugins/lunar/fx/zephod_superfm/zephod_superfm.cpp @@ -203,10 +203,10 @@ public: return -1.0; case 2: // Saw wave. - return (float)phi; + return (float)((phi - 0.5) * 2.0); case 3: // Inverted saw wave. - return (float)-phi; + return (float)((0.5 - phi) * 2.0); default: // Silence. return 0.0; @@ -303,6 +303,8 @@ public: } else { // Note on - set freq, reset envelopes. Voices[t].freq = ((float)*tracks[t].note / float(SAMPLING_RATE * 2)); + Voices[t].VCA.stop(); + Voices[t].ENV.stop(); Voices[t].VCA.reset(); Voices[t].ENV.reset(); } --- a/src/plugins/lunar/fx/zephod_superfm/envelope.cpp +++ b/src/plugins/lunar/fx/zephod_superfm/envelope.cpp @@ -3,6 +3,8 @@ envelope::envelope() { envcoef=0; suscounter=0; + stop(); + reset(); } envelope::~envelope() {