%! % Low End Triangle Series Digital Sinewave Generators % =================================================== % Copyright c 2020 by Don Lancaster & Synergetics, Box 809, Thatcher, AZ, 85552 % (928) 428-4073 Email: don@tinaja.com Website: http://www.tinaja.com % Consulting services available http://www.tinaja.com/info01.html % All commercial rights and all electronic media rights ~fully~ reserved. % Linking usually welcome. Reposting expressly forbidden. Version 1.1 % Development and cataloging of some ultra low end digital sinewaves. % http://www.tinaja.com/psutils/lowend.pdf % http://www.tinaja.com/psutils/lowend.psl % http://www.tinaja.com/psutils/lowend.log %%%%%%%%% % This comment is a reminder that Distiller needs an //acrodist.exe /F to use disk files %%%%%%%%% % Define and alter your full gonzo.ps path reminder here It might be % C:/Users/don/Desktop/Dist-FR/gonzo.ps % Preplace gonzo.ps from http://www.tinaja.com/post01.shtml#gonzo to above directory % Make sure there are no previously active instances of distiller. % Then run distiller ONLY from % //acrodist.exe /F run % Then drag and drop this file into Distiller. %%%%%%%%% % Set Directory Headers %%%%%%%% % /gonzodirectory (C:/Users/Don/Desktop/Ghost/gonzo.psl) run % use internal ) store % dbl rvse slashes for ps /imagelocaldirectory (C:/Users/don/Desktop/canal/images/) store % sin fwd slashes for win /imageremotedirectory (http://www.tinaja.com/canal/images/) store % sin fwd slashes for chrome % mergestr merges the two top stack strings into one top stack string /mergestr {2 copy length exch length add string dup dup 4 3 roll 4 index length exch putinterval 3 1 roll exch 0 exch putinterval} def %%%%%%%%% % This code activates gonzo utilities for this document %%%%%%%%% % Required preload of gonzo.ps and adjusted for your machine per above. % gonzodirectory (gonzo.ps) mergestr run % double reverse slashes in PS! (C:/Users/Don/Desktop/Ghost/gonzo.psl) run % This will need modified for your pc! /guru { gonzo begin ps.util.1 begin printerror nuisance begin} def guru % activate gonzo utilities %%%%%%%%%% % This code locks pdfmark commands out of a PostScript printer. %%%%%%%%%% /pdfmark where {pop}{userdict /pdfmark /cleartomark load put} ifelse %%%%%%%%%% % This code changes the page size to smaller %%%%%%%%%% [/CropBox [0 0 520 620] % set the weird size in points X Y. /PAGES pdfmark %%%%%%%%%% % This code is needed for the automatic url placer %%%%%%%%%% % Requires a defined name for the url below % Activate with text text |/surl urlname |/eurl text text % /surl "start url" marks the beginning of a text sequence to be urled. % It also paints the text blue... /surl {mark /blue cvx 0.33 /setgray cvx % change text to blue /currentpoint cvx % remember box start /urly /exch cvx /store cvx /urlx /exch cvx /store cvx ] cvx % complete deferred command printlist exch 3 index exch put % stuff into gonzo printlist exch 1 add exch % increment gonzo list count } def % /eurl "end url" unmarks the end of a text sequence and sets up % the pdfmark needed to define the Acrobat web link. /eurl {mark % start deferred proc exch % position url string % /black cvx 0 /setgray cvx % turn blue marker off % maintextcolor /setrgbcolor cvx % reset to main text color??? /aqua cvx /black cvx /makeurl cvx % defer call of url builder ] cvx % complete deferred proc printlist exch 3 index exch % stuff into gonzo printlist put exch 1 add exch % increment gonzo list count } def % /makeurl generates the pdfmark, receiving a {(urlstring) makeurl}. % Note that it is not called until formatted printlist time... /urlover 0.2 def % fraction of hot area over bounds /makeurl { /cururlname exch store % save the url string mark % start pdfmark currentfont /ScaleMatrix get 3 get /fsize exch store % guess height /Rect [ urlx fsize urlover mul sub % set box left x urly fsize urlover mul sub % set box left y currentpoint exch fsize urlover mul add exch fsize add ] /Border [ 0 0 0] % [0 0 0 ] = none; [0 0 2] = debug /Color [ .7 0 0 ] /Action <> /Subtype /Link /ANN % annotation type pdfmark % call pdf operators } def % /makeurlx generates the box specific pdfmark, receiving % a {(urlstring) makeurl}. % Note that it is not called until formatted printlist time... /makeurlx { /cururlnamex exch store % save the url string mark % start pdfmark /Rect [ xpos % set box left x ypos 0.9 sub % set box left y xpos 2.8 add % box right x ypos 0.9 sub 2.8 add % box right y ] /Border [ 0 0 0] % [0 0 0 ] = none; [0 0 2] = debug /Color [ .7 0 0 ] /Action <> /Subtype /Link /ANN % annotation type pdfmark % call pdf operators } def %%%%%%%%%%% % This code converts a .JPG image into a PS image %%%%%%%%%%% /jpegimageprocwithlink { % hoffset voffset hres vres urlfrom urlto save /snap2 exch def /inurllink exch store % grab link filename /infilename exch store % grab passed pix file /photoscale exch store /vpixels exch store /hpixels exch store % (\nvpixels = )print vpixels == % (\nhpixels = )print hpixels == % (\photoscale = ) print photoscale == % (\ninurllink = ) print inurllink == % (\ninfilemane = ) print infilename == translate % adjust position for final figure ??? inurllink setareaurl % autolink sizing /DeviceRGB setcolorspace % pick color model 0 0 translate % set page position hpixels vpixels scale % magnify unit square photoscale dup scale /infile infilename (r) file def % establish input read file /Data {infile /DCTDecode filter} def % define a data source << % start image dicationary /ImageType 1 % always one /Width hpixels % JPEG width in pixels /Height vpixels % JPEG height in pixels /ImageMatrix [hpixels 0 0 vpixels neg 0 vpixels ] /DataSource Data % proc to get filtered JPEG /BitsPerComponent 8 % color resolution /Decode [0 1 0 1 0 1] % per red book 4.10 >> image % call the image operator ypos snap2 restore /ypos exch def } def /setareaurl { % for auto include routine /cururlname exch store mark % start pdfmark /Rect [ 0 0 hpixels photoscale mul vpixels photoscale mul ] /Border [ 0 0 0] % [0 0 0 ] = none; [0 0 2] = debug /Color [ .7 0 0 ] /Action <> /Subtype /Link /ANN % annotation type pdfmark % call pdf operators } def %%%%%%%%%%% % This code inserts a PS figure proc into a fixed location %%%%%%%%%%% %%%%%%%%%%% % This code autopositions a PS figure proc %%%%%%%%%%% %%% task specific code starts here %%%%%%%%%%% % This image code for sequential pages %%%%%%%%%%% /startnewpage { black beige 0.35 setgray 21 -2.5 (|3\320|j|j) ggnum 60 string cvs mergestr (|j |j) mergestr pagenum 10 string cvs mergestr (|j|j\320) mergestr cc aqua showpage %% start next page /pagenum pagenum 1 add store 50 50 10 setgrid % create grid true pop false {32 setwebtint 40 56 showgrid 0 setwebtint} if setpagefonts font1 textleft texttop } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%% document specific resources start here %%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%% % define fonts and main document gonzo params %%%%%%%%%% /setpagefonts { /cstretch 0.015 def /sstretch 0.015 def /font0 /StoneSans-Bold 1.6 gonzofont /font1 /StoneSans 0.95 gonzofont /font2 /StoneSans [0.95 0 0.25 0.95 0 0 ] gonzofont /font4 /StoneSans 0.85 gonzofont /font3 /StoneSans-Bold 0.85 gonzofont /font6 /StoneSans-Bold 0.85 gonzofont /font7 /StoneSans-Bold 1.05 gonzofont % subheaders /font8 /StoneSans-Bold [0.65 0 0 0.65 0 0.4] gonzofont /font9 /StoneSans-Bold 1.05 gonzofont /txtwide 36 store /yinc 1.2 store /kern 0.1 store /texttop 51 store /textleft 3 store /amacro {(zy0) stringmacro /ypos ypos ypara add def} def % start drop cap /bmacro {(iFy1) stringmacro /ypos ypos ypara add def} def % finish drop cap } store /nogrid {true} store /ggnum (Triangle Series Digital Sinewave Generators) store % header for pagenumber /pagenum 1 def % initial pagenumber %%% Page Navigation Utilities %%%% % requires gonzo utilities from http://www.tinaja.com/gonzo.psl /kern 0.1 store /navpagenum 1 store /prevpage 1 store /lastpage false store /baux { save /ssnap exch store /sym exch store translate 0 0 mt 2 pu 2 pr 2 pd closepath gsave 0.94 0.94 0.98 setrgbcolor fill grestore 0.8 dup dup setrgbcolor line2 stroke 0.5 dup dup setrgbcolor /font1 /Helvetica 1.5 gonzofont font1 1 0.5 sym cc ssnap restore} store black /glyphnext { 53 (>) baux } store /glyphprev {53 (<) baux } store /glyphone { 53 (1) baux} store /glyphback {53 (<|k|k|k<) baux} store /aaaa { [ /Rect [0 53 2 55] /Page/Next /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [2.5 53 4.5 55] /Page prevpage /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark } store /bbbb { [ /Rect [0 53 2 55] /Page /Prev /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [2.5 53 4.5 55] /Page 1 /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [5 53 7 55] /Page/Next /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [7.5 53 9.5 55] /Page prevpage /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark } store /cccc { [ /Rect [0 53 2 55] /Page /Prev /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [2.5 53 4.5 55] /Page 1 /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [5 53 7 55] /Page prevpage /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark } store /addpagenav { navpagenum 1 eq { 0 glyphnext 2.5 glyphback aaaa} if navpagenum 1 ne lastpage not and {0 glyphprev 2.5 glyphone 5 glyphnext 7.5 glyphback bbbb} if lastpage {0 glyphprev 2.5 glyphone 5 glyphback cccc} if /prevpage pagenum store /navpagenum navpagenum 1 add store} store % ///////// (A) WEB FRIENDLY COLOR UTILITIES ///////////// % tintmat is a self-generating list of 216 triple color values /webtintmat [ 0 1 5 { /a exch store 0 1 5 { /b exch store 0 1 5 { 5 div b 5 div a 5 div }for } for } for ] def % setwebtint accepts a color number 0 to 215 and then % sets the PostScript color generator for later use... /setwebtint { abs cvi 216 cvi mod % restrict range webtintmat exch 3 mul 3 getinterval % get values from table aload pop setrgbcolor} def % and set them %%%%%%%%%%%%%%%% begin kml experiment %%%%%%%%%%%%%%%%%%%%%%%%%%% % this still needs a way for Chrome to go directly to Google Earth. % presently opens kml textfile instead. Chrome extensions not helping. % presently usable with this manual workaround: Do a save as from the % clicked kml text. Then click on the saved kml file. /clickforkml { false { save /ksnap exch store 34 53 translate 0 0 mt 2 pu 7.2 pr 2 pd closepath gsave 0.94 0.94 0.98 setrgbcolor fill grestore 0.8 0.8 0.8 setrgbcolor line2 stroke 0.6 0.6 (|6|/surl Click for KML |/kmlx ) cl ksnap restore } if } store % end kml link %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%% actual page content starts here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%% % notebox uses modified roundpath %%%%%%%%%%%%% /notebox { % hpos vpos hsize vsize corrad titsize title body save /boxsnap exch store /yinc 1.1 store /body exch store /title exch store /titsize exch store /corrad exch store /hsize exch store /vsize exch store translate hsize 2 div 0 moveto 0 0 0 vsize corrad arct 0 vsize hsize vsize corrad arct hsize vsize hsize 0 corrad arct hsize 0 0 0 corrad arct closepath gsave 141 setwebtint fill grestore 54 pop 48 setwebtint line3 stroke hsize 2 div vsize titsize sub moveto 0 vsize titsize sub lineto 0 vsize hsize vsize corrad arct hsize vsize hsize vsize titsize sub corrad arct hsize vsize titsize sub lineto closepath 54 pop 48 setwebtint fill white font3 hsize 2 div vsize 1.4 sub title cc 1 2 3 4 black font3 hsize 2 div vsize titsize sub 1.2 sub body cc boxsnap restore } store % zzzz /webtintmat [ 0 1 5 { /a exch store 0 1 5 { /b exch store 0 1 5 { 5 div b 5 div a 5 div }for } for } for ] def % setwebtint accepts a color number 0 to 215 and then % sets the PostScript color generator for later use... /setwebtint { abs cvi 216 cvi mod % restrict range webtintmat exch 3 mul 3 getinterval % get values from table aload pop setrgbcolor} def % and set them % linking old /to and t1... /tint {mark exch /setwebtint cvx] cvx printlist exch 3 index exch put exch 1 add exch} def /ta {121 tint font6} store % aqua /tb {0 tint font6} store % black /tg {33 tint font6} store % green /tr {5 tint font6} store % red /tpu {183 tint font6} store % burple /tp reserved? /tx {0 tint font1} store % restore black /cmacro {121 setwebtint (znhL7) stringmacro} store /dmacro {0 setwebtint(pL1hz) stringmacro } store << % linked url's /gurugram (https://www.tinaja.com/ggsamp1.shtml) /maildon (mailto:don@tinaja.com) /tinaja (https://www.tinaja.com) /amradhist (https://worldradiohistory.com/) /hackar4 (https://www.tinaja.com/glib/hackar4.pdf) /bytecopy (https://www.tinaja.com/third/Byte_sinewaves.pdf) /wikfourier (https://en.wikipedia.org/wiki/Fourier_series) /connectpdf (https://ww.tinaja.com/glib/muse152.pdf) /connectpsl (https://ww.tinaja.com/glib/muse152.psl) /fibonacci (https://www.tinaja.com/glib/muse89.pdf) /wiktriangle (https://en.wikipedia.org/wiki/Triangular_number) /fouriertut (https://www.tinaja.com/glib/muse90.pdf) /msjs (https://www.tinaja.com/xxxx1.js) /mscalc (https://www.tinaja.com/mscalc4mq.shtml) /skilling (https://www.amazon.com/Electrical-Engineering-Circuits-Hildreth-Skilling/dp/0471794007) /skillingus (https://www.tinaja.com/psutils/skilling443.pdf) /postscript (https://www.tinaja.com/pssamp1.shtml) /plrm (https://search.yahoo.com/search?fr=mcafee&type=E211US91217G0&p=postscript+reference+m) /newfourier (https://www.tinaja.com/psutils/fourier1.psl) /newfourierdemo (https://www.tinaja.com/psutils/fourier1demo.psl) /lowend1source (https://www.tinaja.com/psutils/lowend1.pdf) /preva (http://www.tinaja.com/psutils/sincat1a.pdf) /prevb (http://www.tinaja.com/psutils/sincat1b.pdf) /prevc (http://www.tinaja.com/psutils/sincat1c.pdf) /sourcecode (http://www.tinaja.com/psutils/newsincat.pdf) >> {mark exch /eurl cvx ] cvx def} forall /ggnum (Triangle Series Digital Sinewave Generators) store % header for pagenumber /pagenum 1 def % initial pagenumber %%%%%%%%%%%%%% % title page %%%%%%%%%%%%% /tabs [2.3 5 10] store 50 50 10 setgrid true pop false{ 32 setwebtint 40 56 showgrid} if setpagefonts 20 48.3 0.7 add 0.5 add % 1 sub (|/ta |0Low |jEnd |jTriangle |jSeries)cc 20 46.3 0.7 add 0.5 add % 1 sub (|/ta |0Digital |jSinewave |jGenerators) cc black font1 textleft 44.3 0.5 add (|/ta |6Don Lancaster|/tx |1 Synergetics, Box 809, Thatcher, AZ 85552 copyright c2020 as |/surl |6GuruGram|/gurugram |1#124 |1 All rights reserved |/surl |6https://www.tinaja.com|/tinaja |/surl don@tinaja.com|1|/maildon |/ta (928) 428-4073|/tx |/ta |0M|/tx any digital sine or cosine generators can be based on the |/ta double integration|/tx method. |/ta The integral of a sinewave is minus the cosine. The integral of a cosine |/ta is plus the sine|/tx . |h Cascade and invert the two and close them on themselves and you have a sine and cosine generator. By definition of their fundamental differential equations. |h Yeah, analog versions have some amplitude stability problems (|jwhich HP first brilliantly solved with a nonlinear pilot light|j) But it is a simple matter to force digital sinewave solutions to unity loop gain, especially when using integer math. |h A superb (|jbut flawed|j) double integration method was first described in the December 1994 |/surl |6Byte Magazine|/amradhist |1on pages 217 and 218. A copy of which can be found |/surl |6here|/bytecopy |1. |h The flaw was that they used a triangle wave instead of a sine for impressively fast and compact code. Despite |/ta integrators inherently being lowpass filters|/tx , the net result was unfiltered distortion in the one to four percent range. |h An initial workaround involving clipping triangle waves so they looked more like a cosine. Which significantly reduced the unfiltered distortion with only minor increases in code size and processing time. This was found as column #85 |/surl |6here|1|/hackar4 . |h Consider the following "table lookup" digital sinewave\274 |h  |t|/tpu [ 14 13 11 8 4 0 -4 -8 -11 -13 -14 -14 -13 -11 -8 -4 0 4 8 11 13 14 ]|/tx |h Which can be difference integrated from this |/ta IDQ|/tx internal digital quarter of this triangle series "sine" wave\274 |h   |t|t|t|/tpu /IDQ [ -1 -2 -3 -4 -4 ] store |h |1which expands as\274 |t|t|/tpu [ -1 -2 -3 -4 -4 -4 -4 -3 -2 -1 0 1 2 3 4 4 4 4 3 2 1 ] |h ) cl addpagenav % clickforkml %%%%%% second page %%%%%%% startnewpage 3 52 ( Yes, this is a low amplitude result with a crude sample rate. But it has several astounding properties. Its amplitude or |/ta size|/tx is 14. Otherwise known as the |/ta |6integrated sum|1|/tx of all your IDQ terms. |h Its |/ta speed|/tx |1is four times the IDQ term count plus two (|jfor the zeros|j) or 22. |/ta Its third |/ta |6harmonic distortion is ZERO (!!)|/tx |1and its fifth harmonic is a mere 0.19 percent! |/ta Before filtering!!|/tx |1 There are no even harmonics. Several very high frequency harmonics are easily dealt with. |h You start your cosine array with |/ta |6size|1|/tx and then add (|jintegrate|j) one IDQ term at a time. Until it goes once again back around to |/ta |6size|1|/tx . |h The maximum internal sine clip will be the rightmost IDQ term. Apparently only an |/ta |6even|/tx |1 number of identical rightmost terms permit (|jbut do not at all guarantee|j) the rather rare zero third harmonics. |h Note that the above |/tpu |6[ 14 13 11 \274 ]|1|/tx code can be scaled by a factor of 1 through 9 while retaining the same distortion and speed. Low end 8-bit micros restrict your maximum integers to a +127 to -127 range. |h Only a very few |/ta |6size|1|/tx and IDQ choices will yield usefully low distortions. |h These can sometimes be helped by going to one or more "soft" clips in which selected earlier IDQ terms are appropriately repeated. |h The best found so far has been an IDQ choice of |/tpu |6[1 2 3 4 5 6 7 8 8 9 9 10 10 10 ]|/tx |1 which has an unfiltered third harmonic of .109 percent and a total harmonic distortion 3 through 9 of 0.141 percent. |h |/cmacro Fourier |jSeries |/dmacro Sine and Cosine distortion is normally measured by the use of |/surl |6Fourier Series|/wikfourier |/tx . A tutorial can be found |/surl |6here|/fouriertut |1 and some very fancy code (|j64 bit math usable to the 177th harmonic!|j) can be found in |/surl |6this JavaScript addon|/msjs |1 to our |/surl |6Magic Sinewave|/mscalc |/surl |6Calculator|/mscalc |1. |h Skilling in his classic 1967 |/surl |6Electrical Engineering Circuits|/skilling |1 provided a brilliant but excessively painful |/ta |6special numeric method|/tx |1 for calculating low Fourier Harmonics. Details of the original approach can be found |/surl |6here|/skillingus |1. |h I did manage to eke out a modest 3,756,894:1 speedup by rewriting his table in |/surl |6PostScript|/postscript |1. Find the raw code |/surl |6here|/newfourier |1, a demo |/surl |6here|/newfourierdemo |1, and actual use details in the sourcecode for this document |/surl |6here|/lowend1source |1. |h In its present form, the code only finds the fundamental and the third, fifth, seventh, and ninth Fourier Cosine terms. It accepts a\274 |h |t|t |/tpu /signal = [64 63 61 57 \274 57 61 63 64 ]|/tx |1 ) cl addpagenav % clickforkml startnewpage %%%%%% third wpage /tabs [8 2 23] store 3 52 ( \274stack input to its |/tpu |6findfourier|1|/tx command and returns definitions for |/tpu |6intf3|1|/tx , |/tpu |6intf5|1|/tx , |/tpu intf7|/tx |1, |/tpu |6 intf9|/tx |1, and |/tpu |6totaldist|/tx |1 calculations. |h |/cmacro Triangle |jSeries |/dmacro A little known and seldom used |/surl |6triangle series|/wiktriangle |1 forms the basis of the original Byte generators as well as tools for exploring fancier new candidates. It is somewhat similar to but different from a |/surl |6Fibonacci Series|1|/fibonacci . |h The triangle series consists of the sum of its two previous terms. As in\274 |h |t |/tpu 0 1 3 6 10 15 21 28 36 45 55 66 78 \274 |/tx |1 |h It is called a triangular series in that |/ta |6each successive "n" can be arranged into |/ta an |6equalateral triangle|/tx |1. The most common use is finding the total number of connections between n objects. And usually expressed as |/tpu |6n(n+1)/2|/tx |1. We looked at this |/surl |6here|/connectpdf |1 with its sourcecode |/surl |6here|/connectpsl |1. |h The neat thing about a triangle series for cosine approximation is that |/ta |6it puts |/ta |6"little pieces" on the "more bent" portions of the curve|/tx |1, and vice versa. And thus has enormous potential for minimizing distortion. |h |/cmacro Some |jCode |/dmacro Two approaches can be used here to find candidate digital sinewaves suitable to create a catalog for minimalist low end 8-bit microcomputers. |h The original Byte code can be modified to allow for hard or soft single or multiple clipping or single versus double triangle peaks. Or fancier PostScript code can be used in a |/ta |6generate3|1|/tx routine to evaluate IDQ candidates. |h The modified Byte code looks like this with some of its red custom additions\274 |h |t|t|/tpu |6/cosval size store|/tx |1 |t % initialize to size |h |t|t|/tpu |6/increment { |/tx |1 |t % once per speed count |t|t|/tpu |6/sinval sinval cosval 0 gt {-1}{+1}ifelse |t|t|/tr |6false {cosval 0 eq {pop 0} if} if|/tx |1 |t % for double peak |h |t|t|/tpu |6/cosval cosval sinval |t|t |/tr |6 false {|jsinval 10 ge {pop 10} if } if|/tx |t % for top clip |t|t |/tr |6 false {|jsinval 10 neg lt {pop 10 neg} if } if|/tx |1|t % for bottom clip |t|t|/tpu add store |t|t|/tpu } store|/tx |1 |h This has been written in |/ta |6PostScript|/tx with its reference |/surl |6here|/plrm |1, but is easily adapted to most any micros raw machine language code. The |/tr |6red|1|/tx additions shown above will need altered for each and every low end sinewave adaption. Custom or device specific code will be needed for single or double soft clipping. |h ) cl addpagenav % clikcforkml %%%% fourth page %%%%% startnewpage /tabs [2 6 26] store 3 52 ( The more elaborate PostScript |/tpu |6generate3|1|/tx code accepts IDQ's and converts them to graphic displays of relevant data. Such as these "better" choices\274 |h |t|/tpu |6 [ |t|/tr |6[ 1 2 3 4 4] (14-22-04)] |1 |t|t|t% .000 .394|/tx |t|/tpu |6[ 1 2 3 4 5 6 6 6] (33-34-06)]|/tx |1 |t|t|t% .000 .551 |t|/tpu |6[ 1 2 3 4 5 5 6 6] (32-34-06)]|/tx |1 |t|t|t% .183 .251 |t|/tpu |6[ 1 2 3 4 5 6 6 7 7] (41-38-07)]|/tx |1 |t|t|t% .362 .392 |t|/tpu |6[ 1 2 3 4 5 6 7 8 8 8 8] (60-46-08)]|/tx |1 |t|t|t% .000 .628 |t|/tpu |6[ 1 2 3 4 5 6 7 7 8 8 8] (59-46-08)]|/tx |1 |t|t|t% .073 .253 |t|/tpu |6[1 2 3 4 5 6 7 8 9 10 10 10 10 10 ] (92-58-10)]|/tx |1 |t|t|t% .000 .674 |t|/tpu |6[1 2 3 4 5 6 7 8 9 9 10 10 10 10 ] (94-58-10)]|/tx |1 |t|t|t% .036 .410 |t|/tr |6[1 2 3 4 5 6 7 8 8 9 9 10 10 10 ] (92-58-10)]| |1 |t|t|t% .109 .141|/tx |t|/tpu |6[1 2 3 4 5 6 7 8 9 10 10 10 11 11 11 ] (108-62-11)]|/tx |1 |t|t|t% .166 .361 |t|/tpu |6 ]{ generate3} forall|/tx |1 The shortened data values shown in the title string are |/tpu |6size-speed-sinclip|1|/tx , while the first comment value is the third harmonic distortion in percent and the second the total THD distortion H3 through H9. |h So far, |/tpu 14-22-04|1|/tx and its scaled gang members seem to utterly and totally blow away all of the other candidates. Especially since their unfiltered fifth harmonics are only a remarkably low 0.19 percent. Plus their ridiculously shorter size. |h As before, lower |/tpu |6size|1|/tx values may be integer scaled so long as none of them ever exceed 127. The actual |/tpu |6generate3|/tx |1 code can be read from the |/surl |6sourcecode for this|/sourcecode |/surl doc|1|/sourcecode . |h |/cmacro The |jCurrent |jCatalog |/dmacro The rest of our pages here are a catalog of many of the triangle series low end sinewaves explored to date. |h Additional material can be found in our earlier docs |/surl |6here|1|/preva , |/surl |6here|1|/prevb , and |/surl |6here|1|/prevc . ) cl addpagenav % clickforkml % startnewpage showpage %%%%%%%%%%%%%%%%%%%%% Catalog starts here %%%%%%%%%%%%%%%%%%%%%%%%%%%%% % A modified efficient digital sinewave algorithm scanner % ===================================== % Don Lancaster and Synergetics www.tinaja.com % Some ultra compact low end digital sinewave generators % were described in Column 85 of https://www.tinaja.com/glib/hackar4.pdf % It appears that better performance and lower distortion can be % had by making the initial triangle approximation look more like % a true cosine wave. This can be done by adding adjustments to a % simple clipping. At a penalty of only a few bytes extra. % This code scans for candidate sinewaves having no dc offset and % a "unity" cosine match % This file is http://www.tinaja.com/psutils/sincat1.psl It is normally % run by sending the file to Distiller by way of command line //acrodist /F. % It should also be GhostScript or Google Drive compatible. % The companion demo is http://www.tinaja.com/psutils/sincat1.pdf % All distortions are BEFORE filtering! % Development services available via don@tinaja.com. % ///////// (A) WEB FRIENDLY COLOR UTILITIES ///////////// % tintmat is a self-generating list of 216 triple color values /webtintmat [ 0 1 5 { /a exch store 0 1 5 { /b exch store 0 1 5 { 5 div b 5 div a 5 div }for } for } for ] def % setwebtint accepts a color number 0 to 215 and then % sets the PostScript color generator for later use... /setwebtint { abs cvi 216 cvi mod % restrict range webtintmat exch 3 mul 3 getinterval % get values from table aload pop setrgbcolor} def % and set them % The blocks are arranged as red to the right, green % up in order of increasing blue. % Some "pure color" sequences are % red: 0 1 2 3 4 5 % orange: 0 7 8 15 16 23 (sort of) % yellow: 0 7 14 21 28 35 % green: 0 6 12 18 24 30 % aqua: 0 42 84 126 168 210 % blue: 0 36 72 108 144 180 % magenta: 0 37 74 111 148 185 % purple 0 73 73 110 147 183 (sort of) % gray 0 43 86 129 172 215 % ////////////// GONZO EXCERPTS ////////////////// /setgrid { /blocksize exch def translate % simplified blocksize dup scale} def % repeats [ proc distance trips] xrpt /xrpt{gsave aload pop /trips exch def /dist exch def /rproc exch def trips { gsave rproc grestore dist 0 translate } repeat grestore} def /yrpt{gsave aload pop /trips exch def /dist exch def /rproc exch def trips { gsave rproc grestore 0 dist translate } repeat grestore} def % mergestr merges the two top stack strings into one top stack string /mergestr {2 copy length exch length add string dup dup 4 3 roll 4 index length exch putinterval 3 1 roll exch 0 exch putinterval} def % convert an array of low integers into a string /makestring {dup length string dup /NullEncode filter 3 -1 roll {1 index exch write} forall pop} def /showgrid {gsave /vblocks exch def /hblocks exch def thingridlines setlinewidth [{0 0 moveto 0 vblocks rlineto stroke} 1 hblocks 1 add] xrpt [{0 0 moveto hblocks 0 rlineto stroke} 1 vblocks 1 add] yrpt fatterborder { gsave newpath 0 0.96 blocksize div dtransform round idtransform setlinewidth pop 2 setlinecap 0 0 moveto hblocks 0 rlineto 0 vblocks rlineto hblocks neg 0 rlineto closepath stroke grestore} if fat5 { gsave newpath 0 0.48 blocksize div dtransform round idtransform setlinewidth pop mark {5 0 moveto 0 vblocks rlineto stroke} 5 hblocks 5 div cvi] xrpt mark {0 5 moveto hblocks 0 rlineto stroke} 5 vblocks 5 div cvi] yrpt grestore} if fatter10 { gsave newpath 0 0.96 blocksize div dtransform round idtransform setlinewidth pop mark {10 0 moveto 0 vblocks rlineto stroke} 10 hblocks 10 div cvi] xrpt mark {0 10 moveto hblocks 0 rlineto stroke} 10 vblocks 10 div cvi] yrpt grestore} if grestore} def /fatterborder {true } store /fat5 {true} store /fatter10 {true} store /thingridlines {0} store /dot { currentpoint newpath 0.150 0 360 arc fill } def /mdot { moveto dot} def %%%%%%%%%%%%%%%%%%%%%%%% Fourier Service Module %%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%% fourier begins here %%%%%%%%%%%%%%%%% zzz /findfourier { % based on skilling 443 % (\nentering findfor with signal of ) print signal == signal length 1 sub /points exch store 360 points div /inc exch store 0 % fundamental cosine 1 1 points { /posn exch store posn inc mul inc 2 div sub /ang exch store signal posn get signal posn 1 sub get add 2 div ang cos mul add } for /intf1 exch points div store 0 % third harmonic cosine 1 1 points { /posn exch store posn inc mul inc 2 div sub /ang exch store signal posn get signal posn 1 sub get add 2 div ang 3 mul cos mul add} for /intf3 exch points dup 0 eq {pop 0.00001} if div intf1 dup 0 eq {pop 0.00001} if div store % relative to fundamental 0 1 1 points { /posn exch store posn inc % fifth harmonic cosine mul inc 2 div sub /ang exch store signal posn get signal posn 1 sub get add 2 div ang 5 mul cos mul add } for /intf5 exch points dup 0 eq {pop 0.00001} if div intf1 dup 0 eq {pop 0.00001} if div store 0 1 1 points { /posn exch store posn inc % seventh harmonic cosine mul inc 2 div sub /ang exch store signal posn get signal posn 1 sub get add 2 div ang 7 mul cos mul add } for /intf7 exch points dup 0 eq {pop 0.00001} if div intf1 dup 0 eq {pop 0.00001} if div store 0 1 1 points { /posn exch store posn inc % ninth harmonic cosine mul inc 2 div sub /ang exch store signal posn get signal posn 1 sub get add 2 div ang 9 mul cos mul add } for /intf9 exch points dup 0 eq {pop 0.00001} if div intf1 dup 0 eq {pop 0.00001} if div store 0 1 1 points { /posn exch store posn inc % eleventh harmonic cosine mul inc 2 div sub /ang exch store signal posn get signal posn 1 sub get add 2 div ang 11 mul cos mul add } for /intf11 exch points dup 0 eq {pop 0.00001} if div intf1 dup 0 eq {pop 0.00001} if div store intf3 dup mul % totl distortion 3-9 percent intf5 dup mul add intf7 dup mul add intf9 dup mul add sqrt 100 mul /totaldist exch store } store /fourierdemo { % test module only /signal [ % triangle wave -1/9 1/25 -1/49 1/81 slight errors normal for this sample 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20] store findfourier intf1 == intf3 == intf5 == intf7 == intf9 == totaldist == (\n) print } store % fourierdemo % comment to stop fourier test /findharmonics { % make sure speed is exactly one cycle! /cosval size store /sinval 0 store mark % start signal array cosval 0 1 speed 2 sub {pop increment cosval } for ] /signal exch store signal == % comment to stop report signal length == findfourier intf3 == intf5 == intf7 == intf9 == totaldist == % reportharms } store %%%%%%%%%%%%%%%%%%%%%%%%%%% end Fourier service modules %%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%% triangle series increment code %%%%%%%%%%%%%%%%% /clipped true store /doublepeak true store /softclip true store /sinclip 10 store % softclip presently has to be manually overrided /increment { % softclip not yet valid /sinval sinval cosval 0 gt {-1}{+1}ifelse doublepeak {cosval 0 eq {pop 0} if} if % for double peak add store /cosval cosval sinval % softclip {sinval sinclip eq {pop sinclip 1 sub} if } store % softclip { sinval neg sinclip eq {pop sinclip neg 1 add} if } store clipped { sinval sinclip ge {pop sinclip} if } if clipped { sinval sinclip neg lt {pop sinclip neg} if } if add store } store /findsignal { % this version requires predefined speed /signal mark size 0 1 speed 1 sub {increment cosval} for ] store signal == signal == } store /makepage {50 50 10 setgrid 32 setwebtint 40 56 showgrid findsignaldelta gsave 1 13 translate refamplitudes showoutputcos showintsin showrefcos printsindata validtridata { printtridata } if showrefsin grestore printcosdata printcosdata printdata printtitle printharm addpagenav showpage } store %%%%% /refamplitudes {5 setwebtint 0 setlinewidth 0 0 moveto 38 0 lineto stroke 0 sinclip 10 div moveto 38 sinclip 10 div lineto stroke 0 sinclip 10 div neg moveto 38 sinclip neg 10 div lineto stroke 0 size 10 div moveto 38 size 10 div lineto stroke 0 size 10 div neg moveto 38 size 10 div neg lineto stroke } store %%%% %%%%%%%%%%% print data %%%%%%%%%%%%%%% /printdata { gsave 0 24 translate /StoneSans-Bold findfont 1 scalefont setfont 0 setwebtint 1 10 moveto (Cosine Amplitude "size" : ) size 20 string cvs mergestr show 1 8.5 .2 add moveto (Cosine Time Period "speed" : ) speed 20 string cvs mergestr show 1 7 .4 add moveto (Clipped Sin Amplitude "sinclip" : ) sinclip 20 string cvs mergestr show 1 5.5 .6 add moveto (Cycles Displayed : ) cycles 1000 string cvs mergestr show 1 4 .8 add moveto (Soft Clip: ) softclip 10 string cvs mergestr show 1 2.5 1 add moveto (Double Peak: ) doublepeak 10 string cvs mergestr show 1 1 1.2 add moveto (Clipped: ) clipped 10 string cvs mergestr show grestore} store /printcosdata { gsave 0 25.5 translate % show the output cosine /StoneSans-Bold findfont 1 scalefont setfont 0 setwebtint /vpos1 16 store 1 vpos1 moveto (Approximate Cosine Wave Output:) show /vpos1 vpos1 1.2 sub store 3 vpos1 moveto ([ ) show /wide speed 4 div cvi store 0 1 signal length 1 sub {/posn1 exch store signal posn1 get 20 string cvs show ( ) show posn1 1 add wide eq posn1 1 add wide 2 mul eq or posn1 1 add wide 3 mul eq or {/vpos1 vpos1 1.2 sub store 4 vpos1 moveto} if } for ( ]) show grestore } store /printsindata { gsave -1 16 translate % show the output cosine /StoneSans-Bold findfont 1 scalefont setfont 0 setwebtint /vpos1 19 store 1 vpos1 moveto (Approximate Internal Sinewave:) show /vpos1 vpos1 1.2 sub store 3 vpos1 moveto ([ ) show /wide speed 4 div cvi store 0 1 signaldelta length 1 sub {/posn1 exch store signaldelta posn1 get 20 string cvs show ( ) show posn1 1 add wide eq posn1 1 add wide 2 mul eq or posn1 1 add wide 3 mul eq or {/vpos1 vpos1 1.2 sub store 4 vpos1 moveto} if } for ( ]) show grestore } store /printtridata { gsave -1 24 translate % show the output cosine /StoneSans-Bold findfont 1 scalefont setfont 0 setwebtint /vpos1 25 store 1 vpos1 moveto (Initial Triangle Series:) show /vpos1 vpos1 1.5 sub store 3 vpos1 moveto ([ ) show /wide speed 4 div cvi store 0 1 triangledata length 1 sub {/posn1 exch store triangledata posn1 get 20 string cvs show ( ) show posn1 1 add wide eq posn1 1 add wide 2 mul eq or posn1 1 add wide 3 mul eq or {/vpos1 vpos1 1.5 sub store 4 vpos1 moveto} if } for ( ]) show grestore } store %%%%%%%%%%%% print harmonics %%%%%%%% /printharm {gsave 0 24 translate /StoneSans-Bold findfont 1 scalefont setfont 0 setwebtint 22 10 moveto 156 setwebtint ( Unfiltered! ) show 0 setwebtint 22 8.5 .2 add moveto (Third Harmonic: ) show intf3 100 mul 15 string cvs show ( %.) show 22 7 .4 add moveto (Fifth Harmonic: ) show intf5 100 mul 15 string cvs show ( %.) show 22 5.5 .6 add moveto (Seventh Harmonic: ) show intf7 100 mul 15 string cvs show ( %.) show 22 4 .8 add moveto (Ninth Harmonic: ) show intf9 100 mul 15 string cvs show ( %.) show 22 2.5 1 add moveto ( THD 3 - 9 : ) show totaldist 1.0 mul 15 string cvs show ( %.) show grestore } store %%%% print title /printtitle { gsave 0 10 translate currentdict /title known { /StoneSans-Bold findfont 1.6 scalefont setfont 0 40 moveto ( ) show title 156 setwebtint show } if grestore} store /showoutputcos { gsave 204 setwebtint 0.17 setlinewidth 1 setlinejoin 1 setlinecap 0 size 10 div moveto cycles { 1 1 speed 1 sub { /posn exch store /val signal posn get store 0.1 0 rlineto posn 10 div val 10 div lineto } for currentpoint 0.2 0 rlineto stroke exch 0.15 add exch moveto speed 10 div 0 translate } repeat grestore } store /showintsin { gsave 0.05 0 translate % align with cosine 202 setwebtint 0.17 setlinewidth 1 setlinejoin 1 setlinecap 0 -.1 moveto cycles { 1 1 signaldelta length 1 sub { /posn exch store /val signaldelta posn get store 0.1 0 rlineto posn 10 div val 10 div lineto } for currentpoint 0 -0.01 rlineto .1 0 rlineto 0 -0.1 rlineto 0.1 0 rlineto stroke exch 0.15 add exch moveto speed 10 div 0 translate 0 -0.1 moveto } repeat grestore } store %%%%%%%%%%% show reference sin %%%%%%%%%%%%%% /showrefsin {gsave 0 setwebtint 1 setlinejoin 1 setlinecap cycles { 0 0 moveto 0 5 360 {/degs exch store /posn degs speed mul 360 div 10 div store /ampl degs sin neg sinclip mul 10 div store posn ampl lineto } for stroke speed 10 div 0 translate } repeat grestore } store %%%%%%%%%%% show reference cosine %%%%%%%%%%%%%% /showrefcos {gsave 0 setwebtint 1 setlinejoin 1 setlinecap cycles { 0 size 10 div moveto 0 5 360 {/degs exch store /posn degs speed mul 360 div 10 div store /ampl degs cos size mul 10 div store posn ampl lineto } for stroke speed 10 div 0 translate } repeat grestore } store %%%%%% /findsignaldelta { mark 0 1 signal length 2 sub {/posn exch store signal posn get signal posn 1 add get sub neg } for ] /signaldelta exch store signaldelta == } store /validtridata false store % temp may not be valid with soft clip %%%%%%%%%%%%%%%%%%%%%%%% quarter lookup signal generator %%%%%%%%%%%%%%%%%% /generate3 { dup 0 get /target exch store 1 get /title exch store /size 0 target {add} forall store /speed target length 4 mul 2 add store /sinclip target dup length 1 sub get store /cycles 390 speed div floor cvi store true { title == target == size == speed == sinclip == cycles == } if /signal mark size 0 1 target length 1 sub {/posn exch store % first quadrant dup target posn get sub} for target length 1 sub -1 0 { /posn1 exch store dup target posn1 get sub } for dup % double bottom peak 0 1 target length 1 sub {/posn exch store % third quadrant dup target posn get add} for target length 1 sub -1 0 { /posn1 exch store dup target posn1 get add } for ] store signal == /sinval 0 store /cosval size store findfourier intf3 == intf5 == intf7 == intf9 == totaldist == makepage (\n ) print } store %%%%% data %%%%% % while the /increment method internal approach above is often more % suitable for low end microcomputer use, the table lookup method % involving generate3 was used to create the follwing retults... /clipped true store /doublepeak true store /softclip false store %%%%%%%%%%%%%%%%%%%%%%% % clipped fours [[ 1 2 3 4 4] (14-22-04 hard clipped double peak ) ] generate3 % 0.0! 0.39 % clipped fives % none yet found suitable % clipped sixes [[ 1 2 3 4 5 6 6 6] (33-34-06 hard clipped double peak) ] generate3 % 0.0! 0.55 [[ 1 2 3 4 5 5 6 6] (32-34-06 single soft clipped double peak) ] generate3 % .183 .251 % clipped sevens [[1 2 3 4 5 6 6 7 7 ] (41-38-07 single soft clip double peak)] generate3 % .362 .392 % clipped eghts [[ 1 2 3 4 5 6 7 8 8 8 8] (60-46-08 hard clip double peak) ] generate3 % .000 .628 [[ 1 2 3 4 5 6 7 7 8 8 8] (59-46-08 single soft clip double peak) ] generate3 % .073 .25 % clipped nines [[1 2 3 4 5 6 7 8 9 9 9 9 ] (72-50-09 hard clip double peak)] generate3 % .500 .737 [[1 2 3 4 5 6 7 8 8 9 9 9 ] (71-50-09 single soft clip double peak)] generate3 % .377 .448 % clipped tens [[1 2 3 4 5 6 7 8 9 10 10 10 10 10 ] (92-58-10 hard clip double peak)] generate3 % 0.0 0.67 [[1 2 3 4 5 6 7 8 9 9 10 10 10 10 ] (94-58-10 single soft clip double peak)] generate3 % .036 0.41 [[1 2 3 4 5 6 7 8 8 9 9 10 10 10 ] (92-58-10 double soft clip double peak)] generate3 % .109 0.141 % clipped elevens [[1 2 3 4 5 6 7 8 9 10 11 11 11 11 11 ] (110-62-11 hard clip double peak)] generate3 % .409 .727 [[1 2 3 4 5 6 7 8 9 10 10 10 11 11 11 ] (108-62-11 single soft clip double peak)] generate3 % .166 .361 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % original triangle series % except for the stunning [ 1 2 3 4 4...], results are mostly above one percent third. [[1 2 3 ] ( 06-14-03 triangle series no clip single peak)] generate3 % 1.23 1.32 [[1 2 3 3 ] ( 09-18-04 triangle series no clip double peak)] generate3 % 1.31 1.44 [[1 2 3 4 ] (10-18-04 triangle series no clip single peak)] generate3 % 1.90 2.01 [[1 2 3 4 4] (14-22-04 triangle series no clip double peak)] generate3 % 0.00 0.392 [[1 2 3 4 5] (15-22-05 triangle series no clip single peak)] generate3 % 2.30 2.42 [[1 2 3 4 5 5] (20-26-05 triangle series no clip double peak)] generate3 % 0.87 0.93 [[1 2 3 4 5 6] (21-26-06 triangle series no clip single peak)] generate3 % 2.56 2.68 [[1 2 3 4 5 6 6] (27-30-06 triangle series no clip double peak)] generate3 % 1.45 1.49 [[1 2 3 4 5 6 7 ] (28-30-07 triangle series no clip single peak)] generate3 % 2.74 2.86 [[1 2 3 4 5 6 7 7](35-34-07 triangle series no clip double peak)] generate3 % 0.86 0.90 [[1 2 3 4 5 6 7 8 ] (36-34-08 triangle series no clip single peak)] generate3 % 2.88 2.99 [[1 2 3 4 5 6 7 8 8] (44-38-08 triangle series no clip double peak)] generate3 % 2.16 2.20 [[1 2 3 4 5 6 7 8 9 ] (45-38-09 triangle series no clip single peak)] generate3 % 2.97 3.09 [[1 2 3 4 5 6 7 8 9 9] (54-42-09 triangle series no clip double peak)] generate3 % 2.38 2.43 [[1 2 3 4 5 6 7 8 9 10 ] (55-42-10 triangle series no clip single peak)] generate3 % 3.05 3.17 [[1 2 3 4 5 6 7 8 9 10 10] (65-46-10 triangle series no clip double peak)] generate3 % 2.56 2.61 [[1 2 3 4 5 6 7 8 9 10 11] (66-46-11 triangle series no clip single peak)] generate3 % 3.11 3.23 [[1 2 3 4 5 6 7 8 9 10 11 11] ( 77-50-11 triangle series no clip double peak)] generate3 % 2.70 2.75 [[1 2 3 4 5 6 7 8 9 10 11 12] (78-50-12 triangle series no clip single peak)] generate3 % 3.17 3.29 [[1 2 3 4 5 6 7 7 8 9 10 11 12 12] (97-58-04 triangle series hard clip double peak)] generate3 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 4 sinclip series magnifies [1 2 3 4 4...] % still has display glitches in display repeat cycles /softclip false store [[1 2 3 4 4] (14-22-04 triangle hard clip double peak)] generate3 % 0.0 0.39 [[2 4 6 8 8 ] (28-22-08 triangle mag hard clip double peak)] generate3 % 0.0 0.39 [[3 6 9 12 12 ] (42-22-12 triangle mag hard clip double peak)] generate3 % 0.0 0.39 [[4 8 12 16 16 ] (56-22-16 triangle mag hard clip double peak)] generate3 % 0.0 0.39 [[5 10 15 20 20 ] (70-22-20 triangle mag hard clip double peak)] generate3 % 0.0 0.39 [[6 12 18 24 24 ] (84-22-24 triangle mag hard clip double peak)] generate3 % 0.0 0.39 [[7 14 21 28 28 ] (98-22-28 triangle mag hard clip double peak)] generate3 % 0.0 0.39 [[8 16 24 32 32 ] (112-22-32 triangle mag hard clip double peak)] generate3 % 0.0 0.39 [[9 18 27 36 36 ] (126-22-36 triangle mag hard clip double peak)] generate3 % 0.0 0.39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % results [ size speed sinclip 3H 3H-9H } /results [ [11 62 11 .166 .361 ] [108 62 11 .409 .727 ] [ 92 58 10 .109 .141 ] % best double soft [ 94 58 10 .036 .419 ] % good single soft [ 95 58 10 .000 .672 ] % ZERO third [ 71 50 09 .377 .448 ] [ 72 50 09 .500 .737 ] [ 59 46 08 .073 .251 ] % good single soft [ 60 46 08 .000 .628 ] % ZERO third [ 41 38 07 .362 .392 ] % [ 32 34 06 .183 .251 ] % good single soft [ 33 34 06 0.0 .551 ] % ZERO third [ 14 18 04 0.0 .390 ] % ZERO third ] store %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /results4mag { % ultra fast and compact, low fifth [14-22-04 0.0 0.39] % ZERO third [28-22-04 0.0 0.39] % ZERO third 2x magnification limited sample rate [32-22-04 0.0 0.39] % ZERO third 3x magnification limited sample rate [56-22-04 0.0 0.39] % ZERO third 4x magnification limited sample rate [70-22-04 0.0 0.39] % ZERO third 5x magnification limited sample rate [84-22-04 0.0 0.39] % ZERO third 6x magnification limited sample rate [108-22-04 0.0 0.39] % ZERO third 7x magnification limited sample rate } store % addpagenav % EOF