Waveform Morphing


    Jan 11 2017 | 7:20 pm
    I am trying to build sine --> saw and sine --> square morphing oscillators in Gen, similar to what you might see in a Buchla 258 oscillator.
    The best option I have found so far is a patch posted here in 2007 using feedback delay for the saw and overdrive for the square. Ported to gen~ it looks like this:
    { "patcher" : { "fileversion" : 1, "appversion" : { "major" : 7, "minor" : 2, "revision" : 5, "architecture" : "x86", "modernui" : 1 } , "rect" : [ 63.0, 104.0, 640.0, 480.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, "default_fontface" : 0, "default_fontname" : "Arial", "gridonopen" : 1, "gridsize" : [ 15.0, 15.0 ], "gridsnaponopen" : 1, "objectsnaponopen" : 1, "statusbarvisible" : 2, "toolbarvisible" : 1, "lefttoolbarpinned" : 0, "toptoolbarpinned" : 0, "righttoolbarpinned" : 0, "bottomtoolbarpinned" : 0, "toolbars_unpinned_last_save" : 0, "tallnewobj" : 0, "boxanimatetime" : 200, "enablehscroll" : 1, "enablevscroll" : 1, "devicewidth" : 0.0, "description" : "", "digest" : "", "tags" : "", "style" : "", "subpatcher_template" : "", "boxes" : [ { "box" : { "id" : "obj-5", "maxclass" : "gain~", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "signal", "int" ], "parameter_enable" : 0, "patching_rect" : [ 250.0, 226.0, 22.0, 140.0 ], "style" : "" }
    } , { "box" : { "id" : "obj-3", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 325.0, 50.0, 70.0, 22.0 ], "style" : "", "text" : "loadbang 1" }
    } , { "box" : { "calccount" : 4, "id" : "obj-12", "maxclass" : "scope~", "numinlets" : 2, "numoutlets" : 0, "patching_rect" : [ 478.0, 252.0, 130.0, 130.0 ], "style" : "", "trigger" : 1 }
    } , { "box" : { "format" : 6, "id" : "obj-11", "maxclass" : "flonum", "minimum" : 1.0, "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 359.0, 112.0, 50.0, 22.0 ], "style" : "" }
    } , { "box" : { "calccount" : 4, "id" : "obj-8", "maxclass" : "scope~", "numinlets" : 2, "numoutlets" : 0, "patching_rect" : [ 290.0, 252.0, 130.0, 130.0 ], "style" : "", "trigger" : 1 }
    } , { "box" : { "format" : 6, "id" : "obj-6", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 294.0, 112.0, 50.0, 22.0 ], "style" : "" }
    } , { "box" : { "format" : 6, "id" : "obj-4", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 212.0, 112.0, 50.0, 22.0 ], "style" : "" }
    } , { "box" : { "id" : "obj-2", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 0, "patching_rect" : [ 212.0, 390.0, 37.0, 22.0 ], "style" : "", "text" : "dac~" }
    } , { "box" : { "id" : "obj-1", "maxclass" : "gain~", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "signal", "int" ], "parameter_enable" : 0, "patching_rect" : [ 212.0, 226.0, 22.0, 140.0 ], "style" : "" }
    } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-16", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 2, "outlettype" : [ "signal", "signal" ], "patching_rect" : [ 212.0, 157.0, 132.0, 22.0 ], "style" : "", "text" : "gen~ sin2saworsquare" }
    } ], "lines" : [ { "patchline" : { "destination" : [ "obj-2", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-1", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-2", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-1", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-16", 2 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-11", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-1", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-16", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-12", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-16", 1 ] }
    } , { "patchline" : { "destination" : [ "obj-5", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-16", 1 ] }
    } , { "patchline" : { "destination" : [ "obj-8", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-16", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-16", 2 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-3", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-16", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-4", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-2", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-5", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-2", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-5", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-16", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-6", 0 ] }
    } ], "dependency_cache" : [ { "name" : "sin2saworsquare.gendsp", "bootpath" : "~/src/projects/Springs/modules_dev/fm", "type" : "gDSP", "implicit" : 1 } ], "autosave" : 0 }
    }
    . . .however it does not respond well to frequency or phase modulation. Lot's of zipper noise. Here's an example of the same patch (minus the sine-->square bit, but with a wave folder) in an upsampled poly~ with phase modulation:
    { "patcher" : { "fileversion" : 1, "appversion" : { "major" : 7, "minor" : 2, "revision" : 5, "architecture" : "x86", "modernui" : 1 } , "rect" : [ 231.0, 79.0, 1175.0, 700.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, "default_fontface" : 0, "default_fontname" : "Arial", "gridonopen" : 1, "gridsize" : [ 15.0, 15.0 ], "gridsnaponopen" : 1, "objectsnaponopen" : 1, "statusbarvisible" : 2, "toolbarvisible" : 1, "lefttoolbarpinned" : 0, "toptoolbarpinned" : 0, "righttoolbarpinned" : 0, "bottomtoolbarpinned" : 0, "toolbars_unpinned_last_save" : 0, "tallnewobj" : 0, "boxanimatetime" : 200, "enablehscroll" : 1, "enablevscroll" : 1, "devicewidth" : 0.0, "description" : "", "digest" : "", "tags" : "", "style" : "", "subpatcher_template" : "", "boxes" : [ { "box" : { "id" : "obj-1", "maxclass" : "spectroscope~", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 225.0, 600.0, 255.0, 81.0 ], "style" : "" }
    } , { "box" : { "calccount" : 8, "id" : "obj-13", "maxclass" : "scope~", "numinlets" : 2, "numoutlets" : 0, "patching_rect" : [ 375.0, 390.0, 255.0, 75.0 ], "style" : "", "trigger" : 1 }
    } , { "box" : { "format" : 6, "id" : "obj-30", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 123.5, 195.0, 50.0, 22.0 ], "style" : "" }
    } , { "box" : { "format" : 6, "id" : "obj-26", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 123.5, 135.0, 50.0, 22.0 ], "style" : "" }
    } , { "box" : { "id" : "obj-44", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 195.0, 89.0, 20.0 ], "style" : "", "text" : "wavefolder 0-1" }
    } , { "box" : { "id" : "obj-41", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 10.5, 135.0, 111.0, 20.0 ], "style" : "", "text" : "modulation sin/saw" }
    } , { "box" : { "id" : "obj-21", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 32.0, 75.0, 89.5, 20.0 ], "style" : "", "text" : "carrier sin/saw" }
    } , { "box" : { "id" : "obj-23", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 21.0, 165.0, 100.0, 20.0 ], "style" : "", "text" : "modulation index" }
    } , { "box" : { "id" : "obj-11", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 105.0, 91.0, 20.0 ], "style" : "", "text" : "modulation freq" }
    } , { "box" : { "id" : "obj-24", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 53.5, 45.0, 68.0, 20.0 ], "style" : "", "text" : "carrier freq" }
    } , { "box" : { "format" : 6, "id" : "obj-22", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 123.5, 75.0, 50.0, 22.0 ], "style" : "" }
    } , { "box" : { "id" : "obj-17", "maxclass" : "gain~", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "signal", "int" ], "parameter_enable" : 0, "patching_rect" : [ 180.0, 300.0, 22.0, 140.0 ], "style" : "" }
    } , { "box" : { "id" : "obj-18", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 0, "patching_rect" : [ 180.0, 469.0, 100.0, 22.0 ], "style" : "", "text" : "dac~" }
    } , { "box" : { "format" : 6, "id" : "obj-16", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 123.5, 165.0, 50.0, 22.0 ], "style" : "" }
    } , { "box" : { "format" : 6, "id" : "obj-14", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 123.5, 105.0, 50.0, 22.0 ], "style" : "" }
    } , { "box" : { "format" : 6, "id" : "obj-12", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 123.5, 45.0, 50.0, 22.0 ], "style" : "" }
    } , { "box" : { "id" : "obj-3", "maxclass" : "newobj", "numinlets" : 6, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 180.0, 240.0, 158.0, 22.0 ], "style" : "", "text" : "poly~ polysin2saw2 1 up 16" }
    } ], "lines" : [ { "patchline" : { "destination" : [ "obj-3", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 133.0, 71.0, 189.5, 71.0 ], "source" : [ "obj-12", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-3", 2 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 133.0, 131.0, 245.100006, 131.0 ], "source" : [ "obj-14", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-3", 4 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 133.0, 192.0, 300.700012, 192.0 ], "source" : [ "obj-16", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-1", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-17", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-18", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-17", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-18", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-17", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-3", 1 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 133.0, 100.0, 217.300003, 100.0 ], "source" : [ "obj-22", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-3", 3 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 133.0, 160.0, 272.899994, 160.0 ], "source" : [ "obj-26", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-13", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-3", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-17", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-3", 0 ] }
    } , { "patchline" : { "destination" : [ "obj-3", 5 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 133.0, 223.0, 328.5, 223.0 ], "source" : [ "obj-30", 0 ] }
    } ], "dependency_cache" : [ { "name" : "polysin2saw2.maxpat", "bootpath" : "~/src/projects/Springs/modules_dev/fm", "type" : "JSON", "implicit" : 1 } , { "name" : "sin2saw4wavefolder.gendsp", "bootpath" : "~/src/projects/Springs/modules_dev/fm", "type" : "gDSP", "implicit" : 1 } , { "name" : "sin2saw.gendsp", "bootpath" : "~/src/projects/Springs/modules_dev/fm/old", "type" : "gDSP", "implicit" : 1 } ], "autosave" : 0 }
    }
    Can anyone offer any alternate gen~ solutions for sine shape morphing suitable for FM/PM?
    Thanks!!
    Peter

    • Jan 11 2017 | 7:50 pm
      Sadly, no edit option on this forum---> I had meant for these patches to be presented in expandable code boxes.
      The second patch, while it functions in principal, features a great deal of zipper noise.
    • Jan 11 2017 | 7:55 pm
      Also the second patch did not translate well to text, so here they are both patches in a .zip. . .
    • Jan 11 2017 | 8:09 pm
      Copy compressed is your friend.
    • Jan 11 2017 | 8:37 pm
      Copy compressed is your friend.
      Thanks for the tip! But copy compressed appears greyed out for me??