From d74435cb61e7467a3d1fada593e084d50a421d8c Mon Sep 17 00:00:00 2001 From: dschmenk Date: Thu, 27 Apr 2017 19:48:19 -0700 Subject: [PATCH] Flip phase of speaker on entry/exit. Seems to work more often than not --- src/samplesrc/a2pwm/hilopwm.pla | 23 ++++++++++++++--------- src/samplesrc/a2pwm/lfo.po | Bin 143360 -> 143360 bytes 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/samplesrc/a2pwm/hilopwm.pla b/src/samplesrc/a2pwm/hilopwm.pla index 1770f01..463a891 100755 --- a/src/samplesrc/a2pwm/hilopwm.pla +++ b/src/samplesrc/a2pwm/hilopwm.pla @@ -39,7 +39,7 @@ word heap // // Periods of scale in second octave // -byte scale[] = 166, 156, 148, 139, 132, 124, 117, 111, 104, 99, 93, 88, 83, 78 +byte scale[] = 166, 156, 148, 139, 132, 124, 117, 111, 104, 98, 92, 87, 82, 78 // // Key mapping to note // @@ -537,9 +537,9 @@ def main savePatch fin break - is '0' // Toggle speaker phase - ^$C030 - break + is '0' // Toggle speaker phase + ^$C030 + break wend fin fin @@ -556,6 +556,13 @@ def main until quit end // +// Get us into a standard 40 column video mode +// +call($FDED, $8D, 0, 0, 0) +call($FDED, $91, 0, 0, 0)// CTRL-Q = turn off 80 column +call($FDED, $8D, 0, 0, 0) +^$C000 = 0 // Turn off 80STORE +// // Get heap start. // macros = *freemem @@ -566,13 +573,11 @@ if not loadPatch fin recalcEnv envelope(current.durAtk, current.durDcy, current.durSus, current.durRel, current:rateAtk, current:rateDcy, current:rateRel) -call($FDED, $8D, 0, 0, 0) -call($FDED, $91, 0, 0, 0)// CTRL-Q = turn off 80 column -call($FDED, $8D, 0, 0, 0) -^$C000 = 0 // Turn off 80STORE grmode showMainPanel -main +^$C030 // Flip phase of speaker. This seems to help more often than not +main // Main program +^$C030 // Flip it back if modPatch if query("SAVE PATCH (Y/N)?") savePatch diff --git a/src/samplesrc/a2pwm/lfo.po b/src/samplesrc/a2pwm/lfo.po index b7166d86b42610659b0fb149c0b58e75fdb51a96..504a20fc618e753d9c1252b7ce490aba3d298599 100755 GIT binary patch delta 109 zcmZp8z|ru4V?#QNK#C&6Y$XF>28PEB3LwVja+Y3SMzhVVK_UVyNipF;n`M(ygeIRV z(VW~^;wc(3!O$SY!puO&;6Q>wh?p&yG5KGKp+K{+^f OvH%lTQ`xdI#$5o|At&nq