wavetable playback


    Jan 23 2012 | 11:19 pm
    ive been reading the theory and technique of electronic music by miller puckette and he explains wavetable playback in the second chapter, ive made a patch that follows the logic behind it as best i can, and its very clicky, and of course generating sound is a very precise business. so what am i doing wrong in this?
    { "boxes" : [ { "box" : { "maxclass" : "flonum", "patching_rect" : [ 200.0, 323.0, 84.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 2, "id" : "obj-84", "outlettype" : [ "float", "bang" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "flonum", "patching_rect" : [ 380.0, 18.0, 68.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 2, "id" : "obj-83", "outlettype" : [ "float", "bang" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "toggle", "patching_rect" : [ 205.0, 65.0, 20.0, 20.0 ], "numinlets" : 1, "numoutlets" : 1, "id" : "obj-82", "outlettype" : [ "int" ] }
    } , { "box" : { "maxclass" : "newobj", "text" : "receive~ recout", "patching_rect" : [ 762.0, 106.0, 90.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-79", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "newobj", "text" : "send~ recout", "patching_rect" : [ 352.0, 94.0, 78.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 0, "id" : "obj-78", "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "newobj", "text" : "buffer~ recme 1000", "patching_rect" : [ 770.0, 271.0, 111.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 2, "id" : "obj-77", "outlettype" : [ "float", "bang" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "toggle", "patching_rect" : [ 488.0, 94.0, 20.0, 20.0 ], "numinlets" : 1, "numoutlets" : 1, "id" : "obj-13", "outlettype" : [ "int" ] }
    } , { "box" : { "maxclass" : "message", "text" : "append $1", "patching_rect" : [ 488.0, 120.0, 65.0, 18.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-14", "outlettype" : [ "" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "toggle", "patching_rect" : [ 462.0, 40.0, 20.0, 20.0 ], "numinlets" : 1, "numoutlets" : 1, "id" : "obj-15", "outlettype" : [ "int" ] }
    } , { "box" : { "maxclass" : "message", "text" : "loop $1", "patching_rect" : [ 462.0, 66.0, 49.0, 18.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-16", "outlettype" : [ "" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "message", "text" : "reset", "patching_rect" : [ 513.0, 149.0, 36.0, 18.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-17", "outlettype" : [ "" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "toggle", "patching_rect" : [ 690.0, 25.0, 20.0, 20.0 ], "numinlets" : 1, "numoutlets" : 1, "id" : "obj-26", "outlettype" : [ "int" ] }
    } , { "box" : { "maxclass" : "newobj", "text" : "record~ recme", "patching_rect" : [ 739.0, 184.0, 186.0, 20.0 ], "numinlets" : 3, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-30", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "comment", "text" : "start/stop recording", "patching_rect" : [ 710.0, 26.0, 110.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 0, "id" : "obj-33", "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "comment", "text" : "set to record into entire sample", "patching_rect" : [ 550.0, 149.0, 170.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 0, "id" : "obj-41", "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "comment", "text" : "Enable/disable loop recording", "patching_rect" : [ 511.0, 65.0, 161.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 0, "id" : "obj-73", "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "comment", "text" : "Enable/disable append mode.", "patching_rect" : [ 510.0, 95.0, 164.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 0, "id" : "obj-74", "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "number~", "patching_rect" : [ 333.0, 214.0, 76.0, 20.0 ], "ft1" : 5.0, "numinlets" : 2, "fontname" : "Arial", "sig" : 0.0, "mode" : 2, "numoutlets" : 2, "id" : "obj-65", "presentation_rect" : [ 333.0, 111.0, 0.0, 0.0 ], "outlettype" : [ "signal", "float" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "newobj", "text" : "+~", "patching_rect" : [ 303.0, 168.0, 32.5, 20.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-64", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "flonum", "patching_rect" : [ 304.0, 18.0, 71.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 2, "id" : "obj-62", "presentation_rect" : [ 325.0, 45.0, 0.0, 0.0 ], "outlettype" : [ "float", "bang" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "newobj", "text" : "cycle~", "patching_rect" : [ 328.0, 52.0, 44.0, 20.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-63", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "newobj", "text" : "*~ 2.", "patching_rect" : [ 291.0, 230.0, 35.0, 20.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-61", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "number~", "patching_rect" : [ 333.0, 322.0, 76.0, 20.0 ], "ft1" : 5.0, "numinlets" : 2, "fontname" : "Arial", "sig" : 0.0, "mode" : 2, "numoutlets" : 2, "id" : "obj-57", "presentation_rect" : [ 316.0, 210.0, 0.0, 0.0 ], "outlettype" : [ "signal", "float" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "newobj", "text" : "/~ 2.", "patching_rect" : [ 302.0, 297.0, 33.0, 20.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-56", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "newobj", "text" : "+~ 1.", "patching_rect" : [ 287.0, 261.0, 37.0, 20.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-55", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "preset", "patching_rect" : [ 56.0, 182.0, 100.0, 40.0 ], "numinlets" : 1, "numoutlets" : 4, "id" : "obj-54", "outlettype" : [ "preset", "int", "preset", "int" ], "preset_data" : [ { "number" : 1, "data" : [ 5, "obj-7", "flonum", "float", 1.0, 5, "obj-45", "flonum", "float", 1.0, 5, "obj-47", "number~", "list", 0.0, 5, "obj-52", "flonum", "float", 22050.0 ] } , { "number" : 2, "data" : [ 5, "obj-7", "flonum", "float", 1.0, 5, "obj-45", "flonum", "float", 0.6, 5, "obj-47", "number~", "list", 0.0, 5, "obj-52", "flonum", "float", 1126.0, 5, "obj-57", "number~", "list", 0.0, 5, "obj-62", "flonum", "float", 0.29, 5, "obj-65", "number~", "list", 0.0 ] } , { "number" : 3, "data" : [ 5, "obj-7", "flonum", "float", 1.0, 5, "obj-45", "flonum", "float", 5.0, 5, "obj-47", "number~", "list", 0.0, 5, "obj-52", "flonum", "float", 1126.0, 5, "obj-57", "number~", "list", 0.0, 5, "obj-62", "flonum", "float", 1.0, 5, "obj-65", "number~", "list", 0.0, 5, "obj-26", "toggle", "int", 0, 5, "obj-15", "toggle", "int", 0, 5, "obj-13", "toggle", "int", 0, 5, "obj-82", "toggle", "int", 0, 5, "obj-83", "flonum", "float", 0.25, 5, "obj-84", "flonum", "float", 1000.0 ] } ] }
    } , { "box" : { "maxclass" : "newobj", "text" : "cycle~", "patching_rect" : [ 416.0, 368.0, 44.0, 20.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-53", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "flonum", "patching_rect" : [ 428.0, 339.0, 91.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 2, "id" : "obj-52", "outlettype" : [ "float", "bang" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "newobj", "text" : "sah~", "patching_rect" : [ 297.0, 411.0, 36.0, 20.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-51", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "scope~", "patching_rect" : [ 269.0, 579.0, 360.0, 104.0 ], "numinlets" : 2, "numoutlets" : 0, "id" : "obj-50" }
    } , { "box" : { "maxclass" : "newobj", "text" : "*~ 1000.", "patching_rect" : [ 287.0, 357.0, 54.0, 20.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-49", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "number~", "patching_rect" : [ 418.0, 418.0, 110.0, 20.0 ], "ft1" : 5.0, "numinlets" : 2, "fontname" : "Arial", "sig" : 0.0, "mode" : 2, "numoutlets" : 2, "id" : "obj-47", "presentation_rect" : [ 393.0, 326.0, 0.0, 0.0 ], "outlettype" : [ "signal", "float" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "flonum", "patching_rect" : [ 245.0, 18.0, 50.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 2, "id" : "obj-45", "outlettype" : [ "float", "bang" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "newobj", "text" : "saw~", "patching_rect" : [ 251.0, 52.0, 38.0, 20.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-43", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "flonum", "patching_rect" : [ 111.0, 502.0, 50.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 2, "id" : "obj-7", "outlettype" : [ "float", "bang" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "ezdac~", "varname" : "autohelp_dac", "local" : 1, "patching_rect" : [ 56.0, 567.0, 45.0, 45.0 ], "numinlets" : 2, "numoutlets" : 0, "id" : "obj-3" }
    } , { "box" : { "maxclass" : "newobj", "text" : "*~ 0.2", "patching_rect" : [ 56.0, 530.0, 74.0, 20.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-4", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "message", "text" : "read", "patching_rect" : [ 462.0, 221.0, 34.0, 18.0 ], "numinlets" : 2, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-27", "outlettype" : [ "" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "newobj", "text" : "buffer~ playme 1000", "patching_rect" : [ 462.0, 249.0, 117.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 2, "id" : "obj-28", "outlettype" : [ "float", "bang" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "newobj", "text" : "play~ recme", "patching_rect" : [ 56.0, 466.0, 74.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 1, "id" : "obj-34", "outlettype" : [ "signal" ], "fontsize" : 11.595187 }
    } , { "box" : { "maxclass" : "comment", "text" : "open a sample file", "patching_rect" : [ 496.0, 221.0, 105.0, 20.0 ], "numinlets" : 1, "fontname" : "Arial", "numoutlets" : 0, "id" : "obj-42", "fontsize" : 11.595187 }
    } ], "lines" : [ { "patchline" : { "source" : [ "obj-56", 0 ], "destination" : [ "obj-49", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-49", 0 ], "destination" : [ "obj-51", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-49", 0 ], "destination" : [ "obj-47", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-49", 0 ], "destination" : [ "obj-34", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-84", 0 ], "destination" : [ "obj-49", 1 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-64", 0 ], "destination" : [ "obj-61", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-64", 0 ], "destination" : [ "obj-65", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-43", 0 ], "destination" : [ "obj-64", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-83", 0 ], "destination" : [ "obj-63", 1 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-82", 0 ], "destination" : [ "obj-26", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-82", 0 ], "destination" : [ "obj-3", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-4", 0 ], "destination" : [ "obj-50", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-34", 0 ], "destination" : [ "obj-4", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-63", 0 ], "destination" : [ "obj-78", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-79", 0 ], "destination" : [ "obj-30", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-15", 0 ], "destination" : [ "obj-16", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-26", 0 ], "destination" : [ "obj-30", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-17", 0 ], "destination" : [ "obj-30", 0 ], "hidden" : 0, "midpoints" : [ 522.5, 180.0, 748.5, 180.0 ] }
    } , { "patchline" : { "source" : [ "obj-14", 0 ], "destination" : [ "obj-30", 0 ], "hidden" : 0, "midpoints" : [ 497.5, 180.0, 748.5, 180.0 ] }
    } , { "patchline" : { "source" : [ "obj-16", 0 ], "destination" : [ "obj-30", 0 ], "hidden" : 0, "midpoints" : [ 471.5, 180.0, 748.5, 180.0 ] }
    } , { "patchline" : { "source" : [ "obj-13", 0 ], "destination" : [ "obj-14", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-62", 0 ], "destination" : [ "obj-63", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-61", 0 ], "destination" : [ "obj-55", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-45", 0 ], "destination" : [ "obj-43", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-55", 0 ], "destination" : [ "obj-56", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-56", 0 ], "destination" : [ "obj-57", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-53", 0 ], "destination" : [ "obj-51", 1 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-52", 0 ], "destination" : [ "obj-53", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-27", 0 ], "destination" : [ "obj-28", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-7", 0 ], "destination" : [ "obj-4", 1 ], "hidden" : 0, "midpoints" : [ ] }
    } , { "patchline" : { "source" : [ "obj-4", 0 ], "destination" : [ "obj-3", 1 ], "hidden" : 0, "midpoints" : [ 65.5, 558.0, 91.5, 558.0 ] }
    } , { "patchline" : { "source" : [ "obj-4", 0 ], "destination" : [ "obj-3", 0 ], "hidden" : 0, "midpoints" : [ ] }
    } ] }

    • Jan 29 2012 | 7:00 pm
      Hello,
      You might get more responses if you use copy compressed from the edit menu instead of normal copy when you want to post patches to the forum. I show 2 ways to do wavetable. The first is using cycle~ and the second uses upsampling in a poly~. You have to download both patchs and save them into the same folder.
      Save the first one as anything you like:
      Save the second one as wavepoly
      Load up the first one from the folder and it should automatically load the poly~ subpatch. Hope it helps.