From 4e117acc6b0fddc974c2f034a974fec0032c2e51 Mon Sep 17 00:00:00 2001 From: Cole Ingraham Date: Wed, 18 Jun 2014 10:31:59 +0800 Subject: [PATCH] updated docs --- Docs/api.js | 96 +- .../vendor/prettify/prettify-min copy.css | 1 + Docs/classes/allpassC.html | 130 +- Docs/classes/allpassL.html | 130 +- Docs/classes/allpassN.html | 132 +- Docs/classes/auxIn.html | 481 ++ Docs/classes/bandpass.html | 130 +- Docs/classes/blip.html | 130 +- Docs/classes/brown.html | 130 +- Docs/classes/bufAllpassC.html | 499 ++ Docs/classes/bufAllpassL.html | 499 ++ Docs/classes/bufAllpassN.html | 499 ++ Docs/classes/bufCombC.html | 499 ++ Docs/classes/bufCombL.html | 499 ++ Docs/classes/bufCombN.html | 499 ++ Docs/classes/bufDelayC.html | 478 ++ Docs/classes/bufDelayL.html | 478 ++ Docs/classes/bufDelayN.html | 478 ++ Docs/classes/clipNoise.html | 130 +- Docs/classes/combC.html | 130 +- Docs/classes/combL.html | 130 +- Docs/classes/combN.html | 130 +- Docs/classes/crackle.html | 130 +- Docs/classes/crush.html | 130 +- Docs/classes/cuspL.html | 130 +- Docs/classes/cuspN.html | 130 +- Docs/classes/dc.html | 130 +- Docs/classes/decimate.html | 130 +- Docs/classes/delayC.html | 130 +- Docs/classes/delayL.html | 130 +- Docs/classes/delayN.html | 130 +- Docs/classes/dup.html | 457 ++ Docs/classes/dust.html | 130 +- Docs/classes/env.html | 130 +- Docs/classes/env2.html | 130 +- Docs/classes/formant.html | 130 +- Docs/classes/gbmanL.html | 130 +- Docs/classes/gbmanN.html | 130 +- Docs/classes/gray.html | 130 +- Docs/classes/highpass.html | 130 +- Docs/classes/impulse.html | 130 +- Docs/classes/lag.html | 130 +- Docs/classes/localBuf.html | 478 ++ Docs/classes/lowpass.html | 130 +- Docs/classes/noiseL.html | 130 +- Docs/classes/noiseN.html | 130 +- Docs/classes/noiseX.html | 130 +- Docs/classes/out.html | 130 +- Docs/classes/pan.html | 478 ++ Docs/classes/perc.html | 130 +- Docs/classes/perc2.html | 130 +- Docs/classes/pink.html | 130 +- Docs/classes/pulse.html | 130 +- Docs/classes/saw.html | 130 +- Docs/classes/scACos.html | 424 ++ Docs/classes/scASin.html | 424 ++ Docs/classes/scATan.html | 424 ++ Docs/classes/scAbs.html | 424 ++ Docs/classes/scAmpDb.html | 424 ++ Docs/classes/scBitAnd.html | 476 ++ Docs/classes/scBitLeftShift.html | 476 ++ Docs/classes/scBitOr.html | 476 ++ Docs/classes/scBitRightShift.html | 476 ++ Docs/classes/scBitXor.html | 476 ++ Docs/classes/scCeil.html | 424 ++ Docs/classes/scClip.html | 478 ++ Docs/classes/scCos.html | 424 ++ Docs/classes/scCosh.html | 424 ++ Docs/classes/scCpsMidi.html | 424 ++ Docs/classes/scCubed.html | 424 ++ Docs/classes/scDbAmp.html | 424 ++ Docs/classes/scDistort.html | 424 ++ Docs/classes/scExpRand.html | 478 ++ Docs/classes/scFloor.html | 424 ++ Docs/classes/scFold.html | 478 ++ Docs/classes/scIRand.html | 478 ++ Docs/classes/scLinRand.html | 478 ++ Docs/classes/scLog.html | 424 ++ Docs/classes/scLog10.html | 424 ++ Docs/classes/scLog2.html | 424 ++ Docs/classes/scMidiCps.html | 424 ++ Docs/classes/scMod.html | 476 ++ Docs/classes/scNRand.html | 499 ++ Docs/classes/scNeg.html | 424 ++ Docs/classes/scPow.html | 476 ++ Docs/classes/scRand.html | 478 ++ Docs/classes/scReciprocal.html | 424 ++ Docs/classes/scRound.html | 476 ++ Docs/classes/scSin.html | 424 ++ Docs/classes/scSinh.html | 424 ++ Docs/classes/scSoftClip.html | 424 ++ Docs/classes/scSqrt.html | 424 ++ Docs/classes/scSquared.html | 424 ++ Docs/classes/scTExpRand.html | 499 ++ Docs/classes/scTIRand.html | 499 ++ Docs/classes/scTRand.html | 499 ++ Docs/classes/scTan.html | 424 ++ Docs/classes/scTanh.html | 424 ++ Docs/classes/scWrap.html | 478 ++ Docs/classes/sin.html | 130 +- Docs/classes/square.html | 130 +- Docs/classes/tri.html | 130 +- Docs/classes/white.html | 130 +- Docs/data.json | 4480 ++++++++++++++--- .../CloudChamber.js_CloudChamber.js.html | 2129 ++++++++ Docs/files/Compiler_Compiler.js.html | 2229 ++++++++ Docs/files/Soliton.js_SuperCollider.js.html | 1553 +++++- ...odemirror-3.20_addon_edit_closetag.js.html | 432 ++ ...d-party_codemirror-3.20_keymap_vim.js.html | 4046 +++++++++++++++ ...demirror-3.20_mode_clojure_clojure.js.html | 567 +++ ...y_codemirror-3.20_mode_cobol_cobol.js.html | 583 +++ ....20_mode_coffeescript_coffeescript.js.html | 697 +++ ...or-3.20_mode_livescript_livescript.js.html | 610 +++ ...y_codemirror-3.20_mode_nginx_nginx.js.html | 506 ++ ...mirror-3.20_mode_ntriples_ntriples.js.html | 513 ++ ...codemirror-3.20_mode_scheme_scheme.js.html | 575 +++ ...codemirror-3.20_mode_smarty_smarty.js.html | 548 ++ ...-3.20_mode_smartymixed_smartymixed.js.html | 518 ++ ...or-3.20_mode_tiddlywiki_tiddlywiki.js.html | 696 +++ ...rty_codemirror-3.20_test_mode_test.js.html | 543 ++ ...arty_codemirror-3.20_test_vim_test.js.html | 2734 ++++++++++ ..._three.js_postprocessing_BloomPass.js.html | 451 ++ ...ee.js_postprocessing_DotScreenPass.js.html | 396 ++ ...e.js_postprocessing_EffectComposer.js.html | 487 ++ ...y_three.js_postprocessing_FilmPass.js.html | 397 ++ ...y_three.js_postprocessing_MaskPass.js.html | 429 ++ ...three.js_postprocessing_RenderPass.js.html | 394 ++ ...y_three.js_postprocessing_SavePass.js.html | 398 ++ ...three.js_postprocessing_ShaderPass.js.html | 394 ++ ...hree.js_postprocessing_TexturePass.js.html | 383 ++ ...party_three.js_shaders_BasicShader.js.html | 374 ++ ...hree.js_shaders_BleachBypassShader.js.html | 407 ++ ...party_three.js_shaders_BlendShader.js.html | 394 ++ ...party_three.js_shaders_BokehShader.js.html | 459 ++ ...s_shaders_BrightnessContrastShader.js.html | 401 ++ ...e.js_shaders_ColorCorrectionShader.js.html | 391 ++ ...ty_three.js_shaders_ColorifyShader.js.html | 392 ++ ...three.js_shaders_ConvolutionShader.js.html | 444 ++ ...-party_three.js_shaders_CopyShader.js.html | 389 ++ ...y_three.js_shaders_DOFMipMapShader.js.html | 401 ++ ...y_three.js_shaders_DotScreenShader.js.html | 411 ++ ...-party_three.js_shaders_EdgeShader.js.html | 436 ++ ...party_three.js_shaders_EdgeShader2.js.html | 416 ++ ...-party_three.js_shaders_FXAAShader.js.html | 442 ++ ...-party_three.js_shaders_FilmShader.js.html | 447 ++ ...party_three.js_shaders_FocusShader.js.html | 434 ++ ...rty_three.js_shaders_FresnelShader.js.html | 417 ++ ...ee.js_shaders_HorizontalBlurShader.js.html | 405 ++ ..._shaders_HorizontalTiltShiftShader.js.html | 408 ++ ...ree.js_shaders_HueSaturationShader.js.html | 412 ++ ...rty_three.js_shaders_KaleidoShader.js.html | 403 ++ ..._three.js_shaders_LuminosityShader.js.html | 393 ++ ...arty_three.js_shaders_MirrorShader.js.html | 401 ++ ...y_three.js_shaders_NormalMapShader.js.html | 396 ++ ...ty_three.js_shaders_RGBShiftShader.js.html | 399 ++ ...-party_three.js_shaders_SSAOShader.js.html | 602 +++ ...party_three.js_shaders_SepiaShader.js.html | 397 ++ ...hree.js_shaders_TriangleBlurShader.js.html | 421 ++ ...e.js_shaders_UnpackDepthRGBAShader.js.html | 400 ++ ...hree.js_shaders_VerticalBlurShader.js.html | 405 ++ ...js_shaders_VerticalTiltShiftShader.js.html | 408 ++ ...ty_three.js_shaders_VignetteShader.js.html | 406 ++ Docs/files/third-party_webgl-utils.js.html | 517 ++ Docs/index.html | 128 + Docs/modules/Bitwise Operators.html | 398 ++ Docs/modules/Buffers.html | 368 ++ Docs/modules/Chaos.html | 128 + Docs/modules/Delays.html | 180 +- Docs/modules/Distortions.html | 392 ++ Docs/modules/Envelopes.html | 128 + Docs/modules/Filters.html | 134 + Docs/modules/InputOutput.html | 134 + Docs/modules/Lich.sc UGens.html | 536 ++ Docs/modules/Noise.html | 128 + Docs/modules/Oscillators.html | 128 + Docs/modules/Panning.html | 374 ++ Docs/modules/Random.html | 404 ++ Docs/modules/Signal Math.html | 524 ++ 178 files changed, 77023 insertions(+), 762 deletions(-) create mode 100644 Docs/assets/vendor/prettify/prettify-min copy.css create mode 100644 Docs/classes/auxIn.html create mode 100644 Docs/classes/bufAllpassC.html create mode 100644 Docs/classes/bufAllpassL.html create mode 100644 Docs/classes/bufAllpassN.html create mode 100644 Docs/classes/bufCombC.html create mode 100644 Docs/classes/bufCombL.html create mode 100644 Docs/classes/bufCombN.html create mode 100644 Docs/classes/bufDelayC.html create mode 100644 Docs/classes/bufDelayL.html create mode 100644 Docs/classes/bufDelayN.html create mode 100644 Docs/classes/dup.html create mode 100644 Docs/classes/localBuf.html create mode 100644 Docs/classes/pan.html create mode 100644 Docs/classes/scACos.html create mode 100644 Docs/classes/scASin.html create mode 100644 Docs/classes/scATan.html create mode 100644 Docs/classes/scAbs.html create mode 100644 Docs/classes/scAmpDb.html create mode 100644 Docs/classes/scBitAnd.html create mode 100644 Docs/classes/scBitLeftShift.html create mode 100644 Docs/classes/scBitOr.html create mode 100644 Docs/classes/scBitRightShift.html create mode 100644 Docs/classes/scBitXor.html create mode 100644 Docs/classes/scCeil.html create mode 100644 Docs/classes/scClip.html create mode 100644 Docs/classes/scCos.html create mode 100644 Docs/classes/scCosh.html create mode 100644 Docs/classes/scCpsMidi.html create mode 100644 Docs/classes/scCubed.html create mode 100644 Docs/classes/scDbAmp.html create mode 100644 Docs/classes/scDistort.html create mode 100644 Docs/classes/scExpRand.html create mode 100644 Docs/classes/scFloor.html create mode 100644 Docs/classes/scFold.html create mode 100644 Docs/classes/scIRand.html create mode 100644 Docs/classes/scLinRand.html create mode 100644 Docs/classes/scLog.html create mode 100644 Docs/classes/scLog10.html create mode 100644 Docs/classes/scLog2.html create mode 100644 Docs/classes/scMidiCps.html create mode 100644 Docs/classes/scMod.html create mode 100644 Docs/classes/scNRand.html create mode 100644 Docs/classes/scNeg.html create mode 100644 Docs/classes/scPow.html create mode 100644 Docs/classes/scRand.html create mode 100644 Docs/classes/scReciprocal.html create mode 100644 Docs/classes/scRound.html create mode 100644 Docs/classes/scSin.html create mode 100644 Docs/classes/scSinh.html create mode 100644 Docs/classes/scSoftClip.html create mode 100644 Docs/classes/scSqrt.html create mode 100644 Docs/classes/scSquared.html create mode 100644 Docs/classes/scTExpRand.html create mode 100644 Docs/classes/scTIRand.html create mode 100644 Docs/classes/scTRand.html create mode 100644 Docs/classes/scTan.html create mode 100644 Docs/classes/scTanh.html create mode 100644 Docs/classes/scWrap.html create mode 100644 Docs/files/CloudChamber.js_CloudChamber.js.html create mode 100644 Docs/files/Compiler_Compiler.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_addon_edit_closetag.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_keymap_vim.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_mode_clojure_clojure.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_mode_cobol_cobol.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_mode_coffeescript_coffeescript.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_mode_livescript_livescript.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_mode_nginx_nginx.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_mode_ntriples_ntriples.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_mode_scheme_scheme.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_mode_smarty_smarty.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_mode_smartymixed_smartymixed.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_mode_tiddlywiki_tiddlywiki.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_test_mode_test.js.html create mode 100644 Docs/files/third-party_codemirror-3.20_test_vim_test.js.html create mode 100644 Docs/files/third-party_three.js_postprocessing_BloomPass.js.html create mode 100644 Docs/files/third-party_three.js_postprocessing_DotScreenPass.js.html create mode 100644 Docs/files/third-party_three.js_postprocessing_EffectComposer.js.html create mode 100644 Docs/files/third-party_three.js_postprocessing_FilmPass.js.html create mode 100644 Docs/files/third-party_three.js_postprocessing_MaskPass.js.html create mode 100644 Docs/files/third-party_three.js_postprocessing_RenderPass.js.html create mode 100644 Docs/files/third-party_three.js_postprocessing_SavePass.js.html create mode 100644 Docs/files/third-party_three.js_postprocessing_ShaderPass.js.html create mode 100644 Docs/files/third-party_three.js_postprocessing_TexturePass.js.html create mode 100644 Docs/files/third-party_three.js_shaders_BasicShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_BleachBypassShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_BlendShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_BokehShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_BrightnessContrastShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_ColorCorrectionShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_ColorifyShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_ConvolutionShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_CopyShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_DOFMipMapShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_DotScreenShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_EdgeShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_EdgeShader2.js.html create mode 100644 Docs/files/third-party_three.js_shaders_FXAAShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_FilmShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_FocusShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_FresnelShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_HorizontalBlurShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_HorizontalTiltShiftShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_HueSaturationShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_KaleidoShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_LuminosityShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_MirrorShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_NormalMapShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_RGBShiftShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_SSAOShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_SepiaShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_TriangleBlurShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_UnpackDepthRGBAShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_VerticalBlurShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_VerticalTiltShiftShader.js.html create mode 100644 Docs/files/third-party_three.js_shaders_VignetteShader.js.html create mode 100644 Docs/files/third-party_webgl-utils.js.html create mode 100644 Docs/modules/Bitwise Operators.html create mode 100644 Docs/modules/Buffers.html create mode 100644 Docs/modules/Distortions.html create mode 100644 Docs/modules/Panning.html create mode 100644 Docs/modules/Random.html create mode 100644 Docs/modules/Signal Math.html diff --git a/Docs/api.js b/Docs/api.js index c3b27d3..6ad0e10 100644 --- a/Docs/api.js +++ b/Docs/api.js @@ -4,9 +4,19 @@ YUI.add("yuidoc-meta", function(Y) { "allpassC", "allpassL", "allpassN", + "auxIn", "bandpass", "blip", "brown", + "bufAllpassC", + "bufAllpassL", + "bufAllpassN", + "bufCombC", + "bufCombL", + "bufCombN", + "bufDelayC", + "bufDelayL", + "bufDelayN", "clipNoise", "combC", "combL", @@ -20,6 +30,7 @@ YUI.add("yuidoc-meta", function(Y) { "delayC", "delayL", "delayN", + "dup", "dust", "env", "env2", @@ -30,32 +41,95 @@ YUI.add("yuidoc-meta", function(Y) { "highpass", "impulse", "lag", + "localBuf", "lowpass", "noiseL", "noiseN", "noiseX", "out", + "pan", "perc", "perc2", "pink", "pulse", "saw", + "scACos", + "scASin", + "scATan", + "scAbs", + "scAmpDb", + "scBitAnd", + "scBitLeftShift", + "scBitOr", + "scBitRightShift", + "scBitXor", + "scCeil", + "scClip", + "scCos", + "scCosh", + "scCpsMidi", + "scCubed", + "scDbAmp", + "scDistort", + "scExpRand", + "scFloor", + "scFold", + "scIRand", + "scLinRand", + "scLog", + "scLog10", + "scLog2", + "scMidiCps", + "scMod", + "scNRand", + "scNeg", + "scPow", + "scRand", + "scReciprocal", + "scRound", + "scSin", + "scSinh", + "scSoftClip", + "scSqrt", + "scSquared", + "scTExpRand", + "scTIRand", + "scTRand", + "scTan", + "scTanh", + "scWrap", "sin", "square", "tri", "white" ], "modules": [ + "Bitwise Operators", + "Buffers", "Chaos", "Delays", + "Distortions", "Envelopes", "Filters", "InputOutput", "Lich.sc UGens", "Noise", - "Oscillators" + "Oscillators", + "Panning", + "Random", + "Signal Math" ], "allModules": [ + { + "displayName": "Bitwise Operators", + "name": "Bitwise Operators", + "description": "Bitwise Operators. TODO: fix all examples" + }, + { + "displayName": "Buffers", + "name": "Buffers", + "description": "Buffers." + }, { "displayName": "Chaos", "name": "Chaos", @@ -66,6 +140,11 @@ YUI.add("yuidoc-meta", function(Y) { "name": "Delays", "description": "Delays." }, + { + "displayName": "Distortions", + "name": "Distortions", + "description": "Distortions." + }, { "displayName": "Envelopes", "name": "Envelopes", @@ -95,6 +174,21 @@ YUI.add("yuidoc-meta", function(Y) { "displayName": "Oscillators", "name": "Oscillators", "description": "Oscillators." + }, + { + "displayName": "Panning", + "name": "Panning", + "description": "Panning UGens" + }, + { + "displayName": "Random", + "name": "Random", + "description": "Random Number Generators." + }, + { + "displayName": "Signal Math", + "name": "Signal Math", + "description": "Signal Math. TODO: fix all the examples" } ] } }; diff --git a/Docs/assets/vendor/prettify/prettify-min copy.css b/Docs/assets/vendor/prettify/prettify-min copy.css new file mode 100644 index 0000000..d44b3a2 --- /dev/null +++ b/Docs/assets/vendor/prettify/prettify-min copy.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file diff --git a/Docs/classes/allpassC.html b/Docs/classes/allpassC.html index 7f75096..c766652 100644 --- a/Docs/classes/allpassC.html +++ b/Docs/classes/allpassC.html @@ -46,12 +46,32 @@

APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -326,7 +454,7 @@

    Example:

    diff --git a/Docs/classes/allpassL.html b/Docs/classes/allpassL.html index 0e576cd..9f0bdbe 100644 --- a/Docs/classes/allpassL.html +++ b/Docs/classes/allpassL.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -326,7 +454,7 @@

    Example:

    diff --git a/Docs/classes/allpassN.html b/Docs/classes/allpassN.html index 6c8cb46..066fa03 100644 --- a/Docs/classes/allpassN.html +++ b/Docs/classes/allpassN.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -326,13 +454,13 @@

    Example:

    - Module: Delays
    + Module: Filters
    Parent Module: Lich.sc UGens diff --git a/Docs/classes/auxIn.html b/Docs/classes/auxIn.html new file mode 100644 index 0000000..6ecbb34 --- /dev/null +++ b/Docs/classes/auxIn.html @@ -0,0 +1,481 @@ + + + + + auxIn - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    auxIn

    + + +
    +

    Reads audio from a range of audio buses.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    auxIn

    + + +
    +
      + +
    • + + busNum + +
    • + +
    • + + numChannels + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + busNum + + + + +
      +

      The bus index to start reading from.

      + +
      + + +
    • + +
    • + + numChannels + + + + +
      +

      The number of channels to read from.

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let simpleSynth freq => sin freq * square (2*tempoSeconds) * 0.25 >> out 20
    +let sSynth = simpleSynth 440
    +let fxSynth => auxIn 20 1 >> combC tempoSeconds [tempoSeconds/1, tempoSeconds/2] 10 >> out 0
    +let fx = Synth::after "fxSynth" [] server
    +stop sSynth
    +stop fx

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: InputOutput
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/bandpass.html b/Docs/classes/bandpass.html index 06d2fcc..adfc765 100644 --- a/Docs/classes/bandpass.html +++ b/Docs/classes/bandpass.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -305,7 +433,7 @@

    Example:

    diff --git a/Docs/classes/blip.html b/Docs/classes/blip.html index cb4d1c5..659b8f4 100644 --- a/Docs/classes/blip.html +++ b/Docs/classes/blip.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -305,7 +433,7 @@

    Example:

    diff --git a/Docs/classes/brown.html b/Docs/classes/brown.html index 8df679e..42b3227 100644 --- a/Docs/classes/brown.html +++ b/Docs/classes/brown.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/bufAllpassC.html b/Docs/classes/bufAllpassC.html new file mode 100644 index 0000000..4d84976 --- /dev/null +++ b/Docs/classes/bufAllpassC.html @@ -0,0 +1,499 @@ + + + + + bufAllpassC - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    bufAllpassC

    + + +
    +

    An allpass delay line with cubic interpolation. This version uses a localBuf.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    bufAllpassC

    + + +
    +
      + +
    • + + buf + +
    • + +
    • + + del + +
    • + +
    • + + decay + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + buf + + + + +
      +

      LocalBuf to use for the delay

      + +
      + + +
    • + +
    • + + del + + + + +
      +

      Delay time in seconds

      + +
      + + +
    • + +
    • + + decay + + + + +
      +

      Time for the echoes to decay by 60 decibels.

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test del => impulse 1 >> bufAllpassC (localBuf 44100 1) del 1 >> out 0
    +let t = test 0.1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Delays
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/bufAllpassL.html b/Docs/classes/bufAllpassL.html new file mode 100644 index 0000000..c125e62 --- /dev/null +++ b/Docs/classes/bufAllpassL.html @@ -0,0 +1,499 @@ + + + + + bufAllpassL - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    bufAllpassL

    + + +
    +

    An allpass delay line with linear interpolation. This version uses a localBuf.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    bufAllpassL

    + + +
    +
      + +
    • + + buf + +
    • + +
    • + + del + +
    • + +
    • + + decay + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + buf + + + + +
      +

      LocalBuf to use for the delay

      + +
      + + +
    • + +
    • + + del + + + + +
      +

      Delay time in seconds

      + +
      + + +
    • + +
    • + + decay + + + + +
      +

      Time for the echoes to decay by 60 decibels.

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test del => impulse 1 >> bufAllpassL (localBuf 44100 1) del 1 >> out 0
    +let t = test 0.1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Delays
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/bufAllpassN.html b/Docs/classes/bufAllpassN.html new file mode 100644 index 0000000..c95a06b --- /dev/null +++ b/Docs/classes/bufAllpassN.html @@ -0,0 +1,499 @@ + + + + + bufAllpassN - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    bufAllpassN

    + + +
    +

    An allpass delay line with no interpolation. This version uses a localBuf.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    bufAllpassN

    + + +
    +
      + +
    • + + buf + +
    • + +
    • + + del + +
    • + +
    • + + decay + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + buf + + + + +
      +

      LocalBuf to use for the delay

      + +
      + + +
    • + +
    • + + del + + + + +
      +

      Delay time in seconds

      + +
      + + +
    • + +
    • + + decay + + + + +
      +

      Time for the echoes to decay by 60 decibels.

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test del => impulse 1 >> bufAllpassN (localBuf 44100 1) del 1 >> out 0
    +let t = test 0.1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Delays
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/bufCombC.html b/Docs/classes/bufCombC.html new file mode 100644 index 0000000..8726102 --- /dev/null +++ b/Docs/classes/bufCombC.html @@ -0,0 +1,499 @@ + + + + + bufCombC - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    bufCombC

    + + +
    +

    A comb delay line with cubic interpolation. This version uses a localBuf.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    bufCombC

    + + +
    +
      + +
    • + + buf + +
    • + +
    • + + del + +
    • + +
    • + + decay + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + buf + + + + +
      +

      LocalBuf to use for the delay

      + +
      + + +
    • + +
    • + + del + + + + +
      +

      Delay time in seconds

      + +
      + + +
    • + +
    • + + decay + + + + +
      +

      Time in seconds for the echoes to decay by 60 decibels.

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test del => impulse 1 >> bufCombC (localBuf 44100 1) del 1 >> out 0
    +let t = test 0.1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Delays
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/bufCombL.html b/Docs/classes/bufCombL.html new file mode 100644 index 0000000..1eb13aa --- /dev/null +++ b/Docs/classes/bufCombL.html @@ -0,0 +1,499 @@ + + + + + bufCombL - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    bufCombL

    + + +
    +

    A comb delay line with cubic linear interpolation. This version uses a localBuf.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    bufCombL

    + + +
    +
      + +
    • + + buf + +
    • + +
    • + + del + +
    • + +
    • + + decay + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + buf + + + + +
      +

      LocalBuf to use for the delay

      + +
      + + +
    • + +
    • + + del + + + + +
      +

      Delay time in seconds

      + +
      + + +
    • + +
    • + + decay + + + + +
      +

      Time in seconds for the echoes to decay by 60 decibels.

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test del => impulse 1 >> bufCombL (localBuf 44100 1) del 1 >> out 0
    +let t = test 0.1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Delays
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/bufCombN.html b/Docs/classes/bufCombN.html new file mode 100644 index 0000000..4c12a20 --- /dev/null +++ b/Docs/classes/bufCombN.html @@ -0,0 +1,499 @@ + + + + + bufCombN - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    bufCombN

    + + +
    +

    A comb delay line with no interpolation. This version uses a localBuf.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    bufCombN

    + + +
    +
      + +
    • + + buf + +
    • + +
    • + + del + +
    • + +
    • + + decay + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + buf + + + + +
      +

      LocalBuf to use for the delay

      + +
      + + +
    • + +
    • + + del + + + + +
      +

      Delay time in seconds

      + +
      + + +
    • + +
    • + + decay + + + + +
      +

      Time in seconds for the echoes to decay by 60 decibels.

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test del => impulse 1 >> bufCombN (localBuf 44100 1) del 1 >> out 0
    +let t = test 0.1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Delays
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/bufDelayC.html b/Docs/classes/bufDelayC.html new file mode 100644 index 0000000..e51bc01 --- /dev/null +++ b/Docs/classes/bufDelayC.html @@ -0,0 +1,478 @@ + + + + + bufDelayC - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    bufDelayC

    + + +
    +

    A simple delay with cubic interpolation. This version uses a localBuf.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    bufDelayC

    + + +
    +
      + +
    • + + buf + +
    • + +
    • + + del + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + buf + + + + +
      +

      LocalBuf to use for the delay

      + +
      + + +
    • + +
    • + + del + + + + +
      +

      Delay time in seconds

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test del => impulse 1 >> bufDelayC (localBuf 44100 1) del >> out 0
    +let t = test 0.1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Delays
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/bufDelayL.html b/Docs/classes/bufDelayL.html new file mode 100644 index 0000000..7492806 --- /dev/null +++ b/Docs/classes/bufDelayL.html @@ -0,0 +1,478 @@ + + + + + bufDelayL - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    bufDelayL

    + + +
    +

    A simple delay with linear interpolation. This version uses a localBuf.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    bufDelayL

    + + +
    +
      + +
    • + + buf + +
    • + +
    • + + del + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + buf + + + + +
      +

      LocalBuf to use for the delay

      + +
      + + +
    • + +
    • + + del + + + + +
      +

      Delay time in seconds

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test del => impulse 1 >> bufDelayL (localBuf 44100 1) del >> out 0
    +let t = test 0.1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Delays
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/bufDelayN.html b/Docs/classes/bufDelayN.html new file mode 100644 index 0000000..ae09ecb --- /dev/null +++ b/Docs/classes/bufDelayN.html @@ -0,0 +1,478 @@ + + + + + bufDelayN - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    bufDelayN

    + + +
    +

    A simple delay with no interpolation. This version uses a localBuf.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    bufDelayN

    + + +
    +
      + +
    • + + buf + +
    • + +
    • + + del + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + buf + + + + +
      +

      LocalBuf to use for the delay

      + +
      + + +
    • + +
    • + + del + + + + +
      +

      Delay time in seconds

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test del => impulse 1 >> bufDelayN (localBuf 44100 1) del >> out 0
    +let t = test 0.1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Delays
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/clipNoise.html b/Docs/classes/clipNoise.html index 81fb947..c840f3b 100644 --- a/Docs/classes/clipNoise.html +++ b/Docs/classes/clipNoise.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/combC.html b/Docs/classes/combC.html index 8ebb3c0..b7b3b4f 100644 --- a/Docs/classes/combC.html +++ b/Docs/classes/combC.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -326,7 +454,7 @@

    Example:

    diff --git a/Docs/classes/combL.html b/Docs/classes/combL.html index 3d46501..f2e2cb2 100644 --- a/Docs/classes/combL.html +++ b/Docs/classes/combL.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -326,7 +454,7 @@

    Example:

    diff --git a/Docs/classes/combN.html b/Docs/classes/combN.html index 2826b42..b8ffd9e 100644 --- a/Docs/classes/combN.html +++ b/Docs/classes/combN.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -326,7 +454,7 @@

    Example:

    diff --git a/Docs/classes/crackle.html b/Docs/classes/crackle.html index 42a3c97..e2bab10 100644 --- a/Docs/classes/crackle.html +++ b/Docs/classes/crackle.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/crush.html b/Docs/classes/crush.html index 3f865f8..5729b1d 100644 --- a/Docs/classes/crush.html +++ b/Docs/classes/crush.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/cuspL.html b/Docs/classes/cuspL.html index ed02820..113f013 100644 --- a/Docs/classes/cuspL.html +++ b/Docs/classes/cuspL.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -347,7 +475,7 @@

    Example:

    diff --git a/Docs/classes/cuspN.html b/Docs/classes/cuspN.html index 558e1c6..5f28a28 100644 --- a/Docs/classes/cuspN.html +++ b/Docs/classes/cuspN.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -347,7 +475,7 @@

    Example:

    diff --git a/Docs/classes/dc.html b/Docs/classes/dc.html index e95fbca..7a0c298 100644 --- a/Docs/classes/dc.html +++ b/Docs/classes/dc.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/decimate.html b/Docs/classes/decimate.html index d62cc70..a5ea51d 100644 --- a/Docs/classes/decimate.html +++ b/Docs/classes/decimate.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/delayC.html b/Docs/classes/delayC.html index 4d74c6f..232f271 100644 --- a/Docs/classes/delayC.html +++ b/Docs/classes/delayC.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -305,7 +433,7 @@

    Example:

    diff --git a/Docs/classes/delayL.html b/Docs/classes/delayL.html index c560027..18dac56 100644 --- a/Docs/classes/delayL.html +++ b/Docs/classes/delayL.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -305,7 +433,7 @@

    Example:

    diff --git a/Docs/classes/delayN.html b/Docs/classes/delayN.html index 096da83..2b58e71 100644 --- a/Docs/classes/delayN.html +++ b/Docs/classes/delayN.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -305,7 +433,7 @@

    Example:

    diff --git a/Docs/classes/dup.html b/Docs/classes/dup.html new file mode 100644 index 0000000..29fccee --- /dev/null +++ b/Docs/classes/dup.html @@ -0,0 +1,457 @@ + + + + + dup - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    dup

    + + +
    +

    Duplicates an input across a 2 index array.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    dup

    + + +
    +
      + +
    • + + input + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + input + + + + +
      +

      The audio input to be expanded.

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test freq => sin freq >> dup >> out 0
    +let t = test 440
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Panning
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/dust.html b/Docs/classes/dust.html index b75fae4..c6be24c 100644 --- a/Docs/classes/dust.html +++ b/Docs/classes/dust.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/env.html b/Docs/classes/env.html index 30e015c..e7a80d2 100644 --- a/Docs/classes/env.html +++ b/Docs/classes/env.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -346,7 +474,7 @@

    Example:

    diff --git a/Docs/classes/env2.html b/Docs/classes/env2.html index bd1e341..a2ef947 100644 --- a/Docs/classes/env2.html +++ b/Docs/classes/env2.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -346,7 +474,7 @@

    Example:

    diff --git a/Docs/classes/formant.html b/Docs/classes/formant.html index 8b13716..133f1bf 100644 --- a/Docs/classes/formant.html +++ b/Docs/classes/formant.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -326,7 +454,7 @@

    Example:

    diff --git a/Docs/classes/gbmanL.html b/Docs/classes/gbmanL.html index 7fa49f3..68a8b2b 100644 --- a/Docs/classes/gbmanL.html +++ b/Docs/classes/gbmanL.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -326,7 +454,7 @@

    Example:

    diff --git a/Docs/classes/gbmanN.html b/Docs/classes/gbmanN.html index 0fb919d..d8a1e29 100644 --- a/Docs/classes/gbmanN.html +++ b/Docs/classes/gbmanN.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -326,7 +454,7 @@

    Example:

    diff --git a/Docs/classes/gray.html b/Docs/classes/gray.html index cf9102a..77f643d 100644 --- a/Docs/classes/gray.html +++ b/Docs/classes/gray.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/highpass.html b/Docs/classes/highpass.html index bef2977..bb38a9e 100644 --- a/Docs/classes/highpass.html +++ b/Docs/classes/highpass.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -305,7 +433,7 @@

    Example:

    diff --git a/Docs/classes/impulse.html b/Docs/classes/impulse.html index a955fec..10de2ab 100644 --- a/Docs/classes/impulse.html +++ b/Docs/classes/impulse.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/lag.html b/Docs/classes/lag.html index 8582ac4..ab1b607 100644 --- a/Docs/classes/lag.html +++ b/Docs/classes/lag.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/localBuf.html b/Docs/classes/localBuf.html new file mode 100644 index 0000000..ea77c78 --- /dev/null +++ b/Docs/classes/localBuf.html @@ -0,0 +1,478 @@ + + + + + localBuf - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    localBuf

    + + +
    +

    A buffer local to a synth.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    localBuf

    + + +
    +
      + +
    • + + frames + +
    • + +
    • + + channels + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + frames + + + + +
      +

      Size of the buffer in samples

      + +
      + + +
    • + +
    • + + channels + + + + +
      +

      Number of channels for the buffer

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test del => impulse 1 >> bufCombC (localBuf 44100 1) del 1 >> out 0
    +let t = test 0.1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Buffers
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/lowpass.html b/Docs/classes/lowpass.html index ba063a5..3c02020 100644 --- a/Docs/classes/lowpass.html +++ b/Docs/classes/lowpass.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -305,7 +433,7 @@

    Example:

    diff --git a/Docs/classes/noiseL.html b/Docs/classes/noiseL.html index a030a2f..6b4d385 100644 --- a/Docs/classes/noiseL.html +++ b/Docs/classes/noiseL.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/noiseN.html b/Docs/classes/noiseN.html index 5eeec06..155084f 100644 --- a/Docs/classes/noiseN.html +++ b/Docs/classes/noiseN.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/noiseX.html b/Docs/classes/noiseX.html index 67fa194..76a5d9d 100644 --- a/Docs/classes/noiseX.html +++ b/Docs/classes/noiseX.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/out.html b/Docs/classes/out.html index 29fecfa..e70b995 100644 --- a/Docs/classes/out.html +++ b/Docs/classes/out.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/pan.html b/Docs/classes/pan.html new file mode 100644 index 0000000..5ac0fb7 --- /dev/null +++ b/Docs/classes/pan.html @@ -0,0 +1,478 @@ + + + + + pan - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    pan

    + + +
    +

    Pans a single channel input across a stereo field using equal power panning.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    pan

    + + +
    +
      + +
    • + + position + +
    • + +
    • + + input + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + position + + + + +
      +

      The position in the stereo field where the input will be panned. Range of -1 (left) to 1 (right).

      + +
      + + +
    • + +
    • + + input + + + + +
      +

      The audio input to be panned.

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test pos => white 1 >> pan pos >> out 0
    +let t = test-0.3
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Panning
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/perc.html b/Docs/classes/perc.html index e4f5a44..69af576 100644 --- a/Docs/classes/perc.html +++ b/Docs/classes/perc.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -325,7 +453,7 @@

    Example:

    diff --git a/Docs/classes/perc2.html b/Docs/classes/perc2.html index bedc677..18f29fe 100644 --- a/Docs/classes/perc2.html +++ b/Docs/classes/perc2.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -313,7 +441,7 @@

    Arguments:

    diff --git a/Docs/classes/pink.html b/Docs/classes/pink.html index 843bde2..84bf8d9 100644 --- a/Docs/classes/pink.html +++ b/Docs/classes/pink.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/pulse.html b/Docs/classes/pulse.html index 8727612..b20d2ec 100644 --- a/Docs/classes/pulse.html +++ b/Docs/classes/pulse.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -305,7 +433,7 @@

    Example:

    diff --git a/Docs/classes/saw.html b/Docs/classes/saw.html index 79ba466..325e3f0 100644 --- a/Docs/classes/saw.html +++ b/Docs/classes/saw.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/scACos.html b/Docs/classes/scACos.html new file mode 100644 index 0000000..4045a87 --- /dev/null +++ b/Docs/classes/scACos.html @@ -0,0 +1,424 @@ + + + + + scACos - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scACos

    + + +
    +

    Return the arc cos of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scACos

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scACos >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scASin.html b/Docs/classes/scASin.html new file mode 100644 index 0000000..734eb92 --- /dev/null +++ b/Docs/classes/scASin.html @@ -0,0 +1,424 @@ + + + + + scASin - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scASin

    + + +
    +

    Return the arc sin of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scASin

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scASin >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scATan.html b/Docs/classes/scATan.html new file mode 100644 index 0000000..b60d15b --- /dev/null +++ b/Docs/classes/scATan.html @@ -0,0 +1,424 @@ + + + + + scATan - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scATan

    + + +
    +

    Return the arc tan of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scATan

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scATan >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scAbs.html b/Docs/classes/scAbs.html new file mode 100644 index 0000000..7ecb948 --- /dev/null +++ b/Docs/classes/scAbs.html @@ -0,0 +1,424 @@ + + + + + scAbs - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scAbs

    + + +
    +

    Return the absolute value of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scAbs

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scAbs >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scAmpDb.html b/Docs/classes/scAmpDb.html new file mode 100644 index 0000000..599daf0 --- /dev/null +++ b/Docs/classes/scAmpDb.html @@ -0,0 +1,424 @@ + + + + + scAmpDb - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scAmpDb

    + + +
    +

    Convert a value RMS amplitude to dB.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scAmpDb

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scAmpDb >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scBitAnd.html b/Docs/classes/scBitAnd.html new file mode 100644 index 0000000..e8dc38b --- /dev/null +++ b/Docs/classes/scBitAnd.html @@ -0,0 +1,476 @@ + + + + + scBitAnd - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scBitAnd

    + + +
    +

    Bitwise & a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scBitAnd

    + + +
    +
      + +
    • + + a + +
    • + +
    • + + b + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + a + + + + +
      +

      Signal a

      + +
      + + +
    • + +
    • + + b + + + + +
      +

      Signal b

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    TODO

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Bitwise Operators
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scBitLeftShift.html b/Docs/classes/scBitLeftShift.html new file mode 100644 index 0000000..e4229df --- /dev/null +++ b/Docs/classes/scBitLeftShift.html @@ -0,0 +1,476 @@ + + + + + scBitLeftShift - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scBitLeftShift

    + + +
    +

    Bitwise << a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scBitLeftShift

    + + +
    +
      + +
    • + + a + +
    • + +
    • + + b + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + a + + + + +
      +

      Signal a

      + +
      + + +
    • + +
    • + + b + + + + +
      +

      Signal b

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    TODO

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Bitwise Operators
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scBitOr.html b/Docs/classes/scBitOr.html new file mode 100644 index 0000000..79473d8 --- /dev/null +++ b/Docs/classes/scBitOr.html @@ -0,0 +1,476 @@ + + + + + scBitOr - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scBitOr

    + + +
    +

    Bitwise | a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scBitOr

    + + +
    +
      + +
    • + + a + +
    • + +
    • + + b + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + a + + + + +
      +

      Signal a

      + +
      + + +
    • + +
    • + + b + + + + +
      +

      Signal b

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    TODO

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Bitwise Operators
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scBitRightShift.html b/Docs/classes/scBitRightShift.html new file mode 100644 index 0000000..5baaf07 --- /dev/null +++ b/Docs/classes/scBitRightShift.html @@ -0,0 +1,476 @@ + + + + + scBitRightShift - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scBitRightShift

    + + +
    +

    Bitwise >> a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scBitRightShift

    + + +
    +
      + +
    • + + a + +
    • + +
    • + + b + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + a + + + + +
      +

      Signal a

      + +
      + + +
    • + +
    • + + b + + + + +
      +

      Signal b

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    TODO

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Bitwise Operators
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scBitXor.html b/Docs/classes/scBitXor.html new file mode 100644 index 0000000..1c66dc2 --- /dev/null +++ b/Docs/classes/scBitXor.html @@ -0,0 +1,476 @@ + + + + + scBitXor - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scBitXor

    + + +
    +

    Bitwise xor a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scBitXor

    + + +
    +
      + +
    • + + a + +
    • + +
    • + + b + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + a + + + + +
      +

      Signal a

      + +
      + + +
    • + +
    • + + b + + + + +
      +

      Signal b

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    TODO

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Bitwise Operators
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scCeil.html b/Docs/classes/scCeil.html new file mode 100644 index 0000000..931cd24 --- /dev/null +++ b/Docs/classes/scCeil.html @@ -0,0 +1,424 @@ + + + + + scCeil - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scCeil

    + + +
    +

    Return the ceil of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scCeil

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scCeil >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scClip.html b/Docs/classes/scClip.html new file mode 100644 index 0000000..778ae3d --- /dev/null +++ b/Docs/classes/scClip.html @@ -0,0 +1,478 @@ + + + + + scClip - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scClip

    + + +
    +

    Clip distortion.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scClip

    + + +
    +
      + +
    • + + lo + +
    • + +
    • + + hi + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + lo + + + + +
      +

      Low boundry to clip at

      + +
      + + +
    • + +
    • + + hi + + + + +
      +

      High boundry to clip at

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test l h => white 1 >> scClip l h >> out 0
    +let t = test -0.5 0.5
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Distortions
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scCos.html b/Docs/classes/scCos.html new file mode 100644 index 0000000..5730c26 --- /dev/null +++ b/Docs/classes/scCos.html @@ -0,0 +1,424 @@ + + + + + scCos - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scCos

    + + +
    +

    Return the cos of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scCos

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scCos >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scCosh.html b/Docs/classes/scCosh.html new file mode 100644 index 0000000..31b0864 --- /dev/null +++ b/Docs/classes/scCosh.html @@ -0,0 +1,424 @@ + + + + + scCosh - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scCosh

    + + +
    +

    Return the cosh of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scCosh

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scCosh >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scCpsMidi.html b/Docs/classes/scCpsMidi.html new file mode 100644 index 0000000..7daf5a3 --- /dev/null +++ b/Docs/classes/scCpsMidi.html @@ -0,0 +1,424 @@ + + + + + scCpsMidi - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scCpsMidi

    + + +
    +

    Convert a value from cycles per second to MIDI.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scCpsMidi

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scCpsMidi >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scCubed.html b/Docs/classes/scCubed.html new file mode 100644 index 0000000..bcf86b0 --- /dev/null +++ b/Docs/classes/scCubed.html @@ -0,0 +1,424 @@ + + + + + scCubed - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scCubed

    + + +
    +

    Return the cube of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scCubed

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scCubed >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scDbAmp.html b/Docs/classes/scDbAmp.html new file mode 100644 index 0000000..2e228b2 --- /dev/null +++ b/Docs/classes/scDbAmp.html @@ -0,0 +1,424 @@ + + + + + scDbAmp - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scDbAmp

    + + +
    +

    Convert a value dB to RMS amplitude.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scDbAmp

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scDbAmp >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scDistort.html b/Docs/classes/scDistort.html new file mode 100644 index 0000000..87c0b0c --- /dev/null +++ b/Docs/classes/scDistort.html @@ -0,0 +1,424 @@ + + + + + scDistort - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scDistort

    + + +
    +

    Distort a signal. This is the same as using .distort in SuperCollider.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scDistort

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> distort >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Distortions
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scExpRand.html b/Docs/classes/scExpRand.html new file mode 100644 index 0000000..4881e94 --- /dev/null +++ b/Docs/classes/scExpRand.html @@ -0,0 +1,478 @@ + + + + + scExpRand - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scExpRand

    + + +
    +

    Generate a random number with exponential distribution when synth starts playing.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scExpRand

    + + +
    +
      + +
    • + + lo + +
    • + +
    • + + hi + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + lo + + + + +
      +

      Lowest possible value

      + +
      + + +
    • + +
    • + + hi + + + + +
      +

      Highest possible value

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test a => sin (scExpRand 220 440) >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Random
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scFloor.html b/Docs/classes/scFloor.html new file mode 100644 index 0000000..89e3c0f --- /dev/null +++ b/Docs/classes/scFloor.html @@ -0,0 +1,424 @@ + + + + + scFloor - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scFloor

    + + +
    +

    Return the floor of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scFloor

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scFloor >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scFold.html b/Docs/classes/scFold.html new file mode 100644 index 0000000..4db65e6 --- /dev/null +++ b/Docs/classes/scFold.html @@ -0,0 +1,478 @@ + + + + + scFold - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scFold

    + + +
    +

    Foldback distortion.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scFold

    + + +
    +
      + +
    • + + lo + +
    • + +
    • + + hi + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + lo + + + + +
      +

      Low boundry to fold at

      + +
      + + +
    • + +
    • + + hi + + + + +
      +

      High boundry to fold at

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test l h => white 1 >> scFold l h >> out 0
    +let t = test -0.5 0.5
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Distortions
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scIRand.html b/Docs/classes/scIRand.html new file mode 100644 index 0000000..80237a7 --- /dev/null +++ b/Docs/classes/scIRand.html @@ -0,0 +1,478 @@ + + + + + scIRand - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scIRand

    + + +
    +

    Generate a random integer with uniform distribution when synth starts playing.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scIRand

    + + +
    +
      + +
    • + + lo + +
    • + +
    • + + hi + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + lo + + + + +
      +

      Lowest possible value

      + +
      + + +
    • + +
    • + + hi + + + + +
      +

      Highest possible value

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test a => sin (scIRand 220 440) >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Random
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scLinRand.html b/Docs/classes/scLinRand.html new file mode 100644 index 0000000..de4134a --- /dev/null +++ b/Docs/classes/scLinRand.html @@ -0,0 +1,478 @@ + + + + + scLinRand - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scLinRand

    + + +
    +

    Generate a random number with linear distribution when synth starts playing.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scLinRand

    + + +
    +
      + +
    • + + lo + +
    • + +
    • + + hi + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + lo + + + + +
      +

      Lowest possible value

      + +
      + + +
    • + +
    • + + hi + + + + +
      +

      Highest possible value

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test a => sin (scLinRand 220 440) >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Random
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scLog.html b/Docs/classes/scLog.html new file mode 100644 index 0000000..ec90015 --- /dev/null +++ b/Docs/classes/scLog.html @@ -0,0 +1,424 @@ + + + + + scLog - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scLog

    + + +
    +

    Return the log of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scLog

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scLog >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scLog10.html b/Docs/classes/scLog10.html new file mode 100644 index 0000000..79694db --- /dev/null +++ b/Docs/classes/scLog10.html @@ -0,0 +1,424 @@ + + + + + scLog10 - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scLog10

    + + +
    +

    Return the log10 of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scLog10

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scLog10 >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scLog2.html b/Docs/classes/scLog2.html new file mode 100644 index 0000000..fe8ac67 --- /dev/null +++ b/Docs/classes/scLog2.html @@ -0,0 +1,424 @@ + + + + + scLog2 - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scLog2

    + + +
    +

    Return the log2 of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scLog2

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scLog2 >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scMidiCps.html b/Docs/classes/scMidiCps.html new file mode 100644 index 0000000..1dbd5ea --- /dev/null +++ b/Docs/classes/scMidiCps.html @@ -0,0 +1,424 @@ + + + + + scMidiCps - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scMidiCps

    + + +
    +

    Convert a value from MIDI to cycles per second.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scMidiCps

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scMidiCps >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scMod.html b/Docs/classes/scMod.html new file mode 100644 index 0000000..d1987a2 --- /dev/null +++ b/Docs/classes/scMod.html @@ -0,0 +1,476 @@ + + + + + scMod - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scMod

    + + +
    +

    Return the modulo of two signals. a % b

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scMod

    + + +
    +
      + +
    • + + a + +
    • + +
    • + + b + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + a + + + + +
      +

      Signal a

      + +
      + + +
    • + +
    • + + b + + + + +
      +

      Signal b

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    TODO

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scNRand.html b/Docs/classes/scNRand.html new file mode 100644 index 0000000..266c559 --- /dev/null +++ b/Docs/classes/scNRand.html @@ -0,0 +1,499 @@ + + + + + scNRand - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scNRand

    + + +
    +

    Generate a random number with distribution based on the sum of n random numbers when synth starts playing.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scNRand

    + + +
    +
      + +
    • + + lo + +
    • + +
    • + + hi + +
    • + +
    • + + n + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + lo + + + + +
      +

      Lowest possible value

      + +
      + + +
    • + +
    • + + hi + + + + +
      +

      Highest possible value

      + +
      + + +
    • + +
    • + + n + + + + +
      +

      Number of random numbers to sum. 1 = uniform distribution, 2 = triangular, etc. Higher numbers approach gaussian

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test a => sin (scNRand 220 440 4) >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Random
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scNeg.html b/Docs/classes/scNeg.html new file mode 100644 index 0000000..cd068b8 --- /dev/null +++ b/Docs/classes/scNeg.html @@ -0,0 +1,424 @@ + + + + + scNeg - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scNeg

    + + +
    +

    Return the inverse of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scNeg

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scNeg >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scPow.html b/Docs/classes/scPow.html new file mode 100644 index 0000000..40fa44d --- /dev/null +++ b/Docs/classes/scPow.html @@ -0,0 +1,476 @@ + + + + + scPow - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scPow

    + + +
    +

    Return the signal to the power of b.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scPow

    + + +
    +
      + +
    • + + a + +
    • + +
    • + + b + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + a + + + + +
      +

      Signal a

      + +
      + + +
    • + +
    • + + b + + + + +
      +

      Value to round to

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    TODO

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scRand.html b/Docs/classes/scRand.html new file mode 100644 index 0000000..4c054fc --- /dev/null +++ b/Docs/classes/scRand.html @@ -0,0 +1,478 @@ + + + + + scRand - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scRand

    + + +
    +

    Generate a random number with uniform distribution when synth starts playing.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scRand

    + + +
    +
      + +
    • + + lo + +
    • + +
    • + + hi + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + lo + + + + +
      +

      Lowest possible value

      + +
      + + +
    • + +
    • + + hi + + + + +
      +

      Highest possible value

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test a => sin (scRand 220 440) >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Bitwise Operators
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scReciprocal.html b/Docs/classes/scReciprocal.html new file mode 100644 index 0000000..41c22d1 --- /dev/null +++ b/Docs/classes/scReciprocal.html @@ -0,0 +1,424 @@ + + + + + scReciprocal - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scReciprocal

    + + +
    +

    Return the reciprocal of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scReciprocal

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scReciprocal >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scRound.html b/Docs/classes/scRound.html new file mode 100644 index 0000000..4537559 --- /dev/null +++ b/Docs/classes/scRound.html @@ -0,0 +1,476 @@ + + + + + scRound - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scRound

    + + +
    +

    Return the signal rounded to the nearest value of b.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scRound

    + + +
    +
      + +
    • + + a + +
    • + +
    • + + b + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + a + + + + +
      +

      Signal a

      + +
      + + +
    • + +
    • + + b + + + + +
      +

      Value to round to

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    TODO

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scSin.html b/Docs/classes/scSin.html new file mode 100644 index 0000000..f628a5f --- /dev/null +++ b/Docs/classes/scSin.html @@ -0,0 +1,424 @@ + + + + + scSin - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scSin

    + + +
    +

    Return the sin of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scSin

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scSin >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scSinh.html b/Docs/classes/scSinh.html new file mode 100644 index 0000000..467a15f --- /dev/null +++ b/Docs/classes/scSinh.html @@ -0,0 +1,424 @@ + + + + + scSinh - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scSinh

    + + +
    +

    Return the sinh of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scSinh

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scSinh >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scSoftClip.html b/Docs/classes/scSoftClip.html new file mode 100644 index 0000000..6a62419 --- /dev/null +++ b/Docs/classes/scSoftClip.html @@ -0,0 +1,424 @@ + + + + + scSoftClip - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scSoftClip

    + + +
    +

    Distortion with a perfectly linear region from -0.5 to +0.5. This is the same as using .softclip in SuperCollider.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scSoftClip

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scSoftClip >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Distortions
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scSqrt.html b/Docs/classes/scSqrt.html new file mode 100644 index 0000000..8d69790 --- /dev/null +++ b/Docs/classes/scSqrt.html @@ -0,0 +1,424 @@ + + + + + scSqrt - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scSqrt

    + + +
    +

    Return the square root of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scSqrt

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scSqrt >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scSquared.html b/Docs/classes/scSquared.html new file mode 100644 index 0000000..20c74cc --- /dev/null +++ b/Docs/classes/scSquared.html @@ -0,0 +1,424 @@ + + + + + scSquared - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scSquared

    + + +
    +

    Return the square of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scSquared

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scSquared >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scTExpRand.html b/Docs/classes/scTExpRand.html new file mode 100644 index 0000000..fcab1b0 --- /dev/null +++ b/Docs/classes/scTExpRand.html @@ -0,0 +1,499 @@ + + + + + scTExpRand - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scTExpRand

    + + +
    +

    Generate a random number with exponential distribution on each trigger.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scTExpRand

    + + +
    +
      + +
    • + + lo + +
    • + +
    • + + hi + +
    • + +
    • + + trigger + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + lo + + + + +
      +

      Lowest possible value

      + +
      + + +
    • + +
    • + + hi + + + + +
      +

      Highest possible value

      + +
      + + +
    • + +
    • + + trigger + + + + +
      +

      A trigger happens when the signal changes from non-positive to positive

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test a => sin (scTExpRand 220 440 (impulse 1)) >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Random
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scTIRand.html b/Docs/classes/scTIRand.html new file mode 100644 index 0000000..6ced5c4 --- /dev/null +++ b/Docs/classes/scTIRand.html @@ -0,0 +1,499 @@ + + + + + scTIRand - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scTIRand

    + + +
    +

    Generate a random integer with uniform distribution on each trigger.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scTIRand

    + + +
    +
      + +
    • + + lo + +
    • + +
    • + + hi + +
    • + +
    • + + trigger + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + lo + + + + +
      +

      Lowest possible value

      + +
      + + +
    • + +
    • + + hi + + + + +
      +

      Highest possible value

      + +
      + + +
    • + +
    • + + trigger + + + + +
      +

      A trigger happens when the signal changes from non-positive to positive

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test a => sin (scTIRand 220 440 (impulse 1)) >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Random
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scTRand.html b/Docs/classes/scTRand.html new file mode 100644 index 0000000..74158e6 --- /dev/null +++ b/Docs/classes/scTRand.html @@ -0,0 +1,499 @@ + + + + + scTRand - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scTRand

    + + +
    +

    Generate a random number with uniform distribution on each trigger.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scTRand

    + + +
    +
      + +
    • + + lo + +
    • + +
    • + + hi + +
    • + +
    • + + trigger + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + lo + + + + +
      +

      Lowest possible value

      + +
      + + +
    • + +
    • + + hi + + + + +
      +

      Highest possible value

      + +
      + + +
    • + +
    • + + trigger + + + + +
      +

      A trigger happens when the signal changes from non-positive to positive

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test a => sin (scTRand 220 440 (impulse 1)) >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Random
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scTan.html b/Docs/classes/scTan.html new file mode 100644 index 0000000..449eb6a --- /dev/null +++ b/Docs/classes/scTan.html @@ -0,0 +1,424 @@ + + + + + scTan - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scTan

    + + +
    +

    Return the tan of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scTan

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scTan >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scTanh.html b/Docs/classes/scTanh.html new file mode 100644 index 0000000..630a107 --- /dev/null +++ b/Docs/classes/scTanh.html @@ -0,0 +1,424 @@ + + + + + scTanh - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scTanh

    + + +
    +

    Return the tanh of a signal.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scTanh

    + + + () + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    +

    Example:

    + +
    +
    let test amp => sin 440 >> gain amp >> scTanh >> out 0
    +let t = test 1
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Signal Math
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/scWrap.html b/Docs/classes/scWrap.html new file mode 100644 index 0000000..1dc376e --- /dev/null +++ b/Docs/classes/scWrap.html @@ -0,0 +1,478 @@ + + + + + scWrap - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    scWrap

    + + +
    +

    Wrap distortion.

    + +
    + + +
    +
    + +

    Syntax

    +
    +

    scWrap

    + + +
    +
      + +
    • + + lo + +
    • + +
    • + + hi + +
    • + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    +

    Arguments:

    + +
      + +
    • + + lo + + + + +
      +

      Low boundry to wrap at

      + +
      + + +
    • + +
    • + + hi + + + + +
      +

      High boundry to wrap at

      + +
      + + +
    • + +
    +
    + + + + + +
    +

    Example:

    + +
    +
    let test l h => white 1 >> scWrap l h >> out 0
    +let t = test -0.5 0.5
    +stop t

    + +
    +
    +
    + + + + +
    + +
    + + +
    +
    +
    + + + + + + + Module: Distortions
    + Parent Module: Lich.sc UGens + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/classes/sin.html b/Docs/classes/sin.html index af0938a..946393f 100644 --- a/Docs/classes/sin.html +++ b/Docs/classes/sin.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/square.html b/Docs/classes/square.html index 5702c71..a121548 100644 --- a/Docs/classes/square.html +++ b/Docs/classes/square.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/tri.html b/Docs/classes/tri.html index 9f8a3ba..134b1f9 100644 --- a/Docs/classes/tri.html +++ b/Docs/classes/tri.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/classes/white.html b/Docs/classes/white.html index 747517e..355bd31 100644 --- a/Docs/classes/white.html +++ b/Docs/classes/white.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -284,7 +412,7 @@

    Example:

    diff --git a/Docs/data.json b/Docs/data.json index 0d89eb9..0c970fe 100644 --- a/Docs/data.json +++ b/Docs/data.json @@ -6,19 +6,84 @@ "url": "https://github.com/ChadMcKinney/Lich.js" }, "files": { + "CloudChamber.js/CloudChamber.js": { + "name": "CloudChamber.js/CloudChamber.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "Compiler/Compiler.js": { + "name": "Compiler/Compiler.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, "Soliton.js/SuperCollider.js": { "name": "Soliton.js/SuperCollider.js", "modules": { "Lich.sc UGens": 1, + "Distortions": 1, + "Signal Math": 1, + "Bitwise Operators": 1, + "Random": 1, "Oscillators": 1, "Noise": 1, "Chaos": 1, "Filters": 1, "Delays": 1, "Envelopes": 1, - "InputOutput": 1 + "InputOutput": 1, + "Panning": 1, + "Buffers": 1 }, "classes": { + "scDistort": 1, + "scSoftClip": 1, + "scFold": 1, + "scWrap": 1, + "scClip": 1, + "scNeg": 1, + "scAbs": 1, + "scCeil": 1, + "scFloor": 1, + "scSquared": 1, + "scCubed": 1, + "scSqrt": 1, + "scReciprocal": 1, + "scCpsMidi": 1, + "scMidiCps": 1, + "scDbAmp": 1, + "scAmpDb": 1, + "scLog": 1, + "scLog2": 1, + "scLog10": 1, + "scSin": 1, + "scCos": 1, + "scTan": 1, + "scASin": 1, + "scACos": 1, + "scATan": 1, + "scSinh": 1, + "scCosh": 1, + "scTanh": 1, + "scMod": 1, + "scRound": 1, + "scPow": 1, + "scBitAnd": 1, + "scBitOr": 1, + "scBitXor": 1, + "scBitLeftShift": 1, + "scBitRightShift": 1, + "scRand": 1, + "scNRand": 1, + "scLinRand": 1, + "scIRand": 1, + "scExpRand": 1, + "scTRand": 1, + "scTIRand": 1, + "scTExpRand": 1, "dc": 1, "sin": 1, "saw": 1, @@ -49,37 +114,493 @@ "crush": 1, "decimate": 1, "allpassN": 1, + "bufAllpassN": 1, "allpassL": 1, + "bufAllpassL": 1, "allpassC": 1, + "bufAllpassC": 1, "combN": 1, + "bufCombN": 1, "combL": 1, + "bufCombL": 1, "combC": 1, + "bufCombC": 1, "delayN": 1, + "bufDelayN": 1, "delayL": 1, + "bufDelayL": 1, "delayC": 1, + "bufDelayC": 1, "env": 1, "env2": 1, "perc": 1, "perc2": 1, - "out": 1 + "out": 1, + "auxIn": 1, + "pan": 1, + "dup": 1, + "localBuf": 1 }, "fors": {}, "namespaces": {} + }, + "third-party/codemirror-3.20/addon/edit/closetag.js": { + "name": "third-party/codemirror-3.20/addon/edit/closetag.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/keymap/vim.js": { + "name": "third-party/codemirror-3.20/keymap/vim.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/mode/clojure/clojure.js": { + "name": "third-party/codemirror-3.20/mode/clojure/clojure.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/mode/cobol/cobol.js": { + "name": "third-party/codemirror-3.20/mode/cobol/cobol.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/mode/coffeescript/coffeescript.js": { + "name": "third-party/codemirror-3.20/mode/coffeescript/coffeescript.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/mode/livescript/livescript.js": { + "name": "third-party/codemirror-3.20/mode/livescript/livescript.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/mode/nginx/nginx.js": { + "name": "third-party/codemirror-3.20/mode/nginx/nginx.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/mode/ntriples/ntriples.js": { + "name": "third-party/codemirror-3.20/mode/ntriples/ntriples.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/mode/scheme/scheme.js": { + "name": "third-party/codemirror-3.20/mode/scheme/scheme.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/mode/smarty/smarty.js": { + "name": "third-party/codemirror-3.20/mode/smarty/smarty.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/mode/smartymixed/smartymixed.js": { + "name": "third-party/codemirror-3.20/mode/smartymixed/smartymixed.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/mode/tiddlywiki/tiddlywiki.js": { + "name": "third-party/codemirror-3.20/mode/tiddlywiki/tiddlywiki.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/test/mode_test.js": { + "name": "third-party/codemirror-3.20/test/mode_test.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/codemirror-3.20/test/vim_test.js": { + "name": "third-party/codemirror-3.20/test/vim_test.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/postprocessing/BloomPass.js": { + "name": "third-party/three.js/postprocessing/BloomPass.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/postprocessing/DotScreenPass.js": { + "name": "third-party/three.js/postprocessing/DotScreenPass.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/postprocessing/EffectComposer.js": { + "name": "third-party/three.js/postprocessing/EffectComposer.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/postprocessing/FilmPass.js": { + "name": "third-party/three.js/postprocessing/FilmPass.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/postprocessing/MaskPass.js": { + "name": "third-party/three.js/postprocessing/MaskPass.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/postprocessing/RenderPass.js": { + "name": "third-party/three.js/postprocessing/RenderPass.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/postprocessing/SavePass.js": { + "name": "third-party/three.js/postprocessing/SavePass.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/postprocessing/ShaderPass.js": { + "name": "third-party/three.js/postprocessing/ShaderPass.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/postprocessing/TexturePass.js": { + "name": "third-party/three.js/postprocessing/TexturePass.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/BasicShader.js": { + "name": "third-party/three.js/shaders/BasicShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/BleachBypassShader.js": { + "name": "third-party/three.js/shaders/BleachBypassShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/BlendShader.js": { + "name": "third-party/three.js/shaders/BlendShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/BokehShader.js": { + "name": "third-party/three.js/shaders/BokehShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/BrightnessContrastShader.js": { + "name": "third-party/three.js/shaders/BrightnessContrastShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/ColorCorrectionShader.js": { + "name": "third-party/three.js/shaders/ColorCorrectionShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/ColorifyShader.js": { + "name": "third-party/three.js/shaders/ColorifyShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/ConvolutionShader.js": { + "name": "third-party/three.js/shaders/ConvolutionShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/CopyShader.js": { + "name": "third-party/three.js/shaders/CopyShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/DOFMipMapShader.js": { + "name": "third-party/three.js/shaders/DOFMipMapShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/DotScreenShader.js": { + "name": "third-party/three.js/shaders/DotScreenShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/EdgeShader.js": { + "name": "third-party/three.js/shaders/EdgeShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/EdgeShader2.js": { + "name": "third-party/three.js/shaders/EdgeShader2.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/FXAAShader.js": { + "name": "third-party/three.js/shaders/FXAAShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/FilmShader.js": { + "name": "third-party/three.js/shaders/FilmShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/FocusShader.js": { + "name": "third-party/three.js/shaders/FocusShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/FresnelShader.js": { + "name": "third-party/three.js/shaders/FresnelShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/HorizontalBlurShader.js": { + "name": "third-party/three.js/shaders/HorizontalBlurShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/HorizontalTiltShiftShader.js": { + "name": "third-party/three.js/shaders/HorizontalTiltShiftShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/HueSaturationShader.js": { + "name": "third-party/three.js/shaders/HueSaturationShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/KaleidoShader.js": { + "name": "third-party/three.js/shaders/KaleidoShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/LuminosityShader.js": { + "name": "third-party/three.js/shaders/LuminosityShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/MirrorShader.js": { + "name": "third-party/three.js/shaders/MirrorShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/NormalMapShader.js": { + "name": "third-party/three.js/shaders/NormalMapShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/RGBShiftShader.js": { + "name": "third-party/three.js/shaders/RGBShiftShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/SSAOShader.js": { + "name": "third-party/three.js/shaders/SSAOShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/SepiaShader.js": { + "name": "third-party/three.js/shaders/SepiaShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/TriangleBlurShader.js": { + "name": "third-party/three.js/shaders/TriangleBlurShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/UnpackDepthRGBAShader.js": { + "name": "third-party/three.js/shaders/UnpackDepthRGBAShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/VerticalBlurShader.js": { + "name": "third-party/three.js/shaders/VerticalBlurShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/VerticalTiltShiftShader.js": { + "name": "third-party/three.js/shaders/VerticalTiltShiftShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/three.js/shaders/VignetteShader.js": { + "name": "third-party/three.js/shaders/VignetteShader.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "third-party/webgl-utils.js": { + "name": "third-party/webgl-utils.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} } }, "modules": { "Lich.sc UGens": { "name": "Lich.sc UGens", "submodules": { + "Distortions": 1, + "Signal Math": 1, + "Bitwise Operators": 1, + "Random": 1, "Oscillators": 1, "Noise": 1, "Chaos": 1, "Filters": 1, "Delays": 1, "Envelopes": 1, - "InputOutput": 1 + "InputOutput": 1, + "Panning": 1, + "Buffers": 1 }, "classes": { + "scDistort": 1, + "scSoftClip": 1, + "scFold": 1, + "scWrap": 1, + "scClip": 1, + "scNeg": 1, + "scAbs": 1, + "scCeil": 1, + "scFloor": 1, + "scSquared": 1, + "scCubed": 1, + "scSqrt": 1, + "scReciprocal": 1, + "scCpsMidi": 1, + "scMidiCps": 1, + "scDbAmp": 1, + "scAmpDb": 1, + "scLog": 1, + "scLog2": 1, + "scLog10": 1, + "scSin": 1, + "scCos": 1, + "scTan": 1, + "scASin": 1, + "scACos": 1, + "scATan": 1, + "scSinh": 1, + "scCosh": 1, + "scTanh": 1, + "scMod": 1, + "scRound": 1, + "scPow": 1, + "scBitAnd": 1, + "scBitOr": 1, + "scBitXor": 1, + "scBitLeftShift": 1, + "scBitRightShift": 1, + "scRand": 1, + "scNRand": 1, + "scLinRand": 1, + "scIRand": 1, + "scExpRand": 1, + "scTRand": 1, + "scTIRand": 1, + "scTExpRand": 1, "dc": 1, "sin": 1, "saw": 1, @@ -110,27 +631,141 @@ "crush": 1, "decimate": 1, "allpassN": 1, + "bufAllpassN": 1, "allpassL": 1, + "bufAllpassL": 1, "allpassC": 1, + "bufAllpassC": 1, "combN": 1, + "bufCombN": 1, "combL": 1, + "bufCombL": 1, "combC": 1, + "bufCombC": 1, "delayN": 1, + "bufDelayN": 1, "delayL": 1, + "bufDelayL": 1, "delayC": 1, + "bufDelayC": 1, "env": 1, "env2": 1, "perc": 1, "perc2": 1, - "out": 1 + "out": 1, + "auxIn": 1, + "pan": 1, + "dup": 1, + "localBuf": 1 }, "fors": {}, "namespaces": {}, "tag": "module", "file": "Soliton.js/SuperCollider.js", - "line": 1283, + "line": 2481, "description": "Lich.sc UGen bindings." }, + "Distortions": { + "name": "Distortions", + "submodules": {}, + "classes": { + "scDistort": 1, + "scSoftClip": 1, + "scFold": 1, + "scWrap": 1, + "scClip": 1 + }, + "fors": {}, + "is_submodule": 1, + "namespaces": {}, + "module": "Lich.sc UGens", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 761, + "description": "Distortions." + }, + "Signal Math": { + "name": "Signal Math", + "submodules": {}, + "classes": { + "scNeg": 1, + "scAbs": 1, + "scCeil": 1, + "scFloor": 1, + "scSquared": 1, + "scCubed": 1, + "scSqrt": 1, + "scReciprocal": 1, + "scCpsMidi": 1, + "scMidiCps": 1, + "scDbAmp": 1, + "scAmpDb": 1, + "scLog": 1, + "scLog2": 1, + "scLog10": 1, + "scSin": 1, + "scCos": 1, + "scTan": 1, + "scASin": 1, + "scACos": 1, + "scATan": 1, + "scSinh": 1, + "scCosh": 1, + "scTanh": 1, + "scMod": 1, + "scRound": 1, + "scPow": 1 + }, + "fors": {}, + "is_submodule": 1, + "namespaces": {}, + "module": "Lich.sc UGens", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1173, + "description": "Signal Math. TODO: fix all the examples" + }, + "Bitwise Operators": { + "name": "Bitwise Operators", + "submodules": {}, + "classes": { + "scBitAnd": 1, + "scBitOr": 1, + "scBitXor": 1, + "scBitLeftShift": 1, + "scBitRightShift": 1, + "scRand": 1 + }, + "fors": {}, + "is_submodule": 1, + "namespaces": {}, + "module": "Lich.sc UGens", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1268, + "description": "Bitwise Operators. TODO: fix all examples" + }, + "Random": { + "name": "Random", + "submodules": {}, + "classes": { + "scNRand": 1, + "scLinRand": 1, + "scIRand": 1, + "scExpRand": 1, + "scTRand": 1, + "scTIRand": 1, + "scTExpRand": 1 + }, + "fors": {}, + "is_submodule": 1, + "namespaces": {}, + "module": "Lich.sc UGens", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1396, + "description": "Random Number Generators." + }, "Oscillators": { "name": "Oscillators", "submodules": {}, @@ -151,7 +786,7 @@ "module": "Lich.sc UGens", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 638, + "line": 1551, "description": "Oscillators." }, "Noise": { @@ -175,7 +810,7 @@ "module": "Lich.sc UGens", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 804, + "line": 1717, "description": "Noise." }, "Chaos": { @@ -193,7 +828,7 @@ "module": "Lich.sc UGens", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 881, + "line": 1794, "description": "Chaotic Oscillators." }, "Filters": { @@ -205,7 +840,8 @@ "bandpass": 1, "lag": 1, "crush": 1, - "decimate": 1 + "decimate": 1, + "allpassN": 1 }, "fors": {}, "is_submodule": 1, @@ -213,22 +849,30 @@ "module": "Lich.sc UGens", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 986, + "line": 1915, "description": "Filters." }, "Delays": { "name": "Delays", "submodules": {}, "classes": { - "allpassN": 1, + "bufAllpassN": 1, "allpassL": 1, + "bufAllpassL": 1, "allpassC": 1, + "bufAllpassC": 1, "combN": 1, + "bufCombN": 1, "combL": 1, + "bufCombL": 1, "combC": 1, + "bufCombC": 1, "delayN": 1, + "bufDelayN": 1, "delayL": 1, - "delayC": 1 + "bufDelayL": 1, + "delayC": 1, + "bufDelayC": 1 }, "fors": {}, "is_submodule": 1, @@ -236,7 +880,7 @@ "module": "Lich.sc UGens", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1149, + "line": 2221, "description": "Delays." }, "Envelopes": { @@ -254,14 +898,15 @@ "module": "Lich.sc UGens", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1270, + "line": 2342, "description": "Envelopes." }, "InputOutput": { "name": "InputOutput", "submodules": {}, "classes": { - "out": 1 + "out": 1, + "auxIn": 1 }, "fors": {}, "is_submodule": 1, @@ -269,14 +914,45 @@ "module": "Lich.sc UGens", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1283, + "line": 2386, "description": "Inputs and Outputs" + }, + "Panning": { + "name": "Panning", + "submodules": {}, + "classes": { + "pan": 1, + "dup": 1 + }, + "fors": {}, + "is_submodule": 1, + "namespaces": {}, + "module": "Lich.sc UGens", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2438, + "description": "Panning UGens" + }, + "Buffers": { + "name": "Buffers", + "submodules": {}, + "classes": { + "localBuf": 1 + }, + "fors": {}, + "is_submodule": 1, + "namespaces": {}, + "module": "Lich.sc UGens", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2481, + "description": "Buffers." } }, "classes": { - "dc": { - "name": "dc", - "shortname": "dc", + "scDistort": { + "name": "scDistort", + "shortname": "scDistort", "classitems": [], "plugins": [], "extensions": [], @@ -285,1236 +961,3760 @@ "module": "Lich.sc UGens", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 501, - "description": "Output a constant value", + "line": 692, + "description": "Distort a signal. This is the same as using .distort in SuperCollider.", "is_constructor": 1, - "params": [ - { - "name": "value", - "description": "Value to be output" - } - ], "example": [ - "\nlet test value => dc value >> out 0
    \nlet t = test 1
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> distort >> out 0
    \nlet t = test 1
    \nstop t" ], - "submodule": "Oscillators" + "submodule": "Distortions" }, - "sin": { - "name": "sin", - "shortname": "sin", + "scSoftClip": { + "name": "scSoftClip", + "shortname": "scSoftClip", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Oscillators", + "submodule": "Distortions", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 522, - "description": "A sine wave oscillator.", + "line": 712, + "description": "Distortion with a perfectly linear region from -0.5 to +0.5. This is the same as using .softclip in SuperCollider.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Frequency" - } - ], "example": [ - "\nlet test f => sin f >> out 0
    \nlet t = test 440
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scSoftClip >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "saw": { - "name": "saw", - "shortname": "saw", + "scFold": { + "name": "scFold", + "shortname": "scFold", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Oscillators", + "submodule": "Distortions", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 538, - "description": "A saw wave oscillator.", + "line": 727, + "description": "Foldback distortion.", "is_constructor": 1, "params": [ { - "name": "freq", - "description": "Frequency" + "name": "lo", + "description": "Low boundry to fold at" + }, + { + "name": "hi", + "description": "High boundry to fold at" } ], "example": [ - "\nlet test f => saw f >> out 0
    \nlet t = test 440
    \nstop t" + "\nlet test l h => white 1 >> scFold l h >> out 0
    \nlet t = test -0.5 0.5
    \nstop t" ] }, - "tri": { - "name": "tri", - "shortname": "tri", + "scWrap": { + "name": "scWrap", + "shortname": "scWrap", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Oscillators", + "submodule": "Distortions", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 554, - "description": "A triangle wave oscillator.", + "line": 744, + "description": "Wrap distortion.", "is_constructor": 1, "params": [ { - "name": "freq", - "description": "Frequency" + "name": "lo", + "description": "Low boundry to wrap at" + }, + { + "name": "hi", + "description": "High boundry to wrap at" } ], "example": [ - "\nlet test f => tri f >> out 0
    \nlet t = test 440
    \nstop t" + "\nlet test l h => white 1 >> scWrap l h >> out 0
    \nlet t = test -0.5 0.5
    \nstop t" ] }, - "square": { - "name": "square", - "shortname": "square", + "scClip": { + "name": "scClip", + "shortname": "scClip", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Oscillators", + "submodule": "Distortions", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 570, - "description": "A square wave oscillator.", + "line": 761, + "description": "Clip distortion.", "is_constructor": 1, "params": [ { - "name": "freq", - "description": "Frequency" + "name": "lo", + "description": "Low boundry to clip at" + }, + { + "name": "hi", + "description": "High boundry to clip at" } ], "example": [ - "\nlet test f => square f >> out 0
    \nlet t = test 440
    \nstop t" + "\nlet test l h => white 1 >> scClip l h >> out 0
    \nlet t = test -0.5 0.5
    \nstop t" ] }, - "pulse": { - "name": "pulse", - "shortname": "pulse", + "scNeg": { + "name": "scNeg", + "shortname": "scNeg", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Oscillators", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 586, - "description": "A pulse wave oscillator with variable duty cycle.", + "line": 778, + "description": "Return the inverse of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Frequency" - }, - { - "name": "width", - "description": "Pulse width from 0.0 to 1.0" - } - ], "example": [ - "\nlet test f w => pulse f w >> out 0
    \nlet t = test 440 0.2
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scNeg >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "blip": { - "name": "blip", - "shortname": "blip", + "scAbs": { + "name": "scAbs", + "shortname": "scAbs", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Oscillators", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 603, - "description": "An oscillator with a variable number of harmonics of equal amplitude.", + "line": 798, + "description": "Return the absolute value of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Frequency" - }, - { - "name": "nharm", - "description": "Number of harmonics" - } - ], "example": [ - "\nlet test f n => blip f n >> out 0
    \nlet t = test 440 5
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scAbs >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "formant": { - "name": "formant", - "shortname": "formant", + "scCeil": { + "name": "scCeil", + "shortname": "scCeil", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Oscillators", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 620, - "description": "Generates a set of harmonics around a formant frequency at a given fundamental frequency.", + "line": 813, + "description": "Return the ceil of a signal.", "is_constructor": 1, - "params": [ - { - "name": "fundf", - "description": "Fundamental frequency" - }, - { - "name": "formf", - "description": "Formant frequency" - }, - { - "name": "bwf", - "description": "Pulse width frequency. Must be >= fundf." - } - ], "example": [ - "\nlet test fund form bwf => blip fund form bwf >> out 0
    \nlet t = test 440 1760 880
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scCeil >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "impulse": { - "name": "impulse", - "shortname": "impulse", + "scFloor": { + "name": "scFloor", + "shortname": "scFloor", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Oscillators", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 638, - "description": "Generates single sample impulses at a frequency.", + "line": 828, + "description": "Return the floor of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Frequency" - } - ], "example": [ - "\nlet test f => impulse f >> out 0
    \nlet t = test 5
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scFloor >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "white": { - "name": "white", - "shortname": "white", + "scSquared": { + "name": "scSquared", + "shortname": "scSquared", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Noise", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 654, - "description": "White noise generator.", + "line": 843, + "description": "Return the square of a signal.", "is_constructor": 1, - "params": [ - { - "name": "amp", - "description": "Amplitude of the noise" - } - ], "example": [ - "\nlet test a => white a >> out 0
    \nlet t = test 1
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scSquared >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "pink": { - "name": "pink", - "shortname": "pink", + "scCubed": { + "name": "scCubed", + "shortname": "scCubed", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Noise", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 675, - "description": "Pink noise generator.", + "line": 858, + "description": "Return the cube of a signal.", "is_constructor": 1, - "params": [ - { - "name": "amp", - "description": "Amplitude of the noise" - } - ], "example": [ - "\nlet test a => pink a >> out 0
    \nlet t = test 1
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scCubed >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "brown": { - "name": "brown", - "shortname": "brown", + "scSqrt": { + "name": "scSqrt", + "shortname": "scSqrt", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Noise", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 691, - "description": "Brownian noise generator.", + "line": 873, + "description": "Return the square root of a signal.", "is_constructor": 1, - "params": [ - { - "name": "amp", - "description": "Amplitude of the noise" - } - ], "example": [ - "\nlet test a => brown a >> out 0
    \nlet t = test 1
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scSqrt >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "gray": { - "name": "gray", - "shortname": "gray", + "scReciprocal": { + "name": "scReciprocal", + "shortname": "scReciprocal", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Noise", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 707, - "description": "Gray noise generator.", + "line": 888, + "description": "Return the reciprocal of a signal.", "is_constructor": 1, - "params": [ - { - "name": "amp", - "description": "Amplitude of the noise" - } - ], "example": [ - "\nlet test a => gray a >> out 0
    \nlet t = test 1
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scReciprocal >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "clipNoise": { - "name": "clipNoise", - "shortname": "clipNoise", + "scCpsMidi": { + "name": "scCpsMidi", + "shortname": "scCpsMidi", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Noise", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 723, - "description": "Generates noise whose values are either -1 or 1.", + "line": 903, + "description": "Convert a value from cycles per second to MIDI.", "is_constructor": 1, - "params": [ - { - "name": "amp", - "description": "Amplitude of the noise" - } - ], "example": [ - "\nlet test a => clipNoise a >> out 0
    \nlet t = test 1
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scCpsMidi >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "crackle": { - "name": "crackle", - "shortname": "crackle", + "scMidiCps": { + "name": "scMidiCps", + "shortname": "scMidiCps", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Noise", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 739, - "description": "A noise generator based on a chaotic function.", + "line": 918, + "description": "Convert a value from MIDI to cycles per second.", "is_constructor": 1, - "params": [ - { - "name": "chaos", - "description": "A parameter of the chaotic function with useful values from just below 1.0 to just above 2.0. Towards 2.0 the sound crackles." - } - ], "example": [ - "\nlet test c => crackle c >> out 0
    \nlet t = test 1.5
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scMidiCps >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "dust": { - "name": "dust", - "shortname": "dust", + "scDbAmp": { + "name": "scDbAmp", + "shortname": "scDbAmp", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Noise", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 756, - "description": "Generates random impulses from 0 to +1.", + "line": 933, + "description": "Convert a value dB to RMS amplitude.", "is_constructor": 1, - "params": [ - { - "name": "density", - "description": "Average number of impulses per second." - } - ], "example": [ - "\nlet test d => dust d >> out 0
    \nlet t = test 1.5
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scDbAmp >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "noiseN": { - "name": "noiseN", - "shortname": "noiseN", + "scAmpDb": { + "name": "scAmpDb", + "shortname": "scAmpDb", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Noise", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 772, - "description": "A stepped random number generator", + "line": 948, + "description": "Convert a value RMS amplitude to dB.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Frequency of random number generation" - } - ], "example": [ - "\nlet test f => noiseN f >> out 0
    \nlet t = test 440
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scAmpDb >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "noiseL": { - "name": "noiseL", - "shortname": "noiseL", + "scLog": { + "name": "scLog", + "shortname": "scLog", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Noise", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 788, - "description": "A linearly interpolated random number generator", + "line": 963, + "description": "Return the log of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Frequency of random number generation" - } - ], "example": [ - "\nlet test f => noiseL f >> out 0
    \nlet t = test 440
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scLog >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "noiseX": { - "name": "noiseX", - "shortname": "noiseX", + "scLog2": { + "name": "scLog2", + "shortname": "scLog2", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Noise", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 804, - "description": "A cubic interpolated random number generator", + "line": 978, + "description": "Return the log2 of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Frequency of random number generation" - } - ], "example": [ - "\nlet test f => noiseX f >> out 0
    \nlet t = test 440
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scLog2 >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "cuspN": { - "name": "cuspN", - "shortname": "cuspN", + "scLog10": { + "name": "scLog10", + "shortname": "scLog10", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Chaos", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 820, - "description": "A non-interpolating sound generator based on the difference equation: x[n+1] = a - b * sqrt(abs(x[n]))", + "line": 993, + "description": "Return the log10 of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Frequency" - }, - { - "name": "a", - "description": "Equation variable" - }, - { - "name": "b", - "description": "Equation variable" - }, - { - "name": "xi", - "description": "Initial value of x" - } - ], "example": [ - "\nlet test f a b xi => cuspN f a b xi >> out 0
    \nlet t = test 22050 1 1.9 0
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scLog10 >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "cuspL": { - "name": "cuspL", - "shortname": "cuspL", + "scSin": { + "name": "scSin", + "shortname": "scSin", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Chaos", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 844, - "description": "A linearly interpolating sound generator based on the difference equation: x[n+1] = a - b * sqrt(abs(x[n]))", + "line": 1008, + "description": "Return the sin of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Frequency" - }, - { - "name": "a", - "description": "Equation variable" - }, - { - "name": "b", - "description": "Equation variable" - }, - { - "name": "xi", - "description": "Initial value of x" - } - ], "example": [ - "\nlet test f a b xi => cuspL f a b xi >> out 0
    \nlet t = test 22050 1 1.9 0
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scSin >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "gbmanN": { - "name": "gbmanN", - "shortname": "gbmanN", + "scCos": { + "name": "scCos", + "shortname": "scCos", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Chaos", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 863, - "description": "A non-interpolating sound generator based on the difference equation: x[n+1] = 1 - y[n] + abs(x[n]); y[n+1] = x[n];", + "line": 1023, + "description": "Return the cos of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Frequency" - }, - { - "name": "xi", - "description": "Initial value of x" - }, - { - "name": "yi", - "description": "Initial value of y" - } - ], "example": [ - "\nlet test f xi yi => gbmanN f xi yi >> out 0
    \nlet t = test 22050 1.2 2.1
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scCos >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "gbmanL": { - "name": "gbmanL", - "shortname": "gbmanL", + "scTan": { + "name": "scTan", + "shortname": "scTan", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Chaos", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 881, - "description": "A linearly interpolating sound generator based on the difference equation: x[n+1] = 1 - y[n] + abs(x[n]); y[n+1] = x[n];", + "line": 1038, + "description": "Return the tan of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Frequency" - }, - { - "name": "xi", - "description": "Initial value of x" - }, - { - "name": "yi", - "description": "Initial value of y" - } - ], "example": [ - "\nlet test f xi yi => gbmanL f xi yi >> out 0
    \nlet t = test 22050 1.2 2.1
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scTan >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "lowpass": { - "name": "lowpass", - "shortname": "lowpass", + "scASin": { + "name": "scASin", + "shortname": "scASin", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Filters", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 899, - "description": "A low pass filter.", + "line": 1053, + "description": "Return the arc sin of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Cutoff frequency for the filter" - }, - { - "name": "q", - "description": "Quality of the filter" - } - ], "example": [ - "\nlet test f q => white 1 >> lowpass f q >> out 0
    \nlet t = test 440 10
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scASin >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "highpass": { - "name": "highpass", - "shortname": "highpass", + "scACos": { + "name": "scACos", + "shortname": "scACos", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Filters", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 921, - "description": "A high pass filter.", + "line": 1068, + "description": "Return the arc cos of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Cutoff frequency for the filter" - }, - { - "name": "q", - "description": "Quality of the filter" - } - ], "example": [ - "\nlet test f q => white 1 >> highpass f q >> out 0
    \nlet t = test 440 10
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scACos >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "bandpass": { - "name": "bandpass", - "shortname": "bandpass", + "scATan": { + "name": "scATan", + "shortname": "scATan", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Filters", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 938, - "description": "A band pass filter.", + "line": 1083, + "description": "Return the arc tan of a signal.", "is_constructor": 1, - "params": [ - { - "name": "freq", - "description": "Cutoff frequency for the filter" - }, - { - "name": "q", - "description": "Quality of the filter" - } - ], "example": [ - "\nlet test f q => white 1 >> bandpass f q >> out 0
    \nlet t = test 440 10
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scATan >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "lag": { - "name": "lag", - "shortname": "lag", + "scSinh": { + "name": "scSinh", + "shortname": "scSinh", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Filters", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 955, - "description": "Ramp a signal between two values over time.", + "line": 1098, + "description": "Return the sinh of a signal.", "is_constructor": 1, - "params": [ - { - "name": "lagtime", - "description": "Ramp time in seconds" - } - ], "example": [ - "\nlet test lagtime => noiseN 100 >> lag lagtime >> out 0
    \nlet t = test 0.001
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scSinh >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "crush": { - "name": "crush", - "shortname": "crush", + "scCosh": { + "name": "scCosh", + "shortname": "scCosh", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Filters", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 971, - "description": "Bit crush a signal.", + "line": 1113, + "description": "Return the cosh of a signal.", "is_constructor": 1, - "params": [ - { - "name": "bits", - "description": "Bitdepth of resulting signal (1-64)" - } - ], "example": [ - "\nlet test b => sin 440 >> crush b >> out 0
    \nlet t = test 4
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scCosh >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "decimate": { - "name": "decimate", - "shortname": "decimate", + "scTanh": { + "name": "scTanh", + "shortname": "scTanh", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Filters", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 986, - "description": "Sample rate reduction on a signal.", + "line": 1128, + "description": "Return the tanh of a signal.", "is_constructor": 1, - "params": [ - { - "name": "rate", - "description": "Sample rate of resulting signel (1-44100)" - } - ], "example": [ - "\nlet test r => sin 440 >> decimate r >> out 0
    \nlet t = test 11000
    \nstop t" + "\nlet test amp => sin 440 >> gain amp >> scTanh >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "allpassN": { - "name": "allpassN", - "shortname": "allpassN", + "scMod": { + "name": "scMod", + "shortname": "scMod", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Delays", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1002, - "description": "An allpass delay line with no interpolation.", + "line": 1143, + "description": "Return the modulo of two signals. a % b", "is_constructor": 1, "params": [ { - "name": "maxDel", - "description": "Max delay time in seconds" - }, - { - "name": "del", - "description": "Delay time in seconds" + "name": "a", + "description": "Signal a" }, { - "name": "decay", - "description": "Time for the echoes to decay by 60 decibels." + "name": "b", + "description": "Signal b" } ], "example": [ - "\nlet test del => impulse 1 >> allpassN del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + "\nTODO" ] }, - "allpassL": { - "name": "allpassL", - "shortname": "allpassL", + "scRound": { + "name": "scRound", + "shortname": "scRound", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Delays", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1025, - "description": "An allpass delay line with linear interpolation.", + "line": 1158, + "description": "Return the signal rounded to the nearest value of b.", "is_constructor": 1, "params": [ { - "name": "maxDel", - "description": "Max delay time in seconds" - }, - { - "name": "del", - "description": "Delay time in seconds" + "name": "a", + "description": "Signal a" }, { - "name": "decay", - "description": "Time for the echoes to decay by 60 decibels." + "name": "b", + "description": "Value to round to" } ], "example": [ - "\nlet test del => impulse 1 >> allpassL del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + "\nTODO" ] }, - "allpassC": { - "name": "allpassC", - "shortname": "allpassC", + "scPow": { + "name": "scPow", + "shortname": "scPow", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Delays", + "submodule": "Signal Math", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1043, - "description": "An allpass delay line with cubic interpolation.", + "line": 1173, + "description": "Return the signal to the power of b.", "is_constructor": 1, "params": [ { - "name": "maxDel", - "description": "Max delay time in seconds" - }, - { - "name": "del", - "description": "Delay time in seconds" + "name": "a", + "description": "Signal a" }, { - "name": "decay", - "description": "Time for the echoes to decay by 60 decibels." + "name": "b", + "description": "Value to round to" } ], "example": [ - "\nlet test del => impulse 1 >> allpassC del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + "\nTODO" ] }, - "combN": { - "name": "combN", - "shortname": "combN", + "scBitAnd": { + "name": "scBitAnd", + "shortname": "scBitAnd", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Delays", + "submodule": "Bitwise Operators", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1061, - "description": "A comb delay line with no interpolation.", + "line": 1188, + "description": "Bitwise & a signal.", "is_constructor": 1, "params": [ { - "name": "maxDel", - "description": "Max delay time in seconds" - }, - { - "name": "del", - "description": "Delay time in seconds" + "name": "a", + "description": "Signal a" }, { - "name": "decay", - "description": "Time for the echoes to decay by 60 decibels." + "name": "b", + "description": "Signal b" } ], "example": [ - "\nlet test del => impulse 1 >> combN del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + "\nTODO" ] }, - "combL": { - "name": "combL", - "shortname": "combL", + "scBitOr": { + "name": "scBitOr", + "shortname": "scBitOr", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Delays", + "submodule": "Bitwise Operators", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1079, - "description": "A comb delay line with linear interpolation.", + "line": 1208, + "description": "Bitwise | a signal.", "is_constructor": 1, "params": [ { - "name": "maxDel", - "description": "Max delay time in seconds" - }, - { - "name": "del", - "description": "Delay time in seconds" + "name": "a", + "description": "Signal a" }, { - "name": "decay", - "description": "Time for the echoes to decay by 60 decibels." + "name": "b", + "description": "Signal b" } ], "example": [ - "\nlet test del => impulse 1 >> combL del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + "\nTODO" ] }, - "combC": { - "name": "combC", - "shortname": "combC", + "scBitXor": { + "name": "scBitXor", + "shortname": "scBitXor", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Delays", + "submodule": "Bitwise Operators", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1097, - "description": "A comb delay line with cubic interpolation.", + "line": 1223, + "description": "Bitwise xor a signal.", "is_constructor": 1, "params": [ { - "name": "maxDel", - "description": "Max delay time in seconds" - }, - { - "name": "del", - "description": "Delay time in seconds" + "name": "a", + "description": "Signal a" }, { - "name": "decay", - "description": "Time in seconds for the echoes to decay by 60 decibels." + "name": "b", + "description": "Signal b" } ], "example": [ - "\nlet test del => impulse 1 >> combC del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + "\nTODO" ] }, - "delayN": { - "name": "delayN", - "shortname": "delayN", + "scBitLeftShift": { + "name": "scBitLeftShift", + "shortname": "scBitLeftShift", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Delays", + "submodule": "Bitwise Operators", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1115, - "description": "A simple delay with no interpolation.", + "line": 1238, + "description": "Bitwise << a signal.", "is_constructor": 1, "params": [ { - "name": "maxDel", - "description": "Max delay time in seconds" + "name": "a", + "description": "Signal a" }, { - "name": "del", - "description": "Delay time in seconds" + "name": "b", + "description": "Signal b" } ], "example": [ - "\nlet test del => impulse 1 >> delayN del del >> out 0
    \nlet t = test 0.1
    \nstop t" + "\nTODO" ] }, - "delayL": { - "name": "delayL", - "shortname": "delayL", + "scBitRightShift": { + "name": "scBitRightShift", + "shortname": "scBitRightShift", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Delays", + "submodule": "Bitwise Operators", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1132, - "description": "A simple delay with linear interpolation.", + "line": 1253, + "description": "Bitwise >> a signal.", "is_constructor": 1, "params": [ { - "name": "maxDel", - "description": "Max delay time in seconds" + "name": "a", + "description": "Signal a" }, { - "name": "del", - "description": "Delay time in seconds" + "name": "b", + "description": "Signal b" } ], "example": [ - "\nlet test del => impulse 1 >> delayL del del >> out 0
    \nlet t = test 0.1
    \nstop t" + "\nTODO" ] }, - "delayC": { - "name": "delayC", - "shortname": "delayC", + "scRand": { + "name": "scRand", + "shortname": "scRand", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Delays", + "submodule": "Bitwise Operators", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1149, - "description": "A simple delay with cubic interpolation.", + "line": 1268, + "description": "Generate a random number with uniform distribution when synth starts playing.", "is_constructor": 1, "params": [ { - "name": "maxDel", - "description": "Max delay time in seconds" + "name": "lo", + "description": "Lowest possible value" }, { - "name": "del", - "description": "Delay time in seconds" + "name": "hi", + "description": "Highest possible value" } ], "example": [ - "\nlet test del => impulse 1 >> delayC del del >> out 0
    \nlet t = test 0.1
    \nstop t" + "\nlet test a => sin (scRand 220 440) >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "env": { - "name": "env", - "shortname": "env", + "scNRand": { + "name": "scNRand", + "shortname": "scNRand", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Envelopes", + "submodule": "Random", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1213, - "description": "Envelope generator. Used for amplitude envelopes, will automatically free the synth when finished.", + "line": 1285, + "description": "Generate a random number with distribution based on the sum of n random numbers when synth starts playing.", "is_constructor": 1, "params": [ { - "name": "levels", - "description": "The levels that the envelope will move through" + "name": "lo", + "description": "Lowest possible value" }, { - "name": "times", - "description": "The times it takes for the env to move between levels. Should be 1 item less than levels" + "name": "hi", + "description": "Highest possible value" }, { - "name": "shape", - "description": "Either a shape number or string. Some examples: -4, 0, 1, \"linear\", \"squared\"" + "name": "n", + "description": "Number of random numbers to sum. 1 = uniform distribution, 2 = triangular, etc. Higher numbers approach gaussian" + } + ], + "example": [ + "\nlet test a => sin (scNRand 220 440 4) >> out 0
    \nlet t = test 1
    \nstop t" + ] + }, + "scLinRand": { + "name": "scLinRand", + "shortname": "scLinRand", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Random", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1308, + "description": "Generate a random number with linear distribution when synth starts playing.", + "is_constructor": 1, + "params": [ + { + "name": "lo", + "description": "Lowest possible value" }, { - "name": "input", - "description": "Either a ugen or 1" + "name": "hi", + "description": "Highest possible value" } ], "example": [ - " \nlet test amp => white amp >> env [0,1,0] [1,1] \"linear\" >> out 0
    \ntest $ random 0.1 1.0" + "\nlet test a => sin (scLinRand 220 440) >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "env2": { - "name": "env2", - "shortname": "env2", + "scIRand": { + "name": "scIRand", + "shortname": "scIRand", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Envelopes", + "submodule": "Random", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1236, - "description": "Envelope generator. Used for amplitude envelopes, will NOT automatically free the synth when finished.", + "line": 1325, + "description": "Generate a random integer with uniform distribution when synth starts playing.", "is_constructor": 1, "params": [ { - "name": "levels", - "description": "The levels that the envelope will move through" + "name": "lo", + "description": "Lowest possible value" }, { - "name": "times", - "description": "The times it takes for the env to move between levels. Should be 1 item less than levels" + "name": "hi", + "description": "Highest possible value" + } + ], + "example": [ + "\nlet test a => sin (scIRand 220 440) >> out 0
    \nlet t = test 1
    \nstop t" + ] + }, + "scExpRand": { + "name": "scExpRand", + "shortname": "scExpRand", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Random", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1343, + "description": "Generate a random number with exponential distribution when synth starts playing.", + "is_constructor": 1, + "params": [ + { + "name": "lo", + "description": "Lowest possible value" }, { - "name": "shape", - "description": "Either a shape number or string. Some examples: -4, 0, 1, \"linear\", \"squared\"" + "name": "hi", + "description": "Highest possible value" + } + ], + "example": [ + "\nlet test a => sin (scExpRand 220 440) >> out 0
    \nlet t = test 1
    \nstop t" + ] + }, + "scTRand": { + "name": "scTRand", + "shortname": "scTRand", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Random", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1360, + "description": "Generate a random number with uniform distribution on each trigger.", + "is_constructor": 1, + "params": [ + { + "name": "lo", + "description": "Lowest possible value" }, { - "name": "input", - "description": "Either a ugen or 1" + "name": "hi", + "description": "Highest possible value" + }, + { + "name": "trigger", + "description": "A trigger happens when the signal changes from non-positive to positive" } ], "example": [ - "\nlet test f => sin (env2[f,f*2,f] [1,1] \"linear\" 1) >> env [0,0.3,0] [2,2] \"linear\" >> out 0
    \ntest $ random 440 880" + "\nlet test a => sin (scTRand 220 440 (impulse 1)) >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "perc": { - "name": "perc", - "shortname": "perc", + "scTIRand": { + "name": "scTIRand", + "shortname": "scTIRand", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Envelopes", + "submodule": "Random", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1254, - "description": "Envelope generator. Used for amplitude envelopes, will automatically free the synth when finished.", + "line": 1378, + "description": "Generate a random integer with uniform distribution on each trigger.", "is_constructor": 1, "params": [ { - "name": "attackTime", - "description": "Time for the envelope to go from 0 to the peak" + "name": "lo", + "description": "Lowest possible value" }, { - "name": "peak", - "description": "The highest level the envelope with reach" + "name": "hi", + "description": "Highest possible value" }, { - "name": "decayTime", - "description": "Time for the envelope to go from the peak to 0" + "name": "trigger", + "description": "A trigger happens when the signal changes from non-positive to positive" } ], "example": [ - "\nlet test amp => white amp >> perc 0 1 1 >> out 0
    \ntest $ random 0.1 1.0" + "\nlet test a => sin (scTIRand 220 440 (impulse 1)) >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "perc2": { - "name": "perc2", - "shortname": "perc2", + "scTExpRand": { + "name": "scTExpRand", + "shortname": "scTExpRand", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "Envelopes", + "submodule": "Random", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1270, - "description": "Envelope generator. Used for amplitude envelopes, will NOT automatically free the synth when finished.", + "line": 1396, + "description": "Generate a random number with exponential distribution on each trigger.", "is_constructor": 1, "params": [ { - "name": "attackTime", - "description": "Time for the envelope to go from 0 to the peak" + "name": "lo", + "description": "Lowest possible value" }, { - "name": "peak", - "description": "The highest level the envelope with reach" + "name": "hi", + "description": "Highest possible value" }, { - "name": "decayTime", - "description": "Time for the envelope to go from the peak to 0" + "name": "trigger", + "description": "A trigger happens when the signal changes from non-positive to positive" } + ], + "example": [ + "\nlet test a => sin (scTExpRand 220 440 (impulse 1)) >> out 0
    \nlet t = test 1
    \nstop t" ] }, - "out": { - "name": "out", - "shortname": "out", + "dc": { + "name": "dc", + "shortname": "dc", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "Lich.sc UGens", - "submodule": "InputOutput", + "submodule": "Oscillators", "namespace": "", "file": "Soliton.js/SuperCollider.js", - "line": 1283, - "description": "Send a signal to an output bus.", + "line": 1414, + "description": "Output a constant value", "is_constructor": 1, "params": [ { - "name": "busNum", - "description": "The bus index to send to" + "name": "value", + "description": "Value to be output" } ], "example": [ - "\nlet test bus => white 1 >> out bus
    \nlet t = test 0
    \nstop t" + "\nlet test value => dc value >> out 0
    \nlet t = test 1
    \nstop t" ] - } - }, - "classitems": [], - "warnings": [] + }, + "sin": { + "name": "sin", + "shortname": "sin", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Oscillators", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1435, + "description": "A sine wave oscillator.", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency" + } + ], + "example": [ + "\nlet test f => sin f >> out 0
    \nlet t = test 440
    \nstop t" + ] + }, + "saw": { + "name": "saw", + "shortname": "saw", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Oscillators", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1451, + "description": "A saw wave oscillator.", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency" + } + ], + "example": [ + "\nlet test f => saw f >> out 0
    \nlet t = test 440
    \nstop t" + ] + }, + "tri": { + "name": "tri", + "shortname": "tri", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Oscillators", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1467, + "description": "A triangle wave oscillator.", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency" + } + ], + "example": [ + "\nlet test f => tri f >> out 0
    \nlet t = test 440
    \nstop t" + ] + }, + "square": { + "name": "square", + "shortname": "square", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Oscillators", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1483, + "description": "A square wave oscillator.", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency" + } + ], + "example": [ + "\nlet test f => square f >> out 0
    \nlet t = test 440
    \nstop t" + ] + }, + "pulse": { + "name": "pulse", + "shortname": "pulse", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Oscillators", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1499, + "description": "A pulse wave oscillator with variable duty cycle.", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency" + }, + { + "name": "width", + "description": "Pulse width from 0.0 to 1.0" + } + ], + "example": [ + "\nlet test f w => pulse f w >> out 0
    \nlet t = test 440 0.2
    \nstop t" + ] + }, + "blip": { + "name": "blip", + "shortname": "blip", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Oscillators", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1516, + "description": "An oscillator with a variable number of harmonics of equal amplitude.", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency" + }, + { + "name": "nharm", + "description": "Number of harmonics" + } + ], + "example": [ + "\nlet test f n => blip f n >> out 0
    \nlet t = test 440 5
    \nstop t" + ] + }, + "formant": { + "name": "formant", + "shortname": "formant", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Oscillators", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1533, + "description": "Generates a set of harmonics around a formant frequency at a given fundamental frequency.", + "is_constructor": 1, + "params": [ + { + "name": "fundf", + "description": "Fundamental frequency" + }, + { + "name": "formf", + "description": "Formant frequency" + }, + { + "name": "bwf", + "description": "Pulse width frequency. Must be >= fundf." + } + ], + "example": [ + "\nlet test fund form bwf => blip fund form bwf >> out 0
    \nlet t = test 440 1760 880
    \nstop t" + ] + }, + "impulse": { + "name": "impulse", + "shortname": "impulse", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Oscillators", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1551, + "description": "Generates single sample impulses at a frequency.", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency" + } + ], + "example": [ + "\nlet test f => impulse f >> out 0
    \nlet t = test 5
    \nstop t" + ] + }, + "white": { + "name": "white", + "shortname": "white", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Noise", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1567, + "description": "White noise generator.", + "is_constructor": 1, + "params": [ + { + "name": "amp", + "description": "Amplitude of the noise" + } + ], + "example": [ + "\nlet test a => white a >> out 0
    \nlet t = test 1
    \nstop t" + ] + }, + "pink": { + "name": "pink", + "shortname": "pink", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Noise", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1588, + "description": "Pink noise generator.", + "is_constructor": 1, + "params": [ + { + "name": "amp", + "description": "Amplitude of the noise" + } + ], + "example": [ + "\nlet test a => pink a >> out 0
    \nlet t = test 1
    \nstop t" + ] + }, + "brown": { + "name": "brown", + "shortname": "brown", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Noise", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1604, + "description": "Brownian noise generator.", + "is_constructor": 1, + "params": [ + { + "name": "amp", + "description": "Amplitude of the noise" + } + ], + "example": [ + "\nlet test a => brown a >> out 0
    \nlet t = test 1
    \nstop t" + ] + }, + "gray": { + "name": "gray", + "shortname": "gray", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Noise", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1620, + "description": "Gray noise generator.", + "is_constructor": 1, + "params": [ + { + "name": "amp", + "description": "Amplitude of the noise" + } + ], + "example": [ + "\nlet test a => gray a >> out 0
    \nlet t = test 1
    \nstop t" + ] + }, + "clipNoise": { + "name": "clipNoise", + "shortname": "clipNoise", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Noise", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1636, + "description": "Generates noise whose values are either -1 or 1.", + "is_constructor": 1, + "params": [ + { + "name": "amp", + "description": "Amplitude of the noise" + } + ], + "example": [ + "\nlet test a => clipNoise a >> out 0
    \nlet t = test 1
    \nstop t" + ] + }, + "crackle": { + "name": "crackle", + "shortname": "crackle", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Noise", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1652, + "description": "A noise generator based on a chaotic function.", + "is_constructor": 1, + "params": [ + { + "name": "chaos", + "description": "A parameter of the chaotic function with useful values from just below 1.0 to just above 2.0. Towards 2.0 the sound crackles." + } + ], + "example": [ + "\nlet test c => crackle c >> out 0
    \nlet t = test 1.5
    \nstop t" + ] + }, + "dust": { + "name": "dust", + "shortname": "dust", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Noise", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1669, + "description": "Generates random impulses from 0 to +1.", + "is_constructor": 1, + "params": [ + { + "name": "density", + "description": "Average number of impulses per second." + } + ], + "example": [ + "\nlet test d => dust d >> out 0
    \nlet t = test 1.5
    \nstop t" + ] + }, + "noiseN": { + "name": "noiseN", + "shortname": "noiseN", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Noise", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1685, + "description": "A stepped random number generator", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency of random number generation" + } + ], + "example": [ + "\nlet test f => noiseN f >> out 0
    \nlet t = test 440
    \nstop t" + ] + }, + "noiseL": { + "name": "noiseL", + "shortname": "noiseL", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Noise", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1701, + "description": "A linearly interpolated random number generator", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency of random number generation" + } + ], + "example": [ + "\nlet test f => noiseL f >> out 0
    \nlet t = test 440
    \nstop t" + ] + }, + "noiseX": { + "name": "noiseX", + "shortname": "noiseX", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Noise", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1717, + "description": "A cubic interpolated random number generator", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency of random number generation" + } + ], + "example": [ + "\nlet test f => noiseX f >> out 0
    \nlet t = test 440
    \nstop t" + ] + }, + "cuspN": { + "name": "cuspN", + "shortname": "cuspN", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Chaos", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1733, + "description": "A non-interpolating sound generator based on the difference equation: x[n+1] = a - b * sqrt(abs(x[n]))", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency" + }, + { + "name": "a", + "description": "Equation variable" + }, + { + "name": "b", + "description": "Equation variable" + }, + { + "name": "xi", + "description": "Initial value of x" + } + ], + "example": [ + "\nlet test f a b xi => cuspN f a b xi >> out 0
    \nlet t = test 22050 1 1.9 0
    \nstop t" + ] + }, + "cuspL": { + "name": "cuspL", + "shortname": "cuspL", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Chaos", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1757, + "description": "A linearly interpolating sound generator based on the difference equation: x[n+1] = a - b * sqrt(abs(x[n]))", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency" + }, + { + "name": "a", + "description": "Equation variable" + }, + { + "name": "b", + "description": "Equation variable" + }, + { + "name": "xi", + "description": "Initial value of x" + } + ], + "example": [ + "\nlet test f a b xi => cuspL f a b xi >> out 0
    \nlet t = test 22050 1 1.9 0
    \nstop t" + ] + }, + "gbmanN": { + "name": "gbmanN", + "shortname": "gbmanN", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Chaos", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1776, + "description": "A non-interpolating sound generator based on the difference equation: x[n+1] = 1 - y[n] + abs(x[n]); y[n+1] = x[n];", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency" + }, + { + "name": "xi", + "description": "Initial value of x" + }, + { + "name": "yi", + "description": "Initial value of y" + } + ], + "example": [ + "\nlet test f xi yi => gbmanN f xi yi >> out 0
    \nlet t = test 22050 1.2 2.1
    \nstop t" + ] + }, + "gbmanL": { + "name": "gbmanL", + "shortname": "gbmanL", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Chaos", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1794, + "description": "A linearly interpolating sound generator based on the difference equation: x[n+1] = 1 - y[n] + abs(x[n]); y[n+1] = x[n];", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Frequency" + }, + { + "name": "xi", + "description": "Initial value of x" + }, + { + "name": "yi", + "description": "Initial value of y" + } + ], + "example": [ + "\nlet test f xi yi => gbmanL f xi yi >> out 0
    \nlet t = test 22050 1.2 2.1
    \nstop t" + ] + }, + "lowpass": { + "name": "lowpass", + "shortname": "lowpass", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Filters", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1812, + "description": "A low pass filter.", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Cutoff frequency for the filter" + }, + { + "name": "q", + "description": "Quality of the filter" + } + ], + "example": [ + "\nlet test f q => white 1 >> lowpass f q >> out 0
    \nlet t = test 440 10
    \nstop t" + ] + }, + "highpass": { + "name": "highpass", + "shortname": "highpass", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Filters", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1834, + "description": "A high pass filter.", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Cutoff frequency for the filter" + }, + { + "name": "q", + "description": "Quality of the filter" + } + ], + "example": [ + "\nlet test f q => white 1 >> highpass f q >> out 0
    \nlet t = test 440 10
    \nstop t" + ] + }, + "bandpass": { + "name": "bandpass", + "shortname": "bandpass", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Filters", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1851, + "description": "A band pass filter.", + "is_constructor": 1, + "params": [ + { + "name": "freq", + "description": "Cutoff frequency for the filter" + }, + { + "name": "q", + "description": "Quality of the filter" + } + ], + "example": [ + "\nlet test f q => white 1 >> bandpass f q >> out 0
    \nlet t = test 440 10
    \nstop t" + ] + }, + "lag": { + "name": "lag", + "shortname": "lag", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Filters", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1868, + "description": "Ramp a signal between two values over time.", + "is_constructor": 1, + "params": [ + { + "name": "lagtime", + "description": "Ramp time in seconds" + } + ], + "example": [ + "\nlet test lagtime => noiseN 100 >> lag lagtime >> out 0
    \nlet t = test 0.001
    \nstop t" + ] + }, + "crush": { + "name": "crush", + "shortname": "crush", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Filters", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1884, + "description": "Bit crush a signal.", + "is_constructor": 1, + "params": [ + { + "name": "bits", + "description": "Bitdepth of resulting signal (1-64)" + } + ], + "example": [ + "\nlet test b => sin 440 >> crush b >> out 0
    \nlet t = test 4
    \nstop t" + ] + }, + "decimate": { + "name": "decimate", + "shortname": "decimate", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Filters", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1899, + "description": "Sample rate reduction on a signal.", + "is_constructor": 1, + "params": [ + { + "name": "rate", + "description": "Sample rate of resulting signel (1-44100)" + } + ], + "example": [ + "\nlet test r => sin 440 >> decimate r >> out 0
    \nlet t = test 11000
    \nstop t" + ] + }, + "allpassN": { + "name": "allpassN", + "shortname": "allpassN", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Filters", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1915, + "description": "An allpass delay line with no interpolation.", + "is_constructor": 1, + "params": [ + { + "name": "maxDel", + "description": "Max delay time in seconds" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> allpassN del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "bufAllpassN": { + "name": "bufAllpassN", + "shortname": "bufAllpassN", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1933, + "description": "An allpass delay line with no interpolation. This version uses a localBuf.", + "is_constructor": 1, + "params": [ + { + "name": "buf", + "description": "LocalBuf to use for the delay" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> bufAllpassN (localBuf 44100 1) del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "allpassL": { + "name": "allpassL", + "shortname": "allpassL", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1956, + "description": "An allpass delay line with linear interpolation.", + "is_constructor": 1, + "params": [ + { + "name": "maxDel", + "description": "Max delay time in seconds" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> allpassL del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "bufAllpassL": { + "name": "bufAllpassL", + "shortname": "bufAllpassL", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1974, + "description": "An allpass delay line with linear interpolation. This version uses a localBuf.", + "is_constructor": 1, + "params": [ + { + "name": "buf", + "description": "LocalBuf to use for the delay" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> bufAllpassL (localBuf 44100 1) del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "allpassC": { + "name": "allpassC", + "shortname": "allpassC", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 1992, + "description": "An allpass delay line with cubic interpolation.", + "is_constructor": 1, + "params": [ + { + "name": "maxDel", + "description": "Max delay time in seconds" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> allpassC del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "bufAllpassC": { + "name": "bufAllpassC", + "shortname": "bufAllpassC", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2010, + "description": "An allpass delay line with cubic interpolation. This version uses a localBuf.", + "is_constructor": 1, + "params": [ + { + "name": "buf", + "description": "LocalBuf to use for the delay" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> bufAllpassC (localBuf 44100 1) del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "combN": { + "name": "combN", + "shortname": "combN", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2028, + "description": "A comb delay line with no interpolation.", + "is_constructor": 1, + "params": [ + { + "name": "maxDel", + "description": "Max delay time in seconds" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> combN del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "bufCombN": { + "name": "bufCombN", + "shortname": "bufCombN", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2046, + "description": "A comb delay line with no interpolation. This version uses a localBuf.", + "is_constructor": 1, + "params": [ + { + "name": "buf", + "description": "LocalBuf to use for the delay" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time in seconds for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> bufCombN (localBuf 44100 1) del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "combL": { + "name": "combL", + "shortname": "combL", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2064, + "description": "A comb delay line with linear interpolation.", + "is_constructor": 1, + "params": [ + { + "name": "maxDel", + "description": "Max delay time in seconds" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> combL del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "bufCombL": { + "name": "bufCombL", + "shortname": "bufCombL", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2082, + "description": "A comb delay line with cubic linear interpolation. This version uses a localBuf.", + "is_constructor": 1, + "params": [ + { + "name": "buf", + "description": "LocalBuf to use for the delay" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time in seconds for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> bufCombL (localBuf 44100 1) del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "combC": { + "name": "combC", + "shortname": "combC", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2100, + "description": "A comb delay line with cubic interpolation.", + "is_constructor": 1, + "params": [ + { + "name": "maxDel", + "description": "Max delay time in seconds" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time in seconds for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> combC del del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "bufCombC": { + "name": "bufCombC", + "shortname": "bufCombC", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2118, + "description": "A comb delay line with cubic interpolation. This version uses a localBuf.", + "is_constructor": 1, + "params": [ + { + "name": "buf", + "description": "LocalBuf to use for the delay" + }, + { + "name": "del", + "description": "Delay time in seconds" + }, + { + "name": "decay", + "description": "Time in seconds for the echoes to decay by 60 decibels." + } + ], + "example": [ + "\nlet test del => impulse 1 >> bufCombC (localBuf 44100 1) del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "delayN": { + "name": "delayN", + "shortname": "delayN", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2136, + "description": "A simple delay with no interpolation.", + "is_constructor": 1, + "params": [ + { + "name": "maxDel", + "description": "Max delay time in seconds" + }, + { + "name": "del", + "description": "Delay time in seconds" + } + ], + "example": [ + "\nlet test del => impulse 1 >> delayN del del >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "bufDelayN": { + "name": "bufDelayN", + "shortname": "bufDelayN", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2153, + "description": "A simple delay with no interpolation. This version uses a localBuf.", + "is_constructor": 1, + "params": [ + { + "name": "buf", + "description": "LocalBuf to use for the delay" + }, + { + "name": "del", + "description": "Delay time in seconds" + } + ], + "example": [ + "\nlet test del => impulse 1 >> bufDelayN (localBuf 44100 1) del >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "delayL": { + "name": "delayL", + "shortname": "delayL", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2170, + "description": "A simple delay with linear interpolation.", + "is_constructor": 1, + "params": [ + { + "name": "maxDel", + "description": "Max delay time in seconds" + }, + { + "name": "del", + "description": "Delay time in seconds" + } + ], + "example": [ + "\nlet test del => impulse 1 >> delayL del del >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "bufDelayL": { + "name": "bufDelayL", + "shortname": "bufDelayL", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2187, + "description": "A simple delay with linear interpolation. This version uses a localBuf.", + "is_constructor": 1, + "params": [ + { + "name": "buf", + "description": "LocalBuf to use for the delay" + }, + { + "name": "del", + "description": "Delay time in seconds" + } + ], + "example": [ + "\nlet test del => impulse 1 >> bufDelayL (localBuf 44100 1) del >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "delayC": { + "name": "delayC", + "shortname": "delayC", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2204, + "description": "A simple delay with cubic interpolation.", + "is_constructor": 1, + "params": [ + { + "name": "maxDel", + "description": "Max delay time in seconds" + }, + { + "name": "del", + "description": "Delay time in seconds" + } + ], + "example": [ + "\nlet test del => impulse 1 >> delayC del del >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "bufDelayC": { + "name": "bufDelayC", + "shortname": "bufDelayC", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Delays", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2221, + "description": "A simple delay with cubic interpolation. This version uses a localBuf.", + "is_constructor": 1, + "params": [ + { + "name": "buf", + "description": "LocalBuf to use for the delay" + }, + { + "name": "del", + "description": "Delay time in seconds" + } + ], + "example": [ + "\nlet test del => impulse 1 >> bufDelayC (localBuf 44100 1) del >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + }, + "env": { + "name": "env", + "shortname": "env", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Envelopes", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2285, + "description": "Envelope generator. Used for amplitude envelopes, will automatically free the synth when finished.", + "is_constructor": 1, + "params": [ + { + "name": "levels", + "description": "The levels that the envelope will move through" + }, + { + "name": "times", + "description": "The times it takes for the env to move between levels. Should be 1 item less than levels" + }, + { + "name": "shape", + "description": "Either a shape number or string. Some examples: -4, 0, 1, \"linear\", \"squared\"" + }, + { + "name": "input", + "description": "Either a ugen or 1" + } + ], + "example": [ + " \nlet test amp => white amp >> env [0,1,0] [1,1] \"linear\" >> out 0
    \ntest $ random 0.1 1.0" + ] + }, + "env2": { + "name": "env2", + "shortname": "env2", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Envelopes", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2308, + "description": "Envelope generator. Used for amplitude envelopes, will NOT automatically free the synth when finished.", + "is_constructor": 1, + "params": [ + { + "name": "levels", + "description": "The levels that the envelope will move through" + }, + { + "name": "times", + "description": "The times it takes for the env to move between levels. Should be 1 item less than levels" + }, + { + "name": "shape", + "description": "Either a shape number or string. Some examples: -4, 0, 1, \"linear\", \"squared\"" + }, + { + "name": "input", + "description": "Either a ugen or 1" + } + ], + "example": [ + "\nlet test f => sin (env2[f,f*2,f] [1,1] \"linear\" 1) >> env [0,0.3,0] [2,2] \"linear\" >> out 0
    \ntest $ random 440 880" + ] + }, + "perc": { + "name": "perc", + "shortname": "perc", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Envelopes", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2326, + "description": "Envelope generator. Used for amplitude envelopes, will automatically free the synth when finished.", + "is_constructor": 1, + "params": [ + { + "name": "attackTime", + "description": "Time for the envelope to go from 0 to the peak" + }, + { + "name": "peak", + "description": "The highest level the envelope with reach" + }, + { + "name": "decayTime", + "description": "Time for the envelope to go from the peak to 0" + } + ], + "example": [ + "\nlet test amp => white amp >> perc 0 1 1 >> out 0
    \ntest $ random 0.1 1.0" + ] + }, + "perc2": { + "name": "perc2", + "shortname": "perc2", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Envelopes", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2342, + "description": "Envelope generator. Used for amplitude envelopes, will NOT automatically free the synth when finished.", + "is_constructor": 1, + "params": [ + { + "name": "attackTime", + "description": "Time for the envelope to go from 0 to the peak" + }, + { + "name": "peak", + "description": "The highest level the envelope with reach" + }, + { + "name": "decayTime", + "description": "Time for the envelope to go from the peak to 0" + } + ] + }, + "out": { + "name": "out", + "shortname": "out", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "InputOutput", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2355, + "description": "Send a signal to an output bus.", + "is_constructor": 1, + "params": [ + { + "name": "busNum", + "description": "The bus index to send to" + } + ], + "example": [ + "\nlet test bus => white 1 >> out bus
    \nlet t = test 0
    \nstop t" + ] + }, + "auxIn": { + "name": "auxIn", + "shortname": "auxIn", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "InputOutput", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2386, + "description": "Reads audio from a range of audio buses.", + "is_constructor": 1, + "params": [ + { + "name": "busNum", + "description": "The bus index to start reading from." + }, + { + "name": "numChannels", + "description": "The number of channels to read from." + } + ], + "example": [ + "\nlet simpleSynth freq => sin freq \\* square (2\\*tempoSeconds) * 0.25 >> out 20
    \nlet sSynth = simpleSynth 440
    \nlet fxSynth => auxIn 20 1 >> combC tempoSeconds [tempoSeconds/1, tempoSeconds/2] 10 >> out 0
    \nlet fx = Synth::after \"fxSynth\" [] server
    \nstop sSynth
    \nstop fx" + ] + }, + "pan": { + "name": "pan", + "shortname": "pan", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Panning", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2414, + "description": "Pans a single channel input across a stereo field using equal power panning.", + "is_constructor": 1, + "params": [ + { + "name": "position", + "description": "The position in the stereo field where the input will be panned. Range of -1 (left) to 1 (right)." + }, + { + "name": "input", + "description": "The audio input to be panned." + } + ], + "example": [ + "\nlet test pos => white 1 >> pan pos >> out 0
    \nlet t = test-0.3
    \nstop t" + ] + }, + "dup": { + "name": "dup", + "shortname": "dup", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Panning", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2438, + "description": "Duplicates an input across a 2 index array.", + "is_constructor": 1, + "params": [ + { + "name": "input", + "description": "The audio input to be expanded." + } + ], + "example": [ + "\nlet test freq => sin freq >> dup >> out 0
    \nlet t = test 440
    \nstop t" + ] + }, + "localBuf": { + "name": "localBuf", + "shortname": "localBuf", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "Lich.sc UGens", + "submodule": "Buffers", + "namespace": "", + "file": "Soliton.js/SuperCollider.js", + "line": 2481, + "description": "A buffer local to a synth.", + "is_constructor": 1, + "params": [ + { + "name": "frames", + "description": "Size of the buffer in samples" + }, + { + "name": "channels", + "description": "Number of channels for the buffer" + } + ], + "example": [ + "\nlet test del => impulse 1 >> bufCombC (localBuf 44100 1) del 1 >> out 0
    \nlet t = test 0.1
    \nstop t" + ] + } + }, + "classitems": [ + { + "file": "CloudChamber.js/CloudChamber.js", + "line": 212, + "description": "CloudChamber - Basic graphics app class.\ncanvasElementName\nframerate - Frames per second. ie. 30 will be 1000 / 30 = 33.333 ms between frames\ndrawCallback\nprintCallback", + "class": "scDistort" + }, + { + "file": "Compiler/Compiler.js", + "line": 86, + "description": "Takes `f` function and returns wrapper in return, that may be\nused for tail recursive algorithms. Note that returned funciton\nis not side effect free and should not be called from anywhere\nelse during tail recursion. In other words if\n`var f = tco(function foo() { ... bar() ... })`, then `bar`\nshould never call `f`. It is ok though for `bar` to call `tco(foo)`\ninstead.\n\n## Examples\nvar sum = tco(function(x, y) {\n return y > 0 ? sum(x + 1, y - 1) :\n y < 0 ? sum(x - 1, y + 1) :\n x\n})\nsum(20, 100000) // => 100020", + "class": "scDistort" + }, + { + "file": "third-party/codemirror-3.20/addon/edit/closetag.js", + "line": 1, + "description": "Tag-closer extension for CodeMirror.\n\nThis extension adds an \"autoCloseTags\" option that can be set to\neither true to get the default behavior, or an object to further\nconfigure its behavior.\n\nThese are supported options:\n\n`whenClosing` (default true)\n Whether to autoclose when the '/' of a closing tag is typed.\n`whenOpening` (default true)\n Whether to autoclose the tag when the final '>' of an opening\n tag is typed.\n`dontCloseTags` (default is empty tags for HTML, none for XML)\n An array of tag names that should not be autoclosed.\n`indentTags` (default is block tags for HTML, none for XML)\n An array of tag names that should, when opened, cause a\n blank line to be added inside the tag, and the blank line and\n closing line to be indented.\n\nSee demos/closetag.html for a usage example.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 1, + "description": "Supported keybindings:\n\n Motion:\n h, j, k, l\n gj, gk\n e, E, w, W, b, B, ge, gE\n f, F, t, T\n $, ^, 0, -, +, _\n gg, G\n %\n ', `\n\n Operator:\n d, y, c\n dd, yy, cc\n g~, g~g~\n >, <, >>, <<\n\n Operator-Motion:\n x, X, D, Y, C, ~\n\n Action:\n a, i, s, A, I, S, o, O\n zz, z., z, zt, zb, z-\n J\n u, Ctrl-r\n m\n r\n\n Modes:\n ESC - leave insert mode, visual mode, and clear input state.\n Ctrl-[, Ctrl-c - same as ESC.\n\nRegisters: unamed, -, a-z, A-Z, 0-9\n (Does not respect the special case for number registers when delete\n operator is made with these commands: %, (, ), , /, ?, n, N, {, } )\n TODO: Implement the remaining registers.\nMarks: a-z, A-Z, and 0-9\n TODO: Implement the remaining special marks. They have more complex\n behavior.\n\nEvents:\n 'vim-mode-change' - raised on the editor anytime the current mode changes,\n Event object: {mode: \"visual\", subMode: \"linewise\"}\n\nCode structure:\n 1. Default keymap\n 2. Variable declarations and short basic helpers\n 3. Instance (External API) implementation\n 4. Internal state tracking objects (input state, counter) implementation\n and instanstiation\n 5. Key handler (the main command dispatcher) implementation\n 6. Motion, operator, and action implementations\n 7. Helper functions for the key handler, motions, operators, and actions\n 8. Set up Vim to work as a keymap for CodeMirror.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 1225, + "description": "typedef {Object{line:number,ch:number}} Cursor An object containing the\n position of the cursor.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 1985, + "description": "Clips cursor to ensure that line is within the buffer's range\nIf includeLineBreak is true, then allow cur.ch == lineLength.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 2398, + "params": [ + { + "name": "cm", + "description": "CodeMirror object.", + "type": "CodeMirror" + }, + { + "name": "repeat", + "description": "Number of words to move past.", + "type": "Int" + }, + { + "name": "forward", + "description": "True to search forward. False to search\n backward.", + "type": "Boolean" + }, + { + "name": "wordEnd", + "description": "True to move to end of word. False to move to\n beginning of word.", + "type": "Boolean" + }, + { + "name": "bigWord", + "description": "True if punctuation count as part of the word.\n False if only alphabet characters count as part of the word.", + "type": "Boolean" + } + ], + "return": { + "description": "The position the cursor should move to.", + "type": "Cursor" + }, + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 2690, + "description": "Extract the regular expression from the query and return a Regexp object.\nReturns null if the query is blank.\nIf ignoreCase is passed in, the Regexp object will have the 'i' flag set.\nIf smartCase is passed in, and the query contains upper case letters,\n then ignoreCase is overridden, and the 'i' flag will not be set.\nIf the query contains the /i in the flag part of the regular expression,\n then both ignoreCase and smartCase are ignored, and 'i' will be passed\n through to the Regex object.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 2858, + "description": "Check if pos is in the specified range, INCLUSIVE.\nRange can be specified with 1 or 2 arguments.\nIf the first range argument is an array, treat it as an array of line\nnumbers. Match pos against any of the lines.\nIf the first range argument is a number,\n if there is only 1 range argument, check if pos has the same line\n number\n if there are 2 range arguments, then check if pos is in between the two\n range arguments.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 3318, + "params": [ + { + "name": "cm", + "description": "CodeMirror instance we are in.", + "type": "CodeMirror" + }, + { + "name": "confirm", + "description": "Whether to confirm each replace.", + "type": "Boolean" + }, + { + "name": "lineStart", + "description": "Line to start replacing from.", + "type": "Cursor" + }, + { + "name": "lineEnd", + "description": "Line to stop replacing at.", + "type": "Cursor" + }, + { + "name": "query", + "description": "Query for performing matches with.", + "type": "RegExp" + }, + { + "name": "replaceWith", + "description": "Text to replace matches with. May contain $1,\n $2, etc for replacing captured groups using Javascript replace.", + "type": "String" + } + ], + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 3411, + "description": "Handle the raw key event from CodeMirror. Translate the\nShift + key modifier to the resulting letter, while preserving other\nmodifers.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 3561, + "description": "Listens for changes made in insert mode.\nShould only be active in insert mode.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 3580, + "description": "Listens for any kind of cursor activity on CodeMirror.\n- For tracking cursor activity in insert mode.\n- Should only be active in insert mode.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 3596, + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 3601, + "description": "Handles raw key down events from the text area.\n- Should only be active in insert mode.\n- For recording deletes in insert mode.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/keymap/vim.js", + "line": 3619, + "description": "Repeats the last edit, which includes exactly 1 command and at most 1\ninsert. Operator and motion commands are read from lastEditInputState,\nwhile action commands are read from lastEditActionCommand.\n\nIf repeatForInsert is true, then the function was called by\nexitInsertMode to repeat the insert mode changes the user just made. The\ncorresponding enterInsertMode call was made with a count.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/mode/clojure/clojure.js", + "line": 1, + "description": "Author: Hans Engel\nBranched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun)", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/mode/clojure/clojure.js", + "line": 163, + "description": "Either\n(indent-word ..\n(non-indent-word ..\n(;something else, bracket, etc.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/mode/cobol/cobol.js", + "line": 1, + "description": "Author: Gautam Mehta\nBranched from CodeMirror's Scheme mode", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/mode/coffeescript/coffeescript.js", + "line": 1, + "description": "Link to the project's GitHub page:\nhttps://github.com/pickhardt/coffeescript-codemirror-mode", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/mode/livescript/livescript.js", + "line": 1, + "description": "Link to the project's GitHub page:\nhttps://github.com/duralog/CodeMirror", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/mode/nginx/nginx.js", + "line": 42, + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/mode/ntriples/ntriples.js", + "line": 1, + "description": "This script provides syntax highlighting support for\nthe Ntriples format.\nNtriples format specification:\n http://www.w3.org/TR/rdf-testcases/#ntriples", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/mode/scheme/scheme.js", + "line": 1, + "description": "Author: Koh Zi Han, based on implementation by Koh Zi Chun", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/mode/scheme/scheme.js", + "line": 170, + "description": "Either\n(indent-word ..\n(non-indent-word ..\n(;something else, bracket, etc.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/mode/smarty/smarty.js", + "line": 1, + "description": "Smarty 2 and 3 mode.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "smartymixed.js", + "line": 1, + "brief": "Smarty Mixed Codemirror mode (Smarty + Mixed HTML)", + "author": "Ruslan Osmanov ", + "version": "3.0", + "date": "05.07.2013", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/mode/tiddlywiki/tiddlywiki.js", + "line": 1, + "description": "|''Name''|tiddlywiki.js|\n|''Description''|Enables TiddlyWikiy syntax highlighting using CodeMirror|\n|''Author''|PMario|\n|''Version''|0.1.7|\n|''Status''|''stable''|\n|''Source''|[[GitHub|https://github.com/pmario/CodeMirror2/blob/tw-syntax/mode/tiddlywiki]]|\n|''Documentation''|http://codemirror.tiddlyspace.com/|\n|''License''|[[MIT License|http://www.opensource.org/licenses/mit-license.php]]|\n|''CoreVersion''|2.5.0|\n|''Requires''|codemirror.js|\n|''Keywords''|syntax highlighting color code mirror codemirror|\n! Info\nCoreVersion parameter is needed for TiddlyWiki only!", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/test/mode_test.js", + "line": 1, + "description": "Helper to test CodeMirror highlighting modes. It pretty prints output of the\nhighlighter and can check against expected styles.\n\nMode tests are registered by calling test.mode(testName, mode,\ntokens), where mode is a mode object as returned by\nCodeMirror.getMode, and tokens is an array of lines that make up\nthe test.\n\nThese lines are strings, in which styled stretches of code are\nenclosed in brackets `[]`, and prefixed by their style. For\nexample, `[keyword if]`. Brackets in the code itself must be\nduplicated to prevent them from being interpreted as token\nboundaries. For example `a[[i]]` for `a[i]`. If a token has\nmultiple styles, the styles must be separated by ampersands, for\nexample `[tag&error ]`.\n\nSee the test.js files in the css, markdown, gfm, and stex mode\ndirectories for examples.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/test/mode_test.js", + "line": 114, + "description": "Emulation of CodeMirror's internal highlight routine for testing. Multi-line\ninput is supported.", + "params": [ + { + "name": "string", + "description": "to highlight" + }, + { + "name": "mode", + "description": "the mode that will do the actual highlighting" + } + ], + "return": { + "description": "array of [style, token] pairs" + }, + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/test/mode_test.js", + "line": 157, + "description": "Compare two arrays of output from highlight.", + "params": [ + { + "name": "o1", + "description": "array of [style, token] pairs" + }, + { + "name": "o2", + "description": "array of [style, token] pairs" + } + ], + "return": { + "description": "boolean; true iff outputs equal" + }, + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/test/mode_test.js", + "line": 173, + "description": "Print tokens and corresponding styles in a table. Spaces in the token are\nreplaced with 'interpunct' dots (·).", + "params": [ + { + "name": "output", + "description": "array of [style, token] pairs" + } + ], + "return": { + "description": "html string" + }, + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/codemirror-3.20/test/vim_test.js", + "line": 264, + "params": [ + { + "name": "name", + "description": "Name of the test" + }, + { + "name": "keys", + "description": "An array of keys or a string with a single key to simulate." + }, + { + "name": "endPos", + "description": "The expected end position of the cursor." + }, + { + "name": "startPos", + "description": "The position the cursor should start at, defaults to 0, 0." + } + ], + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/postprocessing/BloomPass.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/postprocessing/DotScreenPass.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/postprocessing/EffectComposer.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/postprocessing/FilmPass.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/postprocessing/MaskPass.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/postprocessing/RenderPass.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/postprocessing/SavePass.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/postprocessing/ShaderPass.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/postprocessing/TexturePass.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/BasicShader.js", + "line": 1, + "author": "mrdoob / http://www.mrdoob.com\n\nSimple test shader", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/BleachBypassShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nBleach bypass shader [http://en.wikipedia.org/wiki/Bleach_bypass]\n- based on Nvidia example\nhttp://developer.download.nvidia.com/shaderlibrary/webpages/shader_library.html#post_bleach_bypass", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/BlendShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nBlend two textures", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/BokehShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nDepth-of-field shader with bokeh\nported from GLSL shader by Martins Upitis\nhttp://artmartinsh.blogspot.com/2010/02/glsl-lens-blur-filter-with-bokeh.html", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/BrightnessContrastShader.js", + "line": 1, + "author": "tapio / http://tapio.github.com/\n\nBrightness and contrast adjustment\nhttps://github.com/evanw/glfx.js\nbrightness: -1 to 1 (-1 is solid black, 0 is no change, and 1 is solid white)\ncontrast: -1 to 1 (-1 is solid gray, 0 is no change, and 1 is maximum contrast)", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/ColorCorrectionShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nColor correction", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/ColorifyShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nColorify shader", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/ConvolutionShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nConvolution shader\nported from o3d sample to WebGL / GLSL\nhttp://o3d.googlecode.com/svn/trunk/samples/convolution.html", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/CopyShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nFull-screen textured quad shader", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/DOFMipMapShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nDepth-of-field shader using mipmaps\n- from Matt Handley @applmak\n- requires power-of-2 sized render target with enabled mipmaps", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/DotScreenShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nDot screen shader\nbased on glfx.js sepia shader\nhttps://github.com/evanw/glfx.js", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/EdgeShader.js", + "line": 1, + "author": "zz85 / https://github.com/zz85 | https://www.lab4games.net/zz85/blog\n\nEdge Detection Shader using Frei-Chen filter\nBased on http://rastergrid.com/blog/2011/01/frei-chen-edge-detector\n\naspect: vec2 of (1/width, 1/height)", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/EdgeShader2.js", + "line": 1, + "author": "zz85 / https://github.com/zz85 | https://www.lab4games.net/zz85/blog\n\nEdge Detection Shader using Sobel filter\nBased on http://rastergrid.com/blog/2011/01/frei-chen-edge-detector\n\naspect: vec2 of (1/width, 1/height)", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/FXAAShader.js", + "line": 1, + "author": "davidedc / http://www.sketchpatch.net/\n\nNVIDIA FXAA by Timothy Lottes\nhttp://timothylottes.blogspot.com/2011/06/fxaa3-source-released.html\n- WebGL port by @supereggbert\nhttp://www.glge.org/demos/fxaa/", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/FilmShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nFilm grain & scanlines shader\n\n- ported from HLSL to WebGL / GLSL\nhttp://www.truevision3d.com/forums/showcase/staticnoise_colorblackwhite_scanline_shaders-t18698.0.html\n\nScreen Space Static Postprocessor\n\nProduces an analogue noise overlay similar to a film grain / TV static\n\nOriginal implementation and noise algorithm\nPat 'Hawthorne' Shearon\n\nOptimized scanlines + noise version with intensity scaling\nGeorg 'Leviathan' Steinrohder\n\nThis version is provided under a Creative Commons Attribution 3.0 License\nhttp://creativecommons.org/licenses/by/3.0/", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/FocusShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nFocus shader\nbased on PaintEffect postprocess from ro.me\nhttp://code.google.com/p/3-dreams-of-black/source/browse/deploy/js/effects/PaintEffect.js", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/FresnelShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nBased on Nvidia Cg tutorial", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/HorizontalBlurShader.js", + "line": 1, + "author": "zz85 / http://www.lab4games.net/zz85/blog\n\nTwo pass Gaussian blur filter (horizontal and vertical blur shaders)\n- described in http://www.gamerendering.com/2008/10/11/gaussian-blur-filter-shader/\n and used in http://www.cake23.de/traveling-wavefronts-lit-up.html\n\n- 9 samples per pass\n- standard deviation 2.7\n- \"h\" and \"v\" parameters should be set to \"1 / width\" and \"1 / height\"", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/HorizontalTiltShiftShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nSimple fake tilt-shift effect, modulating two pass Gaussian blur (see above) by vertical position\n\n- 9 samples per pass\n- standard deviation 2.7\n- \"h\" and \"v\" parameters should be set to \"1 / width\" and \"1 / height\"\n- \"r\" parameter control where \"focused\" horizontal line lies", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/HueSaturationShader.js", + "line": 1, + "author": "tapio / http://tapio.github.com/\n\nHue and saturation adjustment\nhttps://github.com/evanw/glfx.js\nhue: -1 to 1 (-1 is 180 degrees in the negative direction, 0 is no change, etc.\nsaturation: -1 to 1 (-1 is solid gray, 0 is no change, and 1 is maximum contrast)", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/KaleidoShader.js", + "line": 1, + "author": "felixturner / http://airtight.cc/\n\nKaleidoscope Shader\nRadial reflection around center point\nPorted from: http://pixelshaders.com/editor/\nby Toby Schachman / http://tobyschachman.com/\n\nsides: number of reflections\nangle: initial angle in radians", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/LuminosityShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nLuminosity\nhttp://en.wikipedia.org/wiki/Luminosity", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/MirrorShader.js", + "line": 1, + "author": "felixturner / http://airtight.cc/\n\nMirror Shader\nCopies half the input to the other half\n\nside: side of input to mirror (0 = left, 1 = right, 2 = top, 3 = bottom)", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/NormalMapShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nNormal map shader\n- compute normals from heightmap", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/RGBShiftShader.js", + "line": 1, + "author": "felixturner / http://airtight.cc/\n\nRGB Shift Shader\nShifts red and blue channels from center in opposite directions\nPorted from http://kriss.cx/tom/2009/05/rgb-shift/\nby Tom Butterworth / http://kriss.cx/tom/\n\namount: shift distance (1 is width of input)\nangle: shift angle in radians", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/SSAOShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nScreen-space ambient occlusion shader\n- ported from\n SSAO GLSL shader v1.2\n assembled by Martins Upitis (martinsh) (http://devlog-martinsh.blogspot.com)\n original technique is made by ArKano22 (http://www.gamedev.net/topic/550699-ssao-no-halo-artifacts/)\n- modifications\n- modified to use RGBA packed depth texture (use clear color 1,1,1,1 for depth pass)\n- made fog more compatible with three.js linear fog\n- refactoring and optimizations", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/SepiaShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nSepia tone shader\nbased on glfx.js sepia shader\nhttps://github.com/evanw/glfx.js", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/TriangleBlurShader.js", + "line": 1, + "author": "zz85 / http://www.lab4games.net/zz85/blog\n\nTriangle blur shader\nbased on glfx.js triangle blur shader\nhttps://github.com/evanw/glfx.js\n\nA basic blur filter, which convolves the image with a\npyramid filter. The pyramid filter is separable and is applied as two\nperpendicular triangle filters.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/UnpackDepthRGBAShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nUnpack RGBA depth shader\n- show RGBA encoded depth as monochrome color", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/VerticalBlurShader.js", + "line": 1, + "author": "zz85 / http://www.lab4games.net/zz85/blog\n\nTwo pass Gaussian blur filter (horizontal and vertical blur shaders)\n- described in http://www.gamerendering.com/2008/10/11/gaussian-blur-filter-shader/\n and used in http://www.cake23.de/traveling-wavefronts-lit-up.html\n\n- 9 samples per pass\n- standard deviation 2.7\n- \"h\" and \"v\" parameters should be set to \"1 / width\" and \"1 / height\"", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/VerticalTiltShiftShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nSimple fake tilt-shift effect, modulating two pass Gaussian blur (see above) by vertical position\n\n- 9 samples per pass\n- standard deviation 2.7\n- \"h\" and \"v\" parameters should be set to \"1 / width\" and \"1 / height\"\n- \"r\" parameter control where \"focused\" horizontal line lies", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/three.js/shaders/VignetteShader.js", + "line": 1, + "author": "alteredq / http://alteredqualia.com/\n\nVignette shader\nbased on PaintEffect postprocess from ro.me\nhttp://code.google.com/p/3-dreams-of-black/source/browse/deploy/js/effects/PaintEffect.js", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/webgl-utils.js", + "line": 33, + "fileoverview": "This file contains functions every webgl program will need\na version of one way or another.\n\nInstead of setting up a context manually it is recommended to\nuse. This will check for success or failure. On failure it\nwill attempt to present an approriate message to the user.\n\n gl = WebGLUtils.setupWebGL(canvas);\n\nFor animated WebGL apps use of setTimeout or setInterval are\ndiscouraged. It is recommended you structure your rendering\nloop like this.\n\n function render() {\n window.requestAnimFrame(render, canvas);\n\n // do rendering\n ...\n }\n render();\n\nThis will call your rendering function up to the refresh rate\nof your display but will stop rendering if your app is not\nvisible.", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/webgl-utils.js", + "line": 62, + "description": "Creates the HTLM for a failure message", + "params": [ + { + "name": "canvasContainerId", + "description": "id of container of th\n canvas.", + "type": "String" + } + ], + "return": { + "description": "The html.", + "type": "String" + }, + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/webgl-utils.js", + "line": 78, + "description": "Mesasge for getting a webgl browser", + "type": "{string}", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/webgl-utils.js", + "line": 86, + "description": "Mesasge for need better hardware", + "type": "{string}", + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/webgl-utils.js", + "line": 94, + "description": "Creates a webgl context. If creation fails it will\nchange the contents of the container of the \ntag to an error message with the correct links for WebGL.", + "params": [ + { + "name": "canvas.", + "description": "The canvas element to create a\n context from.", + "type": "Element" + }, + { + "name": "opt_attribs", + "description": "Any\n creation attributes you want to pass in.", + "type": "WebGLContextCreationAttirbutes" + }, + { + "name": "opt_onError", + "description": "An function to call\n if there is an error during creation.", + "type": "Function:(msg)" + } + ], + "return": { + "description": "The created context.", + "type": "WebGLRenderingContext" + }, + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/webgl-utils.js", + "line": 136, + "description": "Creates a webgl context.", + "params": [ + { + "name": "canvas", + "description": "The canvas tag to get context\n from. If one is not passed in one will be created.", + "type": "!Canvas" + } + ], + "return": { + "description": "The created context.", + "type": "!WebGLContext" + }, + "class": "", + "module": "Lich.sc UGens" + }, + { + "file": "third-party/webgl-utils.js", + "line": 162, + "description": "Provides requestAnimationFrame in a cross browser way.", + "class": "", + "module": "Lich.sc UGens" + } + ], + "warnings": [ + { + "message": "unknown tag: brief", + "line": " smartymixed.js:1" + }, + { + "message": "unknown tag: version", + "line": " smartymixed.js:1" + }, + { + "message": "unknown tag: date", + "line": " smartymixed.js:1" + }, + { + "message": "unknown tag: fileoverview", + "line": " third-party/webgl-utils.js:33" + }, + { + "message": "Missing item type\nCloudChamber - Basic graphics app class.\ncanvasElementName\nframerate - Frames per second. ie. 30 will be 1000 / 30 = 33.333 ms between frames\ndrawCallback\nprintCallback", + "line": " CloudChamber.js/CloudChamber.js:212" + }, + { + "message": "Missing item type\nTakes `f` function and returns wrapper in return, that may be\nused for tail recursive algorithms. Note that returned funciton\nis not side effect free and should not be called from anywhere\nelse during tail recursion. In other words if\n`var f = tco(function foo() { ... bar() ... })`, then `bar`\nshould never call `f`. It is ok though for `bar` to call `tco(foo)`\ninstead.\n\n## Examples\nvar sum = tco(function(x, y) {\n return y > 0 ? sum(x + 1, y - 1) :\n y < 0 ? sum(x - 1, y + 1) :\n x\n})\nsum(20, 100000) // => 100020", + "line": " Compiler/Compiler.js:86" + }, + { + "message": "Missing item type\nTag-closer extension for CodeMirror.\n\nThis extension adds an \"autoCloseTags\" option that can be set to\neither true to get the default behavior, or an object to further\nconfigure its behavior.\n\nThese are supported options:\n\n`whenClosing` (default true)\n Whether to autoclose when the '/' of a closing tag is typed.\n`whenOpening` (default true)\n Whether to autoclose the tag when the final '>' of an opening\n tag is typed.\n`dontCloseTags` (default is empty tags for HTML, none for XML)\n An array of tag names that should not be autoclosed.\n`indentTags` (default is block tags for HTML, none for XML)\n An array of tag names that should, when opened, cause a\n blank line to be added inside the tag, and the blank line and\n closing line to be indented.\n\nSee demos/closetag.html for a usage example.", + "line": " third-party/codemirror-3.20/addon/edit/closetag.js:1" + }, + { + "message": "Missing item type\nSupported keybindings:\n\n Motion:\n h, j, k, l\n gj, gk\n e, E, w, W, b, B, ge, gE\n f, F, t, T\n $, ^, 0, -, +, _\n gg, G\n %\n ', `\n\n Operator:\n d, y, c\n dd, yy, cc\n g~, g~g~\n >, <, >>, <<\n\n Operator-Motion:\n x, X, D, Y, C, ~\n\n Action:\n a, i, s, A, I, S, o, O\n zz, z., z, zt, zb, z-\n J\n u, Ctrl-r\n m\n r\n\n Modes:\n ESC - leave insert mode, visual mode, and clear input state.\n Ctrl-[, Ctrl-c - same as ESC.\n\nRegisters: unamed, -, a-z, A-Z, 0-9\n (Does not respect the special case for number registers when delete\n operator is made with these commands: %, (, ), , /, ?, n, N, {, } )\n TODO: Implement the remaining registers.\nMarks: a-z, A-Z, and 0-9\n TODO: Implement the remaining special marks. They have more complex\n behavior.\n\nEvents:\n 'vim-mode-change' - raised on the editor anytime the current mode changes,\n Event object: {mode: \"visual\", subMode: \"linewise\"}\n\nCode structure:\n 1. Default keymap\n 2. Variable declarations and short basic helpers\n 3. Instance (External API) implementation\n 4. Internal state tracking objects (input state, counter) implementation\n and instanstiation\n 5. Key handler (the main command dispatcher) implementation\n 6. Motion, operator, and action implementations\n 7. Helper functions for the key handler, motions, operators, and actions\n 8. Set up Vim to work as a keymap for CodeMirror.", + "line": " third-party/codemirror-3.20/keymap/vim.js:1" + }, + { + "message": "Missing item type\ntypedef {Object{line:number,ch:number}} Cursor An object containing the\n position of the cursor.", + "line": " third-party/codemirror-3.20/keymap/vim.js:1225" + }, + { + "message": "Missing item type\nClips cursor to ensure that line is within the buffer's range\nIf includeLineBreak is true, then allow cur.ch == lineLength.", + "line": " third-party/codemirror-3.20/keymap/vim.js:1985" + }, + { + "message": "Missing item type", + "line": " third-party/codemirror-3.20/keymap/vim.js:2398" + }, + { + "message": "Missing item type\nExtract the regular expression from the query and return a Regexp object.\nReturns null if the query is blank.\nIf ignoreCase is passed in, the Regexp object will have the 'i' flag set.\nIf smartCase is passed in, and the query contains upper case letters,\n then ignoreCase is overridden, and the 'i' flag will not be set.\nIf the query contains the /i in the flag part of the regular expression,\n then both ignoreCase and smartCase are ignored, and 'i' will be passed\n through to the Regex object.", + "line": " third-party/codemirror-3.20/keymap/vim.js:2690" + }, + { + "message": "Missing item type\nCheck if pos is in the specified range, INCLUSIVE.\nRange can be specified with 1 or 2 arguments.\nIf the first range argument is an array, treat it as an array of line\nnumbers. Match pos against any of the lines.\nIf the first range argument is a number,\n if there is only 1 range argument, check if pos has the same line\n number\n if there are 2 range arguments, then check if pos is in between the two\n range arguments.", + "line": " third-party/codemirror-3.20/keymap/vim.js:2858" + }, + { + "message": "Missing item type", + "line": " third-party/codemirror-3.20/keymap/vim.js:3318" + }, + { + "message": "Missing item type\nHandle the raw key event from CodeMirror. Translate the\nShift + key modifier to the resulting letter, while preserving other\nmodifers.", + "line": " third-party/codemirror-3.20/keymap/vim.js:3411" + }, + { + "message": "Missing item type\nListens for changes made in insert mode.\nShould only be active in insert mode.", + "line": " third-party/codemirror-3.20/keymap/vim.js:3561" + }, + { + "message": "Missing item type\nListens for any kind of cursor activity on CodeMirror.\n- For tracking cursor activity in insert mode.\n- Should only be active in insert mode.", + "line": " third-party/codemirror-3.20/keymap/vim.js:3580" + }, + { + "message": "Missing item type", + "line": " third-party/codemirror-3.20/keymap/vim.js:3596" + }, + { + "message": "Missing item type\nHandles raw key down events from the text area.\n- Should only be active in insert mode.\n- For recording deletes in insert mode.", + "line": " third-party/codemirror-3.20/keymap/vim.js:3601" + }, + { + "message": "Missing item type\nRepeats the last edit, which includes exactly 1 command and at most 1\ninsert. Operator and motion commands are read from lastEditInputState,\nwhile action commands are read from lastEditActionCommand.\n\nIf repeatForInsert is true, then the function was called by\nexitInsertMode to repeat the insert mode changes the user just made. The\ncorresponding enterInsertMode call was made with a count.", + "line": " third-party/codemirror-3.20/keymap/vim.js:3619" + }, + { + "message": "Missing item type\nAuthor: Hans Engel\nBranched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun)", + "line": " third-party/codemirror-3.20/mode/clojure/clojure.js:1" + }, + { + "message": "Missing item type\nEither\n(indent-word ..\n(non-indent-word ..\n(;something else, bracket, etc.", + "line": " third-party/codemirror-3.20/mode/clojure/clojure.js:163" + }, + { + "message": "Missing item type\nAuthor: Gautam Mehta\nBranched from CodeMirror's Scheme mode", + "line": " third-party/codemirror-3.20/mode/cobol/cobol.js:1" + }, + { + "message": "Missing item type\nLink to the project's GitHub page:\nhttps://github.com/pickhardt/coffeescript-codemirror-mode", + "line": " third-party/codemirror-3.20/mode/coffeescript/coffeescript.js:1" + }, + { + "message": "Missing item type\nLink to the project's GitHub page:\nhttps://github.com/duralog/CodeMirror", + "line": " third-party/codemirror-3.20/mode/livescript/livescript.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/codemirror-3.20/mode/nginx/nginx.js:42" + }, + { + "message": "Missing item type\nThis script provides syntax highlighting support for\nthe Ntriples format.\nNtriples format specification:\n http://www.w3.org/TR/rdf-testcases/#ntriples", + "line": " third-party/codemirror-3.20/mode/ntriples/ntriples.js:1" + }, + { + "message": "Missing item type\nAuthor: Koh Zi Han, based on implementation by Koh Zi Chun", + "line": " third-party/codemirror-3.20/mode/scheme/scheme.js:1" + }, + { + "message": "Missing item type\nEither\n(indent-word ..\n(non-indent-word ..\n(;something else, bracket, etc.", + "line": " third-party/codemirror-3.20/mode/scheme/scheme.js:170" + }, + { + "message": "Missing item type\nSmarty 2 and 3 mode.", + "line": " third-party/codemirror-3.20/mode/smarty/smarty.js:1" + }, + { + "message": "Missing item type", + "line": " smartymixed.js:1" + }, + { + "message": "Missing item type\n|''Name''|tiddlywiki.js|\n|''Description''|Enables TiddlyWikiy syntax highlighting using CodeMirror|\n|''Author''|PMario|\n|''Version''|0.1.7|\n|''Status''|''stable''|\n|''Source''|[[GitHub|https://github.com/pmario/CodeMirror2/blob/tw-syntax/mode/tiddlywiki]]|\n|''Documentation''|http://codemirror.tiddlyspace.com/|\n|''License''|[[MIT License|http://www.opensource.org/licenses/mit-license.php]]|\n|''CoreVersion''|2.5.0|\n|''Requires''|codemirror.js|\n|''Keywords''|syntax highlighting color code mirror codemirror|\n! Info\nCoreVersion parameter is needed for TiddlyWiki only!", + "line": " third-party/codemirror-3.20/mode/tiddlywiki/tiddlywiki.js:1" + }, + { + "message": "Missing item type\nHelper to test CodeMirror highlighting modes. It pretty prints output of the\nhighlighter and can check against expected styles.\n\nMode tests are registered by calling test.mode(testName, mode,\ntokens), where mode is a mode object as returned by\nCodeMirror.getMode, and tokens is an array of lines that make up\nthe test.\n\nThese lines are strings, in which styled stretches of code are\nenclosed in brackets `[]`, and prefixed by their style. For\nexample, `[keyword if]`. Brackets in the code itself must be\nduplicated to prevent them from being interpreted as token\nboundaries. For example `a[[i]]` for `a[i]`. If a token has\nmultiple styles, the styles must be separated by ampersands, for\nexample `[tag&error ]`.\n\nSee the test.js files in the css, markdown, gfm, and stex mode\ndirectories for examples.", + "line": " third-party/codemirror-3.20/test/mode_test.js:1" + }, + { + "message": "Missing item type\nEmulation of CodeMirror's internal highlight routine for testing. Multi-line\ninput is supported.", + "line": " third-party/codemirror-3.20/test/mode_test.js:114" + }, + { + "message": "Missing item type\nCompare two arrays of output from highlight.", + "line": " third-party/codemirror-3.20/test/mode_test.js:157" + }, + { + "message": "Missing item type\nPrint tokens and corresponding styles in a table. Spaces in the token are\nreplaced with 'interpunct' dots (·).", + "line": " third-party/codemirror-3.20/test/mode_test.js:173" + }, + { + "message": "Missing item type", + "line": " third-party/codemirror-3.20/test/vim_test.js:264" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/postprocessing/BloomPass.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/postprocessing/DotScreenPass.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/postprocessing/EffectComposer.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/postprocessing/FilmPass.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/postprocessing/MaskPass.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/postprocessing/RenderPass.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/postprocessing/SavePass.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/postprocessing/ShaderPass.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/postprocessing/TexturePass.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/BasicShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/BleachBypassShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/BlendShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/BokehShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/BrightnessContrastShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/ColorCorrectionShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/ColorifyShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/ConvolutionShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/CopyShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/DOFMipMapShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/DotScreenShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/EdgeShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/EdgeShader2.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/FXAAShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/FilmShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/FocusShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/FresnelShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/HorizontalBlurShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/HorizontalTiltShiftShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/HueSaturationShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/KaleidoShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/LuminosityShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/MirrorShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/NormalMapShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/RGBShiftShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/SSAOShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/SepiaShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/TriangleBlurShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/UnpackDepthRGBAShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/VerticalBlurShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/VerticalTiltShiftShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/three.js/shaders/VignetteShader.js:1" + }, + { + "message": "Missing item type", + "line": " third-party/webgl-utils.js:33" + }, + { + "message": "Missing item type\nCreates the HTLM for a failure message", + "line": " third-party/webgl-utils.js:62" + }, + { + "message": "Missing item type\nMesasge for getting a webgl browser", + "line": " third-party/webgl-utils.js:78" + }, + { + "message": "Missing item type\nMesasge for need better hardware", + "line": " third-party/webgl-utils.js:86" + }, + { + "message": "Missing item type\nCreates a webgl context. If creation fails it will\nchange the contents of the container of the \ntag to an error message with the correct links for WebGL.", + "line": " third-party/webgl-utils.js:94" + }, + { + "message": "Missing item type\nCreates a webgl context.", + "line": " third-party/webgl-utils.js:136" + }, + { + "message": "Missing item type\nProvides requestAnimationFrame in a cross browser way.", + "line": " third-party/webgl-utils.js:162" + } + ] } \ No newline at end of file diff --git a/Docs/files/CloudChamber.js_CloudChamber.js.html b/Docs/files/CloudChamber.js_CloudChamber.js.html new file mode 100644 index 0000000..c89e286 --- /dev/null +++ b/Docs/files/CloudChamber.js_CloudChamber.js.html @@ -0,0 +1,2129 @@ + + + + + CloudChamber.js/CloudChamber.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: CloudChamber.js/CloudChamber.js

    + +
    +
    +/* 
    +    CloudChamber : THREE., - JavaScript WebGL framework
    +    Copyright (C) 2012 Chad McKinney
    +
    +	http://chadmckinneyaudio.com/
    +	seppukuzombie@gmail.com
    +
    +	All rights reserved.
    +	
    +	This program is free software; you can redistribute it and/or modify
    +    it under the terms of the GNU General Public License as published by
    +    the Free Software Foundation; either version 2 of the License, or
    +    (at your option) any later version.
    +
    +    This program is distributed in the hope that it will be useful,
    +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +    GNU General Public License for more details.
    +
    +    You should have received a copy of the GNU General Public License
    +    along with this program; if not, write to the Free Software
    +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
    +*/
    +
    +////////////////////////////////////////
    +// CONSTANTS
    +////////////////////////////////////////
    +
    +var CloudChamber = {};
    +
    +CloudChamber.ONE_SECOND_IN_MILLIS = 1000;
    +CloudChamber.PI = 3.141592654;
    +CloudChamber.POSITION_DATA_SIZE = 3;
    +CloudChamber.COLOR_DATA_SIZE = 4;
    +CloudChamber.pointers = new Array();
    +CloudChamber.update_queue = {};
    +CloudChamber.meshes = new Array();
    +
    +////////////////////////////////////////
    +// Helper functions for loading files
    +////////////////////////////////////////
    +
    +CloudChamber.loadFile = function(url, data, callback, errorCallback) 
    +{
    +    // Set up an asynchronous request
    +    var request = new XMLHttpRequest();
    +    request.open("GET", url, true);
    +
    +    // Hook the event that gets called as the request progresses
    +    request.onreadystatechange = function () 
    +    {
    +        // If the request is "DONE" (completed or failed)
    +        if(request.readyState == 4) 
    +        {
    +            // If we got HTTP status 200 (OK)
    +            if(request.status == 200) 
    +            {
    +                callback(request.responseText, data)
    +            } 
    +
    +            else // Failed 
    +            { 
    +                errorCallback(url);
    +            }
    +        }
    +    };
    +
    +    request.send(null);    
    +}
    +
    +CloudChamber.loadFiles = function(urls, callback, errorCallback) 
    +{
    +    var numUrls = urls.length;
    +    var numComplete = 0;
    +    var result = [];
    +
    +    // Callback for a single file
    +    function partialCallback(text, urlIndex) 
    +    {
    +        result[urlIndex] = text;
    +        numComplete++;
    +
    +        // When all files have downloaded
    +        if (numComplete == numUrls) 
    +        {
    +            callback(result);
    +        }
    +    }
    +
    +    for (var i = 0; i < numUrls; i++) 
    +    {
    +        CloudChamber.loadFile(urls[i], i, partialCallback, errorCallback);
    +    }
    +}
    +
    +CloudChamber.loadShaders = function(vertName, fragName)
    +{
    +	CloudChamber.loadFiles([vertName, fragName], CloudChamber.setShaders, 
    +		function(url)
    +		{
    +			alert("CLOUD CHAMBER: Failed to download" + url);
    +		}
    +	);
    +}
    +
    +CloudChamber.setShaders = function(shaders) // An array of shader programs as a string array [0] vert [1] frag
    +{
    +	var vertexShader = CloudChamber.gl.createShader(CloudChamber.gl.VERTEX_SHADER);
    +	CloudChamber.gl.shaderSource(vertexShader, shaders[0]);
    +	CloudChamber.gl.compileShader(vertexShader);
    +	
    +	var compiled = CloudChamber.gl.getShaderParameter(vertexShader, CloudChamber.gl.COMPILE_STATUS);
    +	if(!compiled)
    +		CloudChamber.print("ERROR COMPILING VERTEX  SHADER");
    +
    +	var fragmentShader = CloudChamber.gl.createShader(CloudChamber.gl.FRAGMENT_SHADER);
    +	CloudChamber.gl.shaderSource(fragmentShader, shaders[1]);
    +	CloudChamber.gl.compileShader(fragmentShader);
    +
    +	compiled = CloudChamber.gl.getShaderParameter(fragmentShader, CloudChamber.gl.COMPILE_STATUS);
    +	if(!compiled)
    +		CloudChamber.print("ERROR COMPILING FRAGMENT  SHADER");
    +
    +	var program = CloudChamber.gl.createProgram();
    +	CloudChamber.gl.attachShader(program, vertexShader);
    +	CloudChamber.gl.attachShader(program, fragmentShader);
    +	
    +	CloudChamber.gl.bindAttribLocation(program, 0, "position");
    +	CloudChamber.gl.bindAttribLocation(program, 1, "color");
    +
    +	CloudChamber.gl.linkProgram(program);
    +	
    +	var linked = CloudChamber.gl.getProgramParameter(program, CloudChamber.gl.LINK_STATUS);
    +	if(!linked)
    +	{
    +		var lastError = CloudChamber.gl.getProgramInfoLog(program);
    +		CloudChamber.print("Error in program linking:" + lastError);
    +		CloudChamber.gl.deleteProgram(program);
    +		return;
    +	}
    +
    +	CloudChamber.mvpMatrixHandle = CloudChamber.gl.getUniformLocation(program, "mvpMatrix");
    +	CloudChamber.positionHandle = CloudChamber.gl.getAttribLocation(program, "position");
    +	CloudChamber.colorHandle = CloudChamber.gl.getAttribLocation(program, "color");
    +
    +	CloudChamber.gl.useProgram(program);
    +	CloudChamber.currentProgram = program;
    +}
    +
    +CloudChamber.print = function(text)
    +{
    +	if(CloudChamber.printCallback != undefined)
    +		CloudChamber.printCallback(text)
    +	else
    +		console.log(text);
    +}
    +
    +// Start animating
    +CloudChamber.start = function()
    +{
    +	/*
    +	var drawFunc = function() 
    +	{
    +		window.requestAnimFrame(CloudChamber.draw, CloudChamber.canvas);
    +	}
    +
    +	if(CloudChamber.framerate <= 0 || CloudChamber.framerate == undefined)
    +		CloudChamber.print("CLOUD CHAMBER: FRAMERATE IS <= 0 OR UNDEFINED. NOT STARTING.");
    +	else
    +		CloudChamber.timer = setInterval(drawFunc, CloudChamber.ONE_SECOND_IN_MILLIS / CloudChamber.framerate);
    +		//CloudChamber.timer = setInterval(CloudChamber.draw, CloudChamber.ONE_SECOND_IN_MILLIS / CloudChamber.framerate);
    +	*/
    +}
    +
    +// Stop animating
    +CloudChamber.stop = function()
    +{
    +	// if(CloudChamber.timer)
    +	//	clearTimeout(CloudChamber.timer);
    +}
    +
    +CloudChamber.checkGLError = function()
    +{
    +	var error = CloudChamber.gl.getError();
    +	
    +	if(error)
    +	{
    +		CloudChamber.print("error: " + error);
    +	}
    +}
    +
    +
    +CloudChamber.draw = function(time)
    +{		
    +	for(var i = 0; i < CloudChamber.meshes.length; ++i)
    +	{
    +		var mesh = CloudChamber.meshes[i];
    +		var linear = mesh.linear_momentum;
    +		var angular = mesh.angular_momentum;
    +		mesh.position.x += linear[0];
    +		mesh.position.y += linear[1]
    +		mesh.position.z += linear[2];
    +				
    +		mesh.rotation.x += angular[0];
    +		mesh.rotation.y += angular[1];
    +		mesh.rotation.z += angular[2];
    +	}	
    +
    +	CloudChamber.composer.render(CloudChamber.scene, CloudChamber.camera);
    +}
    +
    +/******************************************************************************************************************
    +*	CloudChamber - Basic graphics app class.
    +*	canvasElementName
    +*	framerate - Frames per second. ie. 30 will be 1000 / 30 = 33.333 ms between frames
    +*	drawCallback
    +*	printCallback
    +******************************************************************************************************************/
    +CloudChamber.setup = function(canvas, framerate, drawCallback, printCallback)
    +{
    +	// CloudChamber.canvas = document.getElementById(canvasElementName);
    +	CloudChamber.canvas = canvas;
    +	CloudChamber.framerate = framerate;
    +	CloudChamber.frametime = 1000 / framerate;
    +	CloudChamber.drawCallback = drawCallback;
    +	CloudChamber.printCallback = printCallback
    +	CloudChamber.timer = 0;
    +	CloudChamber.currentProgram = 0;
    +
    +	// Setup view frustum and projection matrix
    +	var ratio = CloudChamber.canvas.clientWidth / CloudChamber.canvas.clientHeight;
    +	var left = -ratio;
    +	var right = ratio;
    +	var bottom = -1.0;
    +	var top = 1.0;
    +	var near = 1.0;
    +	var far = 10.0;
    +	mat4.frustum(left, right, bottom, top, near, far, CloudChamber.projectionMatrix);
    +
    +	CloudChamber.eye = vec3.create();
    +	CloudChamber.eye[0] = 25;
    +	CloudChamber.eye[1] = 25;
    +	CloudChamber.eye[2] = 25;
    +
    +	CloudChamber.look = vec3.create();
    +	CloudChamber.look[0] = 0;
    +	CloudChamber.look[1] = 0;
    +	CloudChamber.look[2] = 0;
    +
    +	CloudChamber.up = vec3.create();
    +	CloudChamber.up[0] = 0;
    +	CloudChamber.up[1] = 1;
    +	CloudChamber.up[2] = 0;
    +
    +	var cameraViewAngle = 45, near = 0.1, far = 10000;
    +	
    +	CloudChamber.renderer = new THREE.WebGLRenderer({antialias: true});
    +
    +
    +	CloudChamber.camera = new THREE.PerspectiveCamera(
    +		cameraViewAngle,
    +		ratio,
    +		near,
    +		far
    +	);
    +
    +	CloudChamber.scene = new THREE.Scene();
    +	CloudChamber.scene.add(CloudChamber.camera);
    +	CloudChamber.camera.position.z = 300;
    +	CloudChamber.renderer.setSize(CloudChamber.canvas.clientWidth, CloudChamber.canvas.clientHeight);
    +	CloudChamber.canvas.parentNode.replaceChild(CloudChamber.renderer.domElement, CloudChamber.canvas);
    +
    +	CloudChamber.testLight = new THREE.PointLight(0xFFFFFF);
    +
    +	CloudChamber.testLight.position.x = 10;
    +	CloudChamber.testLight.position.y = 50;
    +	CloudChamber.testLight.position.z = 130;	
    +
    +	CloudChamber.scene.add(CloudChamber.testLight);
    +	CloudChamber.renderer.setClearColorHex(0x141414, 1);
    +
    +	// postprocessing
    +	CloudChamber.composer = new THREE.EffectComposer(CloudChamber.renderer);
    +	CloudChamber.composer.addPass( new THREE.RenderPass(CloudChamber.scene, CloudChamber.camera));
    +
    +	/*
    +
    +	var dotScreenEffect = new THREE.ShaderPass(THREE.DotScreenShader);
    +	dotScreenEffect.uniforms["scale"].value = 4;
    +	CloudChamber.composer.addPass(dotScreenEffect);*/
    +
    +	
    +	var rgbEffect = new THREE.ShaderPass(THREE.RGBShiftShader);
    +	rgbEffect.uniforms["amount"].value = 0.0;
    +	rgbEffect.renderToScreen = true;
    +	CloudChamber.composer.addPass(rgbEffect);
    +
    +	CloudChamber.numShaders = 1;
    +	
    +	CloudChamber.shadersMap = {
    +		"BasicShader" : THREE.BasicShader,
    +		"BleachBypassShader" : THREE.BleachBypassShader,
    +		"BlendShader" : THREE.BlendShader,
    +		"BokehShader" : THREE.BokehShader,
    +		"BrightnessContrastShader" : THREE.BrightnessContrastShader,
    +		"ColorCorrectionShader" : THREE.ColorCorrectionShader,
    +		"ColorifyShader" : THREE.ColorifyShader,
    +		"ConvolutionShader" : THREE.ConvolutionShader,
    +		"CopyShader" : THREE.CopyShader,
    +		"DOFMipMapShader" : THREE.DOFMipMapShader,
    +		"DotScreenShader" : THREE.DotScreenShader,
    +		"EdgeShader" : THREE.EdgeShader,
    +		"EdgeShader2" : THREE.EdgeShader2,
    +		"FilmShader" : THREE.FilmShader,
    +		"FocusShader" : THREE.FocusShader,
    +		"FresnelShader" : THREE.FresnelShader,
    +		"FXAAShader" : THREE.FXAAShader,
    +		"HorizontalBlurShader" : THREE.HorizontalBlurShader,
    +		"HorizontalTiltShiftShader" : THREE.HorizontalTiltShiftShader,
    +		"HueSaturationShader" : THREE.HueSaturationShader,
    +		"KaleidoShader" : THREE.KaleidoShader,
    +		"LuminosityShader" : THREE.LuminosityShader,
    +		"MirrorShader" : THREE.MirrorShader,
    +		"NormalMapShader" : THREE.NormalMapShader,
    +		"RGBShiftShader" : THREE.RGBShiftShader,
    +		"SepiaShader" : THREE.SepiaShader,
    +		"SSAOShader" : THREE.SSAOShader,
    +		"TriangleBlurShader" : THREE.TriangleBlurShader,
    +		"UnpackDepthRGBAShader" : THREE.UnpackDepthRGBAShader,
    +		"VerticalBlurShader" : THREE.VerticalBlurShader,
    +		"VerticalTiltShiftShader" : THREE.VerticalTiltShiftShader,
    +		"VignetteShader" : THREE.VignetteShader 
    +	}
    +
    +	CloudChamber.shaderArray = new Array(
    +		"BasicShader",
    +		"BleachBypassShader",
    +		"BlendShader",
    +		"BokehShader",
    +		"BrightnessContrastShader",
    +		"ColorCorrectionShader",
    +		"ColorifyShader",
    +		"ConvolutionShader",
    +		"CopyShader",
    +		"DOFMipMapShader",
    +		"DotScreenShader",
    +		"EdgeShader",
    +		"EdgeShader2",
    +		"FilmShader",
    +		"FocusShader",
    +		"FresnelShader",
    +		"FXAAShader",
    +		"HorizontalBlurShader",
    +		"HorizontalTiltShiftShader",
    +		"HueSaturationShader",
    +		"KaleidoShader",
    +		"LuminosityShader",
    +		"MirrorShader",
    +		"NormalMapShader",
    +		"RGBShiftShader",
    +		"SepiaShader",
    +		"SSAOShader",
    +		"TriangleBlurShader",
    +		"UnpackDepthRGBAShader",
    +		"VerticalBlurShader",
    +		"VerticalTiltShiftShader",
    +		"VignetteShader"
    +	);
    +
    +	shaders = CloudChamber.shaderArray;
    +
    +	// shim layer with setTimeout fallback
    +	window.requestAnimFrame = (function()
    +	{
    +		return  window.requestAnimationFrame       || 
    +        		window.webkitRequestAnimationFrame || 
    +        		window.mozRequestAnimationFrame    || 
    +        		window.oRequestAnimationFrame      || 
    +        		window.msRequestAnimationFrame     || 
    +        
    +        function(/* function */ callback)
    +        {
    +            window.setTimeout(callback, 33);
    +        }
    +	})();
    +
    +	CloudChamber.print("Graphics initialized.");
    +	// usage:
    +	// instead of setInterval(render, 16) ....
    +
    +	/* 
    +	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    +	!! UNCOMMENT THIS TO GET GRAPHICS BACK!!!
    +	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    +	(function animloop(time){
    +		requestAnimFrame(animloop);
    +		CloudChamber.draw(time);
    +	})();
    +	*/
    +
    +	// place the rAF *before* the render() to assure as close to
    +	// 60fps with the setTimeout fallback.
    +}
    +
    +CloudChamber.addShader = function(shader, amount)
    +{
    +	var pass = new THREE.ShaderPass(CloudChamber.shadersMap[shader]);
    +	// pass.uniforms["amount"].value = amount;
    +	pass.renderToScreen = true;
    +	CloudChamber.composer.addPass(pass);
    +	CloudChamber.numShaders += 1;
    +}
    +
    +function setShader(shader)
    +{
    +	var pass = new THREE.ShaderPass(CloudChamber.shadersMap[shader]);
    +	// pass.uniforms["amount"].value = amount;
    +	pass.renderToScreen = true;
    +	
    +	for(var i = 0; i < CloudChamber.numShaders; ++i)
    +	{
    +		CloudChamber.composer.passes.pop();
    +	}
    +
    +	CloudChamber.numShaders = 1;
    +	CloudChamber.composer.addPass(pass);
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("setShader", setShader);
    +
    +function setNativeShader(shader)
    +{
    +	var pass = new THREE.ShaderPass(shader);
    +	// pass.uniforms["amount"].value = amount;
    +	pass.renderToScreen = true;
    +	
    +	for(var i = 0; i < CloudChamber.numShaders; ++i)
    +	{
    +		CloudChamber.composer.passes.pop();
    +	}
    +
    +	CloudChamber.numShaders = 1;
    +	CloudChamber.composer.addPass(pass);
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("setNativeShader", setNativeShader);
    +
    +function clearShaders()
    +{	
    +	for(var i = 0; i < CloudChamber.numShaders; ++i)
    +	{
    +		CloudChamber.composer.passes.pop();
    +	}
    +
    +	CloudChamber.numShaders = 1;
    +	var rgbEffect = new THREE.ShaderPass(THREE.RGBShiftShader);
    +	rgbEffect.uniforms["amount"].value = 0.0;
    +	rgbEffect.renderToScreen = true;
    +	CloudChamber.composer.addPass(rgbEffect);
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("clearShaders", clearShaders);
    +
    +function setShaders(shaders)
    +{
    +	for(var i = 0; i < shaders.length; ++i)
    +	{
    +		if(i == 0)
    +		{
    +			for(var j = 0; j < CloudChamber.numShaders; ++j)
    +			{
    +				CloudChamber.composer.passes.pop();
    +			}
    +
    +			CloudChamber.numShaders = 0;
    +		}
    +
    +		var pass = new THREE.ShaderPass(CloudChamber.shadersMap[shaders[i]]);
    +		
    +		if(i == (shaders.length - 1))
    +			pass.renderToScreen = true;
    +
    +		CloudChamber.composer.addPass(pass);
    +		CloudChamber.numShaders += 1;
    +	}
    +
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("setShaders", setShaders);
    +
    +CloudChamber.addPointer = function(object)
    +{
    +	CloudChamber.pointers.push(object);
    +	return CloudChamber.pointers.length - 1;
    +}
    +
    +CloudChamber.removePointer = function(pointer)
    +{
    +	CloudChamber.pointers[pointer] = null;
    +}
    +
    +function sphere(sPosition, sRadius, sColor)
    +{
    +	var sphereMaterial = new THREE.MeshLambertMaterial(
    +		{
    +			color: CloudChamber.packRGB(sColor[0],sColor[1],sColor[2])
    +		}
    +	);
    +
    +	var sphere = new THREE.Mesh(
    +		new THREE.SphereGeometry(
    +			sRadius, 64, 64
    +		),
    +		sphereMaterial
    +	);
    +
    +	sphere.position = { x:sPosition[0], y:sPosition[1], z:sPosition[2] };
    +	sphere.linear_momentum = [0, 0, 0];
    +	sphere.angular_momentum = [0, 0, 0];
    +	sphere.momentum_update = false;
    +	CloudChamber.scene.add(sphere);
    +	CloudChamber.print("Sphere: " + sPosition);
    +	CloudChamber.meshes.push(sphere);
    +	return sphere;
    +}
    +
    +_createPrimitive("sphere", sphere);
    +
    +function cube(cPosition, cSize, cRotation, cColor)
    +{
    +	var cubeMaterial = new THREE.MeshLambertMaterial(
    +		{
    +			color: CloudChamber.packRGB(cColor[0],cColor[1],cColor[2])
    +		}
    +	);
    +
    +	var cube = new THREE.Mesh(
    +		new THREE.CubeGeometry(
    +			cSize[0],
    +			cSize[1],
    +			cSize[2]
    +		),
    +		cubeMaterial
    +	);
    +
    +	cube.position = { x:cPosition[0], y:cPosition[1], z:cPosition[2] };
    +	cube.rotation = new THREE.Euler(cRotation[0], cRotation[1], cRotation[2], 'XYZ');
    +	cube.linear_momentum = [0, 0, 0];
    +	cube.angular_momentum = [0, 0, 0];
    +	cube.momentum_update = false;
    +	CloudChamber.scene.add(cube);
    +	CloudChamber.print("Cube: " + cPosition);
    +	CloudChamber.meshes.push(cube);
    +	return cube;
    +}
    +
    +_createPrimitive("cube", cube);
    +
    +CloudChamber.all = function(func)
    +{
    +	for(var i = 0; i < CloudChamber.pointers.length; ++i)
    +	{
    +		if(CloudChamber.pointers[i] != null)
    +		{
    +			func(i);
    +		}
    +	}	
    +}
    +
    +CloudChamber.allArg = function(func, arg)
    +{
    +	for(var i = 0; i < CloudChamber.pointers.length; ++i)
    +	{
    +		if(CloudChamber.pointers[i] != null)
    +		{
    +			func(i, arg);
    +		}
    +	}	
    +}
    +
    +function deleteMesh(mesh)
    +{
    +	var index = CloudChamber.meshes.indexOf(mesh);
    +	
    +	if(index > 0)
    +	{
    +		CloudChamber.meshes.splice(index, 1);
    +	}
    +
    +	CloudChamber.scene.remove(mesh);
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("deleteMesh", deleteMesh);
    +
    +function deleteScene()
    +{
    +	for(var i = 0; i < CloudChamber.meshes.length; ++i)
    +	{
    +		CloudChamber.scene.remove(CloudChamber.meshes[i]);
    +	}
    +
    +	CloudChamber.meshes = new Array();
    +	//CloudChamber.all(CloudChamber.delete);
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("deleteScene", deleteScene);
    +
    +function wireframe(active, mesh)
    +{
    +	mesh.material.wireframe = active;
    +	return mesh;
    +}
    +
    +_createPrimitive("wireframe", wireframe);
    +
    +function wireframeAll(active)
    +{
    +	for(var i = 0; i < CloudChamber.meshes.length; ++i)
    +	{
    +		wireframe(active, CloudChamber.meshes[i]);
    +	}
    +
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("wireframeAll", wireframeAll);
    +
    +function move(relPosition, object)
    +{
    +	var position = object.position;
    +	position.x += relPosition[0];
    +	position.y += relPosition[1];
    +	position.z += relPosition[2];
    +	object.position = position;
    +	return object;
    +}
    +
    +_createPrimitive("move", move);
    +
    +function moveAll(relPosition)
    +{
    +	for(var i = 0; i < CloudChamber.meshes.length; ++i)
    +	{
    +		move(relPosition, CloudChamber.meshes[i]);
    +	}
    +
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("moveAll", moveAll);
    +
    +function setColor(color, mesh)
    +{
    +	mesh.material.color = new THREE.Color(CloudChamber.packRGB(color[0], color[1], color[2]));
    +	return mesh;
    +}
    +
    +_createPrimitive("setColor", setColor);
    +
    +function setColorAll(color)
    +{
    +	for(var i = 0; i < CloudChamber.meshes.length; ++i)
    +	{
    +		setColor(color, CloudChamber.meshes[i]);
    +	}
    +
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("setColorAll", setColorAll);
    +
    +function rotate(relRotation, object)
    +{
    +	var rotation = object.rotation;
    +	rotation.x += relRotation[0];
    +	rotation.y += relRotation[0];
    +	rotation.z += relRotation[0];
    +	object.rotation = rotation;	
    +	return object;
    +}
    +
    +_createPrimitive("rotate", rotate);
    +
    +function rotateAll(relRotation)
    +{
    +	for(var i = 0; i < CloudChamber.meshes.length; ++i)
    +	{
    +		rotate(relRotation, CloudChamber.meshes[i]);
    +	}
    +
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("rotateAll", rotateAll);
    +
    +function linear(linear_momentum, object)
    +{
    +	object.linear_momentum = linear_momentum;
    +	object.momentum_update = true;
    +	return object;
    +}
    +
    +_createPrimitive("linear", linear);
    +
    +function linearAll(linear_momentum)
    +{
    +	for(var i = 0; i < CloudChamber.meshes.length; ++i)
    +	{
    +		linear(linear_momentum, CloudChamber.meshes[i]);
    +	}
    +
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("linearAll", linearAll);
    +
    +function angular(angular_momentum, object)
    +{
    +	object.angular_momentum = angular_momentum;
    +	object.momentum_update = true;
    +	return object;
    +}
    +
    +_createPrimitive("angular", angular);
    +
    +function angularAll(angular_momentum)
    +{
    +	for(var i = 0; i < CloudChamber.meshes.length; ++i)
    +	{
    +		angular(angular_momentum, CloudChamber.meshes[i]);
    +	}
    +
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("angularAll", angularAll);
    +
    +function setPosition(position, object)
    +{
    +	object.position = {x:position[0],y:position[1],z:position[2] };
    +	return object;
    +}
    +
    +_createPrimitive("setPosition", setPosition);
    +
    +function setPositionAll(position)
    +{
    +	for(var i = 0; i < CloudChamber.meshes.length; ++i)
    +	{
    +		setPosition(position, CloudChamber.meshes[i]);
    +	}
    +
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("setPositionAll", setPositionAll);
    +
    +function scale(scaleVec, object)
    +{
    +	object.scale = { x: scaleVec[0], y: scaleVec[1], z: scaleVec[2] };
    +	return object;
    +}
    +
    +_createPrimitive("scale", scale);
    +
    +function scaleAll(scaleVec)
    +{
    +	for(var i = 0; i < CloudChamber.meshes.length; ++i)
    +	{
    +		scale(scaleVec, CloudChamber.meshes[i]);
    +	}
    +
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("scaleAll", scaleAll);
    +
    +function cloudMesh(numTriangles, color)
    +{
    +	var triangles = new Array();
    +
    +	for(var i = 0; i < numTriangles; ++i)
    +	{
    +		var triangle = new Array();
    +		triangle.push(new THREE.Vector3(Math.random() * 200 - 100, Math.random() * 200 - 100, Math.random() * 200 - 100));
    +		triangle.push(new THREE.Vector3(Math.random() * 200 - 100, Math.random() * 200 - 100, Math.random() * 200 - 100));
    +		triangle.push(new THREE.Vector3(Math.random() * 200 - 100, Math.random() * 200 - 100, Math.random() * 200 - 100));
    +		triangles.push(triangle);
    +	}
    +
    +	return CloudChamber.mesh(
    +			triangles, // mesh
    +			new THREE.Color(CloudChamber.packRGB(color[0], color[1], color[2])) // color
    +	);
    +}
    +
    +_createPrimitive("cloudMesh", cloudMesh);
    +
    +CloudChamber.nrand = function() {
    +	var x1, x2, rad, y1;
    +	do {
    +		x1 = 2 * Math.random() - 1;
    +		x2 = 2 * Math.random() - 1;
    +		rad = x1 * x1 + x2 * x2;
    +	} while(rad >= 1 || rad == 0);
    +	var c = Math.sqrt(-2 * Math.log(rad) / rad);
    +	return x1 * c;
    +}
    +
    +function gaussianMesh(numTriangles,color)
    +{
    +	var triangles = new Array();
    +
    +	for(var i = 0; i < numTriangles; ++i)
    +	{
    +		var triangle = new Array();
    +		triangle.push(new THREE.Vector3(CloudChamber.nrand() * 50, CloudChamber.nrand() * 50, CloudChamber.nrand() * 50));
    +		triangle.push(new THREE.Vector3(CloudChamber.nrand() * 50, CloudChamber.nrand() * 50, CloudChamber.nrand() * 50));
    +		triangle.push(new THREE.Vector3(CloudChamber.nrand() * 50, CloudChamber.nrand() * 50, CloudChamber.nrand() * 50));
    +		triangles.push(triangle);
    +	}
    +
    +	return CloudChamber.mesh(
    +			triangles, // mesh
    +			new THREE.Color(CloudChamber.packRGB(color[0], color[1], color[2])) // color
    +	);
    +}
    +
    +_createPrimitive("gaussianMesh", gaussianMesh);
    +
    +function sinMesh(numTriangles, color)
    +{
    +	var triangles = new Array();
    +	var freq1 = CloudChamber.nrand() * 0.1;
    +	var freq2 = CloudChamber.nrand() * 0.1;
    +	var freq3 = CloudChamber.nrand() * 0.1;
    +	var freq4 = Math.random() * 0.1;
    +
    +	for(var i = 0; i < numTriangles; ++i)
    +	{
    +		var triangle = new Array();
    +		var sine = Math.sin(i * freq4) * 0.1 + 0.9;
    +		triangle.push(new THREE.Vector3(Math.sin(i * freq1) * 100 * sine, Math.sin(i * freq2) * 100 * sine, Math.sin(i * freq3) * 100 * sine));
    +		triangle.push(new THREE.Vector3(Math.sin(i * freq3) * 100 * sine, Math.sin(i * freq1) * 100 * sine, Math.sin(i * freq2) * 100 * sine));
    +		triangle.push(new THREE.Vector3(Math.sin(i * freq2) * 100 * sine, Math.sin(i * freq3) * 100 * sine, Math.sin(i * freq1) * 100 * sine));
    +		triangles.push(triangle);
    +	}
    +
    +	return CloudChamber.mesh(
    +			triangles, // mesh
    +			new THREE.Color(CloudChamber.packRGB(color[0], color[1], color[2])) // color
    +	);
    +}
    +
    +_createPrimitive("sinMesh", sinMesh);
    +
    +CloudChamber.heightMap = function(mapFunction, width, depth)
    +{
    +	var map = mapFunction(width, depth);
    +	var triangles = new Array();
    +	var x = 0;
    +	var y = 0;
    +	var even = true;
    +	var doneIterating = false;
    +	var offset = new THREE.Vector3((width / 2) * -1, 0, (depth / 2) * -1);
    +
    +	// Iterate over the height map and create a triangle mesh using correct winding
    +	while(!doneIterating)
    +	{
    +		var triangle = new Array();
    +
    +		if(even)
    +		{	
    +			x += 1;
    +			triangle.push(new THREE.Vector3(x, map[x + (y * width)], y).add(offset));
    +			x -= 1;
    +			triangle.push(new THREE.Vector3(x, map[x + (y * width)], y).add(offset));
    +			y += 1;
    +			triangle.push(new THREE.Vector3(x, map[x + (y * width)], y).add(offset));
    +			even = false;
    +			triangles.push(triangle);
    +		}
    +
    +		else
    +		{
    +			triangle.push(new THREE.Vector3(x, map[x + (y * width)], y).add(offset));
    +			x += 1;
    +			triangle.push(new THREE.Vector3(x, map[x + (y * width)], y).add(offset));
    +			y -= 1;
    +			triangle.push(new THREE.Vector3(x, map[x + (y * width)], y).add(offset));
    +			triangles.push(triangle);
    +			even = true;
    +
    +			// Check to see that we"re done by testing x/y against width/depth
    +			if((x == width) && (y == depth - 1))
    +			{
    +				doneIterating = true;
    +			}
    +
    +			else if(x == width)
    +			{
    +				// New row
    +				x = 0;
    +				y += 1;
    +			}
    +		}
    +	}
    +
    +	return triangles;
    +}
    +
    +CloudChamber.newMap = function(width, depth)
    +{
    +	var map = new Array();
    +
    +	for(var i = 0; i < (width * depth); ++i)
    +	{
    +		map.push(0)
    +	}
    +
    +	return map;
    +}
    +
    +CloudChamber.sineMap = function(width, depth)
    +{
    +	var map = CloudChamber.newMap(width, depth);
    +	var freq = Math.random() * width;
    +	var freq2 = Math.round(Math.random() * 20) / 10;
    +	for(var x = 0; x < width; ++x)
    +	{
    +		for(var y = 0; y < depth; ++y)
    +		{
    +			map[x + (y * width)] = Math.sin(x * freq) * Math.sin(y * freq2) * (width / 2);
    +		}
    +	}
    +
    +	return map;
    +}
    +
    +function sinMapMesh(width, depth, color)
    +{
    +	var triangles = CloudChamber.heightMap(CloudChamber.sineMap, width, depth);
    +
    +	return CloudChamber.mesh(
    +			triangles, // mesh
    +			new THREE.Color(CloudChamber.packRGB(color[0], color[1], color[2])) // color
    +	);
    +}
    +
    +_createPrimitive("sinMapMesh", sinMapMesh);
    +
    +CloudChamber.noiseMap = function(width, depth)
    +{
    +	var map = CloudChamber.newMap(width, depth);
    +	var amp = Math.random() * width;
    +	for(var i = 0; i < (width * depth); ++i)
    +	{
    +		map[i] = ((Math.random() * 2) - 1) * amp;
    +	}
    +
    +	return map;	
    +}
    +
    +function noiseMapMesh(width, depth, color)
    +{
    +	var triangles = CloudChamber.heightMap(CloudChamber.noiseMap, width, depth);
    +
    +	return CloudChamber.mesh(
    +			triangles, // mesh
    +			new THREE.Color(CloudChamber.packRGB(color[0], color[1], color[2])) // color
    +	);
    +}
    +
    +_createPrimitive("noiseMapMesh", noiseMapMesh);
    +
    +CloudChamber.gaussianMap = function(width, depth)
    +{
    +	var map = CloudChamber.newMap(width, depth);
    +	var amp = Math.random() * width;
    +	for(var i = 0; i < (width * depth); ++i)
    +	{
    +		map[i] = CloudChamber.nrand() * amp;
    +	}
    +
    +	return map; 
    +}
    +
    +function gaussianMapMesh(width, depth, color)
    +{
    +	var triangles = CloudChamber.heightMap(CloudChamber.gaussianMap, width, depth);
    +
    +	return CloudChamber.mesh(
    +			triangles, // mesh
    +			new THREE.Color(CloudChamber.packRGB(color[0], color[1], color[2])) // color
    +	);
    +}
    +
    +_createPrimitive("gaussianMapMesh", gaussianMapMesh);
    +
    +CloudChamber.square = function(i, freq)
    +{
    +	if((i % freq) < (freq / 2))
    +		return -1;
    +	else
    +		return 1;
    +}
    +
    +CloudChamber.squareMap = function(width, depth)
    +{
    +	var map = CloudChamber.newMap(width, depth);
    +	var freq = Math.random();
    +	var freq2 = Math.round(Math.random() * 20) / 10;
    +	for(var x = 0; x < width; ++x)
    +	{
    +		for(var y = 0; y < depth; ++y)
    +		{
    +			map[x + (y * width)] = CloudChamber.square(x, freq) * CloudChamber.square(y, freq2)  * (width / 2);
    +		}
    +	}
    +
    +	return map;
    +}
    +
    +function squareMapMesh(width, depth, color)
    +{
    +	var triangles = CloudChamber.heightMap(CloudChamber.squareMap, width, depth);
    +
    +	return CloudChamber.mesh(
    +			triangles, // mesh
    +			new THREE.Color(CloudChamber.packRGB(color[0], color[1], color[2])) // color
    +	);
    +}
    +
    +_createPrimitive("squareMapMesh", squareMapMesh);
    +
    +CloudChamber.saw = function(i, freq)
    +{
    +	return ((i % freq) / freq) * 2 - 1;
    +}
    +
    +CloudChamber.sawMap = function(width, depth)
    +{
    +	var map = CloudChamber.newMap(width, depth);
    +	var freq = Math.random();
    +	var freq2 = Math.round(Math.random() * 20) / 10;
    +	for(var x = 0; x < width; ++x)
    +	{
    +		for(var y = 0; y < depth; ++y)
    +		{
    +			map[x + (y * width)] = CloudChamber.saw(x, freq) * CloudChamber.saw(y, freq2)  * (width / 2);
    +		}
    +	}
    +
    +	return map;
    +}
    +
    +function sawMapMesh(width, depth, color)
    +{
    +	var triangles = CloudChamber.heightMap(CloudChamber.sawMap, width, depth);
    +
    +	return CloudChamber.mesh(
    +			triangles, // mesh
    +			new THREE.Color(CloudChamber.packRGB(color[0], color[1], color[2])) // color
    +	);
    +}
    +
    +_createPrimitive("sawMapMesh", sawMapMesh);
    +
    +CloudChamber.tri = function(i, freq)
    +{
    +	return freq / 2 - Math.abs(i % (2*freq) - freq);
    +}
    +
    +CloudChamber.triMap = function(width, depth)
    +{
    +	var map = CloudChamber.newMap(width, depth);
    +	var freq = Math.random();
    +	var freq2 = Math.round(Math.random() * 20) / 10;
    +	for(var x = 0; x < width; ++x)
    +	{
    +		for(var y = 0; y < depth; ++y)
    +		{
    +			map[x + (y * width)] = CloudChamber.tri(x, freq) * CloudChamber.tri(y, freq2)  * width;
    +		}
    +	}
    +
    +	return map;
    +}
    +
    +function triMapMesh(width, depth, color)
    +{
    +	var triangles = CloudChamber.heightMap(CloudChamber.triMap, width, depth);
    +
    +	return CloudChamber.mesh(
    +			triangles, // mesh
    +			new THREE.Color(CloudChamber.packRGB(color[0], color[1], color[2])) // color
    +	);
    +}
    +
    +_createPrimitive("triMapMesh", triMapMesh);
    +
    +function flatMapMesh(width, depth, color)
    +{
    +	var triangles = CloudChamber.heightMap(CloudChamber.newMap, width, depth);
    +
    +	return CloudChamber.mesh(
    +			triangles, // mesh
    +			new THREE.Color(CloudChamber.packRGB(color[0], color[1], color[2])) // color
    +	);
    +}
    +
    +_createPrimitive("flatMapMesh", flatMapMesh);
    +
    +CloudChamber.calculateNormal = function(p1, p2, p3)
    +{
    +	/*
    +	Set Vector U to (Triangle.p2 minus Triangle.p1)
    +    Set Vector V to (Triangle.p3 minus Triangle.p1)
    + 
    +    Set Normal.x to (multiply U.y by V.z) minus (multiply U.z by V.y)
    +    Set Normal.y to (multiply U.z by V.x) minus (multiply U.x by V.z)
    +    Set Normal.z to (multiply U.x by V.y) minus (multiply U.y by V.x)
    + 
    +    Returning Normal
    +	*/
    +
    +	var u = p2.sub(p1);
    +	var v = p3.sub(p1);
    +	
    +	var normal = new THREE.Vector3(
    +		(u.y * v.z) - (u.z * v.y),
    +		(u.z * v.x) - (u.x * v.z),
    +		(u.x * v.y) - (u.y * v.x)
    +	);
    +
    +	return normal.normalize();
    +}
    +
    +CloudChamber.mesh = function(mGeometry, mColor)
    +{
    +	var material = new THREE.MeshLambertMaterial(
    +		{
    +			color: mColor
    +		}
    +	);
    +
    +	var geometry = new THREE.Geometry();
    +
    +	for(var i = 0; i < mGeometry.length; ++i)
    +	{
    +		var p1 = mGeometry[i][0];
    +		var p2 = mGeometry[i][1];
    +		var p3 = mGeometry[i][2];
    +		geometry.vertices.push(p1);
    +		geometry.vertices.push(p2);
    +		geometry.vertices.push(p3);
    +		geometry.faces.push(new THREE.Face3(i * 3, (i * 3) + 1, (i * 3) + 2));
    +	}
    +
    +	geometry.computeFaceNormals();
    +	geometry.computeCentroids();
    +	geometry.computeBoundingSphere();
    +
    +	var mesh = new THREE.Mesh(
    +		geometry,
    +		material
    +	);
    +
    +	// mesh.position = mPosition;
    +	// mesh.rotation = mRotation;
    +	mesh.doubleSided = true;
    +	mesh.overdraw = true;
    +	mesh.linear_momentum = [0,0,0];
    +	mesh.angular_momentum = [0,0,0];
    +	mesh.momentum_update = false;
    +	CloudChamber.meshes.push(mesh);
    +	CloudChamber.scene.add(mesh);
    +	//CloudChamber.print("Mesh");
    +	return mesh;
    +}
    +
    +function marchingCubes(mColor)
    +{
    +	var map = MarchingCubes.march();
    +
    +	var material = new THREE.MeshLambertMaterial(
    +		{
    +			color: new THREE.Color(CloudChamber.packRGB(mColor[0], mColor[1], mColor[2]))
    +		}
    +	);
    +
    +	var geometry = new THREE.Geometry();
    +
    +	for(var i = 0; i < map.length; ++i)
    +	{
    +		geometry.vertices.push(map[i]);
    +		CloudChamber.print("(" + map[i].x + ", " + map[i].y + ", " + map[i].z + ")");
    +
    +		if(i % 3 == 2)
    +			geometry.faces.push(new THREE.Face3(i - 2, i - 1, i));
    +	}
    +
    +	CloudChamber.print("March faces: " + geometry.faces.length);
    +
    +	geometry.computeFaceNormals();
    +	geometry.computeCentroids();
    +	geometry.computeBoundingSphere();
    +
    +	var mesh = new THREE.Mesh(
    +		geometry,
    +		material
    +	);
    +
    +	mesh.doubleSided = true;
    +	mesh.overdraw = true;
    +	mesh.linear_momentum = { x:0, y:0, z:0 };
    +	mesh.angular_momentum = { x:0, y:0, z:0 };
    +	mesh.momentum_update = false;
    +	CloudChamber.scene.add(mesh);
    +	CloudChamber.print("March");
    +	return CloudChamber.addPointer(mesh);
    +}
    +
    +_createPrimitive("marchingCubes", marchingCubes);
    +
    +///////////////////////////////////////////////////////////////////////////////////////
    +// splice language
    +///////////////////////////////////////////////////////////////////////////////////////
    +
    +/*
    +Generate a shader using the sub-language splice
    +splice is a deterministic, non-turing complete graph description using characters:
    +
    +The first half of the string is the vertext shader, the second half is the fragment
    +
    +examples: 
    +
    +spliceShader "<vVvVvvv<>>>>>>><<<>><^><^^^^^^<^<>>vvvvvvv<v<v>666<<..>>>£%3kqkdwKW:DK"
    +spliceShader ")(R£)FPIEWF}{P}{poef{pwfowefpowefw3290£)(R()IfifpECV<V<>V<££^94@@{}{}"
    +
    +characters are translated to WebGL function calls via a simple switch
    +
    +*/
    +
    +CloudChamber.parseSpliceChar = function(character, input)
    +{
    +	var spliceFunc;
    +	var frag = input == "fragColor";
    +	var assignVar = "a_variable";
    +
    +	if(frag)
    +		assignVar = "frag_variable";
    +
    +	switch(character)
    +	{
    +	case '!': 
    +		if(frag)
    +			spliceFunc = "pow(gl_FragCoord, "+input+" * vec4(2, 2, 2, 2));";
    +		else
    +			spliceFunc = "pow("+assignVar+", "+input+" * vec4(2, 2, 2, 2));";
    +		break;
    +
    +	case '£': 
    +		if(frag)
    +			spliceFunc = "sqrt(gl_FragCoord + "+input+" * vec4(10, 10, 10, 10));";
    +		else
    +			spliceFunc = "sqrt("+input+" + "+assignVar+" * vec4(10, 10, 10, 10));";
    +		break;
    +
    +	case '=': 
    +		if(frag)
    +			spliceFunc = "fract(gl_FragCoord + "+input+" * vec4(10, 10, 10, 10));";
    +		else
    +			spliceFunc = "fract("+input+" + "+assignVar+" * vec4(10, 10, 10, 10));";
    +		break;
    +
    +	case '`': 
    +		if(frag)
    +			spliceFunc = "inversesqrt(gl_FragCoord + "+input+");";
    +		else
    +			spliceFunc = "inversesqrt("+input+" + "+assignVar+");";
    +		break;
    +
    +	case '~': 
    +		if(frag)
    +			spliceFunc = "inversesqrt(gl_FragCoord - "+input+");";
    +		else
    +			spliceFunc = "inversesqrt("+input+" - "+assignVar+");";
    +		break;
    +
    +	case '#': 
    +		if(frag)
    +			spliceFunc = "reflect(gl_FragCoord, "+input+");";
    +		else
    +			spliceFunc = "reflect("+input+", "+assignVar+");";
    +		break;
    +
    +	case ':':
    +		if(frag)
    +			spliceFunc = "refract(gl_FragCoord, "+input+", dot("+input+", "+assignVar+"));";
    +		else
    +			spliceFunc = "refract("+input+", "+assignVar+", dot("+input+", "+assignVar+"));";
    +		break;
    +
    +	case ';': 
    +			spliceFunc = "reflect("+assignVar+", reflect("+assignVar+", "+input+"));";
    +		break;
    +
    +	case '?': 
    +		if(frag)
    +			spliceFunc = "clamp(gl_FragCoord, "+input+", "+assignVar+");";
    +		else
    +			spliceFunc = "clamp("+assignVar+", "+input+", "+input+");";
    +		break;
    +
    +	case '\\': 
    +		if(frag)
    +			spliceFunc = "vec4(cross(gl_FragCoord.xyz, "+input+".xyz), 1);";
    +		else
    +			spliceFunc = "vec4(cross("+assignVar+".xyz, "+input+".xyz), 1);";
    +		break;	
    +
    +	case ' ':
    +		if(frag)
    +			spliceFunc = "mix(gl_FragCoord, "+input+", abs("+assignVar+"));";
    +		else
    +			spliceFunc = "mix("+assignVar+", "+input+", abs("+assignVar+"));";
    +		break;
    +
    +	case '_': // length
    +		spliceFunc = "vec4(length("+input+"), length("+input+"), length("+input+"), length("+input+"));";
    +		break;
    +	
    +	case '[': // fold add, add all components of vector returning a vector of the result
    +		spliceFunc = input+"; "+assignVar+" = "+assignVar+" * ("+input+".x + "+input+".y + "+input+".z + "+input+".w);";
    +		break;
    +
    +	case ']': // fold subtract, sub all components of vector returning a vector of the result
    +		spliceFunc = input+"; "+assignVar+" = "+assignVar+" * ("+input+".x - "+input+".y - "+input+".z - "+input+".w);";
    +		break;
    +	
    +	case '{':
    +		spliceFunc = "vec4("+input+".w, "+input+".z, "+input+".y, "+input+".x);";
    +		break;
    +	
    +	case '}':
    +		if(frag)
    +			spliceFunc = "reflect(gl_FragCoord, "+input+");";
    +		else
    +			spliceFunc = "vec4("+input+".z, "+input+".w, "+input+".x, "+input+".w);";
    +		break;
    +	
    +	case '.': // dot() function
    +		if(frag)
    +			spliceFunc = input+" * dot(gl_FragCoord, "+input+");";
    +		else
    +			spliceFunc = input+" * dot("+input+", "+assignVar+");";
    +		break;
    +	
    +	case '+': // add with next number
    +			spliceFunc = input + " + "+assignVar+";";
    +		break;
    +	
    +	case '-': // subtract next number from this
    +			spliceFunc = input + " + "+assignVar+";";
    +		break;
    +	
    +	case '*': // multiply by next number
    +			spliceFunc = input + " * "+assignVar+";";
    +		break;
    +	
    +	case '/': // divide by next number
    +		spliceFunc = input + " / "+assignVar+";";
    +		break;
    +	
    +	case '&': // bit and with next number
    +			spliceFunc = input + " + "+assignVar+";";
    +		break;
    +	
    +	case '|': // bit or with next number
    +			spliceFunc = input + " - "+assignVar+";";
    +		break;
    +	
    +	case '%': // modulus with next number
    +			spliceFunc = "mod("+input+", "+assignVar+");";
    +		break;
    +	
    +	case '<': // decrement
    +		spliceFunc = "--"+input+";";
    +		break;
    +
    +	case '^': // exponent
    +		spliceFunc = "exp("+input+");";
    +		break;
    +
    +	case '>': // increment
    +		spliceFunc = "++"+input+";";
    +		break;
    +
    +	case '(': // sin
    +		spliceFunc = "sin("+input+");";
    +		break;
    +	
    +	case ')': // cosin
    +		spliceFunc = "cos("+input+");";
    +		break;
    +
    +	case '@': // ascos
    +		spliceFunc = "acos("+input+");";
    +		break;
    +
    +	case '$': // ascos
    +		spliceFunc = "asin("+input+");";
    +		break;
    +
    +	case 'a': // scamble
    +		spliceFunc = "vec4("+input+".y, "+input+".z, "+input+".x, "+input+".w);";		
    +		break;
    +
    +	case 'A': // absolute value
    +		spliceFunc = "abs("+input+");";
    +		break;
    +
    +	case 'b': // less than
    +		spliceFunc = "sign("+assignVar+" * vec4(0.2, 0.2, 0.2, 0.2) - vec4(0.1, 0.1, 0.1, 0.1) + "+input+" - "+assignVar+");";
    +		break;
    +
    +	case 'B': // less than equal
    +		if(frag)
    +			spliceFunc = "sign("+assignVar+" * "+input+" - gl_FragCoord);";
    +		else	
    +			spliceFunc = "sign("+assignVar+" * "+input+");";
    +		break;
    +
    +	case 'c': // ceil
    +		spliceFunc = "ceil("+input+");";
    +		break;
    +
    +	case 'C': // ceil
    +		spliceFunc = "ceil("+input+" * "+assignVar+");";
    +		break;
    +
    +	case 'd': // distance
    +		spliceFunc = "vec4(distance("+assignVar+".x, "+input+".x), distance("+assignVar+".y, "+input+".y), distance("+assignVar+".z, "+input+".z), distance("+assignVar+".w, "+input+".w)) * vec4(-0.01, -0.1, -0.01, -0.01) + "+input+";";
    +		break;
    +	
    +	case 'D': // distance
    +		spliceFunc = input+";\n    "+assignVar+" = vec4(distance("+assignVar+".x, "+input+".x), distance("+assignVar+".y, "+input+".y), distance("+assignVar+".z, "+input+".z), distance("+assignVar+".w, "+input+".w)) * vec4(0.1, 0.1, 0.1, 0.1);";
    +		break;
    +
    +	case 'e': // equal
    +		spliceFunc = "radians("+input+" * "+assignVar+");";
    +		break;
    +
    +	case 'E': // equal
    +		spliceFunc = "radians("+input+" * ceil("+input+"));";
    +		break;
    +
    +	case 'f': // floor
    +		spliceFunc = "floor(vec4(4, 4, 4, 4) * "+input+");";
    +		break;
    +	
    +	case 'F': // fract
    +		spliceFunc = "fract("+input+");";
    +		break;
    +
    +	case 'g': // return input, assign "+assignVar+"
    +		spliceFunc = input+";\n    "+assignVar+" = floor(vec4(4, 4, 4, 4) * "+input+");";
    +		break;
    +
    +	case 'G': // return input, assign "+assignVar+"
    +		spliceFunc = input+";\n    "+assignVar+" = fract("+input+");";
    +		break;
    +
    +	case 'h': // return input, assign "+assignVar+"
    +		spliceFunc = input+";\n    "+assignVar+" = sin("+input+");";
    +		break;
    +
    +	case 'H': // return input, assign "+assignVar+"
    +		spliceFunc = input+";\n    "+assignVar+" = cos("+input+");";
    +		break;
    +
    +	case 'i': // inverse sqrt
    +		spliceFunc = input+" / inversesqrt("+input+") - "+assignVar+";";
    +		break;
    +	
    +	case 'I': // invsqrt(1 / exp2)
    +		spliceFunc = input+" / inversesqrt(vec4(1, 1, 1, 1) / exp2("+input+")) - "+assignVar+";";
    +		break;
    +
    +	case 'j': // return input, assign "+assignVar+"
    +		spliceFunc = input+";\n    "+assignVar+" = vec4(cross("+input+".xyz, "+assignVar+".xyz), "+assignVar+".w);";
    +		break;
    +
    +	case 'J': // return input, assign "+assignVar+"
    +		spliceFunc = input+";\n    "+assignVar+" = "+assignVar+" * dot("+input+", "+assignVar+");";
    +		break;
    +
    +	case 'k': // clamp
    +		spliceFunc = "clamp("+input+", floor(vec4(4, 4, 4, 4) * "+assignVar+"), "+assignVar+");";
    +		break;
    +
    +	case 'K': // clamp
    +		spliceFunc = "clamp("+input+" * vec4(2, 2, 2, 2), "+assignVar+", ceil("+assignVar+"));";
    +		break;
    +
    +	case 'l': // log2
    +		spliceFunc = input+" + log2("+input+");";
    +		break;
    +	
    +	case 'L': // log2(1 / log2)
    +		spliceFunc = "log2(vec4(1, 1, 1, 1) + log2("+input+"));";
    +		break;
    +
    +	case 'm': // min
    +		spliceFunc = "min("+input+", "+assignVar+");";
    +		break;
    +	
    +	case 'M': // max
    +		spliceFunc = "max("+input+", "+assignVar+");";
    +		break;
    +
    +	case 'n': // normalize
    +		spliceFunc = "normalize("+input+" * vec4(6, 0.6, 6, 0.6));";
    +		break;
    +
    +	case 'N': // normalize
    +		spliceFunc = "normalize("+input+" / "+assignVar+");";
    +		break;
    +
    +	case 'o': // min
    +		if(frag)
    +			spliceFunc = "min("+input+", vec4(1, 1, 1, 1) / gl_FragCoord);";
    +		else
    +			spliceFunc = "min("+input+", vec4(1, 1, 1, 1) / "+assignVar+");";
    +		break;
    +
    +	case 'O': // max
    +		if(frag)
    +			spliceFunc = "max("+input+", vec4(1, 1, 1, 1) / gl_FragCoord);";
    +		else
    +			spliceFunc = "max("+input+", vec4(1, 1, 1, 1) / "+assignVar+");";
    +		break;
    +
    +	case 'p': // pow
    +		spliceFunc = "pow("+assignVar+", "+input+");";
    +		break;
    +
    +	case 'P': // pow pow
    +		spliceFunc = "pow("+assignVar+", pow("+assignVar+", "+input+"));";
    +		break
    +
    +	case 'q': // sign value
    +		spliceFunc = "sign("+input+");";
    +		break;	
    +
    +	case 'Q': // sign value
    +		spliceFunc = "sign("+input+" * "+assignVar+");";
    +		break;
    +
    +	case 'r': // reflect
    +		spliceFunc = "reflect("+assignVar+", "+input+");";
    +		break;
    +
    +	case 'R': // Refract
    +		spliceFunc = "refract("+assignVar+", "+input+", dot("+input+", "+assignVar+"));";
    +		break;	
    +
    +	case 's': // step
    +		spliceFunc = "abs("+assignVar+" - reflect("+input+", "+assignVar+")) / "+input+";";
    +		break;
    +	
    +	case 'S': // smooth step
    +		spliceFunc = "faceforward("+input+", "+assignVar+", "+input+") + "+input+";";
    +		break;
    +
    +	case 't': // cross
    +		spliceFunc = "vec4(cross("+input+".xyz, "+assignVar+".xyz), 1);";
    +		break;
    +	
    +	case 'T': // tangent
    +		spliceFunc = "tan("+input+");";
    +		break;	
    +	
    +	case 'u': // 
    +		spliceFunc = input+";\n    "+assignVar+" = tan("+input+");";
    +		break;
    +
    +	case 'U': // 
    +		spliceFunc = input+";\n    "+assignVar+" = normalize("+input+");";
    +		break;
    +
    +	case 'v': // sqrt
    +		spliceFunc = "sqrt("+input+");";
    +		break;
    +
    +	case 'V': // var sqrt
    +		spliceFunc = input+"; "+assignVar+" = sqrt("+input+");";
    +		break;
    +
    +	case 'w': // FaceForward
    +		spliceFunc = input+" - faceforward("+input+", "+assignVar+", "+input+");";
    +		break;
    +
    +	case 'W': // FaceForward
    +		spliceFunc = input+" - faceforward("+input+", "+assignVar+", "+assignVar+");";
    +		break;
    +
    +	case 'x': // mix
    +		spliceFunc = "mix("+input+", "+assignVar+", normalize("+assignVar+"));";
    +		break;
    +	
    +	case 'X': // mix
    +		spliceFunc = "mix("+input+", vec4(1, 1, 1, 1) / "+assignVar+", normalize("+assignVar+"));";
    +		break;
    +
    +	case 'y': // mul
    +		spliceFunc = input + " * 1.111;";
    +		break;
    +
    +	case 'Y': // mul
    +		spliceFunc = input + " * 0.666;";
    +		break;
    +
    +	case 'z': // mul
    +		spliceFunc = input + " * vec4(-1, -1, -1, -1);";
    +		break;
    +
    +	case 'Z': // mul
    +		spliceFunc = input+";\n    "+assignVar+" = "+input+" * vec4(-1, -1, -1, -1);";
    +		break;
    +
    +	default:
    +		// spliceFunc = "atan("+input+", "+(character.charCodeAt(0) / 127)+");";
    +		spliceFunc = input+" + "+ (character.charCodeAt(0) / 127 * 0.2 - 0.1)+";";
    +		break;
    +	}
    +
    +	// return "    "+input+" = "+spliceFunc+"\n     "+input+" = mod("+input+", vec4(1, 1, 1, 1));";
    +	return "    "+input+" = "+spliceFunc;
    +}
    +
    +CloudChamber.shaderTemplate = function(vert, frag)
    +{
    +	return {
    +		uniforms: { 
    +			"tDiffuse": { type: "t", value: null }
    +		},
    +
    +		vertexShader: [
    +			"varying vec4 a_variable;",
    +			"varying vec2 vUv;",
    +			"vec4 newPosition;",
    +			"void main()",
    +			"{",
    +			"    vUv = uv;",
    +			"    a_variable = vec4(position, 1);",
    +			"    newPosition = vec4(position, 1);",
    +			// vert,
    +			"    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1);",
    +			"    // gl_PointSize = min(dot(newPosition.xyz, position), 1);",
    +			"}"
    +		].join("\n"),
    +
    +		fragmentShader: [
    +			"uniform sampler2D tDiffuse;",
    +			"varying vec2 vUv;",
    +			"varying vec4 a_variable;",
    +			"vec4 frag_variable;",
    +			"vec4 fragColor;",
    +			"void main()",
    +			"{",
    +			"    frag_variable = a_variable;",
    +			"    fragColor = texture2D(tDiffuse, vUv);",
    +			frag,
    +			"    gl_FragColor = vec4(1, 1, 1, 1) - mod(fragColor + texture2DProj(tDiffuse, normalize(fragColor) - (vec4(vUv, vUv))) - (gl_FragColor), gl_FragColor);",
    +			"    // gl_FragColor = max(gl_FragColor, gl_FragCoord * 0.0001);",
    +			"}"
    +		].join("\n")
    +	};
    +}
    +
    +CloudChamber.parsesplice = function(lang)
    +{
    +	var numFuncsPerShader = Math.floor(lang.length / 2);
    +	var vertArray = new Array(numFuncsPerShader);
    +	var fragArray = new Array(numFuncsPerShader);
    +	var vertVariable = "newPosition";
    +	var fragVariable = "fragColor";
    +
    +	for(var i = 0; i < numFuncsPerShader; ++i)
    +	{
    +		vertArray.push(CloudChamber.parseSpliceChar(lang[i], vertVariable));
    +	}
    +
    +	for(var i = 0; i < numFuncsPerShader; ++i)
    +	{
    +		fragArray.push(CloudChamber.parseSpliceChar(lang[i + numFuncsPerShader], fragVariable));
    +	}
    +
    +	return CloudChamber.shaderTemplate(vertArray.join("\n"), fragArray.join("\n"));
    +}
    +
    +function spliceShader(lang)
    +{
    +	var shader = CloudChamber.parsesplice(lang);
    +	CloudChamber.print(shader.vertexShader);
    +	CloudChamber.print("\n\n\n"+shader.fragmentShader);
    +
    +	var pass = new THREE.ShaderPass(shader);
    +	pass.renderToScreen = true;
    +	
    +	for(var i = 0; i < CloudChamber.numShaders; ++i)
    +	{
    +		CloudChamber.composer.passes.pop();
    +	}
    +
    +	CloudChamber.numShaders = 1;
    +	CloudChamber.composer.addPass(pass);
    +	return Lich.VM.Void;
    +}
    +
    +_createPrimitive("spliceShader", spliceShader);
    +
    +function randomString(length) // length
    +{
    +	var randString = new Array("");
    +
    +	for(var i = 0; i < length; ++i)
    +	{
    +		randString.push(String.fromCharCode(Math.random() * 127));
    +	}
    +
    +	return randString.join("");
    +}
    +
    +_createPrimitive("randomString", randomString);
    +
    +// NOTE: CACHE SHADERS UP TO 20 OF THEM, THEN START POPPING 
    +
    +CloudChamber.decimalToHexString = function(number)
    +{
    +    if (number < 0)
    +    {
    +    	number = 0xFFFFFFFF + number + 1;
    +    }
    +
    +    return number.toString(16).toUpperCase();
    +}
    +
    +CloudChamber.packRGB = function(r, g, b)
    +{
    +	return ((1 << 24) + (Math.floor(r) << 16) + (Math.floor(g) << 8) + Math.floor(b));
    +}
    +
    +CloudChamber.rgbToHex = function(r, g, b) {
    +    return "0x" + CloudChamber.packRGB(r, g, b).toString(16).slice(1);
    +}
    +
    +CloudChamber.arrayToVector = function(array)
    +{
    +	return {
    +		x: array[0],
    +		y: array[1],
    +		z: array[2]	
    +	}
    +}
    +
    +CloudChamber.arrayToColor = function(array)
    +{
    +	return CloudChamber.packRGB(array[0], array[1], array[2]);
    +}
    +
    +function setBackground(r, g, b)
    +{
    +	CloudChamber.renderer.setClearColorHex(CloudChamber.packRGB(r,g,b), 1);
    +	return CloudChamber.packRGB(r,g,b);
    +}
    +
    +_createPrimitive("setBackground", setBackground);
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/Compiler_Compiler.js.html b/Docs/files/Compiler_Compiler.js.html new file mode 100644 index 0000000..f727059 --- /dev/null +++ b/Docs/files/Compiler_Compiler.js.html @@ -0,0 +1,2229 @@ + + + + + Compiler/Compiler.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: Compiler/Compiler.js

    + +
    +
    +/* 
    +    Lich.js - JavaScript audio/visual live coding language
    +    Copyright (C) 2012 Chad McKinney
    +
    +	http://chadmckinneyaudio.com/
    +	seppukuzombie@gmail.com
    +
    +	LICENSE
    +	=======
    +
    +	Licensed under the Simplified BSD License:
    +
    +	Redistribution and use in source and binary forms, with or without
    +	modification, are permitted provided that the following conditions are met: 
    +
    +	1. Redistributions of source code must retain the above copyright notice, this
    +	   list of conditions and the following disclaimer. 
    +	2. Redistributions in binary form must reproduce the above copyright notice,
    +	   this list of conditions and the following disclaimer in the documentation
    +	   and/or other materials provided with the distribution. 
    +
    +	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    +	ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    +	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    +	DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
    +	ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    +	(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    +	LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    +	ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    +	(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    +	SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +
    +	The views and conclusions contained in the software and documentation are those
    +	of the authors and should not be interpreted as representing official policies, 
    +	either expressed or implied, of the FreeBSD Project.
    +*/
    +
    +Function.prototype.curriedArgs = [];
    +
    +// Function currying that allows for currying to be used multiple times.
    +Function.prototype.curry = function curry() 
    +{
    +	if(typeof this.curriedFunc !== "undefined")
    +	{
    +		if(this.curriedFunc.length <= (this.curriedArgs.length + arguments.length))
    +	    {
    +	    	return this.curriedFunc.apply(this.curriedFunc, this.curriedArgs.concat(Array.prototype.slice.call(arguments)));
    +	    }
    +
    +	    else
    +	    {
    +	    	return this.curriedFunc.curry.apply(this.curriedFunc, this.curriedArgs.concat(Array.prototype.slice.call(arguments)));
    +	    }
    +	}
    +
    +	else
    +	{
    +		if(this.length <= arguments.length)
    +		{
    +			return this.apply(this, arguments);
    +		}
    +
    +		var fn = this;
    +	    var args = Array.prototype.slice.call(arguments);
    +	    var newFunc = function() {
    +
    +	    	if(fn.length <= (args.length + arguments.length))
    +	    	{
    +	    		return fn.apply(fn, args.concat(Array.prototype.slice.call(arguments)));
    +	    	}
    +
    +	    	else
    +	    	{
    +	    		return fn.curry.apply(fn, args.concat(Array.prototype.slice.call(arguments)));
    +	    	}
    +	    };
    +
    +	    newFunc.curriedFunc = fn;
    +	    newFunc.curriedArgs = args;
    +	    return newFunc;
    +	}
    +};
    +
    +// Thanks to: https://gist.github.com/Gozala/1697037
    +function tco(f) {
    +  /**
    +  Takes `f` function and returns wrapper in return, that may be
    +  used for tail recursive algorithms. Note that returned funciton
    +  is not side effect free and should not be called from anywhere
    +  else during tail recursion. In other words if
    +  `var f = tco(function foo() { ... bar() ... })`, then `bar`
    +  should never call `f`. It is ok though for `bar` to call `tco(foo)`
    +  instead.
    +
    +  ## Examples
    +  var sum = tco(function(x, y) {
    +    return y > 0 ? sum(x + 1, y - 1) :
    +           y < 0 ? sum(x - 1, y + 1) :
    +           x
    +  })
    +  sum(20, 100000) // => 100020
    +  **/
    +
    +  var value, active = false, accumulated = []
    +  return function accumulator() {
    +    // Every time accumulator is called, given set of parameters
    +    // are accumulated.
    +    accumulated.push(arguments)
    +    // If accumulator is inactive (is not in the process of
    +    // tail recursion) activate and start accumulating parameters.
    +    if (!active) {
    +      active = true
    +      // If wrapped `f` performs tail call, then new set of parameters will
    +      // be accumulated causing new iteration in the loop. If `f` does not
    +      // performs tail call then accumulation is finished and `value` will
    +      // be returned. 
    +      while (accumulated.length) value = f.apply(this, accumulated.shift())
    +      active = false
    +      return value
    +    }
    +  }
    +}
    +
    +function forEachCpsTco(arr, visitor, done) // cps style array iteration via recursion
    +{ 
    +    trampoline(forEachCpsRecTco(0, arr, visitor, done));
    +}
    +
    +function forEachCpsRecTco(index, arr, visitor, done) 
    +{
    +    if (index < arr.length) 
    +    {
    +    	var retArr;
    +        visitor(arr[index], index, function () 
    +        {
    +            retArr = [forEachCpsRecTco,[index+1, arr, visitor, done]];
    +        });
    +
    +        return retArr;
    +    } 
    +
    +    else 
    +    {
    +        return [done];
    +    }
    +}
    +
    +function forEachCps(arr, visitor, done) // cps style array iteration via recursion
    +{ 
    +    forEachCpsRec(0, arr, visitor, done)
    +}
    +
    +function forEachCpsRec(index, arr, visitor, done) 
    +{
    +    if (index < arr.length) 
    +    {
    +        visitor(arr[index], index, function () 
    +        {
    +            forEachCpsRec(index+1, arr, visitor, done);
    +        });
    +    } 
    +
    +    else 
    +    {
    +        done();
    +    }
    +}
    +
    +function forEachDictCps(arr, visitor, done) // cps style array iteration via recursion
    +{ 
    +	var keys = Object.keys(arr).filter(function(element) { return element != "_lichType"});
    +    forEachDictCpsRec(0, keys, visitor, done)
    +}
    +
    +function forEachDictCpsRec(index, arr, visitor, done) 
    +{
    +    if (index < arr.length) 
    +    {
    +        visitor(arr[index], index, function () 
    +        {
    +            forEachDictCpsRec(index+1, arr, visitor, done);
    +        });
    +    } 
    +
    +    else 
    +    {
    +        done();
    +    }
    +}
    +
    +function forEachDictReverseCps(arr, visitor, done) // cps style array iteration via recursion
    +{ 
    +	var keys = Object.keys(arr).filter(function(element) { return element != "_lichType"});
    +    forEachDictReverseCpsRec(keys.length - 1, keys, visitor, done)
    +}
    +
    +function forEachDictReverseCpsRec(index, arr, visitor, done) 
    +{
    +    if (index >= 0) 
    +    {
    +        visitor(arr[index], index, function () 
    +        {
    +            forEachDictReverseCpsRec(index-1, arr, visitor, done);
    +        });
    +    } 
    +
    +    else 
    +    {
    +        done();
    +    }
    +}
    +
    +function forEachReverseCps(arr, visitor, done) // cps style array iteration via recursion
    +{ 
    +    forEachReverseCpsRec(arr.length - 1, arr, visitor, done)
    +}
    +
    +function forEachReverseCpsRec(index, arr, visitor, done) 
    +{
    +    if(index >= 0) 
    +    {
    +        visitor(arr[index], index, function () 
    +        {
    +            forEachReverseCpsRec(index - 1, arr, visitor, done);
    +        });
    +    } 
    +
    +    else 
    +    {
    +        done();
    +    }
    +}
    +
    +function forEachWithBreakCps(arr, visitor, done) // cps style array iteration via recursion
    +{ 
    +    forEachCpsWithBreakRec(0, arr, visitor, done)
    +}
    +
    +function forEachCpsWithBreakRec(index, arr, visitor, done)
    +{
    +    if (index < arr.length) 
    +    {
    +        visitor(arr[index], index, function(doBreak) // Extra doBreak argument for conditional breaking
    +        {
    +        	if(doBreak)
    +            	done();
    +        	else
    +            	forEachCpsWithBreakRec(index+1, arr, visitor, done);
    +        });
    +    }
    +
    +    else 
    +    {
    +        done();
    +    }
    +}
    +
    +function forEachPairsCps(arr, visitor, done) // cps style array iteration via recursion
    +{ 
    +    forEachPairsCpsRec(0, arr, visitor, done)
    +}
    +
    +function forEachPairsCpsRec(index, arr, visitor, done) // increment by pairs
    +{
    +    if (index < arr.length) 
    +    {
    +        visitor(arr[index], index, function () 
    +        {
    +            forEachPairsCpsRec(index+2, arr, visitor, done);
    +        });
    +    } 
    +
    +    else 
    +    {
    +        done();
    +    }
    +}
    +
    +function mapCps(arr, func, done) 
    +{
    +    mapCpsRec(0, [], arr, func, done)
    +}
    +
    +function mapCpsRec(index, outArr, inArr, func, done) 
    +{
    +    if (index < inArr.length) 
    +    {
    +        func(inArr[index], index, function (result) 
    +        {
    +            mapCpsRec(index+1, outArr.concat(result),
    +                      inArr, func, done);
    +        });
    +    } 
    +
    +    else {
    +        done(outArr);
    +    }
    +}
    +
    +function mapDictCps(arr, func, done) 
    +{
    +	var keys = Object.keys(arr).filter(function(element) { return element != "_lichType"});
    +    mapDictCpsRec(0, {}, keys, func, done)
    +}
    +
    +function mapDictCpsRec(index, outArr, inArr, func, done) 
    +{
    +    if (index < inArr.length) 
    +    {
    +        func(inArr[index], index, function (result) 
    +        {
    +        	outArr[inArr[index]] = result;
    +            mapDictCpsRec(index+1, outArr, inArr, func, done);
    +        });
    +    } 
    +
    +    else {
    +        done(outArr);
    +    }
    +}
    +
    +
    +function trampoline(result) 
    +{
    +    while(Array.isArray(result)) 
    +    {
    +        var func = result[0];
    +        var args = (result.length >= 2 ? result[1] : []);
    +        result = func.apply(null, args);
    +    }
    +}
    +
    +Lich.verifyDef = function(name)
    +{
    +	if(Lich.parseType === "library")
    +	{
    +		if(Lich.libraryNamespace.indexOf(name) != -1)
    +			throw new Error("Duplicate definition for " + name);
    +		else
    +			Lich.libraryNamespace.push(name);
    +	}
    +
    +	if(Lich.VM.reserved.hasOwnProperty(name))
    +		throw new Error("Duplicate definition for reserved variable " + name + ". Use a different name.");
    +}
    +
    +// The Lich.js compiler traverse the abstract syntax tree returned by the parser and calls native JavaScript
    +Lich.compileAST = function(ast)
    +{
    +	if(ast instanceof Array)
    +	{
    +		var res = new Array();
    +		for(var i = 0; i < ast.length; ++i)
    +		{	
    +			res.push(Lich.compileAST(ast[i]));
    +		}
    +
    +		return res;
    +	}
    +
    +	else if(ast instanceof Object)
    +	{
    +		switch(ast.astType)
    +		{
    +			case "primitive":
    +				return ast;
    +
    +			case "percStream":
    +				return Lich.compilePercStream(ast);
    +
    +			case "percList":
    +				return Lich.compilePercList(ast);
    +
    +			case "percMods":
    +				return Lich.compilePercMods(ast);
    +
    +			case "soloStream":
    +				return Lich.compileSoloStream(ast);
    +
    +			case "soloList":
    +				return Lich.compileSoloList(ast);
    +
    +			case "soloMods":
    +				return Lich.compileSoloMods(ast);
    +
    +			case "decl-fun":
    +				return Lich.compileDeclFun(ast);
    +
    +			case "local-decl-fun":
    +				return Lich.compileLocalDeclFun(ast);
    +				
    +			case "fun-where":
    +				return Lich.compileFunWhere(ast);
    +				
    +			case "ite":
    +				return Lich.compileIte(ast);
    +				
    +			case "application":
    +				return Lich.compileApplication(ast);
    +				
    +			case "function-application-op":
    +				return Lich.compileFunctionApplicationOp(ast);
    +
    +			case "receive":
    +				return Lich.compileReceive(ast);
    +				
    +			case "function-composition":
    +				return Lich.compileFunctionComposition(ast);
    +
    +			case "function-stream":
    +				return Lich.compileFunctionStream(ast);
    +
    +			case "lambda":
    +				return Lich.compileLambda(ast);
    +				
    +			case "let":
    +				return Lich.compileLet(ast);
    +				
    +			case "let-one": // ghci style let expression for global definitions
    +				return Lich.compileLetOne(ast);
    +				
    +			case "listexp":
    +				return Lich.compileListExp(ast);
    +				
    +			case "qop":
    +				return Lich.compileQop(ast);
    +				
    +			case "conpat":
    +				return Lich.compileConPat(ast);
    +				
    +			case "wildcard":
    +				return { _lichType: WILDCARD };
    +				
    +			case "integer-lit":
    +			case "char-lit":
    +			case "number":
    +			case "float-lit":
    +			case "boolean-lit":
    +			case "string-lit":
    +				return ast.value;
    +				
    +			case "varname":
    +				return Lich.compileVarName(ast);
    +				
    +			case "dacon":
    +				return Lich.compileDacon(ast);
    +				
    +			case "binop-exp":
    +				return Lich.compileBinOpExp(ast);
    +
    +			case "curried-binop-exp":
    +				return Lich.compileCurriedBinOpExp(ast);
    +
    +			case "left-curried-binop-exp":
    +				return Lich.compileLeftCurriedBinOpExp(ast);
    +
    +			case "right-curried-binop-exp":
    +				return Lich.compileRightCurriedBinOpExp(ast);
    +				
    +			case "negate":
    +				return Lich.compileNegate(ast);
    +				
    +			case "listrange":
    +				return Lich.compileListRange(ast);
    +				
    +			case "dictionary":
    +				return Lich.compileDictionary(ast);
    +				
    +			case "case":
    +				return Lich.compileCase(ast);
    +				
    +			case "Nothing":
    +				return "Lich.VM.Nothing";
    +				
    +			case "list-comprehension":
    +				return Lich.compileListComprehension(ast);
    +				
    +			case "module":
    +				return Lich.compileModule(ast);
    +				
    +			case "body":
    +				return Lich.compileBody(ast);
    +				
    +			case "data-decl":
    +				return Lich.compileDataDecl(ast);
    +				
    +			case "data-inst":
    +				return Lich.compileDataInst(ast);
    +				
    +			case "data-lookup":
    +				return Lich.compileDataLookup(ast);
    +				
    +			case "data-update":
    +				return Lich.compileDataUpdate(ast);
    +				
    +			case "data-enum":
    +				return Lich.compileDataEnum(ast);
    +				
    +			case "data-match":
    +				return Lich.compileDataMatch(ast);
    +				
    +			case "topdecl-decl":
    +				return Lich.compileTopdeclDecl(ast);
    +
    +			case "top-exp":
    +				return Lich.compileTopExp(ast);
    +
    +			case "do-exp":
    +				return Lich.compileDoExp(ast);
    +
    +			case "guard-fun":
    +				return Lich.compileGuardExp(ast);
    +
    +			case "synthdef":
    +				return Lich.compileSynthDef(ast);
    +
    +			case "impjs":
    +				return Lich.compileImportJS(ast);
    +
    +			default:
    +				return Lich.unsupportedSemantics(ast);
    +		}
    +	}
    +
    +	else if(typeof ast === "undefined")
    +	{
    +		return Lich.VM.Nothing;
    +	}
    +
    +	else
    +	{
    +		throw new Error("Unknown AST Type: " + (typeof ast));
    +	}
    +}
    +
    +Lich.unsupportedSemantics = function(ast)
    +{
    +	throw new Error("Unsupported semantics for " +ast+" with type "+ ast.astType);
    +}
    +
    +Lich.getType = function(object)
    +{
    +	if(object == null)
    +		return NOTHING;
    +
    +	var type = typeof object;
    +
    +	if(object instanceof Array)
    +		return LIST;
    +	else if(type === "undefined")
    +		return NOTHING;
    +	else if(type === "number")
    +		return NUMBER;
    +	else if(type === "string")
    +		return STRING;
    +	else if(type === "function")
    +		return CLOSURE;
    +	else if(type === "boolean")
    +		return BOOLEAN;
    +	else if(typeof object._lichType !== "undefined")
    +		return object._lichType;
    +	else
    +		throw new Error("uknown object: " + object);
    +	
    +}
    +
    +Lich.dataMatch = function(object, pat)
    +{
    +	if(Lich.getType(object) != DATA)
    +	{
    +		return false;
    +	}	
    +
    +	else
    +	{
    +		if(object._datatype == pat)
    +			return true;
    +		else
    +			return false;
    +	}
    +}
    +
    +Lich.matchError = function(object, pat)
    +{
    +	throw new Error("Unmatched pattern: " + object);
    +}
    +
    +Lich.listMatchError = function(i)
    +{
    +	throw new Error("Function argument does not match list pattern for argument number "+i);
    +}
    +
    +Lich.lambdaPatternPrint = function(numArgs)
    +{
    +	var lambdaString = "(\\\\";
    +	for(var i = 0; i < numArgs; ++i)
    +	{
    +		lambdaString = lambdaString + "_ ";
    +	}
    +
    +	lambdaString = lambdaString + "->)";
    +	return lambdaString;
    +}
    +
    +Lich.numLambdaArgs = function(object)
    +{
    +	if(typeof object.curriedFunc !== "undefined")
    +	{
    +		return object.curriedFunc.length - object.curriedArgs.length;
    +	}
    +
    +	else
    +	{
    +		return object.length;
    +	}
    +}
    +
    +Lich.generateMatchFunc = function(object, pat, i, throwCode)
    +{
    +	var matchCode = "";
    +	if(pat.astType == "at-match")
    +	{
    +		pat = pat.pat;
    +	}
    +
    +	switch(pat.astType)
    +	{
    +	case "varname":
    +	case "wildcard":
    +		if(throwCode)
    +			return matchCode;
    +		else
    +			return matchCode + "true";
    +
    +	case "Nothing":
    +		if(throwCode)
    +		{
    +			return (matchCode + "if(Lich.getType("+object+") != NOTHING){throw new Error(\"Function argument does not match Nothing pattern for "
    +				+"argument number \"+"+i+")};");
    +		}
    +
    +		else
    +		{
    +			return matchCode + "Lich.getType("+object+") == NOTHING";
    +		}
    +
    +	case "data-match":
    +
    +		if(!throwCode)
    +			matchCode += "(function(){";
    +
    +		matchCode = matchCode + "if(Lich.dataMatch("+object+", \""+pat.id+"\")){";
    +
    +		for(var j = 0; j < pat.members.length; ++j)
    +		{
    +			matchCode = matchCode + pat.members[j] + " = " + object + "[" + object + "._argNames[" + j + "]];";
    +		}
    +
    +		if(throwCode)
    +			matchCode = matchCode + "}else{throw new Error(\"Function argument does not match "+pat.id+" pattern for argument number \"+"+i+")};";
    +		else
    +			matchCode = matchCode + ";return true}else{return false}";
    +		
    +		if(!throwCode)
    +			matchCode += "})()";
    +
    +		return matchCode;
    +
    +	case "literal-match":
    +		var value = pat.value.value;
    +		if(typeof value === "string")
    +			value = value.replace(/\"/g,"");
    +
    +		if(throwCode)
    +		{
    +			return (matchCode+"if("+object+" !== "+pat.value.value+"){Lich.VM.Print("+object+");throw new Error(\"Function argument does not match "
    +				+value+" pattern for argument number \"+"+i+")};");
    +		}
    +
    +		else
    +		{
    +			return matchCode + object+" === "+pat.value.value;
    +		}
    +
    +	case "head-tail-match":
    +
    +		if(!throwCode)
    +			matchCode += "(function(){";
    +
    +		matchCode = matchCode + "if(Lich.getType("+object+") == LIST){if("+object+".length < 1){";
    +
    +		if(throwCode)
    +		{
    +			matchCode = matchCode +"throw new Error(\"Function argument does not match ("+pat.head+":"+pat.tail+") pattern for argument number \"+"+i
    +				+"+\". Matching lists much have a length greater than 0.\")}else{";
    +		}
    +
    +		else
    +		{
    +			matchCode = matchCode + "return false}else{";
    +		}
    +
    +		if(pat.head.astType != "wildcard")
    +		{
    +			matchCode = matchCode + pat.head + " = " + object + ".length >= 1 ? " + object + "[0] : Lich.VM.Nothing;";
    +		}
    +
    +		if(pat.tail.astType != "wildcard")
    +		{
    +			matchCode = matchCode + pat.tail + " = " + object + ".slice(1, " + object + ".length);";
    +		}
    +		
    +		if(throwCode)
    +		{
    +			matchCode = matchCode + "}}else{throw new Error(\"Function argument does not match ("+pat.head+":"+pat.tail+") pattern for argument number \"+"
    +				+i+"+\". Supplied argument is not a list.\")};";
    +		}
    +
    +		else
    +		{
    +			matchCode = matchCode + ";return true}}else{return false};";
    +		}
    +		
    +		if(!throwCode)
    +			matchCode += "})()";
    +		
    +		return matchCode;
    +
    +	case "list-match":
    +
    +		if(!throwCode)
    +			matchCode += "(function(){";
    +
    +		matchCode = matchCode + "if(Lich.getType("+object+") == LIST){if("+object+".length == "+pat.list.length+"){";
    +				
    +		for(var j = 0; j < pat.list.length; ++j)
    +		{
    +			if(pat.list[j].astType !== "wildcard")
    +			{
    +				if(pat.list[j].astType == "varname")
    +				{
    +					matchCode = matchCode + pat.list[j].id + " = " + object + "[" + j + "];";
    +				}
    +
    +				else
    +				{
    +					var tempCode = Lich.generateMatchFunc(object+"["+j+"]", pat.list[j], i, throwCode);
    +					if(throwCode)
    +						matchCode = matchCode + tempCode;
    +					else
    +						matchCode = matchCode + "var _bool=(function(){" + tempCode + "})();if(!(_bool)){return false};";
    +				}
    +			}
    +		}
    +
    +		if(throwCode)
    +		{
    +			matchCode = matchCode + "}else{Lich.listMatchError("+i+")}}else{Lich.listMatchError("+i+")};";	
    +		}
    +
    +		else
    +		{
    +			matchCode = matchCode + ";return true}else{return false}}else{return false};";	
    +		}
    +		
    +		if(!throwCode)
    +			matchCode += "})()";
    +		
    +		return matchCode;
    +
    +	case "lambda-pat":
    +
    +		if(throwCode)
    +		{
    +			matchCode = matchCode + "if((typeof "+ object + " !== \"function\")||(Lich.numLambdaArgs("+object+") != " + pat.numArgs+")){"
    +				+"throw new Error(\"Function argument does not match "+Lich.lambdaPatternPrint(pat.numArgs)+" pattern for argument number \"+"+i+")};";	
    +			return matchCode;
    +		}
    +
    +		else
    +		{
    +			matchCode = matchCode + "(typeof "+ object + " === \"function\")&&(Lich.numLambdaArgs("+object+") == " + pat.numArgs+")";	
    +		}
    +		
    +	default:
    +		return matchCode;
    +	}
    +}
    +
    +// Generates a list of argument names and optional variable names from a pattern. 
    +// Used to create local scope variables before generating the actual matching code.
    +// Every match must generate an argument name for the pattern, and can optionally create extra variables as needed.
    +// The i argument is used to prevent namespace clashes in name generation. All non-user generated names must start with an underscore
    +Lich.generateOneArgNameAndMatchVars = function(pat, i)
    +{
    +	var argName = "_";
    +	var matchVars = "";
    +	if(pat.astType == "at-match")
    +	{
    +		argName = pat.id;
    +		var arr = Lich.generateOneArgNameAndMatchVars(pat.pat, i);
    +		var tempName = arr[0];
    +		var tempVars = arr[1];
    +		matchVars = matchVars + tempVars;
    +		return [argName, matchVars];
    +	}
    +
    +	else
    +	{
    +		switch(pat.astType)
    +		{
    +		case "varname":
    +		case "wildcard":
    +			argName = pat.id;
    +			return [argName, matchVars];
    +
    +		case "Nothing":
    +			argName = "_nothing"+i;
    +			return [argName, matchVars];
    +
    +		case "data-match":
    +			argName = "_"+pat.id+i;
    +			for(var i = 0; i < pat.members.length; ++i)
    +			{	
    +				matchVars = matchVars + "var "+pat.members[i]+";";
    +			}
    +			return [argName, matchVars];
    +
    +		case "literal-match":
    +			argName = "_"+pat.astType.replace(/-/g,"_")+i;
    +			return [argName, matchVars];
    +
    +		case "head-tail-match":
    +			argName = "_headTail"+i;
    +			if(pat.head.astType != "wildcard")
    +			{
    +				matchVars = matchVars + "var "+pat.head+";";	
    +			}
    +			
    +			if(pat.tail.astType != "wildcard")
    +			{
    +				matchVars = matchVars + "var "+pat.tail+";";	
    +			}
    +			return [argName, matchVars];
    +
    +		case "list-match":
    +			argName = "_list"+i;
    +			for(var j = 0; j < pat.list.length; ++j)
    +			{
    +				var elem = pat.list[j];
    +				if(elem.astType !== "wildcard")
    +				{
    +					if(elem.astType == "varname")
    +					{
    +						matchVars = matchVars + "var "+elem.id+";";
    +					}
    +	
    +					else
    +					{
    +						matchVars += Lich.generateOneArgNameAndMatchVars(elem, i)[1];
    +					}
    +				}
    +			}
    +
    +			return [argName, matchVars];
    +
    +		case "lambda-pat":
    +			argName = "_lambda"+i;
    +			return [argName,matchVars];
    +
    +		default:
    +			return [argName,matchVars];
    +		}
    +	}
    +}
    +
    +Lich.generateArgNamesAndMatchVars = function(args)
    +{
    +	var argNames = new Array();
    +	var matchVars = "";
    +	
    +	for(var i = 0; i < args.length; ++i)
    +	{
    +		var arr = Lich.generateOneArgNameAndMatchVars(args[i], i);
    +		argNames.push(arr[0]);
    +		matchVars += arr[1];
    +	}
    +
    +	return [argNames, matchVars];
    +}
    +
    +Lich.checkFunctionArgMatches = function(argNames, pats)
    +{
    +	var matchCode = "";
    +	for(var i = 0; i < argNames.length; ++i)
    +	{
    +		matchCode += Lich.generateMatchFunc(argNames[i], pats[i], i, true);
    +	}
    +
    +	return matchCode;
    +
    +}
    +
    +Lich.compileModule = function(ast)
    +{
    +	Lich.post("Compiling module: " + ast.modid);
    +	var res = Lich.compileAST(ast.body);
    +	Lich.post("Done compiling module: " + ast.modid);
    +	return res;
    +}
    +
    +Lich.compileBody = function(ast)
    +{
    +	var body = "";
    +	for(var i = 0; i < ast.topdecls.length; ++i)
    +	{
    +		body += Lich.compileAST(ast.topdecls[i]) + ";";
    +	}
    +
    +	return body;
    +}
    +
    +Lich.compileTopdeclDecl = function(ast)
    +{
    +	return Lich.compileAST(ast.decl);
    +}
    +
    +Lich.compileTopdeclData = function(ast)
    +{
    +	return Lich.unsupportedSemantics(ast);
    +}
    +
    +Lich.compileLocalDeclFun = function(ast)
    +{
    +	if(ast.args.length == 0)
    +	{
    +		return "var "+ast.ident.id + "=" + Lich.compileAST(ast.rhs);
    +	}
    +
    +	else
    +	{
    +		
    +		var localArgNames = [];
    +
    +		for(var i = 0; i < ast.args.length; ++i)
    +		{
    +			if(ast.args[i].astType == "varname")
    +			{
    +				if(localArgNames.indexOf(ast.args[i].id) != -1)
    +					throw new Error("Duplicate definition for argument: " + ast.args[i].id + " in function " + ast.ident.id);
    +				else
    +					localArgNames.push(ast.args[i].id);
    +			}
    +		}
    +
    +		var rhs = Lich.compileAST(ast.rhs);
    +		var arr = Lich.generateArgNamesAndMatchVars(ast.args);
    +		var argNames = arr[0];
    +		var matchVars = arr[1];
    +		var matchCode = Lich.checkFunctionArgMatches(argNames, ast.args);
    +		return "var " + ast.ident.id + "=function (" + argNames.join(",") + "){"+matchVars+matchCode+"return "+rhs+"}";
    +	}
    +}
    +
    +Lich.printAll = function(arr)
    +{
    +	for(var i = 0; i < arr.length; ++i)
    +	{
    +		Lich.post("printAll: " + Lich.VM.PrettyPrint(arr[i]));
    +	}
    +}
    +
    +Lich.compileDeclFun = function(ast)
    +{
    +	Lich.verifyDef(ast.ident.id);
    +
    +	if(ast.args.length == 0 && typeof ast.noCollapse == "undefined")
    +	{
    +		return  ast.ident.id + "="+Lich.compileAST(ast.rhs)+";";
    +	}
    +
    +	else
    +	{
    +		var localArgNames = [];
    +
    +		for(var i = 0; i < ast.args.length; ++i)
    +		{
    +			if(ast.args[i].astType == "varname")
    +			{
    +				if(localArgNames.indexOf(ast.args[i].id) != -1)
    +					throw new Error("Duplicate definition for argument: " + ast.args[i].id + " in function " + ast.ident.id);
    +				else
    +					localArgNames.push(ast.args[i].id);
    +			}
    +		}
    +
    +		var rhs = Lich.compileAST(ast.rhs);
    +		var arr = Lich.generateArgNamesAndMatchVars(ast.args);
    +		var argNames = arr[0];
    +		var matchVars = arr[1];
    +		var matchCode = Lich.checkFunctionArgMatches(argNames, ast.args);
    +		return ast.ident.id+"=function "+ast.ident.id+"(" + argNames.join(",") + "){"+matchVars+matchCode+"return "+rhs+"}";
    +	}
    +}
    +
    +Lich.compileFunWhere = function(ast)
    +{
    +	var declNames = [];
    +
    +	for(var i = 0; i < ast.decls.length; ++i)
    +	{
    +		if(declNames.indexOf(ast.decls[i].ident.id) != -1)
    +			throw new Error("Duplicate definition for local declaration: " + ast.decls[i].ident.id);
    +		else
    +			declNames.push(ast.decls[i].ident.id);
    +	}
    +
    +	var decls = [];
    +	for(var i = 0; i < ast.decls.length; ++i)
    +	{
    +		var elem = ast.decls[i];
    +
    +		if(elem.astType == "decl-fun")
    +			elem.astType = "local-decl-fun";
    +		else if(elem.astType == "guard-fun")
    +			elem.local = true;
    +
    +		decls.push(Lich.compileAST(elem));
    +	}
    +
    +	var exp = Lich.compileAST(ast.exp);
    +	return "(function(){"+decls.join(";")+";return "+exp+"})();";
    +}
    +
    +Lich.compileConstr = function(ast)
    +{
    +	Lich.unsupportedSemantics(ast);
    +}
    +
    +Lich.compileIte = function(ast)
    +{
    +	var expRes1 = Lich.compileAST(ast.e1);
    +	var expRes2 = Lich.compileAST(ast.e2);
    +	var expRes3 = Lich.compileAST(ast.e3);
    +	return "(function(){if("+expRes1+"){return "+expRes2+"}else{return "+expRes3+"}})()";
    +}
    +
    +Lich.application = function(func, args)
    +{
    +	if(typeof func !=="function")
    +		throw new Error("Expression " + Lich.VM.PrettyPrint(func) + " cannot be used as a function for function application.");
    +
    +	return func.curry.apply(func, args);
    +}
    +
    +Lich.compileApplication = function(ast)
    +{
    +	var exps = [];
    +	for(var i = 0; i < ast.exps.length; ++i)
    +	{
    +		exps.push(Lich.compileAST(ast.exps[i]));
    +	}
    +
    +	return "Lich.application(" + exps[0]+",["+exps.slice(1, exps.length).join(",")+"])";
    +}
    +
    +Lich.compileFunctionApplicationOp = function(ast)
    +{
    +	return "Lich.application("+Lich.compileAST(ast.lhs)+",["+Lich.compileAST(ast.rhs)+"])";
    +}
    +
    +Lich.compileFunctionComposition = function(ast)
    +{
    +	var funcs = [];
    +	for(var i = 0; i < ast.exps.length; ++i)
    +	{
    +		funcs.push(Lich.compileAST(ast.exps[i]));
    +	}
    +
    +	return "function(a){var funcs=["+funcs.join(",")+"];var res = a;for(var i = funcs.length - 1; i >= 0; --i){res = funcs[i](res);};return res;}";
    +}
    +
    +Lich.compileFunctionStream = function(ast)
    +{
    +	var funcs = "";
    +	var end = "";
    +	for(var i = ast.exps.length - 1; i >= 0; --i)
    +	{
    +		if(i > 0)
    +			funcs += "Lich.application(";
    +
    +		funcs += "("+Lich.compileAST(ast.exps[i])+")";
    +
    +		if(i > 0)
    +		{
    +			funcs += ",[";
    +			end += "])";
    +		}
    +	}
    +
    +	return funcs + end;
    +}
    +
    +Lich.compileLambda = function(ast)
    +{
    +	var rhs = Lich.compileAST(ast.rhs);
    +	var arr = Lich.generateArgNamesAndMatchVars(ast.args);
    +	var argNames = arr[0];
    +	var matchVars = arr[1];
    +	var matchCode = Lich.checkFunctionArgMatches(argNames, ast.args);
    +	return "(function (" + argNames.join(",") + "){"+matchVars+matchCode+"return "+rhs+"})"; 			
    +}
    +
    +Lich.compileLet = function(ast)
    +{
    +	var declNames = [];
    +
    +	for(var i = 0; i < ast.decls.length; ++i)
    +	{
    +		if(declNames.indexOf(ast.decls[i].ident.id) != -1)
    +			throw new Error("Duplicate definition for local declaration: " + ast.decls[i].ident.id);
    +		else
    +			declNames.push(ast.decls[i].ident.id);
    +	}
    +
    +	var decls = [];
    +	for(var i = 0; i < ast.decls.length; ++i)
    +	{
    +		var elem = ast.decls[i];
    +
    +		if(elem.astType == "decl-fun")
    +			elem.astType = "local-decl-fun";
    +		else if(elem.astType == "guard-fun")
    +			elem.local = true;
    +
    +		decls.push(Lich.compileAST(elem));
    +	}
    +
    +	var exp = Lich.compileAST(ast.exp);
    +	return "(function(){"+decls.join(";")+";return "+exp+"})();";
    +}
    +
    +Lich.compileLetOne = function(ast)
    +{
    +	return Lich.compileAST(ast.decl)+";Lich.post(Lich.VM.PrettyPrint("+ast.decl.ident.id+"))";
    +}
    +
    +Lich.compileListExp = function(ast)
    +{
    +	var res = [];
    +	for(var i = 0; i < ast.members.length; ++i)
    +	{
    +		res.push(Lich.compileAST(ast.members[i]));
    +	}
    +
    +	return "["+res.join(",")+"]";
    +}
    +
    +Lich.compileQop = function(ast)
    +{
    +	return Lich.unsupportedSemantics(ast);
    +}
    +
    +Lich.compileConPat = function(ast)
    +{
    +	return Lich.unsupportedSemantics(ast);
    +}
    +
    +Lich.compileWildCard = function(ast)
    +{
    +	return Lich.unsupportedSemantics(ast);
    +}
    +
    +Lich.compileVarName = function(ast)
    +{
    +	return ast.id;
    +}
    +
    +Lich.compileDacon = function(ast)
    +{
    +	if(ast == "Nothing")
    +		return "null";
    +	else
    +		return Lich.unsupportedSemantics({astType:ast});
    +}
    +
    +Lich.compileDataDecl = function(ast)
    +{
    +	Lich.verifyDef(ast.id);
    +
    +	var argNames = [];
    +	var initialData = [];
    +	var args = [];
    +	var dataPairs = [];
    +	for(var i = 0; i < ast.members.length; ++i)
    +	{
    +		//var elemRes = Lich.compileAST(ast.members[i].exp);
    +		argNames.push("\""+ast.members[i].id+"\"");
    +		args.push(ast.members[i].id);
    +		dataPairs.push(ast.members[i].id+":"+ast.members[i].id);
    +	}
    +
    +	initialData.push("_lichType:DATA");
    +	initialData.push("_datatype:\""+ast.id+"\"");
    +	initialData.push("_argNames:["+argNames.join(",")+"]");
    +
    +	return ast.id+"=function("+args.join(",")+"){return {"+initialData.concat(dataPairs).join(",")+"}}";
    +}
    +
    +Lich.newData = function(constructor, members)
    +{
    +	if(constructor == null) throw new Error("Unable to find data constructor for " + constructor);
    +	var data = _deepCopy(constructor);
    +	
    +	for(var i = 0; i < members.length; ++i)
    +	{
    +		data[constructor._argNames[i]] = members[i];
    +	}
    +
    +	return data;
    +}
    +
    +Lich.compileDataInst = function(ast)
    +{
    +	var members = [];
    +	for(var i = 0; i < ast.members.length; ++i)
    +	{
    +		members.push(Lich.compileAST(ast.members[i]));
    +	}
    +
    +	if(members.length > 0)
    +		return "Lich.application("+ast.id+",["+members.join(",")+"])";
    +	else
    +		return ast.id;
    +}
    +
    +Lich.compileDataLookup = function(ast)
    +{
    +	return Lich.compileAST(ast.data)+"."+ast.member;
    +}
    +
    +Lich.dataUpdate = function(data,members)
    +{
    +	var newData = _deepCopy(data);
    +	for(var i = 0; i < members.length; ++i)
    +	{
    +		newData[members[i].id] = members[i].exp;
    +	}
    +
    +	return newData;
    +}
    +
    +Lich.compileDataUpdate = function(ast)
    +{
    +	var dataCon = Lich.compileAST(ast.data);
    +	var members = [];
    +	for(var i = 0; i < ast.members.length; ++i)
    +	{
    +		members.push("{id:\""+ast.members[i].id+"\", exp:"+Lich.compileAST(ast.members[i].exp)+"}")
    +	}
    +
    +	return "Lich.dataUpdate("+dataCon+",["+members.join(",")+"])";
    +}
    +
    +Lich.compileDataEnum = function(ast)
    +{
    +	Lich.verifyDef(ast.id);
    +	dataPairs = new Array();
    +	var res = "";
    +
    +	for(var i = 0; i < ast.members.length; ++i)
    +	{
    +		res = res + ast.members[i] + "={_lichType:DATA,_argNames:[],_datatype:\""+ast.members[i]+"\"};"
    +		dataPairs.push("\""+ast.members[i] + "\"" + ":" + ast.members[i]);
    +	}
    +
    +	var argNames = ast.members.map(function(elem){return "\""+elem+"\"";});
    +
    +	dataPairs.push("_lichType:DATA");
    +	dataPairs.push("_argNames:["+argNames.join(",")+"]");
    +	dataPairs.push("_datatype:\""+ast.id+"\"");
    +	return res+ast.id+"={"+dataPairs.join(",")+"};";
    +}
    +
    +var _literalBinOps = ["+","-","/","*","%",">","<",">=","<=","=="];
    +_binOps = {};
    +
    +Lich.compileBinOpExp = function(ast)
    +{
    +	var lhs = Lich.compileAST(ast.lhs);
    +	var rhs = Lich.compileAST(ast.rhs);
    +	
    +	if(((ast.lhs.astType == "float-lit" || ast.lhs.astType == "string-lit") && (ast.rhs.astType == "float-lit" || ast.rhs.astType == "string-lit"))
    +		&& _literalBinOps.indexOf(ast.op) != -1)
    +		return lhs+ast.op+" "+rhs; // space added for negative numbers
    +	else if(Lich.VM.reserved.hasOwnProperty(ast.op))
    +		return _binOps[ast.op]+"("+lhs+","+rhs+")";
    +	else
    +		throw new Error("Unrecongized binary operator: " + ast.op);
    +}
    +
    +
    +Lich.compileCurriedBinOpExp = function(ast)
    +{
    +	if(Lich.VM.reserved.hasOwnProperty(ast.op))
    +		return "Lich.VM.reserved[\""+ast.op+"\"]";
    +	else
    +		throw new Error("Unrecongized binary operator: " + ast.op);
    +}
    +
    +Lich.compileLeftCurriedBinOpExp = function(ast)
    +{
    +	if(Lich.VM.reserved.hasOwnProperty(ast.op))
    +		return "Lich.VM.reserved[\""+ast.op+"\"].curry("+Lich.compileAST(ast.lhs)+")";
    +	else
    +		throw new Error("Unrecongized binary operator: " + ast.op);
    +}
    +
    +Lich.compileRightCurriedBinOpExp = function(ast)
    +{
    +	if(Lich.VM.reserved.hasOwnProperty(ast.op))
    +		return "(function(lhs){return Lich.application(Lich.VM.reserved[\""+ast.op+"\"],[lhs,"+Lich.compileAST(ast.rhs)+"])})";
    +	else
    +		throw new Error("Unrecongized binary operator: " + ast.op);
    +}
    +
    +Lich.compileNegate = function(ast)
    +{ 
    +	return "(-"+Lich.compileAST(ast.rhs)+")"
    +}
    +
    +Lich.listRange = function(lower, upper, next)
    +{
    +	var skip = 0;
    +
    +	if(Lich.getType(next) == NOTHING)
    +	{
    +		if(lower < upper)
    +			skip = 1;
    +		else
    +			skip = -1;
    +	}
    +	
    +	else
    +	{
    +		skip = next - lower;
    +	}
    +
    +	if(typeof lower !== "number" || typeof skip !== "number" || typeof upper !== "number")
    +	{
    +		throw new Error("List range syntax can only be used with numbers. failed with: " 
    +			+ Lich.VM.PrettyPrint(lower) + "," + Lich.VM.PrettyPrint(next) + ".." + Lich.VM.PrettyPrint(upper));
    +	}
    +
    +	var array = new Array();
    +
    +	if(skip <= 0)
    +	{
    +		for(var i = lower; i >= upper; i += skip)
    +		{
    +			array.push(i);
    +		}
    +
    +		return array;
    +	}
    +
    +	else
    +	{
    +		for(var i = lower; i <= upper; i += skip)
    +		{
    +			array.push(i);
    +		}
    +
    +		return array;
    +	}
    +}
    +
    +Lich.compileListRange = function(ast)
    +{
    +	var lower = Lich.compileAST(ast.lower);
    +	var upper = Lich.compileAST(ast.upper);
    +	
    +	if(typeof ast.skip !== "undefined")
    +	{
    +		return "Lich.listRange("+lower+","+upper+","+Lich.compileAST(ast.skip)+")";
    +	}
    +	
    +	else
    +	{
    +		return "Lich.listRange("+lower+","+upper+", Lich.VM.Nothing)";
    +	}
    +}
    +
    +Lich.newDictionary = function(pairs)
    +{
    +	res = {_lichType:DICTIONARY};
    +
    +	for(var i = 0; i < pairs.length; ++i)
    +	{
    +		res[pair[0]] = pair[1];
    +	}
    +
    +	return res;
    +}
    +
    +Lich.compileDictionary = function(ast)
    +{
    +	var pairs = new Array();
    +	pairs.push("_lichType:DICTIONARY");
    +
    +	for(var i = 0; i < ast.pairs.length; i += 2)
    +	{
    +		var dictKey = Lich.compileAST(ast.pairs[i]);
    +		var dictRes = Lich.compileAST(ast.pairs[i+1]);
    +		pairs.push(dictKey+":"+dictRes);
    +	}
    +
    +	return "{" + pairs.join(",") + "}";
    +}
    +
    +Lich.compileCase = function(ast)
    +{
    +	var caseCode = "(function(_object){";
    +	var matchCode = "";
    +
    +	for(var i = 0; i < ast.alts.length; ++i)
    +	{
    +		var elem = ast.alts[i];
    +		var pat = elem.pat;
    +		var arr = Lich.generateOneArgNameAndMatchVars(pat, i);
    +		var argName = arr[0];
    +		var matchVars = arr[1];
    +
    +		if(pat.astType == "at-match")
    +			caseCode += "var "+argName+"=_object;";
    +
    +		caseCode += matchVars;
    +
    +		var tempMatchCode = Lich.generateMatchFunc("_object", pat, i, false);
    +		var altExp = Lich.compileAST(elem.exp);
    +
    +		if(i > 0)
    +			matchCode += "else ";
    +
    +		matchCode += "if("+tempMatchCode+"){return "+altExp+"}";
    +	}
    +
    +	return caseCode + matchCode + "else throw new Error(\"case statement found no matching patterns.\")})("+Lich.compileAST(ast.exp)+")";
    +}
    +
    +Lich.generateListComprehensionCode = function(exp,generators,filters)
    +{
    +	var code = "(function(){var _listRes = new Array();";
    +
    +	for(var i = 0; i < generators.length; ++i)
    +	{
    +		var varName = "_list"+i;
    +		var iName = "i"+i;
    +		code += "var "+varName+"="+generators[i][1]+";for(var "+iName+"=0;"+iName+"<"+varName+".length;++"+iName+"){"+generators[i][0]+"="
    +			+varName+"[i"+i+"];"
    +	}
    +
    +	var doFilters = filters.length > 0;
    +
    +	if(doFilters)
    +		code += "if(";
    +
    +	for(var i = 0; i < filters.length; ++i)
    +	{
    +		if(i > 0)
    +			code += "&&(";
    +		else
    +			code += "(";
    +
    +		code += filters[i]+")";
    +	}
    +	
    +	if(doFilters)
    +		code += "){";
    +
    +	code += "_listRes.push("+exp+");";
    +
    +	if(doFilters)
    +		code += "}";
    +
    +	for(var i = generators.length-1; i >= 0; --i)
    +	{
    +		code += "}";
    +	}
    +
    +	return code+"; return _listRes})()";
    +}
    +
    +Lich.compileListComprehension = function(ast)
    +{
    +	var filters = new Array();
    +	var generators = new Array();
    +
    +	// First we collect all the filter functions
    +	for(var i = 0; i < ast.generators.length; ++i)
    +	{
    +		if(ast.generators[i].astType != "decl-fun")
    +		{
    +			filters.push(Lich.compileAST(ast.generators[i]));
    +		}	
    +	}
    +
    +	// Collect all the lists from the generators
    +	for(var i = 0; i < ast.generators.length; ++i)
    +	{
    +		if(ast.generators[i].astType == "decl-fun")
    +		{
    +			generators.push([ast.generators[i].ident, Lich.compileAST(ast.generators[i].rhs)]);
    +		}
    +	}
    +
    +	return Lich.generateListComprehensionCode(Lich.compileAST(ast.exp), generators, filters);
    +}
    +
    +function postProcessJSON(object)
    +{
    +	if (Object.prototype.toString.call(object) === '[object Array]') 
    +    {
    +        var out = [], i = 0, len = object.length;
    +        for ( ; i < len; i++) 
    +        {
    +			object[i] = postProcessJSON(object[i]);
    +        }
    +
    +        return object;
    +    }
    +
    +	else if(typeof object === 'object') 
    +    {
    +    	if(object == null || typeof object === "undefined")
    +    		return Lich.VM.Nothing;
    +
    +    	if(object._lichType == CLOSURE)
    +	    {
    +	    	return eval(object.value);
    +	    }
    +
    +	    else
    +	    {
    +	    	for(n in object)
    +	    	{
    +	    		object[n] = postProcessJSON(object[n]);
    +	    	}
    +	    }
    +
    +	    return object;
    +    }
    +
    +    return object;
    +}
    +
    +Lich.parseJSON = function(json)
    +{
    +	try{
    +		return postProcessJSON(JSON.parse(json));
    +	}
    +
    +	catch(e)
    +	{
    +		Lich.post(e);
    +	}
    +	// return JSON.retrocycle(postProcessJSON(JSON.parse(json)));
    +}
    +
    +Lich.stringify = function(object)
    +{
    +	var string = "";
    +
    +	try{
    +		string = JSON.stringify(object, function (key, val) 
    +		// return JSON.stringify(JSON.decycle(object), function (key, val) 
    +		{
    +			if(typeof val === "function")
    +			{
    +				/*
    +				var funcAndArgs = _extractFunctionAndArgs(val);
    +				var funcString = funcAndArgs[0].toString();
    +				/*var args = Lich.stringify(funcAndArgs[1]);
    +				var func = funcString.match(/function ([^\(]+)/);
    +
    +				if(func == null || typeof func === "undefined")
    +					func = funcString;
    +				else
    +					func = func[1];*/
    +
    +				return {_lichType:CLOSURE, value: "((function(){return "+val+"})())"};
    +
    +
    +
    +				//return Lich.stringify({_lichType:CLOSURE, value: "((function(){return "+value+"})())"});
    +				//Lich.post("Lich.Stringify = " + val);
    +				//return Lich.stringify({_lichType:CLOSURE, value: "((function(){return "+func+"})())"});
    +				//return "((function(){return "+func+"})())";
    +			}
    +
    +		    return val;
    +
    +		});
    +	}
    +
    +	catch(e)
    +	{
    +		Lich.post(e);
    +	}
    +
    +	return string;
    +}
    +/*
    +Lich.receive = function(patternFunc, ret)
    +{
    +	if(Lich.VM.currentThread === "main")
    +		throw new Error("Cannot use receive from the main thread. receive can only be called by an Actor.");
    +
    +	if(messageBox.length == 0)
    +	{
    +		//Lich.post("*******if(messageBox.length == 0)");
    +		queuedReceive = [Lich.receive, this, Array.prototype.slice.call(arguments)];
    +		return;
    +	}
    +
    +	var match = false;
    +	var messageIndex = 0;
    +	var altFunc;
    +	var continueFunc = [Lich.receive, this, Array.prototype.slice.call(arguments)];
    +
    +	// Two dimensional iteration over each message against each defined pattern.
    +	// If we find a match break from both loops and call the pattern's matching expression.
    +	// Otherwise we schedule receive to be called again upon the arrival of a new message.
    +	forEachWithBreakCps
    +	(
    +		messageBox, // For each message in the messageBox
    +		function(exp, i, nextMessage)
    +		{
    +			Lich.collapse(exp, function(expRes)
    +			{
    +				patternFunc(expRes, function(_bool, func)
    +				{
    +					if(_bool)
    +					{
    +						match = true;
    +						messageIndex = i;
    +						altFunc = func;
    +						nextMessage(true); // break
    +					}
    +
    +					else
    +					{
    +						nextMessage(false); // continue
    +					}
    +				})
    +			});
    +		},
    +
    +		function()
    +		{
    +			//Lich.post("Receive altFunc = " + altFunc);
    +			if(match) // Did we find a match?
    +			{
    +				//Lich.post("*****MATCH!!!!!!!!!");
    +				messageBox.splice(messageIndex, 1); // Remove the message from the message box
    +				queuedReceive = null;
    +				// We found a match, so compile the pattern's expression, continue with ret(res)
    +				Lich.collapse(altFunc, ret);
    +			}
    +
    +			else // No match
    +			{
    +				// createListener for future messages
    +				//Lich.post("*********NO MATCH");
    +				queuedReceive = continueFunc;
    +			}
    +		}
    +	);
    +}
    +
    +Lich.compileReceive = function(ast, ret)
    +{
    +	var caseCode = "Lich.receive.curry(function(_object,_patRet){";
    +	Lich.compileAST(ast.exp, function(exp)
    +	{
    +		//caseCode += exp+",function(_object){";
    +
    +		matchCode = "";
    +		forEachCps(
    +			ast.alts, 
    +			function(elem,i,next)
    +			{
    +				var pat = elem.pat;
    +				Lich.generateOneArgNameAndMatchVars(pat, i, function(argName, matchVars)
    +				{
    +					if(pat.astType == "at-match")
    +						caseCode += "var "+argName+"=_object;";
    +
    +					caseCode += matchVars;
    +					Lich.generateMatchFunc("_object", pat, i, false, function(tempMatchCode)
    +					{
    +						Lich.compileAST(ast.alts[i].exp, function(altExp)
    +						{
    +							matchCode += "if((function(){" + tempMatchCode + "})()){return _patRet(true,"+ altExp + ")};";
    +							next();
    +						});
    +					})
    +				});
    +			},
    +
    +			function()
    +			{
    +				caseCode += matchCode + "_patRet(false)})";
    +				ret(caseCode);
    +			}
    +		);
    +	});
    +}*/
    +
    +Lich.compileTopExp = function(ast)
    +{
    +	return "Lich.post(Lich.VM.PrettyPrint("+Lich.compileAST(ast.exp)+"));";
    +}
    +
    +Lich.compileImportJS = function(ast)
    +{
    +	return "importjs("+ast.imports+")";
    +}
    +
    +Lich.compileDoExp = function(ast, ret)
    +{
    +	var res = "";
    +	var first = ast.exps.length - 1;
    +
    +	for(var i = first; i >= 0; --i)
    +	{
    +
    +		if(i == first)
    +			res = Lich.compileAST(ast.exps[i].exp);
    +		else
    +			res = "bind("+Lich.compileAST(ast.exps[i].exp)+",function(" + ast.exps[i].arg + "){return "+res+"})";
    +	}
    +
    +	return res; 
    +}
    +
    +Lich.compileGuardExp = function(ast, ret)
    +{
    +	var arr = Lich.generateArgNamesAndMatchVars(ast.args);
    +	var argNames = arr[0];
    +	var matchVars = arr[1];
    +	var matchCode = Lich.checkFunctionArgMatches(argNames, ast.args);
    +	var prefix = ast.ident.id+"=function "+ast.ident.id;
    +					
    +	if(ast.local)
    +		prefix = "var " + ast.ident.id + "=function";
    +
    +	var gaurdCode = prefix +"(" + [].concat(argNames).join(",") + "){"+matchVars+matchCode;
    +
    +	for(var i = 0; i < ast.guards.length; ++i)
    +	{
    +		if(i > 0)
    +			gaurdCode += "else ";
    +		gaurdCode += "if("+Lich.compileAST(ast.guards[i].e1)+"){return "+Lich.compileAST(ast.guards[i].e2)+"}";
    +	}
    +
    +	return gaurdCode + "else throw new Error(\"Non-exhaustive patterns in guard function.\")}";
    +}
    +
    +Lich.compilePercStream = function(ast)
    +{
    +	Lich.verifyDef(ast.id);
    +	var list = Lich.compileAST(ast.list);
    +	var modifiers = Lich.compileAST(ast.modifiers);
    +	var res;
    +	if(eval ("typeof "+ast.id+" !== \"undefined\""))
    +	{
    +		res = ast.id+".update("+list+","+modifiers+");";
    +		res += "Lich.post(\"" + ast.id + " \"+ Lich.VM.PrettyPrint(" + ast.id + "));";
    +	}
    +				
    +	else
    +	{
    +		res = ast.id+"=new Soliton.PercStream("+list+","+modifiers+");";
    +		if(Lich.parseType !== "library")
    +		{
    +			res += ast.id + ".play();";
    +			//res += "Lich.scheduler.addScheduledEvent("+ast.id+");";
    +			res += "Lich.post(\"" + ast.id + " \"+ Lich.VM.PrettyPrint(" + ast.id + "));";
    +		}
    +	}
    +
    +	return res;
    +}
    +
    +Lich.compilePercList = function(ast)
    +{
    +	var res = [];
    +
    +	for(var i = 0; i < ast.list.length; ++i)
    +	{
    +		var listItem = ast.list[i];
    +		if(listItem.astType != "varname")
    +			res.push(Lich.compileAST(listItem));
    +		else
    +			res.push("\""+listItem.id+"\"");
    +	}
    +
    +	return "["+res.join(",")+"]";
    +}
    +
    +Lich.compilePercMods = function(ast)
    +{
    +	var res = [];
    +
    +	for(var i = 0; i < ast.list.length; ++i)
    +	{
    +		res.push(Lich.compileAST(ast.list[i]));
    +	}
    +
    +	return "["+res.join(",")+"]"; 	
    +}
    +
    +Lich.compileSoloStream = function(ast)
    +{
    +	Lich.verifyDef(ast.id);
    +
    +	var list = Lich.compileAST(ast.list)
    +	var mods = Lich.compileAST(ast.mods);
    +	var rmods = Lich.compileAST(ast.rmods);
    +	var res;
    +	if(eval ("typeof "+ast.id+" !== \"undefined\""))
    +	{
    +		res = ast.id+".update("+ast.synth+","+list+","+mods+","+rmods+");";
    +		res += "Lich.post(\"" + ast.id + " \"+ Lich.VM.PrettyPrint(" + ast.id + "));";
    +	}
    +				
    +	else
    +	{
    +		res = ast.id+"=new Soliton.SoloStream("+ast.synth+","+list+","+mods+","+rmods+");";
    +		if(Lich.parseType !== "library")
    +		{
    +			res += ast.id + ".play();";
    +			//res += "Lich.scheduler.addScheduledEvent("+ast.id+");";
    +			res += "Lich.post(\"" + ast.id + " \"+ Lich.VM.PrettyPrint(" + ast.id + "));";
    +		}
    +	}
    +
    +	return res;
    +}
    +
    +Lich.compileSoloList = function(ast)
    +{
    +	var res = [];
    +
    +	for(var i = 0; i < ast.list.length; ++i)
    +	{
    +		res.push(Lich.compileAST(ast.list[i]));
    +	}
    +
    +	return "["+res.join(",")+"]"; 
    +}
    +
    +Lich.compileSoloMods = function(ast)
    +{
    +	var res = [];
    +
    +	for(var i = 0; i < ast.list.length; ++i)
    +	{
    +		res.push(Lich.compileAST(ast.list[i]));
    +	}	
    +
    +	return "["+res.join(",")+"]";
    +}
    +
    +Lich.compileSynthDef = function(ast)
    +{
    +	ast.astType = "decl-fun";
    +	ast.noCollapse = true;
    +	var res = Lich.compileAST(ast)+";Soliton.synthDefs[\""+ast.ident.id+"\"]="+ast.ident.id;
    +
    +	if(Lich.parseType !== "library")
    +		res += ";Lich.VM.Print("+ast.ident.id+");";
    +
    +	return res;
    +}
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/Soliton.js_SuperCollider.js.html b/Docs/files/Soliton.js_SuperCollider.js.html index 80538e2..63d32af 100644 --- a/Docs/files/Soliton.js_SuperCollider.js.html +++ b/Docs/files/Soliton.js_SuperCollider.js.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -229,12 +357,59 @@

    File: Soliton.js/SuperCollider.js

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// var spawn = require('child_process').spawn; -var scsynth = require('supercolliderjs').scsynth; -var server = new scsynth({ - path: getSCPath(), - debug: false, - echo: false, -}); +var exec = require('child_process').exec; +var osc = require("osc"); + +function _Server(options) { + this.options = options; +} + +_Server.prototype.connect = function() { + var self = this; + + this.udp = new osc.UDPPort({ + localAddress: "0.0.0.0", + localPort: 57121 + }); + + /* + this.udp.on("bundle", function (oscBundle) { + console.log(oscBundle); + }); + + this.udp.on("message", function (oscMessage) { + console.log(oscMessage); + });*/ + + this.udp.open(); +} + +_Server.prototype.disconnect = function() { + if(typeof this.udp !== "undefined") + { + this.udp.close(); + delete this.udp; + } +} + +_Server.prototype.sendMsg = function(address, args) { + this.udp.send({ + address: address, + args: args + }, this.options.sHost, this.options.sPortNum); +} + +// Useful for scheduling events in the future, makes for better timing! +_Server.prototype.scheduleMsg = function(secondsFromNow, address, args) { + + this.udp.send({ + timeTag: osc.timeTag(secondsFromNow), + packets: [{ + address: address, + args: args + }] + }, this.options.sHost, this.options.sPortNum); +} function getSCPath() { @@ -263,11 +438,11 @@

    File: Soliton.js/SuperCollider.js

    sNumControlBusChannels: 4096 * 0.25, sMaxLogins: 64, sMaxNodes: 1024, - sNumInputBusChannels: 2, + sNumInputBusChannels: 2, sNumOutputBusChannels: 2, sNumBuffers: 1024, sMaxSynthDefs: 8192, - sProtocol: "Udp", + sProtocol: "Udp", sBufLength: 64, sNumRGens: 64, sMaxWireBufs: 64, @@ -279,9 +454,10 @@

    File: Soliton.js/SuperCollider.js

    sMemoryLocking: 0, sPreferredHardwareBufferFrameSize: 512, sRealTimeMemorySize: 81920, // Increased - // sBlockSize: 512, - // sBlockSize: 1024, - sPortNum: 57110, + // sBlockSize: 512, + // sBlockSize: 1024, + sPortNum: 57110, + sHost: "127.0.0.1", sNumPrivateAudioBusChannels: 112 } @@ -304,22 +480,45 @@

    File: Soliton.js/SuperCollider.js

    var fs = require('fs'); +function _startJack() +{ + return spawn("/usr/bin/jackd", ["-d", "alsa", "-P", "hw:0,0", "-r", 44100], { env: process.env, stdio: ['pipe', process.stdout, process.stderr] }); +} + +// var _jack = process.platform == "linux" ? _startJack() : null; var _scsynthpid = spawn(getSCPath(), _optionsArray, { env: process.env, stdio: ['pipe', process.stdout, process.stderr] }); var _currentNodeID = 1000; -var s = server; -/*_scsynthpid.stderr.setEncoding('utf8'); -_scsynthpid.stderr.on('data', function (data) { - if (/^execvp\(\)/.test(data)) - { - console.log('Failed to start child process.'); - } -});*/ +var server = new _Server(_options); +var s = server; +var sampleRate = _options.sPreferredSampleRate -process.on('exit', function(code){ console.log("quitting scsynth... "); _scsynthpid.kill(); }); +server.quit = function() +{ + s.sendMsg('/quit', []); +} -//s.boot(); +process.on('exit', function(code){ + console.log("quitting scsynth... "); + _scsynthpid.kill('SIGTERM'); + /* + if(_jack != null) + { + _jack.kill('SIGTERM'); + var child = exec("killall jackd", function (error, stdout, stderr) { + console.log(stdout); + console.log(stderr); + console.log(error); + }); + + var child2 = exec("killall jackdbus", function (error, stdout, stderr) { + console.log(stdout); + console.log(stderr); + console.log(error); + }); + }*/ +}); // Wait for server to boot ... perhaps there's a better way here. @@ -335,39 +534,6 @@

    File: Soliton.js/SuperCollider.js

    ); -/* -setInterval( // Initial messages - function() - { - s.connect(); - s.sendMsg('/notify', [1]); - s.sendMsg('/status', []); - }, - 2000 -); -*/ - -/* -s.on('OSC', function(addr, msg) { - //console.log(addr+msg); - if(addr == "/fail") - console.log('scsynth ERROR:' + msg); -}); - -scsynth.on('sendosc', function() { - -}); - -scsynth.on('rcvosc', function(addr, msg) { - if(addr == "/fail") - console.log('scsynth ERROR:' + msg); -}); - -scsynth.on('debug', function(d) { - //console.log('scsynth ERROR:' + d); -}); -*/ - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Nodes ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -587,19 +753,57 @@

    File: Soliton.js/SuperCollider.js

    function UGen(name, rate, inputs, numOutputs, specialIndex) { - + var self = this; this.name = name; this.rate = rate; this.inputs = inputs; this.numInputs = inputs.length; this.numOutputs = numOutputs; this.specialIndex = typeof specialIndex === "undefined" ? 0 : specialIndex; - this.synthIndex = -1; + this.synthIndex = null; + this.setSynthIndex = function(index) { self.synthIndex = index; }; + this.outputIndex = 0; + this._lichType = AUDIO; + this._collected = false; // used internally to cull duplicates in the synth graph + this.addToSynth = true; + this.isLocalBuf = false; +} + +// Don't indicate outputs explicity, instead we indicate this with an array of rates. +function MultiOutUGen(name, rates, inputs, specialIndex) +{ + var self = this; + this.name = name; + this.rate = rates[0]; + this.inputs = inputs; + this.numOutputs = rates.length; + this.numInputs = inputs.length; + this.specialIndex = typeof specialIndex === "undefined" ? 0 : specialIndex; + this.channels = []; + + for(var i = 0; i < this.numOutputs; ++i) + { + self.channels.push(outputProxy(rates[i], self, i)); + } + + this.synthIndex = null; + this.setSynthIndex = function(index) { + self.synthIndex = index; + for(var i = 0; i < self.numOutputs; ++i) + { + self.channels[i].setSynthIndex(index); + } + }; + this.outputIndex = 0; this._lichType = AUDIO; this._collected = false; // used internally to cull duplicates in the synth graph + this.addToSynth = true; + this.isLocalBuf = false; } +Number.prototype.setSynthIndex = function(){}; + // supports multi-channel expansion function multiNewUGen(name, rate, inputs, numOutputs, specialIndex) { @@ -641,6 +845,31 @@

    File: Soliton.js/SuperCollider.js

    } } +function outputProxy(rate, sourceUGen, channel) +{ + // var u = new UGen("OutputProxy", rate, [rate, sourceUGen, input], 1, 0); + var u = new UGen("OutputProxy", rate, [sourceUGen], 1, 0); + u.addToSynth = false; + u.outputIndex = channel; + return u; +} + +// !!! We indicate number of outputs using an array of rates. !!! +function newMultiOutUGen(name, rates, inputs, specialIndex) +{ + var expandError = false; + + for(var i = 0; i < inputs.length; ++i) + { + if(inputs[i] instanceof Array) + throw new Error("You can't use multi-channel expansion with: " + name); + } + + var mUgen = new MultiOutUGen(name, rates, inputs, specialIndex); + + return mUgen.channels; +} + //////////////////// // UGen Bindings //////////////////// @@ -654,6 +883,40 @@

    File: Soliton.js/SuperCollider.js

    var _BIN_MINUS = 1; var _BIN_MUL = 2; var _BIN_DIV = 4; +var _BIN_MOD = 5; +var _BIN_EQ = 6; +var _BIN_NE = 7; +var _BIN_LT = 8; +var _BIN_GT = 9; +var _BIN_LE = 10; +var _BIN_GE = 11; +var _BIN_MIN = 12; +var _BIN_MAX = 13; +var _BIN_BITAND = 14; +var _BIN_BITOR = 15; +var _BIN_BITXOR = 16; +var _BIN_LCM = 17; +var _BIN_GCD = 18; +var _BIN_ROUND = 19; +var _BIN_ROUNDUP = 20; +var _BIN_TRUNC = 21; +var _BIN_ATAN2 = 22; +var _BIN_HYPOT = 23; +var _BIN_HYPOTX = 24; +var _BIN_POW = 25; +var _BIN_SHIFTLEFT = 26; +var _BIN_SHIFTRIGHT = 27; +var _BIN_UNSIGNEDSHIFT = 28; +var _BIN_FILL = 29; +var _BIN_RING1 = 30; +var _BIN_RING2 = 31; +var _BIN_RING3 = 32; +var _BIN_RING4 = 33; +var _BIN_DIFSQR = 34; +var _BIN_SUMSQR = 35; +var _BIN_SQRSUM = 36; +var _BIN_SQRDIF = 37; +var _BIN_ABSDIF = 38; function _binaryOpUGen(selector, a, b) { @@ -667,22 +930,800 @@

    File: Soliton.js/SuperCollider.js

    function mix2(a, b) { - return _binaryOpUGen(_BIN_PLUS, a, b); + return _binaryOpUGen(_BIN_PLUS, a, b); +} + +function _subtractMix(a, b) +{ + return _binaryOpUGen(_BIN_MINUS, a, b); +} + +function gain(a, b) +{ + return _binaryOpUGen(_BIN_MUL, a, b); +} + +function _audioDivision(a, b) +{ + return _binaryOpUGen(_BIN_DIV, a, b); +} + +var _UN_NEG = 0; +var _UN_NOT = 1; +var _UN_ISNIL = 2; +var _UN_NOTNIL = 3; +var _UN_BITNOT = 4; +var _UN_ABS = 5; +var _UN_ASFLOAT = 6; +var _UN_ASINT = 7; +var _UN_CEIL = 8; +var _UN_FLOOR = 9; +var _UN_FRAC = 10; +var _UN_SIGN = 11; +var _UN_SQUARED = 12; +var _UN_CUBED = 13; +var _UN_SQRT = 14; +var _UN_EXP = 15; +var _UN_RECIP = 16; +var _UN_MIDICPS = 17; +var _UN_CPSMIDI = 18; +var _UN_MIDIRATIO = 19; +var _UN_RATIOMIDI = 20; +var _UN_DBAMP = 21; +var _UN_AMPDB = 22; +var _UN_OCTCPS = 23; +var _UN_CPSOCT = 24; +var _UN_LOG = 25; +var _UN_LOG2 = 26; +var _UN_LOG10 = 27; +var _UN_SIN = 28; +var _UN_COS = 29; +var _UN_TAN = 30; +var _UN_ARCSIN = 31; +var _UN_ARCCOS = 32; +var _UN_ARCTAN = 33; +var _UN_SINH = 34; +var _UN_COSH = 35; +var _UN_TANH = 36; +var _UN_RAND = 37; +var _UN_RAND2 = 38; +var _UN_LINRAND = 39; +var _UN_BILINRAND = 40; +var _UN_SUM3RAND = 41; +var _UN_DISTORT = 42; +var _UN_SOFTCLIP = 43; +var _UN_COIN = 44; + +function _unaryOpUGen(selector, a) +{ + var rate = ControlRate; + + if(a.rate == AudioRate || b.rate == AudioRate) + rate = AudioRate; + + return multiNewUGen("UnaryOpUGen", rate, [a], 1, selector); +} + +/** + * Distort a signal. This is the same as using .distort in SuperCollider. + * + * @class scDistort + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> distort >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scDistort(a) +{ + return _unaryOpUGen(_UN_DISTORT, a); +} + +/** + * Distortions. + * @submodule Distortions + */ + +/** + * Distortion with a perfectly linear region from -0.5 to +0.5. This is the same as using .softclip in SuperCollider. + * + * @class scSoftClip + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scSoftClip >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scSoftClip(a) +{ + return _unaryOpUGen(_UN_SOFTCLIP, a); +} + +/** + * Foldback distortion. + * + * @class scFold + * @constructor + * @param lo Low boundry to fold at + * @param hi High boundry to fold at + * @example + * let test l h => white 1 >> scFold l h >> out 0<br> + * let t = test -0.5 0.5<br> + * stop t + */ +function scFold(lo, hi, input) +{ + return multiNewUGen("Fold", AudioRate, [input,lo,hi], 1, 0); +} + +/** + * Wrap distortion. + * + * @class scWrap + * @constructor + * @param lo Low boundry to wrap at + * @param hi High boundry to wrap at + * @example + * let test l h => white 1 >> scWrap l h >> out 0<br> + * let t = test -0.5 0.5<br> + * stop t + */ +function scWrap(lo, hi, input) +{ + return multiNewUGen("Wrap", AudioRate, [input,lo,hi], 1, 0); +} + +/** + * Clip distortion. + * + * @class scClip + * @constructor + * @param lo Low boundry to clip at + * @param hi High boundry to clip at + * @example + * let test l h => white 1 >> scClip l h >> out 0<br> + * let t = test -0.5 0.5<br> + * stop t + */ +function scClip(lo, hi, input) +{ + return multiNewUGen("Clip", AudioRate, [input,lo,hi], 1, 0); +} + +/** + * Return the inverse of a signal. + * + * @class scNeg + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scNeg >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scNeg(a) +{ + return _unaryOpUGen(_UN_NEG, a); +} + +/** + * Signal Math. TODO: fix all the examples + * @submodule Signal Math + */ + +/** + * Return the absolute value of a signal. + * + * @class scAbs + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scAbs >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scAbs(a) +{ + return _unaryOpUGen(_UN_ABS, a); +} + +/** + * Return the ceil of a signal. + * + * @class scCeil + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scCeil >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scCeil(a) +{ + return _unaryOpUGen(_UN_CEIL, a); +} + +/** + * Return the floor of a signal. + * + * @class scFloor + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scFloor >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scFloor(a) +{ + return _unaryOpUGen(_UN_FLOOR, a); +} + +/** + * Return the square of a signal. + * + * @class scSquared + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scSquared >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scSquared(a) +{ + return _unaryOpUGen(_UN_SQUARED, a); +} + +/** + * Return the cube of a signal. + * + * @class scCubed + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scCubed >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scCubed(a) +{ + return _unaryOpUGen(_UN_CUBED, a); +} + +/** + * Return the square root of a signal. + * + * @class scSqrt + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scSqrt >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scSqrt(a) +{ + return _unaryOpUGen(_UN_SQRT, a); +} + +/** + * Return the reciprocal of a signal. + * + * @class scReciprocal + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scReciprocal >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scReciprocal(a) +{ + return _unaryOpUGen(_UN_RECIP, a); +} + +/** + * Convert a value from cycles per second to MIDI. + * + * @class scCpsMidi + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scCpsMidi >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scCpsMidi(a) +{ + return _unaryOpUGen(_UN_CPSMIDI, a); +} + +/** + * Convert a value from MIDI to cycles per second. + * + * @class scMidiCps + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scMidiCps >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scMidiCps(a) +{ + return _unaryOpUGen(_UN_MIDICPS, a); +} + +/** + * Convert a value dB to RMS amplitude. + * + * @class scDbAmp + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scDbAmp >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scDbAmp(a) +{ + return _unaryOpUGen(_UN_DBAMP, a); +} + +/** + * Convert a value RMS amplitude to dB. + * + * @class scAmpDb + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scAmpDb >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scAmpDb(a) +{ + return _unaryOpUGen(_UN_DBAMP, a); +} + +/** + * Return the log of a signal. + * + * @class scLog + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scLog >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scLog(a) +{ + return _unaryOpUGen(_UN_LOG, a); +} + +/** + * Return the log2 of a signal. + * + * @class scLog2 + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scLog2 >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scLog2(a) +{ + return _unaryOpUGen(_UN_LOG2, a); +} + +/** + * Return the log10 of a signal. + * + * @class scLog10 + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scLog10 >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scLog10(a) +{ + return _unaryOpUGen(_UN_LOG10, a); +} + +/** + * Return the sin of a signal. + * + * @class scSin + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scSin >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scSin(a) +{ + return _unaryOpUGen(_UN_SIN, a); +} + +/** + * Return the cos of a signal. + * + * @class scCos + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scCos >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scCos(a) +{ + return _unaryOpUGen(_UN_COS, a); +} + +/** + * Return the tan of a signal. + * + * @class scTan + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scTan >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scTan(a) +{ + return _unaryOpUGen(_UN_TAN, a); +} + +/** + * Return the arc sin of a signal. + * + * @class scASin + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scASin >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scASin(a) +{ + return _unaryOpUGen(_UN_ARCSIN, a); +} + +/** + * Return the arc cos of a signal. + * + * @class scACos + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scACos >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scACos(a) +{ + return _unaryOpUGen(_UN_ARCCOS, a); +} + +/** + * Return the arc tan of a signal. + * + * @class scATan + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scATan >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scATan(a) +{ + return _unaryOpUGen(_UN_ARCTAN, a); +} + +/** + * Return the sinh of a signal. + * + * @class scSinh + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scSinh >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scSinh(a) +{ + return _unaryOpUGen(_UN_SINH, a); +} + +/** + * Return the cosh of a signal. + * + * @class scCosh + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scCosh >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scCosh(a) +{ + return _unaryOpUGen(_UN_COSH, a); +} + +/** + * Return the tanh of a signal. + * + * @class scTanh + * @constructor + * @example + * let test amp => sin 440 >> gain amp >> scTanh >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scTanh(a) +{ + return _unaryOpUGen(_UN_TANH, a); +} + +/** + * Return the modulo of two signals. a % b + * + * @class scMod + * @constructor + * @param a Signal a + * @param b Signal b + * @example + * TODO + */ +function scMod(a, b) +{ + return _binaryOpUGen(_BIN_MOD, a, b); +} + +/** + * Return the signal rounded to the nearest value of b. + * + * @class scRound + * @constructor + * @param a Signal a + * @param b Value to round to + * @example + * TODO + */ +function scRound(a, b) +{ + return _binaryOpUGen(_BIN_ROUND, a, b); +} + +/** + * Return the signal to the power of b. + * + * @class scPow + * @constructor + * @param a Signal a + * @param b Value to round to + * @example + * TODO + */ +function scPow(a, b) +{ + return _binaryOpUGen(_BIN_POW, a, b); +} + +/** + * Bitwise & a signal. + * + * @class scBitAnd + * @constructor + * @param a Signal a + * @param b Signal b + * @example + * TODO + */ +function scBitAnd(a, b) +{ + return _binaryOpUGen(_BIN_BITAND, a, b); +} + +/** + * Bitwise Operators. TODO: fix all examples + * @submodule Bitwise Operators + */ + +/** + * Bitwise | a signal. + * + * @class scBitOr + * @constructor + * @param a Signal a + * @param b Signal b + * @example + * TODO + */ +function scBitOr(a, b) +{ + return _binaryOpUGen(_BIN_BITOR, a, b); +} + +/** + * Bitwise xor a signal. + * + * @class scBitXor + * @constructor + * @param a Signal a + * @param b Signal b + * @example + * TODO + */ +function scBitXor(a, b) +{ + return _binaryOpUGen(_BIN_BITXOR, a, b); +} + +/** + * Bitwise << a signal. + * + * @class scBitLeftShift + * @constructor + * @param a Signal a + * @param b Signal b + * @example + * TODO + */ +function scBitLeftShift(a, b) +{ + return _binaryOpUGen(_BIN_SHIFTLEFT, a, b); +} + +/** + * Bitwise >> a signal. + * + * @class scBitRightShift + * @constructor + * @param a Signal a + * @param b Signal b + * @example + * TODO + */ +function scBitRightShift(a, b) +{ + return _binaryOpUGen(_BIN_SHIFTRIGHT, a, b); +} + +/** + * Generate a random number with uniform distribution when synth starts playing. + * + * @class scRand + * @constructor + * @param lo Lowest possible value + * @param hi Highest possible value + * @example + * let test a => sin (scRand 220 440) >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scRand(lo,hi) +{ + return multiNewUGen("Rand", ScalarRate, [lo,hi], 1, 0); +} + +/** + * Generate a random number with distribution based on the sum of n random numbers when synth starts playing. + * + * @class scNRand + * @constructor + * @param lo Lowest possible value + * @param hi Highest possible value + * @param n Number of random numbers to sum. 1 = uniform distribution, 2 = triangular, etc. Higher numbers approach gaussian + * @example + * let test a => sin (scNRand 220 440 4) >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scNRand(lo,hi,n) +{ + return multiNewUGen("NRand", ScalarRate, [lo,hi,n], 1, 0); +} + +/** + * Random Number Generators. + * @submodule Random + */ + +/** + * Generate a random number with linear distribution when synth starts playing. + * + * @class scLinRand + * @constructor + * @param lo Lowest possible value + * @param hi Highest possible value + * @example + * let test a => sin (scLinRand 220 440) >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scLinRand(lo,hi) +{ + return multiNewUGen("LinRand", ScalarRate, [lo,hi], 1, 0); +} + +/** + * Generate a random integer with uniform distribution when synth starts playing. + * + * @class scIRand + * @constructor + * @param lo Lowest possible value + * @param hi Highest possible value + * @example + * let test a => sin (scIRand 220 440) >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scIRand(lo,hi) +{ + return multiNewUGen("IRand", ScalarRate, [lo,hi], 1, 0); +} + + +/** + * Generate a random number with exponential distribution when synth starts playing. + * + * @class scExpRand + * @constructor + * @param lo Lowest possible value + * @param hi Highest possible value + * @example + * let test a => sin (scExpRand 220 440) >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scExpRand(lo,hi) +{ + return multiNewUGen("ExpRand", ScalarRate, [lo,hi], 1, 0); } -function _subtractMix(a, b) +/** + * Generate a random number with uniform distribution on each trigger. + * + * @class scTRand + * @constructor + * @param lo Lowest possible value + * @param hi Highest possible value + * @param trigger A trigger happens when the signal changes from non-positive to positive + * @example + * let test a => sin (scTRand 220 440 (impulse 1)) >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scTRand(lo,hi,trigger) { - return _binaryOpUGen(_BIN_MINUS, a, b); + return multiNewUGen("TRand", AudioRate, [lo,hi,trigger], 1, 0); } -function gain(a, b) +/** + * Generate a random integer with uniform distribution on each trigger. + * + * @class scTIRand + * @constructor + * @param lo Lowest possible value + * @param hi Highest possible value + * @param trigger A trigger happens when the signal changes from non-positive to positive + * @example + * let test a => sin (scTIRand 220 440 (impulse 1)) >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scTIRand(lo,hi,trigger) { - return _binaryOpUGen(_BIN_MUL, a, b); + return multiNewUGen("TIRand", AudioRate, [lo,hi,trigger], 1, 0); } -function _audioDivision(a, b) +/** + * Generate a random number with exponential distribution on each trigger. + * + * @class scTExpRand + * @constructor + * @param lo Lowest possible value + * @param hi Highest possible value + * @param trigger A trigger happens when the signal changes from non-positive to positive + * @example + * let test a => sin (scTExpRand 220 440 (impulse 1)) >> out 0<br> + * let t = test 1<br> + * stop t + */ +function scTExpRand(lo,hi,trigger) { - return _binaryOpUGen(_BIN_DIV, a, b); + return multiNewUGen("TExpRand", AudioRate, [lo,hi,trigger], 1, 0); } /** @@ -1204,6 +2245,24 @@

    File: Soliton.js/SuperCollider.js

    return multiNewUGen("AllpassN", AudioRate, [input,maxDel,del,decay], 1, 0); } +/** + * An allpass delay line with no interpolation. This version uses a localBuf. + * + * @class bufAllpassN + * @constructor + * @param buf LocalBuf to use for the delay + * @param del Delay time in seconds + * @param decay Time for the echoes to decay by 60 decibels. + * @example + * let test del => impulse 1 >> bufAllpassN (localBuf 44100 1) del 1 >> out 0<br> + * let t = test 0.1<br> + * stop t + */ +function bufAllpassN(buf, del, decay, input) +{ + return multiNewUGen("BufAllpassN", AudioRate, [input,buf,del,decay], 1, 0); +} + /** * Delays. * @submodule Delays @@ -1227,6 +2286,24 @@

    File: Soliton.js/SuperCollider.js

    return multiNewUGen("AllpassL", AudioRate, [input,maxDel,del,decay], 1, 0); } +/** + * An allpass delay line with linear interpolation. This version uses a localBuf. + * + * @class bufAllpassL + * @constructor + * @param buf LocalBuf to use for the delay + * @param del Delay time in seconds + * @param decay Time for the echoes to decay by 60 decibels. + * @example + * let test del => impulse 1 >> bufAllpassL (localBuf 44100 1) del 1 >> out 0<br> + * let t = test 0.1<br> + * stop t + */ +function bufAllpassL(buf, del, decay, input) +{ + return multiNewUGen("BufAllpassL", AudioRate, [input,buf,del,decay], 1, 0); +} + /** * An allpass delay line with cubic interpolation. * @@ -1245,6 +2322,24 @@

    File: Soliton.js/SuperCollider.js

    return multiNewUGen("AllpassC", AudioRate, [input,maxDel,del,decay], 1, 0); } +/** + * An allpass delay line with cubic interpolation. This version uses a localBuf. + * + * @class bufAllpassC + * @constructor + * @param buf LocalBuf to use for the delay + * @param del Delay time in seconds + * @param decay Time for the echoes to decay by 60 decibels. + * @example + * let test del => impulse 1 >> bufAllpassC (localBuf 44100 1) del 1 >> out 0<br> + * let t = test 0.1<br> + * stop t + */ +function bufAllpassC(buf, del, decay, input) +{ + return multiNewUGen("BufAllpassC", AudioRate, [input,buf,del,decay], 1, 0); +} + /** * A comb delay line with no interpolation. * @@ -1263,6 +2358,24 @@

    File: Soliton.js/SuperCollider.js

    return multiNewUGen("CombN", AudioRate, [input,maxDel,del,decay], 1, 0); } +/** + * A comb delay line with no interpolation. This version uses a localBuf. + * + * @class bufCombN + * @constructor + * @param buf LocalBuf to use for the delay + * @param del Delay time in seconds + * @param decay Time in seconds for the echoes to decay by 60 decibels. + * @example + * let test del => impulse 1 >> bufCombN (localBuf 44100 1) del 1 >> out 0<br> + * let t = test 0.1<br> + * stop t + */ +function bufCombN(buf, del, decay, input) +{ + return multiNewUGen("BufCombN", AudioRate, [buf, input, del, decay], 1, 0); +} + /** * A comb delay line with linear interpolation. * @@ -1281,6 +2394,24 @@

    File: Soliton.js/SuperCollider.js

    return multiNewUGen("CombL", AudioRate, [input,maxDel,del,decay], 1, 0); } +/** + * A comb delay line with cubic linear interpolation. This version uses a localBuf. + * + * @class bufCombL + * @constructor + * @param buf LocalBuf to use for the delay + * @param del Delay time in seconds + * @param decay Time in seconds for the echoes to decay by 60 decibels. + * @example + * let test del => impulse 1 >> bufCombL (localBuf 44100 1) del 1 >> out 0<br> + * let t = test 0.1<br> + * stop t + */ +function bufCombL(buf, del, decay, input) +{ + return multiNewUGen("BufCombL", AudioRate, [buf, input, del, decay], 1, 0); +} + /** * A comb delay line with cubic interpolation. * @@ -1299,6 +2430,24 @@

    File: Soliton.js/SuperCollider.js

    return multiNewUGen("CombC", AudioRate, [input,maxDel,del,decay], 1, 0); } +/** + * A comb delay line with cubic interpolation. This version uses a localBuf. + * + * @class bufCombC + * @constructor + * @param buf LocalBuf to use for the delay + * @param del Delay time in seconds + * @param decay Time in seconds for the echoes to decay by 60 decibels. + * @example + * let test del => impulse 1 >> bufCombC (localBuf 44100 1) del 1 >> out 0<br> + * let t = test 0.1<br> + * stop t + */ +function bufCombC(buf, del, decay, input) +{ + return multiNewUGen("BufCombC", AudioRate, [buf, input, del, decay], 1, 0); +} + /** * A simple delay with no interpolation. * @@ -1316,6 +2465,23 @@

    File: Soliton.js/SuperCollider.js

    return multiNewUGen("DelayN", AudioRate, [input,maxDel,del], 1, 0); } +/** + * A simple delay with no interpolation. This version uses a localBuf. + * + * @class bufDelayN + * @constructor + * @param buf LocalBuf to use for the delay + * @param del Delay time in seconds + * @example + * let test del => impulse 1 >> bufDelayN (localBuf 44100 1) del >> out 0<br> + * let t = test 0.1<br> + * stop t + */ +function bufDelayN(buf, del, input) +{ + return multiNewUGen("BufDelayN", AudioRate, [input,buf,del], 1, 0); +} + /** * A simple delay with linear interpolation. * @@ -1333,6 +2499,23 @@

    File: Soliton.js/SuperCollider.js

    return multiNewUGen("DelayL", AudioRate, [input,maxDel,del], 1, 0); } +/** + * A simple delay with linear interpolation. This version uses a localBuf. + * + * @class bufDelayL + * @constructor + * @param buf LocalBuf to use for the delay + * @param del Delay time in seconds + * @example + * let test del => impulse 1 >> bufDelayL (localBuf 44100 1) del >> out 0<br> + * let t = test 0.1<br> + * stop t + */ +function bufDelayL(buf, del, input) +{ + return multiNewUGen("BufDelayL", AudioRate, [input,buf,del], 1, 0); +} + /** * A simple delay with cubic interpolation. * @@ -1350,6 +2533,23 @@

    File: Soliton.js/SuperCollider.js

    return multiNewUGen("DelayC", AudioRate, [input,maxDel,del], 1, 0); } +/** + * A simple delay with cubic interpolation. This version uses a localBuf. + * + * @class bufDelayC + * @constructor + * @param buf LocalBuf to use for the delay + * @param del Delay time in seconds + * @example + * let test del => impulse 1 >> bufDelayC (localBuf 44100 1) del >> out 0<br> + * let t = test 0.1<br> + * stop t + */ +function bufDelayC(buf, del, input) +{ + return multiNewUGen("BufDelayC", AudioRate, [input,buf,del], 1, 0); +} + var _shapeNames = { step: 0, lin: 1, @@ -1480,7 +2680,7 @@

    File: Soliton.js/SuperCollider.js

    */ function out(busNum, value) { - var outGen = multiNewUGen("Out", AudioRate, [busNum, value], 0, 0); // Out has not outputs + var outGen = multiNewUGen("Out", AudioRate, [busNum, value], 0, 0); // Out has not outputs if(outGen instanceof Array) { @@ -1498,6 +2698,74 @@

    File: Soliton.js/SuperCollider.js

    * @submodule InputOutput */ +/** + * Reads audio from a range of audio buses. + * + * @class auxIn + * @constructor + * @param busNum The bus index to start reading from. + * @param numChannels The number of channels to read from. + * @example + * let simpleSynth freq => sin freq \* square (2\*tempoSeconds) * 0.25 >> out 20<br> + * let sSynth = simpleSynth 440<br> + * let fxSynth => auxIn 20 1 >> combC tempoSeconds [tempoSeconds/1, tempoSeconds/2] 10 >> out 0<br> + * let fx = Synth::after "fxSynth" [] server<br> + * stop sSynth<br> + * stop fx + */ +function auxIn(busNum, numChannels) +{ + var rates = []; + + for(var i = 0; i < numChannels; ++i) + { + rates.push(AudioRate); + } + + // !!! We indicate number of outputs using an array of rates. !!! + return newMultiOutUGen("In", rates, [busNum], 0); +} + +/** + * Pans a single channel input across a stereo field using equal power panning. + * + * @class pan + * @constructor + * @param position The position in the stereo field where the input will be panned. Range of -1 (left) to 1 (right). + * @param input The audio input to be panned. + * @example + * let test pos => white 1 >> pan pos >> out 0<br> + * let t = test-0.3 <br> + * stop t + */ + +function pan(position, input) +{ + // !!! We indicate number of outputs using an array of rates. This is 2 audio rate outputs !!! + return newMultiOutUGen("Pan2", [AudioRate, AudioRate], [input, position, 1], 0); +} + +/** + * Panning UGens + * @submodule Panning + */ + +/** + * Duplicates an input across a 2 index array. + * + * @class dup + * @constructor + * @param input The audio input to be expanded. + * @example + * let test freq => sin freq >> dup >> out 0<br> + * let t = test 440 <br> + * stop t + */ +function dup(input) +{ + return [input, input]; +} + // Control is used internally for SynthDef arguments/controls function _ControlName(name, controlIndex) { @@ -1519,10 +2787,81 @@

    File: Soliton.js/SuperCollider.js

    return multiNewUGen("Control", ControlRate, values, numControls, 0); } +// Used internally to keep track of local bufs +function _MaxLocalBufs() +{ + return new UGen("MaxLocalBufs", ScalarRate, [0], 1, 0); +} + +/** + * A buffer local to a synth. + * + * @class localBuf + * @constructor + * @param frames Size of the buffer in samples + * @param channels Number of channels for the buffer + * @example + * let test del => impulse 1 >> bufCombC (localBuf 44100 1) del 1 >> out 0<br> + * let t = test 0.1<br> + * stop t + */ +function localBuf(frames, channels) +{ + var lb = multiNewUGen("LocalBuf", ScalarRate, [channels, frames], 1, 0); + + if(lb instanceof Array) + return lb.map(function(e) { e.isLocalBuf = true; return e; }); + + lb.isLocalBuf = true; + return lb; +} + +/** + * Buffers. + * @submodule Buffers + */ + +////////////////////////////////////////////// +//// Write input spec protoype inheritance +////////////////////////////////////////////// + +Number.prototype.writeInputSpec = function(buf, offset, constants, controls) +{ + buf.writeInt32BE(-1, offset); + offset += 4; + buf.writeInt32BE(constants[this.valueOf()], offset); + return offset + 4; +} + +_ControlName.prototype.writeInputSpec = function(buf, offset, constants, controls) +{ + buf.writeInt32BE(0, offset); // The control ugen is always in the 0 index + offset += 4; + buf.writeInt32BE(controls[this.name], offset); + return offset + 4; +} + +UGen.prototype.writeInputSpec = function(buf, offset, constants, controls) +{ + buf.writeInt32BE(this.synthIndex, offset); + offset += 4; + buf.writeInt32BE(this.outputIndex, offset); + return offset + 4; +} + +MultiOutUGen.prototype.writeInputSpec = function(buf, offset, constants, controls) +{ + buf.writeInt32BE(this.synthIndex, offset); + offset += 4; + buf.writeInt32BE(this.outputIndex, offset); + return offset + 4; +} + function _writeInputSpec(buf, ugen, offset, constants, controls) { + /* var isNum = typeof ugen === "number"; - + if(isNum) { buf.writeInt32BE(-1, offset); @@ -1544,11 +2883,42 @@

    File: Soliton.js/SuperCollider.js

    buf.writeInt32BE(ugen.outputIndex, offset); } - return offset + 4; + return offset + 4;*/ + + return ugen.writeInputSpec(buf, offset, constants, controls); +} + +////////////////////////////////////////////// +//// Write output spec protoype inheritance +////////////////////////////////////////////// + + +UGen.prototype.writeOutputSpec = function(buf, offset, constants, controls) +{ + for(var i = 0; i < this.numOutputs; ++i) + { + buf.writeInt8(this.rate, offset); + ++offset; + } + + return offset; +} + +MultiOutUGen.prototype.writeOutputSpec = function(buf, offset, constants, controls) +{ + for(var i = 0; i < this.numOutputs; ++i) + { + offset = this.channels[i].writeOutputSpec(buf, offset, constants, controls); + } + + return offset; } function _writeUGenBytes(buf, ugen, offset, constants, controls) { + if(!ugen.addToSynth) // don't write proxies + return offset; + offset = _pstring(buf, ugen.name, offset); buf.writeInt8(ugen.rate, offset); offset += 1; @@ -1564,13 +2934,16 @@

    File: Soliton.js/SuperCollider.js

    offset = _writeInputSpec(buf, ugen.inputs[i], offset, constants, controls); } + /* for(var i = 0; i < ugen.numOutputs; ++i) { buf.writeInt8(ugen.rate, offset); ++offset; } + + return offset;*/ - return offset; + return ugen.writeOutputSpec(buf, offset, constants, controls); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1625,11 +2998,21 @@

    File: Soliton.js/SuperCollider.js

    } var defList = [ugen]; - + for(var i = ugen.inputs.length - 1; i >= 0; --i) { defList = defList.concat(_ugenToDefList(ugen.inputs[i], constants, controls)); } + + if(ugen.isLocalBuf) // LocalBuf support + { + if(!constants.hasOwnProperty("maxLocalBufs")) + constants["maxLocalBufs"] = _MaxLocalBufs(); + + constants["maxLocalBufs"].inputs[0] += 1; // increment maxLocalBufs + ugen.inputs = ugen.inputs.concat([constants["maxLocalBufs"]]); + ugen.numInputs += 1; + } return defList; } @@ -1664,23 +3047,42 @@

    File: Soliton.js/SuperCollider.js

    { var offset = 4; // default offset to for becase we always start with the same header var numBytes = 11 + name.length; - var buf = new Buffer(1024); + var buf = new Buffer(1024); // NEED TO FIGURE OUT A WAY TO DYNAMICALLY SET THIS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Initialize controls, constants, and children var controls = { numControls: 0, arr: [] }; - var constants = { numConstants: 1, arr: [0], 0:0 }; // We always need the zero constat for controls + var constants = { numConstants: 1, arr: [0], 0:0 }; // We always need the zero constant for controls var children = _ugenToDefList(def, constants, controls).reverse(); - + var numChildren = 0; + children = _removeDuplicateChildren(children); + + if(constants.hasOwnProperty("maxLocalBufs")) // LocalBuf support + { + var maxLocalBufs = constants["maxLocalBufs"]; + var numMaxLocalBufs = maxLocalBufs.inputs[0]; + + children = [maxLocalBufs].concat(children); + + if(!constants.hasOwnProperty(numMaxLocalBufs)) + { + constants[numMaxLocalBufs] = constants.numConstants; + constants.arr.push(numMaxLocalBufs); + constants.numConstants += 1; + } + } if(controls.numControls > 0) children = [_Control(controls.numControls)].concat(children); - + for(var i = 0; i < children.length; ++i) { - children[i].synthIndex = i; + if(children[i].synthIndex == null) + { + children[i].setSynthIndex(numChildren++); + } } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1730,7 +3132,7 @@

    File: Soliton.js/SuperCollider.js

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // UGens - buf.writeInt32BE(children.length, offset); // Number of UGens + buf.writeInt32BE(numChildren, offset); // Number of UGens offset += 4; offset = _writeDef(buf, children, offset, constants, controls); // Compile the ugen list @@ -1746,7 +3148,6 @@

    File: Soliton.js/SuperCollider.js

    // buf = buf.slice(0, offset); s.sendMsg('/d_recv', [buf.slice(0, offset)]); - // console.log(buf.toString()); /* var path = "/tmp/"+name+".scsyndef"; @@ -1786,7 +3187,9 @@

    File: Soliton.js/SuperCollider.js

    function freeAll() { + s.sendMsg('/clearSched', []); s.sendMsg('/g_freeAll', [1]); + Lich.scheduler.freeScheduledEvents(); } // Redefine Lich.compileSynthDef to use SuperCollider behavior instead of web audio diff --git a/Docs/files/third-party_codemirror-3.20_addon_edit_closetag.js.html b/Docs/files/third-party_codemirror-3.20_addon_edit_closetag.js.html new file mode 100644 index 0000000..d7cc367 --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_addon_edit_closetag.js.html @@ -0,0 +1,432 @@ + + + + + third-party/codemirror-3.20/addon/edit/closetag.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/addon/edit/closetag.js

    + +
    +
    +/**
    + * Tag-closer extension for CodeMirror.
    + *
    + * This extension adds an "autoCloseTags" option that can be set to
    + * either true to get the default behavior, or an object to further
    + * configure its behavior.
    + *
    + * These are supported options:
    + *
    + * `whenClosing` (default true)
    + *   Whether to autoclose when the '/' of a closing tag is typed.
    + * `whenOpening` (default true)
    + *   Whether to autoclose the tag when the final '>' of an opening
    + *   tag is typed.
    + * `dontCloseTags` (default is empty tags for HTML, none for XML)
    + *   An array of tag names that should not be autoclosed.
    + * `indentTags` (default is block tags for HTML, none for XML)
    + *   An array of tag names that should, when opened, cause a
    + *   blank line to be added inside the tag, and the blank line and
    + *   closing line to be indented.
    + *
    + * See demos/closetag.html for a usage example.
    + */
    +
    +(function() {
    +  CodeMirror.defineOption("autoCloseTags", false, function(cm, val, old) {
    +    if (old != CodeMirror.Init && old)
    +      cm.removeKeyMap("autoCloseTags");
    +    if (!val) return;
    +    var map = {name: "autoCloseTags"};
    +    if (typeof val != "object" || val.whenClosing)
    +      map["'/'"] = function(cm) { return autoCloseSlash(cm); };
    +    if (typeof val != "object" || val.whenOpening)
    +      map["'>'"] = function(cm) { return autoCloseGT(cm); };
    +    cm.addKeyMap(map);
    +  });
    +
    +  var htmlDontClose = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param",
    +                       "source", "track", "wbr"];
    +  var htmlIndent = ["applet", "blockquote", "body", "button", "div", "dl", "fieldset", "form", "frameset", "h1", "h2", "h3", "h4",
    +                    "h5", "h6", "head", "html", "iframe", "layer", "legend", "object", "ol", "p", "select", "table", "ul"];
    +
    +  function autoCloseGT(cm) {
    +    var pos = cm.getCursor(), tok = cm.getTokenAt(pos);
    +    var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
    +    if (inner.mode.name != "xml" || !state.tagName) return CodeMirror.Pass;
    +
    +    var opt = cm.getOption("autoCloseTags"), html = inner.mode.configuration == "html";
    +    var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose);
    +    var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent);
    +
    +    var tagName = state.tagName;
    +    if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);
    +    var lowerTagName = tagName.toLowerCase();
    +    // Don't process the '>' at the end of an end-tag or self-closing tag
    +    if (tok.type == "string" && (tok.end != pos.ch || !/[\"\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||
    +        tok.type == "tag" && state.type == "closeTag" ||
    +        tok.string.indexOf("/") == (tok.string.length - 1) || // match something like <someTagName />
    +        dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1)
    +      return CodeMirror.Pass;
    +
    +    var doIndent = indentTags && indexOf(indentTags, lowerTagName) > -1;
    +    var curPos = doIndent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1);
    +    cm.replaceSelection(">" + (doIndent ? "\n\n" : "") + "</" + tagName + ">",
    +                        {head: curPos, anchor: curPos});
    +    if (doIndent) {
    +      cm.indentLine(pos.line + 1);
    +      cm.indentLine(pos.line + 2);
    +    }
    +  }
    +
    +  function autoCloseSlash(cm) {
    +    var pos = cm.getCursor(), tok = cm.getTokenAt(pos);
    +    var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
    +    if (tok.type == "string" || tok.string.charAt(0) != "<" ||
    +        tok.start != pos.ch - 1 || inner.mode.name != "xml")
    +      return CodeMirror.Pass;
    +
    +    var tagName = state.context && state.context.tagName;
    +    if (tagName) cm.replaceSelection("/" + tagName + ">", "end");
    +  }
    +
    +  function indexOf(collection, elt) {
    +    if (collection.indexOf) return collection.indexOf(elt);
    +    for (var i = 0, e = collection.length; i < e; ++i)
    +      if (collection[i] == elt) return i;
    +    return -1;
    +  }
    +})();
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_keymap_vim.js.html b/Docs/files/third-party_codemirror-3.20_keymap_vim.js.html new file mode 100644 index 0000000..9eba4c2 --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_keymap_vim.js.html @@ -0,0 +1,4046 @@ + + + + + third-party/codemirror-3.20/keymap/vim.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/keymap/vim.js

    + +
    +
    +/**
    + * Supported keybindings:
    + *
    + *   Motion:
    + *   h, j, k, l
    + *   gj, gk
    + *   e, E, w, W, b, B, ge, gE
    + *   f<character>, F<character>, t<character>, T<character>
    + *   $, ^, 0, -, +, _
    + *   gg, G
    + *   %
    + *   '<character>, `<character>
    + *
    + *   Operator:
    + *   d, y, c
    + *   dd, yy, cc
    + *   g~, g~g~
    + *   >, <, >>, <<
    + *
    + *   Operator-Motion:
    + *   x, X, D, Y, C, ~
    + *
    + *   Action:
    + *   a, i, s, A, I, S, o, O
    + *   zz, z., z<CR>, zt, zb, z-
    + *   J
    + *   u, Ctrl-r
    + *   m<character>
    + *   r<character>
    + *
    + *   Modes:
    + *   ESC - leave insert mode, visual mode, and clear input state.
    + *   Ctrl-[, Ctrl-c - same as ESC.
    + *
    + * Registers: unamed, -, a-z, A-Z, 0-9
    + *   (Does not respect the special case for number registers when delete
    + *    operator is made with these commands: %, (, ),  , /, ?, n, N, {, } )
    + *   TODO: Implement the remaining registers.
    + * Marks: a-z, A-Z, and 0-9
    + *   TODO: Implement the remaining special marks. They have more complex
    + *       behavior.
    + *
    + * Events:
    + *  'vim-mode-change' - raised on the editor anytime the current mode changes,
    + *                      Event object: {mode: "visual", subMode: "linewise"}
    + *
    + * Code structure:
    + *  1. Default keymap
    + *  2. Variable declarations and short basic helpers
    + *  3. Instance (External API) implementation
    + *  4. Internal state tracking objects (input state, counter) implementation
    + *     and instanstiation
    + *  5. Key handler (the main command dispatcher) implementation
    + *  6. Motion, operator, and action implementations
    + *  7. Helper functions for the key handler, motions, operators, and actions
    + *  8. Set up Vim to work as a keymap for CodeMirror.
    + */
    +
    +(function() {
    +  'use strict';
    +
    +  var defaultKeymap = [
    +    // Key to key mapping. This goes first to make it possible to override
    +    // existing mappings.
    +    { keys: ['<Left>'], type: 'keyToKey', toKeys: ['h'] },
    +    { keys: ['<Right>'], type: 'keyToKey', toKeys: ['l'] },
    +    { keys: ['<Up>'], type: 'keyToKey', toKeys: ['k'] },
    +    { keys: ['<Down>'], type: 'keyToKey', toKeys: ['j'] },
    +    { keys: ['<Space>'], type: 'keyToKey', toKeys: ['l'] },
    +    { keys: ['<BS>'], type: 'keyToKey', toKeys: ['h'] },
    +    { keys: ['<C-Space>'], type: 'keyToKey', toKeys: ['W'] },
    +    { keys: ['<C-BS>'], type: 'keyToKey', toKeys: ['B'] },
    +    { keys: ['<S-Space>'], type: 'keyToKey', toKeys: ['w'] },
    +    { keys: ['<S-BS>'], type: 'keyToKey', toKeys: ['b'] },
    +    { keys: ['<C-n>'], type: 'keyToKey', toKeys: ['j'] },
    +    { keys: ['<C-p>'], type: 'keyToKey', toKeys: ['k'] },
    +    { keys: ['C-['], type: 'keyToKey', toKeys: ['<Esc>'] },
    +    { keys: ['<C-c>'], type: 'keyToKey', toKeys: ['<Esc>'] },
    +    { keys: ['s'], type: 'keyToKey', toKeys: ['c', 'l'], context: 'normal' },
    +    { keys: ['s'], type: 'keyToKey', toKeys: ['x', 'i'], context: 'visual'},
    +    { keys: ['S'], type: 'keyToKey', toKeys: ['c', 'c'], context: 'normal' },
    +    { keys: ['S'], type: 'keyToKey', toKeys: ['d', 'c', 'c'], context: 'visual' },
    +    { keys: ['<Home>'], type: 'keyToKey', toKeys: ['0'] },
    +    { keys: ['<End>'], type: 'keyToKey', toKeys: ['$'] },
    +    { keys: ['<PageUp>'], type: 'keyToKey', toKeys: ['<C-b>'] },
    +    { keys: ['<PageDown>'], type: 'keyToKey', toKeys: ['<C-f>'] },
    +    // Motions
    +    { keys: ['H'], type: 'motion',
    +        motion: 'moveToTopLine',
    +        motionArgs: { linewise: true, toJumplist: true }},
    +    { keys: ['M'], type: 'motion',
    +        motion: 'moveToMiddleLine',
    +        motionArgs: { linewise: true, toJumplist: true }},
    +    { keys: ['L'], type: 'motion',
    +        motion: 'moveToBottomLine',
    +        motionArgs: { linewise: true, toJumplist: true }},
    +    { keys: ['h'], type: 'motion',
    +        motion: 'moveByCharacters',
    +        motionArgs: { forward: false }},
    +    { keys: ['l'], type: 'motion',
    +        motion: 'moveByCharacters',
    +        motionArgs: { forward: true }},
    +    { keys: ['j'], type: 'motion',
    +        motion: 'moveByLines',
    +        motionArgs: { forward: true, linewise: true }},
    +    { keys: ['k'], type: 'motion',
    +        motion: 'moveByLines',
    +        motionArgs: { forward: false, linewise: true }},
    +    { keys: ['g','j'], type: 'motion',
    +        motion: 'moveByDisplayLines',
    +        motionArgs: { forward: true }},
    +    { keys: ['g','k'], type: 'motion',
    +        motion: 'moveByDisplayLines',
    +        motionArgs: { forward: false }},
    +    { keys: ['w'], type: 'motion',
    +        motion: 'moveByWords',
    +        motionArgs: { forward: true, wordEnd: false }},
    +    { keys: ['W'], type: 'motion',
    +        motion: 'moveByWords',
    +        motionArgs: { forward: true, wordEnd: false, bigWord: true }},
    +    { keys: ['e'], type: 'motion',
    +        motion: 'moveByWords',
    +        motionArgs: { forward: true, wordEnd: true, inclusive: true }},
    +    { keys: ['E'], type: 'motion',
    +        motion: 'moveByWords',
    +        motionArgs: { forward: true, wordEnd: true, bigWord: true,
    +            inclusive: true }},
    +    { keys: ['b'], type: 'motion',
    +        motion: 'moveByWords',
    +        motionArgs: { forward: false, wordEnd: false }},
    +    { keys: ['B'], type: 'motion',
    +        motion: 'moveByWords',
    +        motionArgs: { forward: false, wordEnd: false, bigWord: true }},
    +    { keys: ['g', 'e'], type: 'motion',
    +        motion: 'moveByWords',
    +        motionArgs: { forward: false, wordEnd: true, inclusive: true }},
    +    { keys: ['g', 'E'], type: 'motion',
    +        motion: 'moveByWords',
    +        motionArgs: { forward: false, wordEnd: true, bigWord: true,
    +            inclusive: true }},
    +    { keys: ['{'], type: 'motion', motion: 'moveByParagraph',
    +        motionArgs: { forward: false, toJumplist: true }},
    +    { keys: ['}'], type: 'motion', motion: 'moveByParagraph',
    +        motionArgs: { forward: true, toJumplist: true }},
    +    { keys: ['<C-f>'], type: 'motion',
    +        motion: 'moveByPage', motionArgs: { forward: true }},
    +    { keys: ['<C-b>'], type: 'motion',
    +        motion: 'moveByPage', motionArgs: { forward: false }},
    +    { keys: ['<C-d>'], type: 'motion',
    +        motion: 'moveByScroll',
    +        motionArgs: { forward: true, explicitRepeat: true }},
    +    { keys: ['<C-u>'], type: 'motion',
    +        motion: 'moveByScroll',
    +        motionArgs: { forward: false, explicitRepeat: true }},
    +    { keys: ['g', 'g'], type: 'motion',
    +        motion: 'moveToLineOrEdgeOfDocument',
    +        motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true }},
    +    { keys: ['G'], type: 'motion',
    +        motion: 'moveToLineOrEdgeOfDocument',
    +        motionArgs: { forward: true, explicitRepeat: true, linewise: true, toJumplist: true }},
    +    { keys: ['0'], type: 'motion', motion: 'moveToStartOfLine' },
    +    { keys: ['^'], type: 'motion',
    +        motion: 'moveToFirstNonWhiteSpaceCharacter' },
    +    { keys: ['+'], type: 'motion',
    +        motion: 'moveByLines',
    +        motionArgs: { forward: true, toFirstChar:true }},
    +    { keys: ['-'], type: 'motion',
    +        motion: 'moveByLines',
    +        motionArgs: { forward: false, toFirstChar:true }},
    +    { keys: ['_'], type: 'motion',
    +        motion: 'moveByLines',
    +        motionArgs: { forward: true, toFirstChar:true, repeatOffset:-1 }},
    +    { keys: ['$'], type: 'motion',
    +        motion: 'moveToEol',
    +        motionArgs: { inclusive: true }},
    +    { keys: ['%'], type: 'motion',
    +        motion: 'moveToMatchedSymbol',
    +        motionArgs: { inclusive: true, toJumplist: true }},
    +    { keys: ['f', 'character'], type: 'motion',
    +        motion: 'moveToCharacter',
    +        motionArgs: { forward: true , inclusive: true }},
    +    { keys: ['F', 'character'], type: 'motion',
    +        motion: 'moveToCharacter',
    +        motionArgs: { forward: false }},
    +    { keys: ['t', 'character'], type: 'motion',
    +        motion: 'moveTillCharacter',
    +        motionArgs: { forward: true, inclusive: true }},
    +    { keys: ['T', 'character'], type: 'motion',
    +        motion: 'moveTillCharacter',
    +        motionArgs: { forward: false }},
    +    { keys: [';'], type: 'motion', motion: 'repeatLastCharacterSearch',
    +        motionArgs: { forward: true }},
    +    { keys: [','], type: 'motion', motion: 'repeatLastCharacterSearch',
    +        motionArgs: { forward: false }},
    +    { keys: ['\'', 'character'], type: 'motion', motion: 'goToMark',
    +        motionArgs: {toJumplist: true}},
    +    { keys: ['`', 'character'], type: 'motion', motion: 'goToMark',
    +        motionArgs: {toJumplist: true}},
    +    { keys: [']', '`'], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true } },
    +    { keys: ['[', '`'], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false } },
    +    { keys: [']', '\''], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true, linewise: true } },
    +    { keys: ['[', '\''], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false, linewise: true } },
    +    { keys: [']', 'character'], type: 'motion',
    +        motion: 'moveToSymbol',
    +        motionArgs: { forward: true, toJumplist: true}},
    +    { keys: ['[', 'character'], type: 'motion',
    +        motion: 'moveToSymbol',
    +        motionArgs: { forward: false, toJumplist: true}},
    +    { keys: ['|'], type: 'motion',
    +        motion: 'moveToColumn',
    +        motionArgs: { }},
    +    // Operators
    +    { keys: ['d'], type: 'operator', operator: 'delete' },
    +    { keys: ['y'], type: 'operator', operator: 'yank' },
    +    { keys: ['c'], type: 'operator', operator: 'change' },
    +    { keys: ['>'], type: 'operator', operator: 'indent',
    +        operatorArgs: { indentRight: true }},
    +    { keys: ['<'], type: 'operator', operator: 'indent',
    +        operatorArgs: { indentRight: false }},
    +    { keys: ['g', '~'], type: 'operator', operator: 'swapcase' },
    +    { keys: ['n'], type: 'motion', motion: 'findNext',
    +        motionArgs: { forward: true, toJumplist: true }},
    +    { keys: ['N'], type: 'motion', motion: 'findNext',
    +        motionArgs: { forward: false, toJumplist: true }},
    +    // Operator-Motion dual commands
    +    { keys: ['x'], type: 'operatorMotion', operator: 'delete',
    +        motion: 'moveByCharacters', motionArgs: { forward: true },
    +        operatorMotionArgs: { visualLine: false }},
    +    { keys: ['X'], type: 'operatorMotion', operator: 'delete',
    +        motion: 'moveByCharacters', motionArgs: { forward: false },
    +        operatorMotionArgs: { visualLine: true }},
    +    { keys: ['D'], type: 'operatorMotion', operator: 'delete',
    +      motion: 'moveToEol', motionArgs: { inclusive: true },
    +        operatorMotionArgs: { visualLine: true }},
    +    { keys: ['Y'], type: 'operatorMotion', operator: 'yank',
    +        motion: 'moveToEol', motionArgs: { inclusive: true },
    +        operatorMotionArgs: { visualLine: true }},
    +    { keys: ['C'], type: 'operatorMotion',
    +        operator: 'change',
    +        motion: 'moveToEol', motionArgs: { inclusive: true },
    +        operatorMotionArgs: { visualLine: true }},
    +    { keys: ['~'], type: 'operatorMotion',
    +        operator: 'swapcase', operatorArgs: { shouldMoveCursor: true },
    +        motion: 'moveByCharacters', motionArgs: { forward: true }},
    +    // Actions
    +    { keys: ['<C-i>'], type: 'action', action: 'jumpListWalk',
    +        actionArgs: { forward: true }},
    +    { keys: ['<C-o>'], type: 'action', action: 'jumpListWalk',
    +        actionArgs: { forward: false }},
    +    { keys: ['a'], type: 'action', action: 'enterInsertMode', isEdit: true,
    +        actionArgs: { insertAt: 'charAfter' }},
    +    { keys: ['A'], type: 'action', action: 'enterInsertMode', isEdit: true,
    +        actionArgs: { insertAt: 'eol' }},
    +    { keys: ['i'], type: 'action', action: 'enterInsertMode', isEdit: true,
    +        actionArgs: { insertAt: 'inplace' }},
    +    { keys: ['I'], type: 'action', action: 'enterInsertMode', isEdit: true,
    +        actionArgs: { insertAt: 'firstNonBlank' }},
    +    { keys: ['o'], type: 'action', action: 'newLineAndEnterInsertMode',
    +        isEdit: true, interlaceInsertRepeat: true,
    +        actionArgs: { after: true }},
    +    { keys: ['O'], type: 'action', action: 'newLineAndEnterInsertMode',
    +        isEdit: true, interlaceInsertRepeat: true,
    +        actionArgs: { after: false }},
    +    { keys: ['v'], type: 'action', action: 'toggleVisualMode' },
    +    { keys: ['V'], type: 'action', action: 'toggleVisualMode',
    +        actionArgs: { linewise: true }},
    +    { keys: ['J'], type: 'action', action: 'joinLines', isEdit: true },
    +    { keys: ['p'], type: 'action', action: 'paste', isEdit: true,
    +        actionArgs: { after: true, isEdit: true }},
    +    { keys: ['P'], type: 'action', action: 'paste', isEdit: true,
    +        actionArgs: { after: false, isEdit: true }},
    +    { keys: ['r', 'character'], type: 'action', action: 'replace', isEdit: true },
    +    { keys: ['@', 'character'], type: 'action', action: 'replayMacro' },
    +    { keys: ['q', 'character'], type: 'action', action: 'enterMacroRecordMode' },
    +    // Handle Replace-mode as a special case of insert mode.
    +    { keys: ['R'], type: 'action', action: 'enterInsertMode', isEdit: true,
    +        actionArgs: { replace: true }},
    +    { keys: ['u'], type: 'action', action: 'undo' },
    +    { keys: ['<C-r>'], type: 'action', action: 'redo' },
    +    { keys: ['m', 'character'], type: 'action', action: 'setMark' },
    +    { keys: ['"', 'character'], type: 'action', action: 'setRegister' },
    +    { keys: ['z', 'z'], type: 'action', action: 'scrollToCursor',
    +        actionArgs: { position: 'center' }},
    +    { keys: ['z', '.'], type: 'action', action: 'scrollToCursor',
    +        actionArgs: { position: 'center' },
    +        motion: 'moveToFirstNonWhiteSpaceCharacter' },
    +    { keys: ['z', 't'], type: 'action', action: 'scrollToCursor',
    +        actionArgs: { position: 'top' }},
    +    { keys: ['z', '<CR>'], type: 'action', action: 'scrollToCursor',
    +        actionArgs: { position: 'top' },
    +        motion: 'moveToFirstNonWhiteSpaceCharacter' },
    +    { keys: ['z', '-'], type: 'action', action: 'scrollToCursor',
    +        actionArgs: { position: 'bottom' }},
    +    { keys: ['z', 'b'], type: 'action', action: 'scrollToCursor',
    +        actionArgs: { position: 'bottom' },
    +        motion: 'moveToFirstNonWhiteSpaceCharacter' },
    +    { keys: ['.'], type: 'action', action: 'repeatLastEdit' },
    +    { keys: ['<C-a>'], type: 'action', action: 'incrementNumberToken',
    +        isEdit: true,
    +        actionArgs: {increase: true, backtrack: false}},
    +    { keys: ['<C-x>'], type: 'action', action: 'incrementNumberToken',
    +        isEdit: true,
    +        actionArgs: {increase: false, backtrack: false}},
    +    // Text object motions
    +    { keys: ['a', 'character'], type: 'motion',
    +        motion: 'textObjectManipulation' },
    +    { keys: ['i', 'character'], type: 'motion',
    +        motion: 'textObjectManipulation',
    +        motionArgs: { textObjectInner: true }},
    +    // Search
    +    { keys: ['/'], type: 'search',
    +        searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true }},
    +    { keys: ['?'], type: 'search',
    +        searchArgs: { forward: false, querySrc: 'prompt', toJumplist: true }},
    +    { keys: ['*'], type: 'search',
    +        searchArgs: { forward: true, querySrc: 'wordUnderCursor', toJumplist: true }},
    +    { keys: ['#'], type: 'search',
    +        searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true }},
    +    // Ex command
    +    { keys: [':'], type: 'ex' }
    +  ];
    +
    +  var Vim = function() {
    +    CodeMirror.defineOption('vimMode', false, function(cm, val) {
    +      if (val) {
    +        cm.setOption('keyMap', 'vim');
    +        CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
    +        cm.on('beforeSelectionChange', beforeSelectionChange);
    +        maybeInitVimState(cm);
    +      } else if (cm.state.vim) {
    +        cm.setOption('keyMap', 'default');
    +        cm.off('beforeSelectionChange', beforeSelectionChange);
    +        cm.state.vim = null;
    +      }
    +    });
    +    function beforeSelectionChange(cm, cur) {
    +      var vim = cm.state.vim;
    +      if (vim.insertMode || vim.exMode) return;
    +
    +      var head = cur.head;
    +      if (head.ch && head.ch == cm.doc.getLine(head.line).length) {
    +        head.ch--;
    +      }
    +    }
    +
    +    var numberRegex = /[\d]/;
    +    var wordRegexp = [(/\w/), (/[^\w\s]/)], bigWordRegexp = [(/\S/)];
    +    function makeKeyRange(start, size) {
    +      var keys = [];
    +      for (var i = start; i < start + size; i++) {
    +        keys.push(String.fromCharCode(i));
    +      }
    +      return keys;
    +    }
    +    var upperCaseAlphabet = makeKeyRange(65, 26);
    +    var lowerCaseAlphabet = makeKeyRange(97, 26);
    +    var numbers = makeKeyRange(48, 10);
    +    var specialSymbols = '~`!@#$%^&*()_-+=[{}]\\|/?.,<>:;"\''.split('');
    +    var specialKeys = ['Left', 'Right', 'Up', 'Down', 'Space', 'Backspace',
    +        'Esc', 'Home', 'End', 'PageUp', 'PageDown', 'Enter'];
    +    var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']);
    +    var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '"']);
    +
    +    function isLine(cm, line) {
    +      return line >= cm.firstLine() && line <= cm.lastLine();
    +    }
    +    function isLowerCase(k) {
    +      return (/^[a-z]$/).test(k);
    +    }
    +    function isMatchableSymbol(k) {
    +      return '()[]{}'.indexOf(k) != -1;
    +    }
    +    function isNumber(k) {
    +      return numberRegex.test(k);
    +    }
    +    function isUpperCase(k) {
    +      return (/^[A-Z]$/).test(k);
    +    }
    +    function isWhiteSpaceString(k) {
    +      return (/^\s*$/).test(k);
    +    }
    +    function inArray(val, arr) {
    +      for (var i = 0; i < arr.length; i++) {
    +        if (arr[i] == val) {
    +          return true;
    +        }
    +      }
    +      return false;
    +    }
    +
    +    var createCircularJumpList = function() {
    +      var size = 100;
    +      var pointer = -1;
    +      var head = 0;
    +      var tail = 0;
    +      var buffer = new Array(size);
    +      function add(cm, oldCur, newCur) {
    +        var current = pointer % size;
    +        var curMark = buffer[current];
    +        function useNextSlot(cursor) {
    +          var next = ++pointer % size;
    +          var trashMark = buffer[next];
    +          if (trashMark) {
    +            trashMark.clear();
    +          }
    +          buffer[next] = cm.setBookmark(cursor);
    +        }
    +        if (curMark) {
    +          var markPos = curMark.find();
    +          // avoid recording redundant cursor position
    +          if (markPos && !cursorEqual(markPos, oldCur)) {
    +            useNextSlot(oldCur);
    +          }
    +        } else {
    +          useNextSlot(oldCur);
    +        }
    +        useNextSlot(newCur);
    +        head = pointer;
    +        tail = pointer - size + 1;
    +        if (tail < 0) {
    +          tail = 0;
    +        }
    +      }
    +      function move(cm, offset) {
    +        pointer += offset;
    +        if (pointer > head) {
    +          pointer = head;
    +        } else if (pointer < tail) {
    +          pointer = tail;
    +        }
    +        var mark = buffer[(size + pointer) % size];
    +        // skip marks that are temporarily removed from text buffer
    +        if (mark && !mark.find()) {
    +          var inc = offset > 0 ? 1 : -1;
    +          var newCur;
    +          var oldCur = cm.getCursor();
    +          do {
    +            pointer += inc;
    +            mark = buffer[(size + pointer) % size];
    +            // skip marks that are the same as current position
    +            if (mark &&
    +                (newCur = mark.find()) &&
    +                !cursorEqual(oldCur, newCur)) {
    +              break;
    +            }
    +          } while (pointer < head && pointer > tail);
    +        }
    +        return mark;
    +      }
    +      return {
    +        cachedCursor: undefined, //used for # and * jumps
    +        add: add,
    +        move: move
    +      };
    +    };
    +
    +    var createMacroState = function() {
    +      return {
    +        macroKeyBuffer: [],
    +        latestRegister: undefined,
    +        inReplay: false,
    +        lastInsertModeChanges: {
    +          changes: [], // Change list
    +          expectCursorActivityForChange: false // Set to true on change, false on cursorActivity.
    +        },
    +        enteredMacroMode: undefined,
    +        isMacroPlaying: false,
    +        toggle: function(cm, registerName) {
    +          if (this.enteredMacroMode) { //onExit
    +            this.enteredMacroMode(); // close dialog
    +            this.enteredMacroMode = undefined;
    +          } else { //onEnter
    +            this.latestRegister = registerName;
    +            this.enteredMacroMode = cm.openDialog(
    +              '(recording)['+registerName+']', null, {bottom:true});
    +          }
    +        }
    +      };
    +    };
    +
    +
    +    function maybeInitVimState(cm) {
    +      if (!cm.state.vim) {
    +        // Store instance state in the CodeMirror object.
    +        cm.state.vim = {
    +          inputState: new InputState(),
    +          // Vim's input state that triggered the last edit, used to repeat
    +          // motions and operators with '.'.
    +          lastEditInputState: undefined,
    +          // Vim's action command before the last edit, used to repeat actions
    +          // with '.' and insert mode repeat.
    +          lastEditActionCommand: undefined,
    +          // When using jk for navigation, if you move from a longer line to a
    +          // shorter line, the cursor may clip to the end of the shorter line.
    +          // If j is pressed again and cursor goes to the next line, the
    +          // cursor should go back to its horizontal position on the longer
    +          // line if it can. This is to keep track of the horizontal position.
    +          lastHPos: -1,
    +          // Doing the same with screen-position for gj/gk
    +          lastHSPos: -1,
    +          // The last motion command run. Cleared if a non-motion command gets
    +          // executed in between.
    +          lastMotion: null,
    +          marks: {},
    +          insertMode: false,
    +          // Repeat count for changes made in insert mode, triggered by key
    +          // sequences like 3,i. Only exists when insertMode is true.
    +          insertModeRepeat: undefined,
    +          visualMode: false,
    +          // If we are in visual line mode. No effect if visualMode is false.
    +          visualLine: false
    +        };
    +      }
    +      return cm.state.vim;
    +    }
    +    var vimGlobalState;
    +    function resetVimGlobalState() {
    +      vimGlobalState = {
    +        // The current search query.
    +        searchQuery: null,
    +        // Whether we are searching backwards.
    +        searchIsReversed: false,
    +        jumpList: createCircularJumpList(),
    +        macroModeState: createMacroState(),
    +        // Recording latest f, t, F or T motion command.
    +        lastChararacterSearch: {increment:0, forward:true, selectedCharacter:''},
    +        registerController: new RegisterController({})
    +      };
    +    }
    +
    +    var vimApi= {
    +      buildKeyMap: function() {
    +        // TODO: Convert keymap into dictionary format for fast lookup.
    +      },
    +      // Testing hook, though it might be useful to expose the register
    +      // controller anyways.
    +      getRegisterController: function() {
    +        return vimGlobalState.registerController;
    +      },
    +      // Testing hook.
    +      resetVimGlobalState_: resetVimGlobalState,
    +
    +      // Testing hook.
    +      getVimGlobalState_: function() {
    +        return vimGlobalState;
    +      },
    +
    +      // Testing hook.
    +      maybeInitVimState_: maybeInitVimState,
    +
    +      InsertModeKey: InsertModeKey,
    +      map: function(lhs, rhs) {
    +        // Add user defined key bindings.
    +        exCommandDispatcher.map(lhs, rhs);
    +      },
    +      defineEx: function(name, prefix, func){
    +        if (name.indexOf(prefix) !== 0) {
    +          throw new Error('(Vim.defineEx) "'+prefix+'" is not a prefix of "'+name+'", command not registered');
    +        }
    +        exCommands[name]=func;
    +        exCommandDispatcher.commandMap_[prefix]={name:name, shortName:prefix, type:'api'};
    +      },
    +      // This is the outermost function called by CodeMirror, after keys have
    +      // been mapped to their Vim equivalents.
    +      handleKey: function(cm, key) {
    +        var command;
    +        var vim = maybeInitVimState(cm);
    +        var macroModeState = vimGlobalState.macroModeState;
    +        if (macroModeState.enteredMacroMode) {
    +          if (key == 'q') {
    +            actions.exitMacroRecordMode();
    +            vim.inputState = new InputState();
    +            return;
    +          }
    +        }
    +        if (key == '<Esc>') {
    +          // Clear input state and get back to normal mode.
    +          vim.inputState = new InputState();
    +          if (vim.visualMode) {
    +            exitVisualMode(cm);
    +          }
    +          return;
    +        }
    +        // Enter visual mode when the mouse selects text.
    +        if (!vim.visualMode &&
    +            !cursorEqual(cm.getCursor('head'), cm.getCursor('anchor'))) {
    +          vim.visualMode = true;
    +          vim.visualLine = false;
    +          CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"});
    +          cm.on('mousedown', exitVisualMode);
    +        }
    +        if (key != '0' || (key == '0' && vim.inputState.getRepeat() === 0)) {
    +          // Have to special case 0 since it's both a motion and a number.
    +          command = commandDispatcher.matchCommand(key, defaultKeymap, vim);
    +        }
    +        if (!command) {
    +          if (isNumber(key)) {
    +            // Increment count unless count is 0 and key is 0.
    +            vim.inputState.pushRepeatDigit(key);
    +          }
    +          return;
    +        }
    +        if (command.type == 'keyToKey') {
    +          // TODO: prevent infinite recursion.
    +          for (var i = 0; i < command.toKeys.length; i++) {
    +            this.handleKey(cm, command.toKeys[i]);
    +          }
    +        } else {
    +          if (macroModeState.enteredMacroMode) {
    +            logKey(macroModeState, key);
    +          }
    +          commandDispatcher.processCommand(cm, vim, command);
    +        }
    +      },
    +      handleEx: function(cm, input) {
    +        exCommandDispatcher.processCommand(cm, input);
    +      }
    +    };
    +
    +    // Represents the current input state.
    +    function InputState() {
    +      this.prefixRepeat = [];
    +      this.motionRepeat = [];
    +
    +      this.operator = null;
    +      this.operatorArgs = null;
    +      this.motion = null;
    +      this.motionArgs = null;
    +      this.keyBuffer = []; // For matching multi-key commands.
    +      this.registerName = null; // Defaults to the unamed register.
    +    }
    +    InputState.prototype.pushRepeatDigit = function(n) {
    +      if (!this.operator) {
    +        this.prefixRepeat = this.prefixRepeat.concat(n);
    +      } else {
    +        this.motionRepeat = this.motionRepeat.concat(n);
    +      }
    +    };
    +    InputState.prototype.getRepeat = function() {
    +      var repeat = 0;
    +      if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) {
    +        repeat = 1;
    +        if (this.prefixRepeat.length > 0) {
    +          repeat *= parseInt(this.prefixRepeat.join(''), 10);
    +        }
    +        if (this.motionRepeat.length > 0) {
    +          repeat *= parseInt(this.motionRepeat.join(''), 10);
    +        }
    +      }
    +      return repeat;
    +    };
    +
    +    /*
    +     * Register stores information about copy and paste registers.  Besides
    +     * text, a register must store whether it is linewise (i.e., when it is
    +     * pasted, should it insert itself into a new line, or should the text be
    +     * inserted at the cursor position.)
    +     */
    +    function Register(text, linewise) {
    +      this.clear();
    +      if (text) {
    +        this.set(text, linewise);
    +      }
    +    }
    +    Register.prototype = {
    +      set: function(text, linewise) {
    +        this.text = text;
    +        this.linewise = !!linewise;
    +      },
    +      append: function(text, linewise) {
    +        // if this register has ever been set to linewise, use linewise.
    +        if (linewise || this.linewise) {
    +          this.text += '\n' + text;
    +          this.linewise = true;
    +        } else {
    +          this.text += text;
    +        }
    +      },
    +      clear: function() {
    +        this.text = '';
    +        this.linewise = false;
    +      },
    +      toString: function() { return this.text; }
    +    };
    +
    +    /*
    +     * vim registers allow you to keep many independent copy and paste buffers.
    +     * See http://usevim.com/2012/04/13/registers/ for an introduction.
    +     *
    +     * RegisterController keeps the state of all the registers.  An initial
    +     * state may be passed in.  The unnamed register '"' will always be
    +     * overridden.
    +     */
    +    function RegisterController(registers) {
    +      this.registers = registers;
    +      this.unamedRegister = registers['"'] = new Register();
    +    }
    +    RegisterController.prototype = {
    +      pushText: function(registerName, operator, text, linewise) {
    +        if (linewise && text.charAt(0) == '\n') {
    +          text = text.slice(1) + '\n';
    +        }
    +        if(linewise && text.charAt(text.length - 1) !== '\n'){
    +          text += '\n';
    +        }
    +        // Lowercase and uppercase registers refer to the same register.
    +        // Uppercase just means append.
    +        var register = this.isValidRegister(registerName) ?
    +            this.getRegister(registerName) : null;
    +        // if no register/an invalid register was specified, things go to the
    +        // default registers
    +        if (!register) {
    +          switch (operator) {
    +            case 'yank':
    +              // The 0 register contains the text from the most recent yank.
    +              this.registers['0'] = new Register(text, linewise);
    +              break;
    +            case 'delete':
    +            case 'change':
    +              if (text.indexOf('\n') == -1) {
    +                // Delete less than 1 line. Update the small delete register.
    +                this.registers['-'] = new Register(text, linewise);
    +              } else {
    +                // Shift down the contents of the numbered registers and put the
    +                // deleted text into register 1.
    +                this.shiftNumericRegisters_();
    +                this.registers['1'] = new Register(text, linewise);
    +              }
    +              break;
    +          }
    +          // Make sure the unnamed register is set to what just happened
    +          this.unamedRegister.set(text, linewise);
    +          return;
    +        }
    +
    +        // If we've gotten to this point, we've actually specified a register
    +        var append = isUpperCase(registerName);
    +        if (append) {
    +          register.append(text, linewise);
    +          // The unamed register always has the same value as the last used
    +          // register.
    +          this.unamedRegister.append(text, linewise);
    +        } else {
    +          register.set(text, linewise);
    +          this.unamedRegister.set(text, linewise);
    +        }
    +      },
    +      setRegisterText: function(name, text, linewise) {
    +        this.getRegister(name).set(text, linewise);
    +      },
    +      // Gets the register named @name.  If one of @name doesn't already exist,
    +      // create it.  If @name is invalid, return the unamedRegister.
    +      getRegister: function(name) {
    +        if (!this.isValidRegister(name)) {
    +          return this.unamedRegister;
    +        }
    +        name = name.toLowerCase();
    +        if (!this.registers[name]) {
    +          this.registers[name] = new Register();
    +        }
    +        return this.registers[name];
    +      },
    +      isValidRegister: function(name) {
    +        return name && inArray(name, validRegisters);
    +      },
    +      shiftNumericRegisters_: function() {
    +        for (var i = 9; i >= 2; i--) {
    +          this.registers[i] = this.getRegister('' + (i - 1));
    +        }
    +      }
    +    };
    +
    +    var commandDispatcher = {
    +      matchCommand: function(key, keyMap, vim) {
    +        var inputState = vim.inputState;
    +        var keys = inputState.keyBuffer.concat(key);
    +        var matchedCommands = [];
    +        var selectedCharacter;
    +        for (var i = 0; i < keyMap.length; i++) {
    +          var command = keyMap[i];
    +          if (matchKeysPartial(keys, command.keys)) {
    +            if (inputState.operator && command.type == 'action') {
    +              // Ignore matched action commands after an operator. Operators
    +              // only operate on motions. This check is really for text
    +              // objects since aW, a[ etcs conflicts with a.
    +              continue;
    +            }
    +            // Match commands that take <character> as an argument.
    +            if (command.keys[keys.length - 1] == 'character') {
    +              selectedCharacter = keys[keys.length - 1];
    +              if(selectedCharacter.length>1){
    +                switch(selectedCharacter){
    +                  case '<CR>':
    +                    selectedCharacter='\n';
    +                    break;
    +                  case '<Space>':
    +                    selectedCharacter=' ';
    +                    break;
    +                  default:
    +                    continue;
    +                }
    +              }
    +            }
    +            // Add the command to the list of matched commands. Choose the best
    +            // command later.
    +            matchedCommands.push(command);
    +          }
    +        }
    +
    +        // Returns the command if it is a full match, or null if not.
    +        function getFullyMatchedCommandOrNull(command) {
    +          if (keys.length < command.keys.length) {
    +            // Matches part of a multi-key command. Buffer and wait for next
    +            // stroke.
    +            inputState.keyBuffer.push(key);
    +            return null;
    +          } else {
    +            if (command.keys[keys.length - 1] == 'character') {
    +              inputState.selectedCharacter = selectedCharacter;
    +            }
    +            // Clear the buffer since a full match was found.
    +            inputState.keyBuffer = [];
    +            return command;
    +          }
    +        }
    +
    +        if (!matchedCommands.length) {
    +          // Clear the buffer since there were no matches.
    +          inputState.keyBuffer = [];
    +          return null;
    +        } else if (matchedCommands.length == 1) {
    +          return getFullyMatchedCommandOrNull(matchedCommands[0]);
    +        } else {
    +          // Find the best match in the list of matchedCommands.
    +          var context = vim.visualMode ? 'visual' : 'normal';
    +          var bestMatch = matchedCommands[0]; // Default to first in the list.
    +          for (var i = 0; i < matchedCommands.length; i++) {
    +            if (matchedCommands[i].context == context) {
    +              bestMatch = matchedCommands[i];
    +              break;
    +            }
    +          }
    +          return getFullyMatchedCommandOrNull(bestMatch);
    +        }
    +      },
    +      processCommand: function(cm, vim, command) {
    +        vim.inputState.repeatOverride = command.repeatOverride;
    +        switch (command.type) {
    +          case 'motion':
    +            this.processMotion(cm, vim, command);
    +            break;
    +          case 'operator':
    +            this.processOperator(cm, vim, command);
    +            break;
    +          case 'operatorMotion':
    +            this.processOperatorMotion(cm, vim, command);
    +            break;
    +          case 'action':
    +            this.processAction(cm, vim, command);
    +            break;
    +          case 'search':
    +            this.processSearch(cm, vim, command);
    +            break;
    +          case 'ex':
    +          case 'keyToEx':
    +            this.processEx(cm, vim, command);
    +            break;
    +          default:
    +            break;
    +        }
    +      },
    +      processMotion: function(cm, vim, command) {
    +        vim.inputState.motion = command.motion;
    +        vim.inputState.motionArgs = copyArgs(command.motionArgs);
    +        this.evalInput(cm, vim);
    +      },
    +      processOperator: function(cm, vim, command) {
    +        var inputState = vim.inputState;
    +        if (inputState.operator) {
    +          if (inputState.operator == command.operator) {
    +            // Typing an operator twice like 'dd' makes the operator operate
    +            // linewise
    +            inputState.motion = 'expandToLine';
    +            inputState.motionArgs = { linewise: true };
    +            this.evalInput(cm, vim);
    +            return;
    +          } else {
    +            // 2 different operators in a row doesn't make sense.
    +            vim.inputState = new InputState();
    +          }
    +        }
    +        inputState.operator = command.operator;
    +        inputState.operatorArgs = copyArgs(command.operatorArgs);
    +        if (vim.visualMode) {
    +          // Operating on a selection in visual mode. We don't need a motion.
    +          this.evalInput(cm, vim);
    +        }
    +      },
    +      processOperatorMotion: function(cm, vim, command) {
    +        var visualMode = vim.visualMode;
    +        var operatorMotionArgs = copyArgs(command.operatorMotionArgs);
    +        if (operatorMotionArgs) {
    +          // Operator motions may have special behavior in visual mode.
    +          if (visualMode && operatorMotionArgs.visualLine) {
    +            vim.visualLine = true;
    +          }
    +        }
    +        this.processOperator(cm, vim, command);
    +        if (!visualMode) {
    +          this.processMotion(cm, vim, command);
    +        }
    +      },
    +      processAction: function(cm, vim, command) {
    +        var inputState = vim.inputState;
    +        var repeat = inputState.getRepeat();
    +        var repeatIsExplicit = !!repeat;
    +        var actionArgs = copyArgs(command.actionArgs) || {};
    +        if (inputState.selectedCharacter) {
    +          actionArgs.selectedCharacter = inputState.selectedCharacter;
    +        }
    +        // Actions may or may not have motions and operators. Do these first.
    +        if (command.operator) {
    +          this.processOperator(cm, vim, command);
    +        }
    +        if (command.motion) {
    +          this.processMotion(cm, vim, command);
    +        }
    +        if (command.motion || command.operator) {
    +          this.evalInput(cm, vim);
    +        }
    +        actionArgs.repeat = repeat || 1;
    +        actionArgs.repeatIsExplicit = repeatIsExplicit;
    +        actionArgs.registerName = inputState.registerName;
    +        vim.inputState = new InputState();
    +        vim.lastMotion = null;
    +        if (command.isEdit) {
    +          this.recordLastEdit(vim, inputState, command);
    +        }
    +        actions[command.action](cm, actionArgs, vim);
    +      },
    +      processSearch: function(cm, vim, command) {
    +        if (!cm.getSearchCursor) {
    +          // Search depends on SearchCursor.
    +          return;
    +        }
    +        var forward = command.searchArgs.forward;
    +        getSearchState(cm).setReversed(!forward);
    +        var promptPrefix = (forward) ? '/' : '?';
    +        var originalQuery = getSearchState(cm).getQuery();
    +        var originalScrollPos = cm.getScrollInfo();
    +        function handleQuery(query, ignoreCase, smartCase) {
    +          try {
    +            updateSearchQuery(cm, query, ignoreCase, smartCase);
    +          } catch (e) {
    +            showConfirm(cm, 'Invalid regex: ' + query);
    +            return;
    +          }
    +          commandDispatcher.processMotion(cm, vim, {
    +            type: 'motion',
    +            motion: 'findNext',
    +            motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist }
    +          });
    +        }
    +        function onPromptClose(query) {
    +          cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
    +          handleQuery(query, true /** ignoreCase */, true /** smartCase */);
    +        }
    +        function onPromptKeyUp(_e, query) {
    +          var parsedQuery;
    +          try {
    +            parsedQuery = updateSearchQuery(cm, query,
    +                true /** ignoreCase */, true /** smartCase */);
    +          } catch (e) {
    +            // Swallow bad regexes for incremental search.
    +          }
    +          if (parsedQuery) {
    +            cm.scrollIntoView(findNext(cm, !forward, parsedQuery), 30);
    +          } else {
    +            clearSearchHighlight(cm);
    +            cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
    +          }
    +        }
    +        function onPromptKeyDown(e, _query, close) {
    +          var keyName = CodeMirror.keyName(e);
    +          if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') {
    +            updateSearchQuery(cm, originalQuery);
    +            clearSearchHighlight(cm);
    +            cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
    +
    +            CodeMirror.e_stop(e);
    +            close();
    +            cm.focus();
    +          }
    +        }
    +        switch (command.searchArgs.querySrc) {
    +          case 'prompt':
    +            showPrompt(cm, {
    +                onClose: onPromptClose,
    +                prefix: promptPrefix,
    +                desc: searchPromptDesc,
    +                onKeyUp: onPromptKeyUp,
    +                onKeyDown: onPromptKeyDown
    +            });
    +            break;
    +          case 'wordUnderCursor':
    +            var word = expandWordUnderCursor(cm, false /** inclusive */,
    +                true /** forward */, false /** bigWord */,
    +                true /** noSymbol */);
    +            var isKeyword = true;
    +            if (!word) {
    +              word = expandWordUnderCursor(cm, false /** inclusive */,
    +                  true /** forward */, false /** bigWord */,
    +                  false /** noSymbol */);
    +              isKeyword = false;
    +            }
    +            if (!word) {
    +              return;
    +            }
    +            var query = cm.getLine(word.start.line).substring(word.start.ch,
    +                word.end.ch);
    +            if (isKeyword) {
    +              query = '\\b' + query + '\\b';
    +            } else {
    +              query = escapeRegex(query);
    +            }
    +
    +            // cachedCursor is used to save the old position of the cursor
    +            // when * or # causes vim to seek for the nearest word and shift
    +            // the cursor before entering the motion.
    +            vimGlobalState.jumpList.cachedCursor = cm.getCursor();
    +            cm.setCursor(word.start);
    +
    +            handleQuery(query, true /** ignoreCase */, false /** smartCase */);
    +            break;
    +        }
    +      },
    +      processEx: function(cm, vim, command) {
    +        function onPromptClose(input) {
    +          // Give the prompt some time to close so that if processCommand shows
    +          // an error, the elements don't overlap.
    +          exCommandDispatcher.processCommand(cm, input);
    +        }
    +        function onPromptKeyDown(e, _input, close) {
    +          var keyName = CodeMirror.keyName(e);
    +          if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') {
    +            CodeMirror.e_stop(e);
    +            close();
    +            cm.focus();
    +          }
    +        }
    +        if (command.type == 'keyToEx') {
    +          // Handle user defined Ex to Ex mappings
    +          exCommandDispatcher.processCommand(cm, command.exArgs.input);
    +        } else {
    +          if (vim.visualMode) {
    +            showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\'<,\'>',
    +                onKeyDown: onPromptKeyDown});
    +          } else {
    +            showPrompt(cm, { onClose: onPromptClose, prefix: ':',
    +                onKeyDown: onPromptKeyDown});
    +          }
    +        }
    +      },
    +      evalInput: function(cm, vim) {
    +        // If the motion comand is set, execute both the operator and motion.
    +        // Otherwise return.
    +        var inputState = vim.inputState;
    +        var motion = inputState.motion;
    +        var motionArgs = inputState.motionArgs || {};
    +        var operator = inputState.operator;
    +        var operatorArgs = inputState.operatorArgs || {};
    +        var registerName = inputState.registerName;
    +        var selectionEnd = cm.getCursor('head');
    +        var selectionStart = cm.getCursor('anchor');
    +        // The difference between cur and selection cursors are that cur is
    +        // being operated on and ignores that there is a selection.
    +        var curStart = copyCursor(selectionEnd);
    +        var curOriginal = copyCursor(curStart);
    +        var curEnd;
    +        var repeat;
    +        if (operator) {
    +          this.recordLastEdit(vim, inputState);
    +        }
    +        if (inputState.repeatOverride !== undefined) {
    +          // If repeatOverride is specified, that takes precedence over the
    +          // input state's repeat. Used by Ex mode and can be user defined.
    +          repeat = inputState.repeatOverride;
    +        } else {
    +          repeat = inputState.getRepeat();
    +        }
    +        if (repeat > 0 && motionArgs.explicitRepeat) {
    +          motionArgs.repeatIsExplicit = true;
    +        } else if (motionArgs.noRepeat ||
    +            (!motionArgs.explicitRepeat && repeat === 0)) {
    +          repeat = 1;
    +          motionArgs.repeatIsExplicit = false;
    +        }
    +        if (inputState.selectedCharacter) {
    +          // If there is a character input, stick it in all of the arg arrays.
    +          motionArgs.selectedCharacter = operatorArgs.selectedCharacter =
    +              inputState.selectedCharacter;
    +        }
    +        motionArgs.repeat = repeat;
    +        vim.inputState = new InputState();
    +        if (motion) {
    +          var motionResult = motions[motion](cm, motionArgs, vim);
    +          vim.lastMotion = motions[motion];
    +          if (!motionResult) {
    +            return;
    +          }
    +          if (motionArgs.toJumplist) {
    +            var jumpList = vimGlobalState.jumpList;
    +            // if the current motion is # or *, use cachedCursor
    +            var cachedCursor = jumpList.cachedCursor;
    +            if (cachedCursor) {
    +              recordJumpPosition(cm, cachedCursor, motionResult);
    +              delete jumpList.cachedCursor;
    +            } else {
    +              recordJumpPosition(cm, curOriginal, motionResult);
    +            }
    +          }
    +          if (motionResult instanceof Array) {
    +            curStart = motionResult[0];
    +            curEnd = motionResult[1];
    +          } else {
    +            curEnd = motionResult;
    +          }
    +          // TODO: Handle null returns from motion commands better.
    +          if (!curEnd) {
    +            curEnd = { ch: curStart.ch, line: curStart.line };
    +          }
    +          if (vim.visualMode) {
    +            // Check if the selection crossed over itself. Will need to shift
    +            // the start point if that happened.
    +            if (cursorIsBefore(selectionStart, selectionEnd) &&
    +                (cursorEqual(selectionStart, curEnd) ||
    +                    cursorIsBefore(curEnd, selectionStart))) {
    +              // The end of the selection has moved from after the start to
    +              // before the start. We will shift the start right by 1.
    +              selectionStart.ch += 1;
    +            } else if (cursorIsBefore(selectionEnd, selectionStart) &&
    +                (cursorEqual(selectionStart, curEnd) ||
    +                    cursorIsBefore(selectionStart, curEnd))) {
    +              // The opposite happened. We will shift the start left by 1.
    +              selectionStart.ch -= 1;
    +            }
    +            selectionEnd = curEnd;
    +            if (vim.visualLine) {
    +              if (cursorIsBefore(selectionStart, selectionEnd)) {
    +                selectionStart.ch = 0;
    +
    +                var lastLine = cm.lastLine();
    +                if (selectionEnd.line > lastLine) {
    +                  selectionEnd.line = lastLine;
    +                }
    +                selectionEnd.ch = lineLength(cm, selectionEnd.line);
    +              } else {
    +                selectionEnd.ch = 0;
    +                selectionStart.ch = lineLength(cm, selectionStart.line);
    +              }
    +            }
    +            cm.setSelection(selectionStart, selectionEnd);
    +            updateMark(cm, vim, '<',
    +                cursorIsBefore(selectionStart, selectionEnd) ? selectionStart
    +                    : selectionEnd);
    +            updateMark(cm, vim, '>',
    +                cursorIsBefore(selectionStart, selectionEnd) ? selectionEnd
    +                    : selectionStart);
    +          } else if (!operator) {
    +            curEnd = clipCursorToContent(cm, curEnd);
    +            cm.setCursor(curEnd.line, curEnd.ch);
    +          }
    +        }
    +
    +        if (operator) {
    +          var inverted = false;
    +          vim.lastMotion = null;
    +          operatorArgs.repeat = repeat; // Indent in visual mode needs this.
    +          if (vim.visualMode) {
    +            curStart = selectionStart;
    +            curEnd = selectionEnd;
    +            motionArgs.inclusive = true;
    +          }
    +          // Swap start and end if motion was backward.
    +          if (cursorIsBefore(curEnd, curStart)) {
    +            var tmp = curStart;
    +            curStart = curEnd;
    +            curEnd = tmp;
    +            inverted = true;
    +          }
    +          if (motionArgs.inclusive && !(vim.visualMode && inverted)) {
    +            // Move the selection end one to the right to include the last
    +            // character.
    +            curEnd.ch++;
    +          }
    +          var linewise = motionArgs.linewise ||
    +              (vim.visualMode && vim.visualLine);
    +          if (linewise) {
    +            // Expand selection to entire line.
    +            expandSelectionToLine(cm, curStart, curEnd);
    +          } else if (motionArgs.forward) {
    +            // Clip to trailing newlines only if the motion goes forward.
    +            clipToLine(cm, curStart, curEnd);
    +          }
    +          operatorArgs.registerName = registerName;
    +          // Keep track of linewise as it affects how paste and change behave.
    +          operatorArgs.linewise = linewise;
    +          operators[operator](cm, operatorArgs, vim, curStart,
    +              curEnd, curOriginal);
    +          if (vim.visualMode) {
    +            exitVisualMode(cm);
    +          }
    +        }
    +      },
    +      recordLastEdit: function(vim, inputState, actionCommand) {
    +        var macroModeState = vimGlobalState.macroModeState;
    +        if (macroModeState.inReplay) { return; }
    +        vim.lastEditInputState = inputState;
    +        vim.lastEditActionCommand = actionCommand;
    +        macroModeState.lastInsertModeChanges.changes = [];
    +        macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false;
    +      }
    +    };
    +
    +    /**
    +     * typedef {Object{line:number,ch:number}} Cursor An object containing the
    +     *     position of the cursor.
    +     */
    +    // All of the functions below return Cursor objects.
    +    var motions = {
    +      moveToTopLine: function(cm, motionArgs) {
    +        var line = getUserVisibleLines(cm).top + motionArgs.repeat -1;
    +        return { line: line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(line)) };
    +      },
    +      moveToMiddleLine: function(cm) {
    +        var range = getUserVisibleLines(cm);
    +        var line = Math.floor((range.top + range.bottom) * 0.5);
    +        return { line: line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(line)) };
    +      },
    +      moveToBottomLine: function(cm, motionArgs) {
    +        var line = getUserVisibleLines(cm).bottom - motionArgs.repeat +1;
    +        return { line: line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(line)) };
    +      },
    +      expandToLine: function(cm, motionArgs) {
    +        // Expands forward to end of line, and then to next line if repeat is
    +        // >1. Does not handle backward motion!
    +        var cur = cm.getCursor();
    +        return { line: cur.line + motionArgs.repeat - 1, ch: Infinity };
    +      },
    +      findNext: function(cm, motionArgs) {
    +        var state = getSearchState(cm);
    +        var query = state.getQuery();
    +        if (!query) {
    +          return;
    +        }
    +        var prev = !motionArgs.forward;
    +        // If search is initiated with ? instead of /, negate direction.
    +        prev = (state.isReversed()) ? !prev : prev;
    +        highlightSearchMatches(cm, query);
    +        return findNext(cm, prev/** prev */, query, motionArgs.repeat);
    +      },
    +      goToMark: function(_cm, motionArgs, vim) {
    +        var mark = vim.marks[motionArgs.selectedCharacter];
    +        if (mark) {
    +          return mark.find();
    +        }
    +        return null;
    +      },
    +      jumpToMark: function(cm, motionArgs, vim) {
    +        var best = cm.getCursor();
    +        for (var i = 0; i < motionArgs.repeat; i++) {
    +          var cursor = best;
    +          for (var key in vim.marks) {
    +            if (!isLowerCase(key)) {
    +              continue;
    +            }
    +            var mark = vim.marks[key].find();
    +            var isWrongDirection = (motionArgs.forward) ?
    +              cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark);
    +
    +            if (isWrongDirection) {
    +              continue;
    +            }
    +            if (motionArgs.linewise && (mark.line == cursor.line)) {
    +              continue;
    +            }
    +
    +            var equal = cursorEqual(cursor, best);
    +            var between = (motionArgs.forward) ?
    +              cusrorIsBetween(cursor, mark, best) :
    +              cusrorIsBetween(best, mark, cursor);
    +
    +            if (equal || between) {
    +              best = mark;
    +            }
    +          }
    +        }
    +
    +        if (motionArgs.linewise) {
    +          // Vim places the cursor on the first non-whitespace character of
    +          // the line if there is one, else it places the cursor at the end
    +          // of the line, regardless of whether a mark was found.
    +          best.ch = findFirstNonWhiteSpaceCharacter(cm.getLine(best.line));
    +        }
    +        return best;
    +      },
    +      moveByCharacters: function(cm, motionArgs) {
    +        var cur = cm.getCursor();
    +        var repeat = motionArgs.repeat;
    +        var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat;
    +        return { line: cur.line, ch: ch };
    +      },
    +      moveByLines: function(cm, motionArgs, vim) {
    +        var cur = cm.getCursor();
    +        var endCh = cur.ch;
    +        // Depending what our last motion was, we may want to do different
    +        // things. If our last motion was moving vertically, we want to
    +        // preserve the HPos from our last horizontal move.  If our last motion
    +        // was going to the end of a line, moving vertically we should go to
    +        // the end of the line, etc.
    +        switch (vim.lastMotion) {
    +          case this.moveByLines:
    +          case this.moveByDisplayLines:
    +          case this.moveByScroll:
    +          case this.moveToColumn:
    +          case this.moveToEol:
    +            endCh = vim.lastHPos;
    +            break;
    +          default:
    +            vim.lastHPos = endCh;
    +        }
    +        var repeat = motionArgs.repeat+(motionArgs.repeatOffset||0);
    +        var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat;
    +        var first = cm.firstLine();
    +        var last = cm.lastLine();
    +        // Vim cancels linewise motions that start on an edge and move beyond
    +        // that edge. It does not cancel motions that do not start on an edge.
    +        if ((line < first && cur.line == first) ||
    +            (line > last && cur.line == last)) {
    +          return;
    +        }
    +        if(motionArgs.toFirstChar){
    +          endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line));
    +          vim.lastHPos = endCh;
    +        }
    +        vim.lastHSPos = cm.charCoords({line:line, ch:endCh},'div').left;
    +        return { line: line, ch: endCh };
    +      },
    +      moveByDisplayLines: function(cm, motionArgs, vim) {
    +        var cur = cm.getCursor();
    +        switch (vim.lastMotion) {
    +          case this.moveByDisplayLines:
    +          case this.moveByScroll:
    +          case this.moveByLines:
    +          case this.moveToColumn:
    +          case this.moveToEol:
    +            break;
    +          default:
    +            vim.lastHSPos = cm.charCoords(cur,'div').left;
    +        }
    +        var repeat = motionArgs.repeat;
    +        var res=cm.findPosV(cur,(motionArgs.forward ? repeat : -repeat),'line',vim.lastHSPos);
    +        if (res.hitSide) {
    +          if (motionArgs.forward) {
    +            var lastCharCoords = cm.charCoords(res, 'div');
    +            var goalCoords = { top: lastCharCoords.top + 8, left: vim.lastHSPos };
    +            var res = cm.coordsChar(goalCoords, 'div');
    +          } else {
    +            var resCoords = cm.charCoords({ line: cm.firstLine(), ch: 0}, 'div');
    +            resCoords.left = vim.lastHSPos;
    +            res = cm.coordsChar(resCoords, 'div');
    +          }
    +        }
    +        vim.lastHPos = res.ch;
    +        return res;
    +      },
    +      moveByPage: function(cm, motionArgs) {
    +        // CodeMirror only exposes functions that move the cursor page down, so
    +        // doing this bad hack to move the cursor and move it back. evalInput
    +        // will move the cursor to where it should be in the end.
    +        var curStart = cm.getCursor();
    +        var repeat = motionArgs.repeat;
    +        cm.moveV((motionArgs.forward ? repeat : -repeat), 'page');
    +        var curEnd = cm.getCursor();
    +        cm.setCursor(curStart);
    +        return curEnd;
    +      },
    +      moveByParagraph: function(cm, motionArgs) {
    +        var line = cm.getCursor().line;
    +        var repeat = motionArgs.repeat;
    +        var inc = motionArgs.forward ? 1 : -1;
    +        for (var i = 0; i < repeat; i++) {
    +          if ((!motionArgs.forward && line === cm.firstLine() ) ||
    +              (motionArgs.forward && line == cm.lastLine())) {
    +            break;
    +          }
    +          line += inc;
    +          while (line !== cm.firstLine() && line != cm.lastLine() && cm.getLine(line)) {
    +            line += inc;
    +          }
    +        }
    +        return { line: line, ch: 0 };
    +      },
    +      moveByScroll: function(cm, motionArgs, vim) {
    +        var scrollbox = cm.getScrollInfo();
    +        var curEnd = null;
    +        var repeat = motionArgs.repeat;
    +        if (!repeat) {
    +          repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight());
    +        }
    +        var orig = cm.charCoords(cm.getCursor(), 'local');
    +        motionArgs.repeat = repeat;
    +        var curEnd = motions.moveByDisplayLines(cm, motionArgs, vim);
    +        if (!curEnd) {
    +          return null;
    +        }
    +        var dest = cm.charCoords(curEnd, 'local');
    +        cm.scrollTo(null, scrollbox.top + dest.top - orig.top);
    +        return curEnd;
    +      },
    +      moveByWords: function(cm, motionArgs) {
    +        return moveToWord(cm, motionArgs.repeat, !!motionArgs.forward,
    +            !!motionArgs.wordEnd, !!motionArgs.bigWord);
    +      },
    +      moveTillCharacter: function(cm, motionArgs) {
    +        var repeat = motionArgs.repeat;
    +        var curEnd = moveToCharacter(cm, repeat, motionArgs.forward,
    +            motionArgs.selectedCharacter);
    +        var increment = motionArgs.forward ? -1 : 1;
    +        recordLastCharacterSearch(increment, motionArgs);
    +        if(!curEnd)return cm.getCursor();
    +        curEnd.ch += increment;
    +        return curEnd;
    +      },
    +      moveToCharacter: function(cm, motionArgs) {
    +        var repeat = motionArgs.repeat;
    +        recordLastCharacterSearch(0, motionArgs);
    +        return moveToCharacter(cm, repeat, motionArgs.forward,
    +            motionArgs.selectedCharacter) || cm.getCursor();
    +      },
    +      moveToSymbol: function(cm, motionArgs) {
    +        var repeat = motionArgs.repeat;
    +        return findSymbol(cm, repeat, motionArgs.forward,
    +            motionArgs.selectedCharacter) || cm.getCursor();
    +      },
    +      moveToColumn: function(cm, motionArgs, vim) {
    +        var repeat = motionArgs.repeat;
    +        // repeat is equivalent to which column we want to move to!
    +        vim.lastHPos = repeat - 1;
    +        vim.lastHSPos = cm.charCoords(cm.getCursor(),'div').left;
    +        return moveToColumn(cm, repeat);
    +      },
    +      moveToEol: function(cm, motionArgs, vim) {
    +        var cur = cm.getCursor();
    +        vim.lastHPos = Infinity;
    +        var retval={ line: cur.line + motionArgs.repeat - 1, ch: Infinity };
    +        var end=cm.clipPos(retval);
    +        end.ch--;
    +        vim.lastHSPos = cm.charCoords(end,'div').left;
    +        return retval;
    +      },
    +      moveToFirstNonWhiteSpaceCharacter: function(cm) {
    +        // Go to the start of the line where the text begins, or the end for
    +        // whitespace-only lines
    +        var cursor = cm.getCursor();
    +        return { line: cursor.line,
    +            ch: findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line)) };
    +      },
    +      moveToMatchedSymbol: function(cm) {
    +        var cursor = cm.getCursor();
    +        var line = cursor.line;
    +        var ch = cursor.ch;
    +        var lineText = cm.getLine(line);
    +        var symbol;
    +        var startContext = cm.getTokenAt(cursor).type;
    +        var startCtxLevel = getContextLevel(startContext);
    +        do {
    +          symbol = lineText.charAt(ch++);
    +          if (symbol && isMatchableSymbol(symbol)) {
    +            var endContext = cm.getTokenAt({line:line, ch:ch}).type;
    +            var endCtxLevel = getContextLevel(endContext);
    +            if (startCtxLevel >= endCtxLevel) {
    +              break;
    +            }
    +          }
    +        } while (symbol);
    +        if (symbol) {
    +          return findMatchedSymbol(cm, {line:line, ch:ch-1}, symbol);
    +        } else {
    +          return cursor;
    +        }
    +      },
    +      moveToStartOfLine: function(cm) {
    +        var cursor = cm.getCursor();
    +        return { line: cursor.line, ch: 0 };
    +      },
    +      moveToLineOrEdgeOfDocument: function(cm, motionArgs) {
    +        var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine();
    +        if (motionArgs.repeatIsExplicit) {
    +          lineNum = motionArgs.repeat - cm.getOption('firstLineNumber');
    +        }
    +        return { line: lineNum,
    +            ch: findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum)) };
    +      },
    +      textObjectManipulation: function(cm, motionArgs) {
    +        var character = motionArgs.selectedCharacter;
    +        // Inclusive is the difference between a and i
    +        // TODO: Instead of using the additional text object map to perform text
    +        //     object operations, merge the map into the defaultKeyMap and use
    +        //     motionArgs to define behavior. Define separate entries for 'aw',
    +        //     'iw', 'a[', 'i[', etc.
    +        var inclusive = !motionArgs.textObjectInner;
    +        if (!textObjects[character]) {
    +          // No text object defined for this, don't move.
    +          return null;
    +        }
    +        var tmp = textObjects[character](cm, inclusive);
    +        var start = tmp.start;
    +        var end = tmp.end;
    +        return [start, end];
    +      },
    +      repeatLastCharacterSearch: function(cm, motionArgs) {
    +        var lastSearch = vimGlobalState.lastChararacterSearch;
    +        var repeat = motionArgs.repeat;
    +        var forward = motionArgs.forward === lastSearch.forward;
    +        var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1);
    +        cm.moveH(-increment, 'char');
    +        motionArgs.inclusive = forward ? true : false;
    +        var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter);
    +        if (!curEnd) {
    +          cm.moveH(increment, 'char');
    +          return cm.getCursor();
    +        }
    +        curEnd.ch += increment;
    +        return curEnd;
    +      }
    +    };
    +
    +    var operators = {
    +      change: function(cm, operatorArgs, _vim, curStart, curEnd) {
    +        vimGlobalState.registerController.pushText(
    +            operatorArgs.registerName, 'change', cm.getRange(curStart, curEnd),
    +            operatorArgs.linewise);
    +        if (operatorArgs.linewise) {
    +          // Push the next line back down, if there is a next line.
    +          var replacement = curEnd.line > cm.lastLine() ? '' : '\n';
    +          cm.replaceRange(replacement, curStart, curEnd);
    +          cm.indentLine(curStart.line, 'smart');
    +          // null ch so setCursor moves to end of line.
    +          curStart.ch = null;
    +        } else {
    +          // Exclude trailing whitespace if the range is not all whitespace.
    +          var text = cm.getRange(curStart, curEnd);
    +          if (!isWhiteSpaceString(text)) {
    +            var match = (/\s+$/).exec(text);
    +            if (match) {
    +              curEnd = offsetCursor(curEnd, 0, - match[0].length);
    +            }
    +          }
    +          cm.replaceRange('', curStart, curEnd);
    +        }
    +        actions.enterInsertMode(cm, {}, cm.state.vim);
    +        cm.setCursor(curStart);
    +      },
    +      // delete is a javascript keyword.
    +      'delete': function(cm, operatorArgs, _vim, curStart, curEnd) {
    +        // If the ending line is past the last line, inclusive, instead of
    +        // including the trailing \n, include the \n before the starting line
    +        if (operatorArgs.linewise &&
    +            curEnd.line > cm.lastLine() && curStart.line > cm.firstLine()) {
    +          curStart.line--;
    +          curStart.ch = lineLength(cm, curStart.line);
    +        }
    +        vimGlobalState.registerController.pushText(
    +            operatorArgs.registerName, 'delete', cm.getRange(curStart, curEnd),
    +            operatorArgs.linewise);
    +        cm.replaceRange('', curStart, curEnd);
    +        if (operatorArgs.linewise) {
    +          cm.setCursor(motions.moveToFirstNonWhiteSpaceCharacter(cm));
    +        } else {
    +          cm.setCursor(curStart);
    +        }
    +      },
    +      indent: function(cm, operatorArgs, vim, curStart, curEnd) {
    +        var startLine = curStart.line;
    +        var endLine = curEnd.line;
    +        // In visual mode, n> shifts the selection right n times, instead of
    +        // shifting n lines right once.
    +        var repeat = (vim.visualMode) ? operatorArgs.repeat : 1;
    +        if (operatorArgs.linewise) {
    +          // The only way to delete a newline is to delete until the start of
    +          // the next line, so in linewise mode evalInput will include the next
    +          // line. We don't want this in indent, so we go back a line.
    +          endLine--;
    +        }
    +        for (var i = startLine; i <= endLine; i++) {
    +          for (var j = 0; j < repeat; j++) {
    +            cm.indentLine(i, operatorArgs.indentRight);
    +          }
    +        }
    +        cm.setCursor(curStart);
    +        cm.setCursor(motions.moveToFirstNonWhiteSpaceCharacter(cm));
    +      },
    +      swapcase: function(cm, operatorArgs, _vim, curStart, curEnd, curOriginal) {
    +        var toSwap = cm.getRange(curStart, curEnd);
    +        var swapped = '';
    +        for (var i = 0; i < toSwap.length; i++) {
    +          var character = toSwap.charAt(i);
    +          swapped += isUpperCase(character) ? character.toLowerCase() :
    +              character.toUpperCase();
    +        }
    +        cm.replaceRange(swapped, curStart, curEnd);
    +        if (!operatorArgs.shouldMoveCursor) {
    +          cm.setCursor(curOriginal);
    +        }
    +      },
    +      yank: function(cm, operatorArgs, _vim, curStart, curEnd, curOriginal) {
    +        vimGlobalState.registerController.pushText(
    +            operatorArgs.registerName, 'yank',
    +            cm.getRange(curStart, curEnd), operatorArgs.linewise);
    +        cm.setCursor(curOriginal);
    +      }
    +    };
    +
    +    var actions = {
    +      jumpListWalk: function(cm, actionArgs, vim) {
    +        if (vim.visualMode) {
    +          return;
    +        }
    +        var repeat = actionArgs.repeat;
    +        var forward = actionArgs.forward;
    +        var jumpList = vimGlobalState.jumpList;
    +
    +        var mark = jumpList.move(cm, forward ? repeat : -repeat);
    +        var markPos = mark ? mark.find() : undefined;
    +        markPos = markPos ? markPos : cm.getCursor();
    +        cm.setCursor(markPos);
    +      },
    +      scrollToCursor: function(cm, actionArgs) {
    +        var lineNum = cm.getCursor().line;
    +        var charCoords = cm.charCoords({line: lineNum, ch: 0}, 'local');
    +        var height = cm.getScrollInfo().clientHeight;
    +        var y = charCoords.top;
    +        var lineHeight = charCoords.bottom - y;
    +        switch (actionArgs.position) {
    +          case 'center': y = y - (height / 2) + lineHeight;
    +            break;
    +          case 'bottom': y = y - height + lineHeight*1.4;
    +            break;
    +          case 'top': y = y + lineHeight*0.4;
    +            break;
    +        }
    +        cm.scrollTo(null, y);
    +      },
    +      replayMacro: function(cm, actionArgs) {
    +        var registerName = actionArgs.selectedCharacter;
    +        var repeat = actionArgs.repeat;
    +        var macroModeState = vimGlobalState.macroModeState;
    +        if (registerName == '@') {
    +          registerName = macroModeState.latestRegister;
    +        }
    +        var keyBuffer = parseRegisterToKeyBuffer(macroModeState, registerName);
    +        while(repeat--){
    +          executeMacroKeyBuffer(cm, macroModeState, keyBuffer);
    +        }
    +      },
    +      exitMacroRecordMode: function() {
    +        var macroModeState = vimGlobalState.macroModeState;
    +        macroModeState.toggle();
    +        parseKeyBufferToRegister(macroModeState.latestRegister,
    +                                 macroModeState.macroKeyBuffer);
    +      },
    +      enterMacroRecordMode: function(cm, actionArgs) {
    +        var macroModeState = vimGlobalState.macroModeState;
    +        var registerName = actionArgs.selectedCharacter;
    +        macroModeState.toggle(cm, registerName);
    +        emptyMacroKeyBuffer(macroModeState);
    +      },
    +      enterInsertMode: function(cm, actionArgs, vim) {
    +        if (cm.getOption('readOnly')) { return; }
    +        vim.insertMode = true;
    +        vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1;
    +        var insertAt = (actionArgs) ? actionArgs.insertAt : null;
    +        if (insertAt == 'eol') {
    +          var cursor = cm.getCursor();
    +          cursor = { line: cursor.line, ch: lineLength(cm, cursor.line) };
    +          cm.setCursor(cursor);
    +        } else if (insertAt == 'charAfter') {
    +          cm.setCursor(offsetCursor(cm.getCursor(), 0, 1));
    +        } else if (insertAt == 'firstNonBlank') {
    +          cm.setCursor(motions.moveToFirstNonWhiteSpaceCharacter(cm));
    +        }
    +        cm.setOption('keyMap', 'vim-insert');
    +        if (actionArgs && actionArgs.replace) {
    +          // Handle Replace-mode as a special case of insert mode.
    +          cm.toggleOverwrite(true);
    +          cm.setOption('keyMap', 'vim-replace');
    +          CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"});
    +        } else {
    +          cm.setOption('keyMap', 'vim-insert');
    +          CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"});
    +        }
    +        if (!vimGlobalState.macroModeState.inReplay) {
    +          // Only record if not replaying.
    +          cm.on('change', onChange);
    +          cm.on('cursorActivity', onCursorActivity);
    +          CodeMirror.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);
    +        }
    +      },
    +      toggleVisualMode: function(cm, actionArgs, vim) {
    +        var repeat = actionArgs.repeat;
    +        var curStart = cm.getCursor();
    +        var curEnd;
    +        // TODO: The repeat should actually select number of characters/lines
    +        //     equal to the repeat times the size of the previous visual
    +        //     operation.
    +        if (!vim.visualMode) {
    +          cm.on('mousedown', exitVisualMode);
    +          vim.visualMode = true;
    +          vim.visualLine = !!actionArgs.linewise;
    +          if (vim.visualLine) {
    +            curStart.ch = 0;
    +            curEnd = clipCursorToContent(cm, {
    +              line: curStart.line + repeat - 1,
    +              ch: lineLength(cm, curStart.line)
    +            }, true /** includeLineBreak */);
    +          } else {
    +            curEnd = clipCursorToContent(cm, {
    +              line: curStart.line,
    +              ch: curStart.ch + repeat
    +            }, true /** includeLineBreak */);
    +          }
    +          // Make the initial selection.
    +          if (!actionArgs.repeatIsExplicit && !vim.visualLine) {
    +            // This is a strange case. Here the implicit repeat is 1. The
    +            // following commands lets the cursor hover over the 1 character
    +            // selection.
    +            cm.setCursor(curEnd);
    +            cm.setSelection(curEnd, curStart);
    +          } else {
    +            cm.setSelection(curStart, curEnd);
    +          }
    +          CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : ""});
    +        } else {
    +          curStart = cm.getCursor('anchor');
    +          curEnd = cm.getCursor('head');
    +          if (!vim.visualLine && actionArgs.linewise) {
    +            // Shift-V pressed in characterwise visual mode. Switch to linewise
    +            // visual mode instead of exiting visual mode.
    +            vim.visualLine = true;
    +            curStart.ch = cursorIsBefore(curStart, curEnd) ? 0 :
    +                lineLength(cm, curStart.line);
    +            curEnd.ch = cursorIsBefore(curStart, curEnd) ?
    +                lineLength(cm, curEnd.line) : 0;
    +            cm.setSelection(curStart, curEnd);
    +            CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: "linewise"});
    +          } else if (vim.visualLine && !actionArgs.linewise) {
    +            // v pressed in linewise visual mode. Switch to characterwise visual
    +            // mode instead of exiting visual mode.
    +            vim.visualLine = false;
    +            CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"});
    +          } else {
    +            exitVisualMode(cm);
    +          }
    +        }
    +        updateMark(cm, vim, '<', cursorIsBefore(curStart, curEnd) ? curStart
    +            : curEnd);
    +        updateMark(cm, vim, '>', cursorIsBefore(curStart, curEnd) ? curEnd
    +            : curStart);
    +      },
    +      joinLines: function(cm, actionArgs, vim) {
    +        var curStart, curEnd;
    +        if (vim.visualMode) {
    +          curStart = cm.getCursor('anchor');
    +          curEnd = cm.getCursor('head');
    +          curEnd.ch = lineLength(cm, curEnd.line) - 1;
    +        } else {
    +          // Repeat is the number of lines to join. Minimum 2 lines.
    +          var repeat = Math.max(actionArgs.repeat, 2);
    +          curStart = cm.getCursor();
    +          curEnd = clipCursorToContent(cm, { line: curStart.line + repeat - 1,
    +              ch: Infinity });
    +        }
    +        var finalCh = 0;
    +        cm.operation(function() {
    +          for (var i = curStart.line; i < curEnd.line; i++) {
    +            finalCh = lineLength(cm, curStart.line);
    +            var tmp = { line: curStart.line + 1,
    +                ch: lineLength(cm, curStart.line + 1) };
    +            var text = cm.getRange(curStart, tmp);
    +            text = text.replace(/\n\s*/g, ' ');
    +            cm.replaceRange(text, curStart, tmp);
    +          }
    +          var curFinalPos = { line: curStart.line, ch: finalCh };
    +          cm.setCursor(curFinalPos);
    +        });
    +      },
    +      newLineAndEnterInsertMode: function(cm, actionArgs, vim) {
    +        vim.insertMode = true;
    +        var insertAt = cm.getCursor();
    +        if (insertAt.line === cm.firstLine() && !actionArgs.after) {
    +          // Special case for inserting newline before start of document.
    +          cm.replaceRange('\n', { line: cm.firstLine(), ch: 0 });
    +          cm.setCursor(cm.firstLine(), 0);
    +        } else {
    +          insertAt.line = (actionArgs.after) ? insertAt.line :
    +              insertAt.line - 1;
    +          insertAt.ch = lineLength(cm, insertAt.line);
    +          cm.setCursor(insertAt);
    +          var newlineFn = CodeMirror.commands.newlineAndIndentContinueComment ||
    +              CodeMirror.commands.newlineAndIndent;
    +          newlineFn(cm);
    +        }
    +        this.enterInsertMode(cm, { repeat: actionArgs.repeat }, vim);
    +      },
    +      paste: function(cm, actionArgs) {
    +        var cur = cm.getCursor();
    +        var register = vimGlobalState.registerController.getRegister(
    +            actionArgs.registerName);
    +        if (!register.text) {
    +          return;
    +        }
    +        for (var text = '', i = 0; i < actionArgs.repeat; i++) {
    +          text += register.text;
    +        }
    +        var linewise = register.linewise;
    +        if (linewise) {
    +          if (actionArgs.after) {
    +            // Move the newline at the end to the start instead, and paste just
    +            // before the newline character of the line we are on right now.
    +            text = '\n' + text.slice(0, text.length - 1);
    +            cur.ch = lineLength(cm, cur.line);
    +          } else {
    +            cur.ch = 0;
    +          }
    +        } else {
    +          cur.ch += actionArgs.after ? 1 : 0;
    +        }
    +        cm.replaceRange(text, cur);
    +        // Now fine tune the cursor to where we want it.
    +        var curPosFinal;
    +        var idx;
    +        if (linewise && actionArgs.after) {
    +          curPosFinal = { line: cur.line + 1,
    +              ch: findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1)) };
    +        } else if (linewise && !actionArgs.after) {
    +          curPosFinal = { line: cur.line,
    +              ch: findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line)) };
    +        } else if (!linewise && actionArgs.after) {
    +          idx = cm.indexFromPos(cur);
    +          curPosFinal = cm.posFromIndex(idx + text.length - 1);
    +        } else {
    +          idx = cm.indexFromPos(cur);
    +          curPosFinal = cm.posFromIndex(idx + text.length);
    +        }
    +        cm.setCursor(curPosFinal);
    +      },
    +      undo: function(cm, actionArgs) {
    +        cm.operation(function() {
    +          repeatFn(cm, CodeMirror.commands.undo, actionArgs.repeat)();
    +          cm.setCursor(cm.getCursor('anchor'));
    +        });
    +      },
    +      redo: function(cm, actionArgs) {
    +        repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)();
    +      },
    +      setRegister: function(_cm, actionArgs, vim) {
    +        vim.inputState.registerName = actionArgs.selectedCharacter;
    +      },
    +      setMark: function(cm, actionArgs, vim) {
    +        var markName = actionArgs.selectedCharacter;
    +        updateMark(cm, vim, markName, cm.getCursor());
    +      },
    +      replace: function(cm, actionArgs, vim) {
    +        var replaceWith = actionArgs.selectedCharacter;
    +        var curStart = cm.getCursor();
    +        var replaceTo;
    +        var curEnd;
    +        if(vim.visualMode){
    +          curStart=cm.getCursor('start');
    +          curEnd=cm.getCursor('end');
    +          // workaround to catch the character under the cursor
    +          //  existing workaround doesn't cover actions
    +          curEnd=cm.clipPos({line: curEnd.line, ch: curEnd.ch+1});
    +        }else{
    +          var line = cm.getLine(curStart.line);
    +          replaceTo = curStart.ch + actionArgs.repeat;
    +          if (replaceTo > line.length) {
    +            replaceTo=line.length;
    +          }
    +          curEnd = { line: curStart.line, ch: replaceTo };
    +        }
    +        if(replaceWith=='\n'){
    +          if(!vim.visualMode) cm.replaceRange('', curStart, curEnd);
    +          // special case, where vim help says to replace by just one line-break
    +          (CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent)(cm);
    +        }else {
    +          var replaceWithStr=cm.getRange(curStart, curEnd);
    +          //replace all characters in range by selected, but keep linebreaks
    +          replaceWithStr=replaceWithStr.replace(/[^\n]/g,replaceWith);
    +          cm.replaceRange(replaceWithStr, curStart, curEnd);
    +          if(vim.visualMode){
    +            cm.setCursor(curStart);
    +            exitVisualMode(cm);
    +          }else{
    +            cm.setCursor(offsetCursor(curEnd, 0, -1));
    +          }
    +        }
    +      },
    +      incrementNumberToken: function(cm, actionArgs) {
    +        var cur = cm.getCursor();
    +        var lineStr = cm.getLine(cur.line);
    +        var re = /-?\d+/g;
    +        var match;
    +        var start;
    +        var end;
    +        var numberStr;
    +        var token;
    +        while ((match = re.exec(lineStr)) !== null) {
    +          token = match[0];
    +          start = match.index;
    +          end = start + token.length;
    +          if(cur.ch < end)break;
    +        }
    +        if(!actionArgs.backtrack && (end <= cur.ch))return;
    +        if (token) {
    +          var increment = actionArgs.increase ? 1 : -1;
    +          var number = parseInt(token) + (increment * actionArgs.repeat);
    +          var from = {ch:start, line:cur.line};
    +          var to = {ch:end, line:cur.line};
    +          numberStr = number.toString();
    +          cm.replaceRange(numberStr, from, to);
    +        } else {
    +          return;
    +        }
    +        cm.setCursor({line: cur.line, ch: start + numberStr.length - 1});
    +      },
    +      repeatLastEdit: function(cm, actionArgs, vim) {
    +        var lastEditInputState = vim.lastEditInputState;
    +        if (!lastEditInputState) { return; }
    +        var repeat = actionArgs.repeat;
    +        if (repeat && actionArgs.repeatIsExplicit) {
    +          vim.lastEditInputState.repeatOverride = repeat;
    +        } else {
    +          repeat = vim.lastEditInputState.repeatOverride || repeat;
    +        }
    +        repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */);
    +      }
    +    };
    +
    +    var textObjects = {
    +      // TODO: lots of possible exceptions that can be thrown here. Try da(
    +      //     outside of a () block.
    +      // TODO: implement text objects for the reverse like }. Should just be
    +      //     an additional mapping after moving to the defaultKeyMap.
    +      'w': function(cm, inclusive) {
    +        return expandWordUnderCursor(cm, inclusive, true /** forward */,
    +            false /** bigWord */);
    +      },
    +      'W': function(cm, inclusive) {
    +        return expandWordUnderCursor(cm, inclusive,
    +            true /** forward */, true /** bigWord */);
    +      },
    +      '{': function(cm, inclusive) {
    +        return selectCompanionObject(cm, '}', inclusive);
    +      },
    +      '(': function(cm, inclusive) {
    +        return selectCompanionObject(cm, ')', inclusive);
    +      },
    +      '[': function(cm, inclusive) {
    +        return selectCompanionObject(cm, ']', inclusive);
    +      },
    +      '\'': function(cm, inclusive) {
    +        return findBeginningAndEnd(cm, "'", inclusive);
    +      },
    +      '"': function(cm, inclusive) {
    +        return findBeginningAndEnd(cm, '"', inclusive);
    +      }
    +    };
    +
    +    /*
    +     * Below are miscellaneous utility functions used by vim.js
    +     */
    +
    +    /**
    +     * Clips cursor to ensure that line is within the buffer's range
    +     * If includeLineBreak is true, then allow cur.ch == lineLength.
    +     */
    +    function clipCursorToContent(cm, cur, includeLineBreak) {
    +      var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() );
    +      var maxCh = lineLength(cm, line) - 1;
    +      maxCh = (includeLineBreak) ? maxCh + 1 : maxCh;
    +      var ch = Math.min(Math.max(0, cur.ch), maxCh);
    +      return { line: line, ch: ch };
    +    }
    +    function copyArgs(args) {
    +      var ret = {};
    +      for (var prop in args) {
    +        if (args.hasOwnProperty(prop)) {
    +          ret[prop] = args[prop];
    +        }
    +      }
    +      return ret;
    +    }
    +    function offsetCursor(cur, offsetLine, offsetCh) {
    +      return { line: cur.line + offsetLine, ch: cur.ch + offsetCh };
    +    }
    +    function matchKeysPartial(pressed, mapped) {
    +      for (var i = 0; i < pressed.length; i++) {
    +        // 'character' means any character. For mark, register commads, etc.
    +        if (pressed[i] != mapped[i] && mapped[i] != 'character') {
    +          return false;
    +        }
    +      }
    +      return true;
    +    }
    +    function repeatFn(cm, fn, repeat) {
    +      return function() {
    +        for (var i = 0; i < repeat; i++) {
    +          fn(cm);
    +        }
    +      };
    +    }
    +    function copyCursor(cur) {
    +      return { line: cur.line, ch: cur.ch };
    +    }
    +    function cursorEqual(cur1, cur2) {
    +      return cur1.ch == cur2.ch && cur1.line == cur2.line;
    +    }
    +    function cursorIsBefore(cur1, cur2) {
    +      if (cur1.line < cur2.line) {
    +        return true;
    +      }
    +      if (cur1.line == cur2.line && cur1.ch < cur2.ch) {
    +        return true;
    +      }
    +      return false;
    +    }
    +    function cusrorIsBetween(cur1, cur2, cur3) {
    +      // returns true if cur2 is between cur1 and cur3.
    +      var cur1before2 = cursorIsBefore(cur1, cur2);
    +      var cur2before3 = cursorIsBefore(cur2, cur3);
    +      return cur1before2 && cur2before3;
    +    }
    +    function lineLength(cm, lineNum) {
    +      return cm.getLine(lineNum).length;
    +    }
    +    function reverse(s){
    +      return s.split('').reverse().join('');
    +    }
    +    function trim(s) {
    +      if (s.trim) {
    +        return s.trim();
    +      }
    +      return s.replace(/^\s+|\s+$/g, '');
    +    }
    +    function escapeRegex(s) {
    +      return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1');
    +    }
    +
    +    function exitVisualMode(cm) {
    +      cm.off('mousedown', exitVisualMode);
    +      var vim = cm.state.vim;
    +      vim.visualMode = false;
    +      vim.visualLine = false;
    +      var selectionStart = cm.getCursor('anchor');
    +      var selectionEnd = cm.getCursor('head');
    +      if (!cursorEqual(selectionStart, selectionEnd)) {
    +        // Clear the selection and set the cursor only if the selection has not
    +        // already been cleared. Otherwise we risk moving the cursor somewhere
    +        // it's not supposed to be.
    +        cm.setCursor(clipCursorToContent(cm, selectionEnd));
    +      }
    +      CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
    +    }
    +
    +    // Remove any trailing newlines from the selection. For
    +    // example, with the caret at the start of the last word on the line,
    +    // 'dw' should word, but not the newline, while 'w' should advance the
    +    // caret to the first character of the next line.
    +    function clipToLine(cm, curStart, curEnd) {
    +      var selection = cm.getRange(curStart, curEnd);
    +      // Only clip if the selection ends with trailing newline + whitespace
    +      if (/\n\s*$/.test(selection)) {
    +        var lines = selection.split('\n');
    +        // We know this is all whitepsace.
    +        lines.pop();
    +
    +        // Cases:
    +        // 1. Last word is an empty line - do not clip the trailing '\n'
    +        // 2. Last word is not an empty line - clip the trailing '\n'
    +        var line;
    +        // Find the line containing the last word, and clip all whitespace up
    +        // to it.
    +        for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) {
    +          curEnd.line--;
    +          curEnd.ch = 0;
    +        }
    +        // If the last word is not an empty line, clip an additional newline
    +        if (line) {
    +          curEnd.line--;
    +          curEnd.ch = lineLength(cm, curEnd.line);
    +        } else {
    +          curEnd.ch = 0;
    +        }
    +      }
    +    }
    +
    +    // Expand the selection to line ends.
    +    function expandSelectionToLine(_cm, curStart, curEnd) {
    +      curStart.ch = 0;
    +      curEnd.ch = 0;
    +      curEnd.line++;
    +    }
    +
    +    function findFirstNonWhiteSpaceCharacter(text) {
    +      if (!text) {
    +        return 0;
    +      }
    +      var firstNonWS = text.search(/\S/);
    +      return firstNonWS == -1 ? text.length : firstNonWS;
    +    }
    +
    +    function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) {
    +      var cur = cm.getCursor();
    +      var line = cm.getLine(cur.line);
    +      var idx = cur.ch;
    +
    +      // Seek to first word or non-whitespace character, depending on if
    +      // noSymbol is true.
    +      var textAfterIdx = line.substring(idx);
    +      var firstMatchedChar;
    +      if (noSymbol) {
    +        firstMatchedChar = textAfterIdx.search(/\w/);
    +      } else {
    +        firstMatchedChar = textAfterIdx.search(/\S/);
    +      }
    +      if (firstMatchedChar == -1) {
    +        return null;
    +      }
    +      idx += firstMatchedChar;
    +      textAfterIdx = line.substring(idx);
    +      var textBeforeIdx = line.substring(0, idx);
    +
    +      var matchRegex;
    +      // Greedy matchers for the "word" we are trying to expand.
    +      if (bigWord) {
    +        matchRegex = /^\S+/;
    +      } else {
    +        if ((/\w/).test(line.charAt(idx))) {
    +          matchRegex = /^\w+/;
    +        } else {
    +          matchRegex = /^[^\w\s]+/;
    +        }
    +      }
    +
    +      var wordAfterRegex = matchRegex.exec(textAfterIdx);
    +      var wordStart = idx;
    +      var wordEnd = idx + wordAfterRegex[0].length;
    +      // TODO: Find a better way to do this. It will be slow on very long lines.
    +      var revTextBeforeIdx = reverse(textBeforeIdx);
    +      var wordBeforeRegex = matchRegex.exec(revTextBeforeIdx);
    +      if (wordBeforeRegex) {
    +        wordStart -= wordBeforeRegex[0].length;
    +      }
    +
    +      if (inclusive) {
    +        // If present, trim all whitespace after word.
    +        // Otherwise, trim all whitespace before word.
    +        var textAfterWordEnd = line.substring(wordEnd);
    +        var whitespacesAfterWord = textAfterWordEnd.match(/^\s*/)[0].length;
    +        if (whitespacesAfterWord > 0) {
    +          wordEnd += whitespacesAfterWord;
    +        } else {
    +          var revTrim = revTextBeforeIdx.length - wordStart;
    +          var textBeforeWordStart = revTextBeforeIdx.substring(revTrim);
    +          var whitespacesBeforeWord = textBeforeWordStart.match(/^\s*/)[0].length;
    +          wordStart -= whitespacesBeforeWord;
    +        }
    +      }
    +
    +      return { start: { line: cur.line, ch: wordStart },
    +        end: { line: cur.line, ch: wordEnd }};
    +    }
    +
    +    function recordJumpPosition(cm, oldCur, newCur) {
    +      if(!cursorEqual(oldCur, newCur)) {
    +        vimGlobalState.jumpList.add(cm, oldCur, newCur);
    +      }
    +    }
    +
    +    function recordLastCharacterSearch(increment, args) {
    +        vimGlobalState.lastChararacterSearch.increment = increment;
    +        vimGlobalState.lastChararacterSearch.forward = args.forward;
    +        vimGlobalState.lastChararacterSearch.selectedCharacter = args.selectedCharacter;
    +    }
    +
    +    var symbolToMode = {
    +        '(': 'bracket', ')': 'bracket', '{': 'bracket', '}': 'bracket',
    +        '[': 'section', ']': 'section',
    +        '*': 'comment', '/': 'comment',
    +        'm': 'method', 'M': 'method',
    +        '#': 'preprocess'
    +    };
    +    var findSymbolModes = {
    +      bracket: {
    +        isComplete: function(state) {
    +          if (state.nextCh === state.symb) {
    +            state.depth++;
    +            if(state.depth >= 1)return true;
    +          } else if (state.nextCh === state.reverseSymb) {
    +            state.depth--;
    +          }
    +          return false;
    +        }
    +      },
    +      section: {
    +        init: function(state) {
    +          state.curMoveThrough = true;
    +          state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}';
    +        },
    +        isComplete: function(state) {
    +          return state.index === 0 && state.nextCh === state.symb;
    +        }
    +      },
    +      comment: {
    +        isComplete: function(state) {
    +          var found = state.lastCh === '*' && state.nextCh === '/';
    +          state.lastCh = state.nextCh;
    +          return found;
    +        }
    +      },
    +      // TODO: The original Vim implementation only operates on level 1 and 2.
    +      // The current implementation doesn't check for code block level and
    +      // therefore it operates on any levels.
    +      method: {
    +        init: function(state) {
    +          state.symb = (state.symb === 'm' ? '{' : '}');
    +          state.reverseSymb = state.symb === '{' ? '}' : '{';
    +        },
    +        isComplete: function(state) {
    +          if(state.nextCh === state.symb)return true;
    +          return false;
    +        }
    +      },
    +      preprocess: {
    +        init: function(state) {
    +          state.index = 0;
    +        },
    +        isComplete: function(state) {
    +          if (state.nextCh === '#') {
    +            var token = state.lineText.match(/#(\w+)/)[1];
    +            if (token === 'endif') {
    +              if (state.forward && state.depth === 0) {
    +                return true;
    +              }
    +              state.depth++;
    +            } else if (token === 'if') {
    +              if (!state.forward && state.depth === 0) {
    +                return true;
    +              }
    +              state.depth--;
    +            }
    +            if(token === 'else' && state.depth === 0)return true;
    +          }
    +          return false;
    +        }
    +      }
    +    };
    +    function findSymbol(cm, repeat, forward, symb) {
    +      var cur = cm.getCursor();
    +      var increment = forward ? 1 : -1;
    +      var endLine = forward ? cm.lineCount() : -1;
    +      var curCh = cur.ch;
    +      var line = cur.line;
    +      var lineText = cm.getLine(line);
    +      var state = {
    +        lineText: lineText,
    +        nextCh: lineText.charAt(curCh),
    +        lastCh: null,
    +        index: curCh,
    +        symb: symb,
    +        reverseSymb: (forward ?  { ')': '(', '}': '{' } : { '(': ')', '{': '}' })[symb],
    +        forward: forward,
    +        depth: 0,
    +        curMoveThrough: false
    +      };
    +      var mode = symbolToMode[symb];
    +      if(!mode)return cur;
    +      var init = findSymbolModes[mode].init;
    +      var isComplete = findSymbolModes[mode].isComplete;
    +      if(init)init(state);
    +      while (line !== endLine && repeat) {
    +        state.index += increment;
    +        state.nextCh = state.lineText.charAt(state.index);
    +        if (!state.nextCh) {
    +          line += increment;
    +          state.lineText = cm.getLine(line) || '';
    +          if (increment > 0) {
    +            state.index = 0;
    +          } else {
    +            var lineLen = state.lineText.length;
    +            state.index = (lineLen > 0) ? (lineLen-1) : 0;
    +          }
    +          state.nextCh = state.lineText.charAt(state.index);
    +        }
    +        if (isComplete(state)) {
    +          cur.line = line;
    +          cur.ch = state.index;
    +          repeat--;
    +        }
    +      }
    +      if (state.nextCh || state.curMoveThrough) {
    +        return { line: line, ch: state.index };
    +      }
    +      return cur;
    +    }
    +
    +    /*
    +     * Returns the boundaries of the next word. If the cursor in the middle of
    +     * the word, then returns the boundaries of the current word, starting at
    +     * the cursor. If the cursor is at the start/end of a word, and we are going
    +     * forward/backward, respectively, find the boundaries of the next word.
    +     *
    +     * @param {CodeMirror} cm CodeMirror object.
    +     * @param {Cursor} cur The cursor position.
    +     * @param {boolean} forward True to search forward. False to search
    +     *     backward.
    +     * @param {boolean} bigWord True if punctuation count as part of the word.
    +     *     False if only [a-zA-Z0-9] characters count as part of the word.
    +     * @param {boolean} emptyLineIsWord True if empty lines should be treated
    +     *     as words.
    +     * @return {Object{from:number, to:number, line: number}} The boundaries of
    +     *     the word, or null if there are no more words.
    +     */
    +    function findWord(cm, cur, forward, bigWord, emptyLineIsWord) {
    +      var lineNum = cur.line;
    +      var pos = cur.ch;
    +      var line = cm.getLine(lineNum);
    +      var dir = forward ? 1 : -1;
    +      var regexps = bigWord ? bigWordRegexp : wordRegexp;
    +
    +      if (emptyLineIsWord && line == '') {
    +        lineNum += dir;
    +        line = cm.getLine(lineNum);
    +        if (!isLine(cm, lineNum)) {
    +          return null;
    +        }
    +        pos = (forward) ? 0 : line.length;
    +      }
    +
    +      while (true) {
    +        if (emptyLineIsWord && line == '') {
    +          return { from: 0, to: 0, line: lineNum };
    +        }
    +        var stop = (dir > 0) ? line.length : -1;
    +        var wordStart = stop, wordEnd = stop;
    +        // Find bounds of next word.
    +        while (pos != stop) {
    +          var foundWord = false;
    +          for (var i = 0; i < regexps.length && !foundWord; ++i) {
    +            if (regexps[i].test(line.charAt(pos))) {
    +              wordStart = pos;
    +              // Advance to end of word.
    +              while (pos != stop && regexps[i].test(line.charAt(pos))) {
    +                pos += dir;
    +              }
    +              wordEnd = pos;
    +              foundWord = wordStart != wordEnd;
    +              if (wordStart == cur.ch && lineNum == cur.line &&
    +                  wordEnd == wordStart + dir) {
    +                // We started at the end of a word. Find the next one.
    +                continue;
    +              } else {
    +                return {
    +                  from: Math.min(wordStart, wordEnd + 1),
    +                  to: Math.max(wordStart, wordEnd),
    +                  line: lineNum };
    +              }
    +            }
    +          }
    +          if (!foundWord) {
    +            pos += dir;
    +          }
    +        }
    +        // Advance to next/prev line.
    +        lineNum += dir;
    +        if (!isLine(cm, lineNum)) {
    +          return null;
    +        }
    +        line = cm.getLine(lineNum);
    +        pos = (dir > 0) ? 0 : line.length;
    +      }
    +      // Should never get here.
    +      throw new Error('The impossible happened.');
    +    }
    +
    +    /**
    +     * @param {CodeMirror} cm CodeMirror object.
    +     * @param {int} repeat Number of words to move past.
    +     * @param {boolean} forward True to search forward. False to search
    +     *     backward.
    +     * @param {boolean} wordEnd True to move to end of word. False to move to
    +     *     beginning of word.
    +     * @param {boolean} bigWord True if punctuation count as part of the word.
    +     *     False if only alphabet characters count as part of the word.
    +     * @return {Cursor} The position the cursor should move to.
    +     */
    +    function moveToWord(cm, repeat, forward, wordEnd, bigWord) {
    +      var cur = cm.getCursor();
    +      var curStart = copyCursor(cur);
    +      var words = [];
    +      if (forward && !wordEnd || !forward && wordEnd) {
    +        repeat++;
    +      }
    +      // For 'e', empty lines are not considered words, go figure.
    +      var emptyLineIsWord = !(forward && wordEnd);
    +      for (var i = 0; i < repeat; i++) {
    +        var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord);
    +        if (!word) {
    +          var eodCh = lineLength(cm, cm.lastLine());
    +          words.push(forward
    +              ? {line: cm.lastLine(), from: eodCh, to: eodCh}
    +              : {line: 0, from: 0, to: 0});
    +          break;
    +        }
    +        words.push(word);
    +        cur = {line: word.line, ch: forward ? (word.to - 1) : word.from};
    +      }
    +      var shortCircuit = words.length != repeat;
    +      var firstWord = words[0];
    +      var lastWord = words.pop();
    +      if (forward && !wordEnd) {
    +        // w
    +        if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) {
    +          // We did not start in the middle of a word. Discard the extra word at the end.
    +          lastWord = words.pop();
    +        }
    +        return {line: lastWord.line, ch: lastWord.from};
    +      } else if (forward && wordEnd) {
    +        return {line: lastWord.line, ch: lastWord.to - 1};
    +      } else if (!forward && wordEnd) {
    +        // ge
    +        if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) {
    +          // We did not start in the middle of a word. Discard the extra word at the end.
    +          lastWord = words.pop();
    +        }
    +        return {line: lastWord.line, ch: lastWord.to};
    +      } else {
    +        // b
    +        return {line: lastWord.line, ch: lastWord.from};
    +      }
    +    }
    +
    +    function moveToCharacter(cm, repeat, forward, character) {
    +      var cur = cm.getCursor();
    +      var start = cur.ch;
    +      var idx;
    +      for (var i = 0; i < repeat; i ++) {
    +        var line = cm.getLine(cur.line);
    +        idx = charIdxInLine(start, line, character, forward, true);
    +        if (idx == -1) {
    +          return null;
    +        }
    +        start = idx;
    +      }
    +      return { line: cm.getCursor().line, ch: idx };
    +    }
    +
    +    function moveToColumn(cm, repeat) {
    +      // repeat is always >= 1, so repeat - 1 always corresponds
    +      // to the column we want to go to.
    +      var line = cm.getCursor().line;
    +      return clipCursorToContent(cm, { line: line, ch: repeat - 1 });
    +    }
    +
    +    function updateMark(cm, vim, markName, pos) {
    +      if (!inArray(markName, validMarks)) {
    +        return;
    +      }
    +      if (vim.marks[markName]) {
    +        vim.marks[markName].clear();
    +      }
    +      vim.marks[markName] = cm.setBookmark(pos);
    +    }
    +
    +    function charIdxInLine(start, line, character, forward, includeChar) {
    +      // Search for char in line.
    +      // motion_options: {forward, includeChar}
    +      // If includeChar = true, include it too.
    +      // If forward = true, search forward, else search backwards.
    +      // If char is not found on this line, do nothing
    +      var idx;
    +      if (forward) {
    +        idx = line.indexOf(character, start + 1);
    +        if (idx != -1 && !includeChar) {
    +          idx -= 1;
    +        }
    +      } else {
    +        idx = line.lastIndexOf(character, start - 1);
    +        if (idx != -1 && !includeChar) {
    +          idx += 1;
    +        }
    +      }
    +      return idx;
    +    }
    +
    +    function getContextLevel(ctx) {
    +      return (ctx === 'string' || ctx === 'comment') ? 1 : 0;
    +    }
    +
    +    function findMatchedSymbol(cm, cur, symb) {
    +      var line = cur.line;
    +      var ch = cur.ch;
    +      symb = symb ? symb : cm.getLine(line).charAt(ch);
    +
    +      var symbContext = cm.getTokenAt({line:line, ch:ch+1}).type;
    +      var symbCtxLevel = getContextLevel(symbContext);
    +
    +      var reverseSymb = ({
    +        '(': ')', ')': '(',
    +        '[': ']', ']': '[',
    +        '{': '}', '}': '{'})[symb];
    +
    +      // Couldn't find a matching symbol, abort
    +      if (!reverseSymb) {
    +        return cur;
    +      }
    +
    +      // set our increment to move forward (+1) or backwards (-1)
    +      // depending on which bracket we're matching
    +      var increment = ({'(': 1, '{': 1, '[': 1})[symb] || -1;
    +      var endLine = increment === 1 ? cm.lineCount() : -1;
    +      var depth = 1, nextCh = symb, index = ch, lineText = cm.getLine(line);
    +      // Simple search for closing paren--just count openings and closings till
    +      // we find our match
    +      // TODO: use info from CodeMirror to ignore closing brackets in comments
    +      // and quotes, etc.
    +      while (line !== endLine && depth > 0) {
    +        index += increment;
    +        nextCh = lineText.charAt(index);
    +        if (!nextCh) {
    +          line += increment;
    +          lineText = cm.getLine(line) || '';
    +          if (increment > 0) {
    +            index = 0;
    +          } else {
    +            var lineLen = lineText.length;
    +            index = (lineLen > 0) ? (lineLen-1) : 0;
    +          }
    +          nextCh = lineText.charAt(index);
    +        }
    +        var revSymbContext = cm.getTokenAt({line:line, ch:index+1}).type;
    +        var revSymbCtxLevel = getContextLevel(revSymbContext);
    +        if (symbCtxLevel >= revSymbCtxLevel) {
    +          if (nextCh === symb) {
    +            depth++;
    +          } else if (nextCh === reverseSymb) {
    +            depth--;
    +          }
    +        }
    +      }
    +
    +      if (nextCh) {
    +        return { line: line, ch: index };
    +      }
    +      return cur;
    +    }
    +
    +    function selectCompanionObject(cm, revSymb, inclusive) {
    +      var cur = cm.getCursor();
    +
    +      var end = findMatchedSymbol(cm, cur, revSymb);
    +      var start = findMatchedSymbol(cm, end);
    +      start.ch += inclusive ? 1 : 0;
    +      end.ch += inclusive ? 0 : 1;
    +
    +      return { start: start, end: end };
    +    }
    +
    +    // Takes in a symbol and a cursor and tries to simulate text objects that
    +    // have identical opening and closing symbols
    +    // TODO support across multiple lines
    +    function findBeginningAndEnd(cm, symb, inclusive) {
    +      var cur = cm.getCursor();
    +      var line = cm.getLine(cur.line);
    +      var chars = line.split('');
    +      var start, end, i, len;
    +      var firstIndex = chars.indexOf(symb);
    +
    +      // the decision tree is to always look backwards for the beginning first,
    +      // but if the cursor is in front of the first instance of the symb,
    +      // then move the cursor forward
    +      if (cur.ch < firstIndex) {
    +        cur.ch = firstIndex;
    +        // Why is this line even here???
    +        // cm.setCursor(cur.line, firstIndex+1);
    +      }
    +      // otherwise if the cursor is currently on the closing symbol
    +      else if (firstIndex < cur.ch && chars[cur.ch] == symb) {
    +        end = cur.ch; // assign end to the current cursor
    +        --cur.ch; // make sure to look backwards
    +      }
    +
    +      // if we're currently on the symbol, we've got a start
    +      if (chars[cur.ch] == symb && !end) {
    +        start = cur.ch + 1; // assign start to ahead of the cursor
    +      } else {
    +        // go backwards to find the start
    +        for (i = cur.ch; i > -1 && !start; i--) {
    +          if (chars[i] == symb) {
    +            start = i + 1;
    +          }
    +        }
    +      }
    +
    +      // look forwards for the end symbol
    +      if (start && !end) {
    +        for (i = start, len = chars.length; i < len && !end; i++) {
    +          if (chars[i] == symb) {
    +            end = i;
    +          }
    +        }
    +      }
    +
    +      // nothing found
    +      if (!start || !end) {
    +        return { start: cur, end: cur };
    +      }
    +
    +      // include the symbols
    +      if (inclusive) {
    +        --start; ++end;
    +      }
    +
    +      return {
    +        start: { line: cur.line, ch: start },
    +        end: { line: cur.line, ch: end }
    +      };
    +    }
    +
    +    // Search functions
    +    function SearchState() {}
    +    SearchState.prototype = {
    +      getQuery: function() {
    +        return vimGlobalState.query;
    +      },
    +      setQuery: function(query) {
    +        vimGlobalState.query = query;
    +      },
    +      getOverlay: function() {
    +        return this.searchOverlay;
    +      },
    +      setOverlay: function(overlay) {
    +        this.searchOverlay = overlay;
    +      },
    +      isReversed: function() {
    +        return vimGlobalState.isReversed;
    +      },
    +      setReversed: function(reversed) {
    +        vimGlobalState.isReversed = reversed;
    +      }
    +    };
    +    function getSearchState(cm) {
    +      var vim = cm.state.vim;
    +      return vim.searchState_ || (vim.searchState_ = new SearchState());
    +    }
    +    function dialog(cm, template, shortText, onClose, options) {
    +      if (cm.openDialog) {
    +        cm.openDialog(template, onClose, { bottom: true, value: options.value,
    +            onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp });
    +      }
    +      else {
    +        onClose(prompt(shortText, ''));
    +      }
    +    }
    +
    +    function findUnescapedSlashes(str) {
    +      var escapeNextChar = false;
    +      var slashes = [];
    +      for (var i = 0; i < str.length; i++) {
    +        var c = str.charAt(i);
    +        if (!escapeNextChar && c == '/') {
    +          slashes.push(i);
    +        }
    +        escapeNextChar = (c == '\\');
    +      }
    +      return slashes;
    +    }
    +    /**
    +     * Extract the regular expression from the query and return a Regexp object.
    +     * Returns null if the query is blank.
    +     * If ignoreCase is passed in, the Regexp object will have the 'i' flag set.
    +     * If smartCase is passed in, and the query contains upper case letters,
    +     *   then ignoreCase is overridden, and the 'i' flag will not be set.
    +     * If the query contains the /i in the flag part of the regular expression,
    +     *   then both ignoreCase and smartCase are ignored, and 'i' will be passed
    +     *   through to the Regex object.
    +     */
    +    function parseQuery(query, ignoreCase, smartCase) {
    +      // Check if the query is already a regex.
    +      if (query instanceof RegExp) { return query; }
    +      // First try to extract regex + flags from the input. If no flags found,
    +      // extract just the regex. IE does not accept flags directly defined in
    +      // the regex string in the form /regex/flags
    +      var slashes = findUnescapedSlashes(query);
    +      var regexPart;
    +      var forceIgnoreCase;
    +      if (!slashes.length) {
    +        // Query looks like 'regexp'
    +        regexPart = query;
    +      } else {
    +        // Query looks like 'regexp/...'
    +        regexPart = query.substring(0, slashes[0]);
    +        var flagsPart = query.substring(slashes[0]);
    +        forceIgnoreCase = (flagsPart.indexOf('i') != -1);
    +      }
    +      if (!regexPart) {
    +        return null;
    +      }
    +      if (smartCase) {
    +        ignoreCase = (/^[^A-Z]*$/).test(regexPart);
    +      }
    +      var regexp = new RegExp(regexPart,
    +          (ignoreCase || forceIgnoreCase) ? 'i' : undefined);
    +      return regexp;
    +    }
    +    function showConfirm(cm, text) {
    +      if (cm.openNotification) {
    +        cm.openNotification('<span style="color: red">' + text + '</span>',
    +                            {bottom: true, duration: 5000});
    +      } else {
    +        alert(text);
    +      }
    +    }
    +    function makePrompt(prefix, desc) {
    +      var raw = '';
    +      if (prefix) {
    +        raw += '<span style="font-family: monospace">' + prefix + '</span>';
    +      }
    +      raw += '<input type="text"/> ' +
    +          '<span style="color: #888">';
    +      if (desc) {
    +        raw += '<span style="color: #888">';
    +        raw += desc;
    +        raw += '</span>';
    +      }
    +      return raw;
    +    }
    +    var searchPromptDesc = '(Javascript regexp)';
    +    function showPrompt(cm, options) {
    +      var shortText = (options.prefix || '') + ' ' + (options.desc || '');
    +      var prompt = makePrompt(options.prefix, options.desc);
    +      dialog(cm, prompt, shortText, options.onClose, options);
    +    }
    +    function regexEqual(r1, r2) {
    +      if (r1 instanceof RegExp && r2 instanceof RegExp) {
    +          var props = ['global', 'multiline', 'ignoreCase', 'source'];
    +          for (var i = 0; i < props.length; i++) {
    +              var prop = props[i];
    +              if (r1[prop] !== r2[prop]) {
    +                  return false;
    +              }
    +          }
    +          return true;
    +      }
    +      return false;
    +    }
    +    // Returns true if the query is valid.
    +    function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) {
    +      if (!rawQuery) {
    +        return;
    +      }
    +      var state = getSearchState(cm);
    +      var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase);
    +      if (!query) {
    +        return;
    +      }
    +      highlightSearchMatches(cm, query);
    +      if (regexEqual(query, state.getQuery())) {
    +        return query;
    +      }
    +      state.setQuery(query);
    +      return query;
    +    }
    +    function searchOverlay(query) {
    +      if (query.source.charAt(0) == '^') {
    +        var matchSol = true;
    +      }
    +      return {
    +        token: function(stream) {
    +          if (matchSol && !stream.sol()) {
    +            stream.skipToEnd();
    +            return;
    +          }
    +          var match = stream.match(query, false);
    +          if (match) {
    +            if (match[0].length == 0) {
    +              // Matched empty string, skip to next.
    +              stream.next();
    +              return 'searching';
    +            }
    +            if (!stream.sol()) {
    +              // Backtrack 1 to match \b
    +              stream.backUp(1);
    +              if (!query.exec(stream.next() + match[0])) {
    +                stream.next();
    +                return null;
    +              }
    +            }
    +            stream.match(query);
    +            return 'searching';
    +          }
    +          while (!stream.eol()) {
    +            stream.next();
    +            if (stream.match(query, false)) break;
    +          }
    +        },
    +        query: query
    +      };
    +    }
    +    function highlightSearchMatches(cm, query) {
    +      var overlay = getSearchState(cm).getOverlay();
    +      if (!overlay || query != overlay.query) {
    +        if (overlay) {
    +          cm.removeOverlay(overlay);
    +        }
    +        overlay = searchOverlay(query);
    +        cm.addOverlay(overlay);
    +        getSearchState(cm).setOverlay(overlay);
    +      }
    +    }
    +    function findNext(cm, prev, query, repeat) {
    +      if (repeat === undefined) { repeat = 1; }
    +      return cm.operation(function() {
    +        var pos = cm.getCursor();
    +        var cursor = cm.getSearchCursor(query, pos);
    +        for (var i = 0; i < repeat; i++) {
    +          var found = cursor.find(prev);
    +          if (i == 0 && found && cursorEqual(cursor.from(), pos)) { found = cursor.find(prev); }
    +          if (!found) {
    +            // SearchCursor may have returned null because it hit EOF, wrap
    +            // around and try again.
    +            cursor = cm.getSearchCursor(query,
    +                (prev) ? { line: cm.lastLine() } : {line: cm.firstLine(), ch: 0} );
    +            if (!cursor.find(prev)) {
    +              return;
    +            }
    +          }
    +        }
    +        return cursor.from();
    +      });
    +    }
    +    function clearSearchHighlight(cm) {
    +      cm.removeOverlay(getSearchState(cm).getOverlay());
    +      getSearchState(cm).setOverlay(null);
    +    }
    +    /**
    +     * Check if pos is in the specified range, INCLUSIVE.
    +     * Range can be specified with 1 or 2 arguments.
    +     * If the first range argument is an array, treat it as an array of line
    +     * numbers. Match pos against any of the lines.
    +     * If the first range argument is a number,
    +     *   if there is only 1 range argument, check if pos has the same line
    +     *       number
    +     *   if there are 2 range arguments, then check if pos is in between the two
    +     *       range arguments.
    +     */
    +    function isInRange(pos, start, end) {
    +      if (typeof pos != 'number') {
    +        // Assume it is a cursor position. Get the line number.
    +        pos = pos.line;
    +      }
    +      if (start instanceof Array) {
    +        return inArray(pos, start);
    +      } else {
    +        if (end) {
    +          return (pos >= start && pos <= end);
    +        } else {
    +          return pos == start;
    +        }
    +      }
    +    }
    +    function getUserVisibleLines(cm) {
    +      var scrollInfo = cm.getScrollInfo();
    +      var occludeToleranceTop = 6;
    +      var occludeToleranceBottom = 10;
    +      var from = cm.coordsChar({left:0, top: occludeToleranceTop + scrollInfo.top}, 'local');
    +      var bottomY = scrollInfo.clientHeight - occludeToleranceBottom + scrollInfo.top;
    +      var to = cm.coordsChar({left:0, top: bottomY}, 'local');
    +      return {top: from.line, bottom: to.line};
    +    }
    +
    +    // Ex command handling
    +    // Care must be taken when adding to the default Ex command map. For any
    +    // pair of commands that have a shared prefix, at least one of their
    +    // shortNames must not match the prefix of the other command.
    +    var defaultExCommandMap = [
    +      { name: 'map', type: 'builtIn' },
    +      { name: 'write', shortName: 'w', type: 'builtIn' },
    +      { name: 'undo', shortName: 'u', type: 'builtIn' },
    +      { name: 'redo', shortName: 'red', type: 'builtIn' },
    +      { name: 'sort', shortName: 'sor', type: 'builtIn'},
    +      { name: 'substitute', shortName: 's', type: 'builtIn'},
    +      { name: 'nohlsearch', shortName: 'noh', type: 'builtIn'},
    +      { name: 'delmarks', shortName: 'delm', type: 'builtin'}
    +    ];
    +    Vim.ExCommandDispatcher = function() {
    +      this.buildCommandMap_();
    +    };
    +    Vim.ExCommandDispatcher.prototype = {
    +      processCommand: function(cm, input) {
    +        var vim = cm.state.vim;
    +        if (vim.visualMode) {
    +          exitVisualMode(cm);
    +        }
    +        var inputStream = new CodeMirror.StringStream(input);
    +        var params = {};
    +        params.input = input;
    +        try {
    +          this.parseInput_(cm, inputStream, params);
    +        } catch(e) {
    +          showConfirm(cm, e);
    +          return;
    +        }
    +        var commandName;
    +        if (!params.commandName) {
    +          // If only a line range is defined, move to the line.
    +          if (params.line !== undefined) {
    +            commandName = 'move';
    +          }
    +        } else {
    +          var command = this.matchCommand_(params.commandName);
    +          if (command) {
    +            commandName = command.name;
    +            this.parseCommandArgs_(inputStream, params, command);
    +            if (command.type == 'exToKey') {
    +              // Handle Ex to Key mapping.
    +              for (var i = 0; i < command.toKeys.length; i++) {
    +                CodeMirror.Vim.handleKey(cm, command.toKeys[i]);
    +              }
    +              return;
    +            } else if (command.type == 'exToEx') {
    +              // Handle Ex to Ex mapping.
    +              this.processCommand(cm, command.toInput);
    +              return;
    +            }
    +          }
    +        }
    +        if (!commandName) {
    +          showConfirm(cm, 'Not an editor command ":' + input + '"');
    +          return;
    +        }
    +        try {
    +          exCommands[commandName](cm, params);
    +        } catch(e) {
    +          showConfirm(cm, e);
    +        }
    +      },
    +      parseInput_: function(cm, inputStream, result) {
    +        inputStream.eatWhile(':');
    +        // Parse range.
    +        if (inputStream.eat('%')) {
    +          result.line = cm.firstLine();
    +          result.lineEnd = cm.lastLine();
    +        } else {
    +          result.line = this.parseLineSpec_(cm, inputStream);
    +          if (result.line !== undefined && inputStream.eat(',')) {
    +            result.lineEnd = this.parseLineSpec_(cm, inputStream);
    +          }
    +        }
    +
    +        // Parse command name.
    +        var commandMatch = inputStream.match(/^(\w+)/);
    +        if (commandMatch) {
    +          result.commandName = commandMatch[1];
    +        } else {
    +          result.commandName = inputStream.match(/.*/)[0];
    +        }
    +
    +        return result;
    +      },
    +      parseLineSpec_: function(cm, inputStream) {
    +        var numberMatch = inputStream.match(/^(\d+)/);
    +        if (numberMatch) {
    +          return parseInt(numberMatch[1], 10) - 1;
    +        }
    +        switch (inputStream.next()) {
    +          case '.':
    +            return cm.getCursor().line;
    +          case '$':
    +            return cm.lastLine();
    +          case '\'':
    +            var mark = cm.state.vim.marks[inputStream.next()];
    +            if (mark && mark.find()) {
    +              return mark.find().line;
    +            }
    +            throw new Error('Mark not set');
    +          default:
    +            inputStream.backUp(1);
    +            return undefined;
    +        }
    +      },
    +      parseCommandArgs_: function(inputStream, params, command) {
    +        if (inputStream.eol()) {
    +          return;
    +        }
    +        params.argString = inputStream.match(/.*/)[0];
    +        // Parse command-line arguments
    +        var delim = command.argDelimiter || /\s+/;
    +        var args = trim(params.argString).split(delim);
    +        if (args.length && args[0]) {
    +          params.args = args;
    +        }
    +      },
    +      matchCommand_: function(commandName) {
    +        // Return the command in the command map that matches the shortest
    +        // prefix of the passed in command name. The match is guaranteed to be
    +        // unambiguous if the defaultExCommandMap's shortNames are set up
    +        // correctly. (see @code{defaultExCommandMap}).
    +        for (var i = commandName.length; i > 0; i--) {
    +          var prefix = commandName.substring(0, i);
    +          if (this.commandMap_[prefix]) {
    +            var command = this.commandMap_[prefix];
    +            if (command.name.indexOf(commandName) === 0) {
    +              return command;
    +            }
    +          }
    +        }
    +        return null;
    +      },
    +      buildCommandMap_: function() {
    +        this.commandMap_ = {};
    +        for (var i = 0; i < defaultExCommandMap.length; i++) {
    +          var command = defaultExCommandMap[i];
    +          var key = command.shortName || command.name;
    +          this.commandMap_[key] = command;
    +        }
    +      },
    +      map: function(lhs, rhs) {
    +        if (lhs != ':' && lhs.charAt(0) == ':') {
    +          var commandName = lhs.substring(1);
    +          if (rhs != ':' && rhs.charAt(0) == ':') {
    +            // Ex to Ex mapping
    +            this.commandMap_[commandName] = {
    +              name: commandName,
    +              type: 'exToEx',
    +              toInput: rhs.substring(1)
    +            };
    +          } else {
    +            // Ex to key mapping
    +            this.commandMap_[commandName] = {
    +              name: commandName,
    +              type: 'exToKey',
    +              toKeys: parseKeyString(rhs)
    +            };
    +          }
    +        } else {
    +          if (rhs != ':' && rhs.charAt(0) == ':') {
    +            // Key to Ex mapping.
    +            defaultKeymap.unshift({
    +              keys: parseKeyString(lhs),
    +              type: 'keyToEx',
    +              exArgs: { input: rhs.substring(1) }});
    +          } else {
    +            // Key to key mapping
    +            defaultKeymap.unshift({
    +              keys: parseKeyString(lhs),
    +              type: 'keyToKey',
    +              toKeys: parseKeyString(rhs)
    +            });
    +          }
    +        }
    +      }
    +    };
    +
    +    // Converts a key string sequence of the form a<C-w>bd<Left> into Vim's
    +    // keymap representation.
    +    function parseKeyString(str) {
    +      var key, match;
    +      var keys = [];
    +      while (str) {
    +        match = (/<\w+-.+?>|<\w+>|./).exec(str);
    +        if(match === null)break;
    +        key = match[0];
    +        str = str.substring(match.index + key.length);
    +        keys.push(key);
    +      }
    +      return keys;
    +    }
    +
    +    var exCommands = {
    +      map: function(cm, params) {
    +        var mapArgs = params.args;
    +        if (!mapArgs || mapArgs.length < 2) {
    +          if (cm) {
    +            showConfirm(cm, 'Invalid mapping: ' + params.input);
    +          }
    +          return;
    +        }
    +        exCommandDispatcher.map(mapArgs[0], mapArgs[1], cm);
    +      },
    +      move: function(cm, params) {
    +        commandDispatcher.processCommand(cm, cm.state.vim, {
    +            type: 'motion',
    +            motion: 'moveToLineOrEdgeOfDocument',
    +            motionArgs: { forward: false, explicitRepeat: true,
    +              linewise: true },
    +            repeatOverride: params.line+1});
    +      },
    +      sort: function(cm, params) {
    +        var reverse, ignoreCase, unique, number;
    +        function parseArgs() {
    +          if (params.argString) {
    +            var args = new CodeMirror.StringStream(params.argString);
    +            if (args.eat('!')) { reverse = true; }
    +            if (args.eol()) { return; }
    +            if (!args.eatSpace()) { throw new Error('invalid arguments ' + args.match(/.*/)[0]); }
    +            var opts = args.match(/[a-z]+/);
    +            if (opts) {
    +              opts = opts[0];
    +              ignoreCase = opts.indexOf('i') != -1;
    +              unique = opts.indexOf('u') != -1;
    +              var decimal = opts.indexOf('d') != -1 && 1;
    +              var hex = opts.indexOf('x') != -1 && 1;
    +              var octal = opts.indexOf('o') != -1 && 1;
    +              if (decimal + hex + octal > 1) { throw new Error('invalid arguments'); }
    +              number = decimal && 'decimal' || hex && 'hex' || octal && 'octal';
    +            }
    +            if (args.eatSpace() && args.match(/\/.*\//)) { throw new Error('patterns not supported'); }
    +          }
    +        }
    +        parseArgs();
    +        var lineStart = params.line || cm.firstLine();
    +        var lineEnd = params.lineEnd || params.line || cm.lastLine();
    +        if (lineStart == lineEnd) { return; }
    +        var curStart = { line: lineStart, ch: 0 };
    +        var curEnd = { line: lineEnd, ch: lineLength(cm, lineEnd) };
    +        var text = cm.getRange(curStart, curEnd).split('\n');
    +        var numberRegex = (number == 'decimal') ? /(-?)([\d]+)/ :
    +           (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i :
    +           (number == 'octal') ? /([0-7]+)/ : null;
    +        var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null;
    +        var numPart = [], textPart = [];
    +        if (number) {
    +          for (var i = 0; i < text.length; i++) {
    +            if (numberRegex.exec(text[i])) {
    +              numPart.push(text[i]);
    +            } else {
    +              textPart.push(text[i]);
    +            }
    +          }
    +        } else {
    +          textPart = text;
    +        }
    +        function compareFn(a, b) {
    +          if (reverse) { var tmp; tmp = a; a = b; b = tmp; }
    +          if (ignoreCase) { a = a.toLowerCase(); b = b.toLowerCase(); }
    +          var anum = number && numberRegex.exec(a);
    +          var bnum = number && numberRegex.exec(b);
    +          if (!anum) { return a < b ? -1 : 1; }
    +          anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix);
    +          bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix);
    +          return anum - bnum;
    +        }
    +        numPart.sort(compareFn);
    +        textPart.sort(compareFn);
    +        text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart);
    +        if (unique) { // Remove duplicate lines
    +          var textOld = text;
    +          var lastLine;
    +          text = [];
    +          for (var i = 0; i < textOld.length; i++) {
    +            if (textOld[i] != lastLine) {
    +              text.push(textOld[i]);
    +            }
    +            lastLine = textOld[i];
    +          }
    +        }
    +        cm.replaceRange(text.join('\n'), curStart, curEnd);
    +      },
    +      substitute: function(cm, params) {
    +        if (!cm.getSearchCursor) {
    +          throw new Error('Search feature not available. Requires searchcursor.js or ' +
    +              'any other getSearchCursor implementation.');
    +        }
    +        var argString = params.argString;
    +        var slashes = findUnescapedSlashes(argString);
    +        if (slashes[0] !== 0) {
    +          showConfirm(cm, 'Substitutions should be of the form ' +
    +              ':s/pattern/replace/');
    +          return;
    +        }
    +        var regexPart = argString.substring(slashes[0] + 1, slashes[1]);
    +        var replacePart = '';
    +        var flagsPart;
    +        var count;
    +        var confirm = false; // Whether to confirm each replace.
    +        if (slashes[1]) {
    +          replacePart = argString.substring(slashes[1] + 1, slashes[2]);
    +        }
    +        if (slashes[2]) {
    +          // After the 3rd slash, we can have flags followed by a space followed
    +          // by count.
    +          var trailing = argString.substring(slashes[2] + 1).split(' ');
    +          flagsPart = trailing[0];
    +          count = parseInt(trailing[1]);
    +        }
    +        if (flagsPart) {
    +          if (flagsPart.indexOf('c') != -1) {
    +            confirm = true;
    +            flagsPart.replace('c', '');
    +          }
    +          regexPart = regexPart + '/' + flagsPart;
    +        }
    +        if (regexPart) {
    +          // If regex part is empty, then use the previous query. Otherwise use
    +          // the regex part as the new query.
    +          try {
    +            updateSearchQuery(cm, regexPart, true /** ignoreCase */,
    +              true /** smartCase */);
    +          } catch (e) {
    +            showConfirm(cm, 'Invalid regex: ' + regexPart);
    +            return;
    +          }
    +        }
    +        var state = getSearchState(cm);
    +        var query = state.getQuery();
    +        var lineStart = (params.line !== undefined) ? params.line : cm.getCursor().line;
    +        var lineEnd = params.lineEnd || lineStart;
    +        if (count) {
    +          lineStart = lineEnd;
    +          lineEnd = lineStart + count - 1;
    +        }
    +        var startPos = clipCursorToContent(cm, { line: lineStart, ch: 0 });
    +        var cursor = cm.getSearchCursor(query, startPos);
    +        doReplace(cm, confirm, lineStart, lineEnd, cursor, query, replacePart);
    +      },
    +      redo: CodeMirror.commands.redo,
    +      undo: CodeMirror.commands.undo,
    +      write: function(cm) {
    +        if (CodeMirror.commands.save) {
    +          // If a save command is defined, call it.
    +          CodeMirror.commands.save(cm);
    +        } else {
    +          // Saves to text area if no save command is defined.
    +          cm.save();
    +        }
    +      },
    +      nohlsearch: function(cm) {
    +        clearSearchHighlight(cm);
    +      },
    +      delmarks: function(cm, params) {
    +        if (!params.argString || !params.argString.trim()) {
    +          showConfirm(cm, 'Argument required');
    +          return;
    +        }
    +
    +        var state = cm.state.vim;
    +        var stream = new CodeMirror.StringStream(params.argString.trim());
    +        while (!stream.eol()) {
    +          stream.eatSpace();
    +
    +          // Record the streams position at the beginning of the loop for use
    +          // in error messages.
    +          var count = stream.pos;
    +
    +          if (!stream.match(/[a-zA-Z]/, false)) {
    +            showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
    +            return;
    +          }
    +
    +          var sym = stream.next();
    +          // Check if this symbol is part of a range
    +          if (stream.match('-', true)) {
    +            // This symbol is part of a range.
    +
    +            // The range must terminate at an alphabetic character.
    +            if (!stream.match(/[a-zA-Z]/, false)) {
    +              showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
    +              return;
    +            }
    +
    +            var startMark = sym;
    +            var finishMark = stream.next();
    +            // The range must terminate at an alphabetic character which
    +            // shares the same case as the start of the range.
    +            if (isLowerCase(startMark) && isLowerCase(finishMark) ||
    +                isUpperCase(startMark) && isUpperCase(finishMark)) {
    +              var start = startMark.charCodeAt(0);
    +              var finish = finishMark.charCodeAt(0);
    +              if (start >= finish) {
    +                showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
    +                return;
    +              }
    +
    +              // Because marks are always ASCII values, and we have
    +              // determined that they are the same case, we can use
    +              // their char codes to iterate through the defined range.
    +              for (var j = 0; j <= finish - start; j++) {
    +                var mark = String.fromCharCode(start + j);
    +                delete state.marks[mark];
    +              }
    +            } else {
    +              showConfirm(cm, 'Invalid argument: ' + startMark + '-');
    +              return;
    +            }
    +          } else {
    +            // This symbol is a valid mark, and is not part of a range.
    +            delete state.marks[sym];
    +          }
    +        }
    +      }
    +    };
    +
    +    var exCommandDispatcher = new Vim.ExCommandDispatcher();
    +
    +    /**
    +    * @param {CodeMirror} cm CodeMirror instance we are in.
    +    * @param {boolean} confirm Whether to confirm each replace.
    +    * @param {Cursor} lineStart Line to start replacing from.
    +    * @param {Cursor} lineEnd Line to stop replacing at.
    +    * @param {RegExp} query Query for performing matches with.
    +    * @param {string} replaceWith Text to replace matches with. May contain $1,
    +    *     $2, etc for replacing captured groups using Javascript replace.
    +    */
    +    function doReplace(cm, confirm, lineStart, lineEnd, searchCursor, query,
    +        replaceWith) {
    +      // Set up all the functions.
    +      cm.state.vim.exMode = true;
    +      var done = false;
    +      var lastPos = searchCursor.from();
    +      function replaceAll() {
    +        cm.operation(function() {
    +          while (!done) {
    +            replace();
    +            next();
    +          }
    +          stop();
    +        });
    +      }
    +      function replace() {
    +        var text = cm.getRange(searchCursor.from(), searchCursor.to());
    +        var newText = text.replace(query, replaceWith);
    +        searchCursor.replace(newText);
    +      }
    +      function next() {
    +        var found = searchCursor.findNext();
    +        if (!found) {
    +          done = true;
    +        } else if (isInRange(searchCursor.from(), lineStart, lineEnd)) {
    +          cm.scrollIntoView(searchCursor.from(), 30);
    +          cm.setSelection(searchCursor.from(), searchCursor.to());
    +          lastPos = searchCursor.from();
    +          done = false;
    +        } else {
    +          done = true;
    +        }
    +      }
    +      function stop(close) {
    +        if (close) { close(); }
    +        cm.focus();
    +        if (lastPos) {
    +          cm.setCursor(lastPos);
    +          var vim = cm.state.vim;
    +          vim.exMode = false;
    +          vim.lastHPos = vim.lastHSPos = lastPos.ch;
    +        }
    +      }
    +      function onPromptKeyDown(e, _value, close) {
    +        // Swallow all keys.
    +        CodeMirror.e_stop(e);
    +        var keyName = CodeMirror.keyName(e);
    +        switch (keyName) {
    +          case 'Y':
    +            replace(); next(); break;
    +          case 'N':
    +            next(); break;
    +          case 'A':
    +            cm.operation(replaceAll); break;
    +          case 'L':
    +            replace();
    +            // fall through and exit.
    +          case 'Q':
    +          case 'Esc':
    +          case 'Ctrl-C':
    +          case 'Ctrl-[':
    +            stop(close);
    +            break;
    +        }
    +        if (done) { stop(close); }
    +      }
    +
    +      // Actually do replace.
    +      next();
    +      if (done) {
    +        throw new Error('No matches for ' + query.source);
    +      }
    +      if (!confirm) {
    +        replaceAll();
    +        return;
    +      }
    +      showPrompt(cm, {
    +        prefix: 'replace with <strong>' + replaceWith + '</strong> (y/n/a/q/l)',
    +        onKeyDown: onPromptKeyDown
    +      });
    +    }
    +
    +    // Register Vim with CodeMirror
    +    function buildVimKeyMap() {
    +      /**
    +       * Handle the raw key event from CodeMirror. Translate the
    +       * Shift + key modifier to the resulting letter, while preserving other
    +       * modifers.
    +       */
    +      // TODO: Figure out a way to catch capslock.
    +      function cmKeyToVimKey(key, modifier) {
    +        var vimKey = key;
    +        if (isUpperCase(vimKey)) {
    +          // Convert to lower case if shift is not the modifier since the key
    +          // we get from CodeMirror is always upper case.
    +          if (modifier == 'Shift') {
    +            modifier = null;
    +          }
    +          else {
    +            vimKey = vimKey.toLowerCase();
    +          }
    +        }
    +        if (modifier) {
    +          // Vim will parse modifier+key combination as a single key.
    +          vimKey = modifier.charAt(0) + '-' + vimKey;
    +        }
    +        var specialKey = ({Enter:'CR',Backspace:'BS',Delete:'Del'})[vimKey];
    +        vimKey = specialKey ? specialKey : vimKey;
    +        vimKey = vimKey.length > 1 ? '<'+ vimKey + '>' : vimKey;
    +        return vimKey;
    +      }
    +
    +      // Closure to bind CodeMirror, key, modifier.
    +      function keyMapper(vimKey) {
    +        return function(cm) {
    +          CodeMirror.Vim.handleKey(cm, vimKey);
    +        };
    +      }
    +
    +      var cmToVimKeymap = {
    +        'nofallthrough': true,
    +        'disableInput': true,
    +        'style': 'fat-cursor'
    +      };
    +      function bindKeys(keys, modifier) {
    +        for (var i = 0; i < keys.length; i++) {
    +          var key = keys[i];
    +          if (!modifier && inArray(key, specialSymbols)) {
    +            // Wrap special symbols with '' because that's how CodeMirror binds
    +            // them.
    +            key = "'" + key + "'";
    +          }
    +          var vimKey = cmKeyToVimKey(keys[i], modifier);
    +          var cmKey = modifier ? modifier + '-' + key : key;
    +          cmToVimKeymap[cmKey] = keyMapper(vimKey);
    +        }
    +      }
    +      bindKeys(upperCaseAlphabet);
    +      bindKeys(upperCaseAlphabet, 'Shift');
    +      bindKeys(upperCaseAlphabet, 'Ctrl');
    +      bindKeys(specialSymbols);
    +      bindKeys(specialSymbols, 'Ctrl');
    +      bindKeys(numbers);
    +      bindKeys(numbers, 'Ctrl');
    +      bindKeys(specialKeys);
    +      bindKeys(specialKeys, 'Ctrl');
    +      return cmToVimKeymap;
    +    }
    +    CodeMirror.keyMap.vim = buildVimKeyMap();
    +
    +    function exitInsertMode(cm) {
    +      var vim = cm.state.vim;
    +      var inReplay = vimGlobalState.macroModeState.inReplay;
    +      if (!inReplay) {
    +        cm.off('change', onChange);
    +        cm.off('cursorActivity', onCursorActivity);
    +        CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);
    +      }
    +      if (!inReplay && vim.insertModeRepeat > 1) {
    +        // Perform insert mode repeat for commands like 3,a and 3,o.
    +        repeatLastEdit(cm, vim, vim.insertModeRepeat - 1,
    +            true /** repeatForInsert */);
    +        vim.lastEditInputState.repeatOverride = vim.insertModeRepeat;
    +      }
    +      delete vim.insertModeRepeat;
    +      cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1, true);
    +      vim.insertMode = false;
    +      cm.setOption('keyMap', 'vim');
    +      cm.toggleOverwrite(false); // exit replace mode if we were in it.
    +      CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
    +    }
    +
    +    CodeMirror.keyMap['vim-insert'] = {
    +      // TODO: override navigation keys so that Esc will cancel automatic
    +      // indentation from o, O, i_<CR>
    +      'Esc': exitInsertMode,
    +      'Ctrl-[': exitInsertMode,
    +      'Ctrl-C': exitInsertMode,
    +      'Ctrl-N': 'autocomplete',
    +      'Ctrl-P': 'autocomplete',
    +      'Enter': function(cm) {
    +        var fn = CodeMirror.commands.newlineAndIndentContinueComment ||
    +            CodeMirror.commands.newlineAndIndent;
    +        fn(cm);
    +      },
    +      fallthrough: ['default']
    +    };
    +
    +    CodeMirror.keyMap['vim-replace'] = {
    +      'Backspace': 'goCharLeft',
    +      fallthrough: ['vim-insert']
    +    };
    +
    +    function parseRegisterToKeyBuffer(macroModeState, registerName) {
    +      var match, key;
    +      var register = vimGlobalState.registerController.getRegister(registerName);
    +      var text = register.toString();
    +      var macroKeyBuffer = macroModeState.macroKeyBuffer;
    +      emptyMacroKeyBuffer(macroModeState);
    +      do {
    +        match = (/<\w+-.+?>|<\w+>|./).exec(text);
    +        if(match === null)break;
    +        key = match[0];
    +        text = text.substring(match.index + key.length);
    +        macroKeyBuffer.push(key);
    +      } while (text);
    +      return macroKeyBuffer;
    +    }
    +
    +    function parseKeyBufferToRegister(registerName, keyBuffer) {
    +      var text = keyBuffer.join('');
    +      vimGlobalState.registerController.setRegisterText(registerName, text);
    +    }
    +
    +    function emptyMacroKeyBuffer(macroModeState) {
    +      if(macroModeState.isMacroPlaying)return;
    +      var macroKeyBuffer = macroModeState.macroKeyBuffer;
    +      macroKeyBuffer.length = 0;
    +    }
    +
    +    function executeMacroKeyBuffer(cm, macroModeState, keyBuffer) {
    +      macroModeState.isMacroPlaying = true;
    +      for (var i = 0, len = keyBuffer.length; i < len; i++) {
    +        CodeMirror.Vim.handleKey(cm, keyBuffer[i]);
    +      };
    +      macroModeState.isMacroPlaying = false;
    +    }
    +
    +    function logKey(macroModeState, key) {
    +      if(macroModeState.isMacroPlaying)return;
    +      var macroKeyBuffer = macroModeState.macroKeyBuffer;
    +      macroKeyBuffer.push(key);
    +    }
    +
    +    /**
    +     * Listens for changes made in insert mode.
    +     * Should only be active in insert mode.
    +     */
    +    function onChange(_cm, changeObj) {
    +      var macroModeState = vimGlobalState.macroModeState;
    +      var lastChange = macroModeState.lastInsertModeChanges;
    +      while (changeObj) {
    +        lastChange.expectCursorActivityForChange = true;
    +        if (changeObj.origin == '+input' || changeObj.origin == 'paste'
    +            || changeObj.origin === undefined /* only in testing */) {
    +          var text = changeObj.text.join('\n');
    +          lastChange.changes.push(text);
    +        }
    +        // Change objects may be chained with next.
    +        changeObj = changeObj.next;
    +      }
    +    }
    +
    +    /**
    +    * Listens for any kind of cursor activity on CodeMirror.
    +    * - For tracking cursor activity in insert mode.
    +    * - Should only be active in insert mode.
    +    */
    +    function onCursorActivity() {
    +      var macroModeState = vimGlobalState.macroModeState;
    +      var lastChange = macroModeState.lastInsertModeChanges;
    +      if (lastChange.expectCursorActivityForChange) {
    +        lastChange.expectCursorActivityForChange = false;
    +      } else {
    +        // Cursor moved outside the context of an edit. Reset the change.
    +        lastChange.changes = [];
    +      }
    +    }
    +
    +    /** Wrapper for special keys pressed in insert mode */
    +    function InsertModeKey(keyName) {
    +      this.keyName = keyName;
    +    }
    +
    +    /**
    +    * Handles raw key down events from the text area.
    +    * - Should only be active in insert mode.
    +    * - For recording deletes in insert mode.
    +    */
    +    function onKeyEventTargetKeyDown(e) {
    +      var macroModeState = vimGlobalState.macroModeState;
    +      var lastChange = macroModeState.lastInsertModeChanges;
    +      var keyName = CodeMirror.keyName(e);
    +      function onKeyFound() {
    +        lastChange.changes.push(new InsertModeKey(keyName));
    +        return true;
    +      }
    +      if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) {
    +        CodeMirror.lookupKey(keyName, ['vim-insert'], onKeyFound);
    +      }
    +    }
    +
    +    /**
    +     * Repeats the last edit, which includes exactly 1 command and at most 1
    +     * insert. Operator and motion commands are read from lastEditInputState,
    +     * while action commands are read from lastEditActionCommand.
    +     *
    +     * If repeatForInsert is true, then the function was called by
    +     * exitInsertMode to repeat the insert mode changes the user just made. The
    +     * corresponding enterInsertMode call was made with a count.
    +     */
    +    function repeatLastEdit(cm, vim, repeat, repeatForInsert) {
    +      var macroModeState = vimGlobalState.macroModeState;
    +      macroModeState.inReplay = true;
    +      var isAction = !!vim.lastEditActionCommand;
    +      var cachedInputState = vim.inputState;
    +      function repeatCommand() {
    +        if (isAction) {
    +          commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand);
    +        } else {
    +          commandDispatcher.evalInput(cm, vim);
    +        }
    +      }
    +      function repeatInsert(repeat) {
    +        if (macroModeState.lastInsertModeChanges.changes.length > 0) {
    +          // For some reason, repeat cw in desktop VIM will does not repeat
    +          // insert mode changes. Will conform to that behavior.
    +          repeat = !vim.lastEditActionCommand ? 1 : repeat;
    +          repeatLastInsertModeChanges(cm, repeat, macroModeState);
    +        }
    +      }
    +      vim.inputState = vim.lastEditInputState;
    +      if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) {
    +        // o and O repeat have to be interlaced with insert repeats so that the
    +        // insertions appear on separate lines instead of the last line.
    +        for (var i = 0; i < repeat; i++) {
    +          repeatCommand();
    +          repeatInsert(1);
    +        }
    +      } else {
    +        if (!repeatForInsert) {
    +          // Hack to get the cursor to end up at the right place. If I is
    +          // repeated in insert mode repeat, cursor will be 1 insert
    +          // change set left of where it should be.
    +          repeatCommand();
    +        }
    +        repeatInsert(repeat);
    +      }
    +      vim.inputState = cachedInputState;
    +      if (vim.insertMode && !repeatForInsert) {
    +        // Don't exit insert mode twice. If repeatForInsert is set, then we
    +        // were called by an exitInsertMode call lower on the stack.
    +        exitInsertMode(cm);
    +      }
    +      macroModeState.inReplay = false;
    +    };
    +
    +    function repeatLastInsertModeChanges(cm, repeat, macroModeState) {
    +      var lastChange = macroModeState.lastInsertModeChanges;
    +      function keyHandler(binding) {
    +        if (typeof binding == 'string') {
    +          CodeMirror.commands[binding](cm);
    +        } else {
    +          binding(cm);
    +        }
    +        return true;
    +      }
    +      for (var i = 0; i < repeat; i++) {
    +        for (var j = 0; j < lastChange.changes.length; j++) {
    +          var change = lastChange.changes[j];
    +          if (change instanceof InsertModeKey) {
    +            CodeMirror.lookupKey(change.keyName, ['vim-insert'], keyHandler);
    +          } else {
    +            var cur = cm.getCursor();
    +            cm.replaceRange(change, cur, cur);
    +          }
    +        }
    +      }
    +    }
    +
    +    resetVimGlobalState();
    +    return vimApi;
    +  };
    +  // Initialize Vim and make it available as an API.
    +  CodeMirror.Vim = Vim();
    +}
    +)();
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_mode_clojure_clojure.js.html b/Docs/files/third-party_codemirror-3.20_mode_clojure_clojure.js.html new file mode 100644 index 0000000..958a6da --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_mode_clojure_clojure.js.html @@ -0,0 +1,567 @@ + + + + + third-party/codemirror-3.20/mode/clojure/clojure.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/mode/clojure/clojure.js

    + +
    +
    +/**
    + * Author: Hans Engel
    + * Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun)
    + */
    +CodeMirror.defineMode("clojure", function () {
    +    var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", CHARACTER = "string-2",
    +        ATOM = "atom", NUMBER = "number", BRACKET = "bracket", KEYWORD = "keyword";
    +    var INDENT_WORD_SKIP = 2;
    +
    +    function makeKeywords(str) {
    +        var obj = {}, words = str.split(" ");
    +        for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
    +        return obj;
    +    }
    +
    +    var atoms = makeKeywords("true false nil");
    +
    +    var keywords = makeKeywords(
    +      "defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle");
    +
    +    var builtins = makeKeywords(
    +        "* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> ->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast byte byte-array bytes case cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? declare default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int rand-nth range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap *default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! set-agent-send-off-executor! some-> some->>");
    +
    +    var indentKeys = makeKeywords(
    +        // Built-ins
    +        "ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch " +
    +
    +        // Binding forms
    +        "let letfn binding loop for doseq dotimes when-let if-let " +
    +
    +        // Data structures
    +        "defstruct struct-map assoc " +
    +
    +        // clojure.test
    +        "testing deftest " +
    +
    +        // contrib
    +        "handler-case handle dotrace deftrace");
    +
    +    var tests = {
    +        digit: /\d/,
    +        digit_or_colon: /[\d:]/,
    +        hex: /[0-9a-f]/i,
    +        sign: /[+-]/,
    +        exponent: /e/i,
    +        keyword_char: /[^\s\(\[\;\)\]]/,
    +        symbol: /[\w*+!\-\._?:\/]/
    +    };
    +
    +    function stateStack(indent, type, prev) { // represents a state stack object
    +        this.indent = indent;
    +        this.type = type;
    +        this.prev = prev;
    +    }
    +
    +    function pushStack(state, indent, type) {
    +        state.indentStack = new stateStack(indent, type, state.indentStack);
    +    }
    +
    +    function popStack(state) {
    +        state.indentStack = state.indentStack.prev;
    +    }
    +
    +    function isNumber(ch, stream){
    +        // hex
    +        if ( ch === '0' && stream.eat(/x/i) ) {
    +            stream.eatWhile(tests.hex);
    +            return true;
    +        }
    +
    +        // leading sign
    +        if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) {
    +          stream.eat(tests.sign);
    +          ch = stream.next();
    +        }
    +
    +        if ( tests.digit.test(ch) ) {
    +            stream.eat(ch);
    +            stream.eatWhile(tests.digit);
    +
    +            if ( '.' == stream.peek() ) {
    +                stream.eat('.');
    +                stream.eatWhile(tests.digit);
    +            }
    +
    +            if ( stream.eat(tests.exponent) ) {
    +                stream.eat(tests.sign);
    +                stream.eatWhile(tests.digit);
    +            }
    +
    +            return true;
    +        }
    +
    +        return false;
    +    }
    +
    +    // Eat character that starts after backslash \
    +    function eatCharacter(stream) {
    +        var first = stream.next();
    +        // Read special literals: backspace, newline, space, return.
    +        // Just read all lowercase letters.
    +        if (first.match(/[a-z]/) && stream.match(/[a-z]+/, true)) {
    +            return;
    +        }
    +        // Read unicode character: \u1000 \uA0a1
    +        if (first === "u") {
    +            stream.match(/[0-9a-z]{4}/i, true);
    +        }
    +    }
    +
    +    return {
    +        startState: function () {
    +            return {
    +                indentStack: null,
    +                indentation: 0,
    +                mode: false
    +            };
    +        },
    +
    +        token: function (stream, state) {
    +            if (state.indentStack == null && stream.sol()) {
    +                // update indentation, but only if indentStack is empty
    +                state.indentation = stream.indentation();
    +            }
    +
    +            // skip spaces
    +            if (stream.eatSpace()) {
    +                return null;
    +            }
    +            var returnType = null;
    +
    +            switch(state.mode){
    +                case "string": // multi-line string parsing mode
    +                    var next, escaped = false;
    +                    while ((next = stream.next()) != null) {
    +                        if (next == "\"" && !escaped) {
    +
    +                            state.mode = false;
    +                            break;
    +                        }
    +                        escaped = !escaped && next == "\\";
    +                    }
    +                    returnType = STRING; // continue on in string mode
    +                    break;
    +                default: // default parsing mode
    +                    var ch = stream.next();
    +
    +                    if (ch == "\"") {
    +                        state.mode = "string";
    +                        returnType = STRING;
    +                    } else if (ch == "\\") {
    +                        eatCharacter(stream);
    +                        returnType = CHARACTER;
    +                    } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) {
    +                        returnType = ATOM;
    +                    } else if (ch == ";") { // comment
    +                        stream.skipToEnd(); // rest of the line is a comment
    +                        returnType = COMMENT;
    +                    } else if (isNumber(ch,stream)){
    +                        returnType = NUMBER;
    +                    } else if (ch == "(" || ch == "[" || ch == "{" ) {
    +                        var keyWord = '', indentTemp = stream.column(), letter;
    +                        /**
    +                        Either
    +                        (indent-word ..
    +                        (non-indent-word ..
    +                        (;something else, bracket, etc.
    +                        */
    +
    +                        if (ch == "(") while ((letter = stream.eat(tests.keyword_char)) != null) {
    +                            keyWord += letter;
    +                        }
    +
    +                        if (keyWord.length > 0 && (indentKeys.propertyIsEnumerable(keyWord) ||
    +                                                   /^(?:def|with)/.test(keyWord))) { // indent-word
    +                            pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);
    +                        } else { // non-indent word
    +                            // we continue eating the spaces
    +                            stream.eatSpace();
    +                            if (stream.eol() || stream.peek() == ";") {
    +                                // nothing significant after
    +                                // we restart indentation 1 space after
    +                                pushStack(state, indentTemp + 1, ch);
    +                            } else {
    +                                pushStack(state, indentTemp + stream.current().length, ch); // else we match
    +                            }
    +                        }
    +                        stream.backUp(stream.current().length - 1); // undo all the eating
    +
    +                        returnType = BRACKET;
    +                    } else if (ch == ")" || ch == "]" || ch == "}") {
    +                        returnType = BRACKET;
    +                        if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : (ch == "]" ? "[" :"{"))) {
    +                            popStack(state);
    +                        }
    +                    } else if ( ch == ":" ) {
    +                        stream.eatWhile(tests.symbol);
    +                        return ATOM;
    +                    } else {
    +                        stream.eatWhile(tests.symbol);
    +
    +                        if (keywords && keywords.propertyIsEnumerable(stream.current())) {
    +                            returnType = KEYWORD;
    +                        } else if (builtins && builtins.propertyIsEnumerable(stream.current())) {
    +                            returnType = BUILTIN;
    +                        } else if (atoms && atoms.propertyIsEnumerable(stream.current())) {
    +                            returnType = ATOM;
    +                        } else returnType = null;
    +                    }
    +            }
    +
    +            return returnType;
    +        },
    +
    +        indent: function (state) {
    +            if (state.indentStack == null) return state.indentation;
    +            return state.indentStack.indent;
    +        },
    +
    +        lineComment: ";;"
    +    };
    +});
    +
    +CodeMirror.defineMIME("text/x-clojure", "clojure");
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_mode_cobol_cobol.js.html b/Docs/files/third-party_codemirror-3.20_mode_cobol_cobol.js.html new file mode 100644 index 0000000..59d7b51 --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_mode_cobol_cobol.js.html @@ -0,0 +1,583 @@ + + + + + third-party/codemirror-3.20/mode/cobol/cobol.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/mode/cobol/cobol.js

    + +
    +
    +/**
    + * Author: Gautam Mehta
    + * Branched from CodeMirror's Scheme mode
    + */
    +CodeMirror.defineMode("cobol", function () {
    +  var BUILTIN = "builtin", COMMENT = "comment", STRING = "string",
    +      ATOM = "atom", NUMBER = "number", KEYWORD = "keyword", MODTAG = "header",
    +      COBOLLINENUM = "def", PERIOD = "link";
    +  function makeKeywords(str) {
    +    var obj = {}, words = str.split(" ");
    +    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
    +    return obj;
    +  }
    +  var atoms = makeKeywords("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES ");
    +  var keywords = makeKeywords(
    +      "ACCEPT ACCESS ACQUIRE ADD ADDRESS " +
    +      "ADVANCING AFTER ALIAS ALL ALPHABET " +
    +      "ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED " +
    +      "ALSO ALTER ALTERNATE AND ANY " +
    +      "ARE AREA AREAS ARITHMETIC ASCENDING " +
    +      "ASSIGN AT ATTRIBUTE AUTHOR AUTO " +
    +      "AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS " +
    +      "B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP " +
    +      "BEFORE BELL BINARY BIT BITS " +
    +      "BLANK BLINK BLOCK BOOLEAN BOTTOM " +
    +      "BY CALL CANCEL CD CF " +
    +      "CH CHARACTER CHARACTERS CLASS CLOCK-UNITS " +
    +      "CLOSE COBOL CODE CODE-SET COL " +
    +      "COLLATING COLUMN COMMA COMMIT COMMITMENT " +
    +      "COMMON COMMUNICATION COMP COMP-0 COMP-1 " +
    +      "COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 " +
    +      "COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 " +
    +      "COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 " +
    +      "COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE " +
    +      "CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS " +
    +      "CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS " +
    +      "CONVERTING COPY CORR CORRESPONDING COUNT " +
    +      "CRT CRT-UNDER CURRENCY CURRENT CURSOR " +
    +      "DATA DATE DATE-COMPILED DATE-WRITTEN DAY " +
    +      "DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION " +
    +      "DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS " +
    +      "DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE " +
    +      "DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING " +
    +      "DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED " +
    +      "DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION " +
    +      "DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 " +
    +      "DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 " +
    +      "DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION " +
    +      "DOWN DROP DUPLICATE DUPLICATES DYNAMIC " +
    +      "EBCDIC EGI EJECT ELSE EMI " +
    +      "EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. " +
    +      "END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY " +
    +      "END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY " +
    +      "END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN " +
    +      "END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT " +
    +      "END-UNSTRING END-WRITE END-XML ENTER ENTRY " +
    +      "ENVIRONMENT EOP EQUAL EQUALS ERASE " +
    +      "ERROR ESI EVALUATE EVERY EXCEEDS " +
    +      "EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL " +
    +      "EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL " +
    +      "FILE-STREAM FILES FILLER FINAL FIND " +
    +      "FINISH FIRST FOOTING FOR FOREGROUND-COLOR " +
    +      "FOREGROUND-COLOUR FORMAT FREE FROM FULL " +
    +      "FUNCTION GENERATE GET GIVING GLOBAL " +
    +      "GO GOBACK GREATER GROUP HEADING " +
    +      "HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL " +
    +      "ID IDENTIFICATION IF IN INDEX " +
    +      "INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 " +
    +      "INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED " +
    +      "INDIC INDICATE INDICATOR INDICATORS INITIAL " +
    +      "INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT " +
    +      "INSTALLATION INTO INVALID INVOKE IS " +
    +      "JUST JUSTIFIED KANJI KEEP KEY " +
    +      "LABEL LAST LD LEADING LEFT " +
    +      "LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY " +
    +      "LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER " +
    +      "LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE " +
    +      "LOCALE LOCALLY LOCK " +
    +      "MEMBER MEMORY MERGE MESSAGE METACLASS " +
    +      "MODE MODIFIED MODIFY MODULES MOVE " +
    +      "MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE " +
    +      "NEXT NO NO-ECHO NONE NOT " +
    +      "NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER " +
    +      "NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS " +
    +      "OF OFF OMITTED ON ONLY " +
    +      "OPEN OPTIONAL OR ORDER ORGANIZATION " +
    +      "OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL " +
    +      "PADDING PAGE PAGE-COUNTER PARSE PERFORM " +
    +      "PF PH PIC PICTURE PLUS " +
    +      "POINTER POSITION POSITIVE PREFIX PRESENT " +
    +      "PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES " +
    +      "PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID " +
    +      "PROMPT PROTECTED PURGE QUEUE QUOTE " +
    +      "QUOTES RANDOM RD READ READY " +
    +      "REALM RECEIVE RECONNECT RECORD RECORD-NAME " +
    +      "RECORDS RECURSIVE REDEFINES REEL REFERENCE " +
    +      "REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE " +
    +      "REMAINDER REMOVAL RENAMES REPEATED REPLACE " +
    +      "REPLACING REPORT REPORTING REPORTS REPOSITORY " +
    +      "REQUIRED RERUN RESERVE RESET RETAINING " +
    +      "RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO " +
    +      "REVERSED REWIND REWRITE RF RH " +
    +      "RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED " +
    +      "RUN SAME SCREEN SD SEARCH " +
    +      "SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT " +
    +      "SELECT SEND SENTENCE SEPARATE SEQUENCE " +
    +      "SEQUENTIAL SET SHARED SIGN SIZE " +
    +      "SKIP1 SKIP2 SKIP3 SORT SORT-MERGE " +
    +      "SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL " +
    +      "SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 " +
    +      "START STARTING STATUS STOP STORE " +
    +      "STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA " +
    +      "SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS " +
    +      "SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT " +
    +      "TABLE TALLYING TAPE TENANT TERMINAL " +
    +      "TERMINATE TEST TEXT THAN THEN " +
    +      "THROUGH THRU TIME TIMES TITLE " +
    +      "TO TOP TRAILING TRAILING-SIGN TRANSACTION " +
    +      "TYPE TYPEDEF UNDERLINE UNEQUAL UNIT " +
    +      "UNSTRING UNTIL UP UPDATE UPON " +
    +      "USAGE USAGE-MODE USE USING VALID " +
    +      "VALIDATE VALUE VALUES VARYING VLR " +
    +      "WAIT WHEN WHEN-COMPILED WITH WITHIN " +
    +      "WORDS WORKING-STORAGE WRITE XML XML-CODE " +
    +      "XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL " );
    +
    +  var builtins = makeKeywords("- * ** / + < <= = > >= ");
    +  var tests = {
    +    digit: /\d/,
    +    digit_or_colon: /[\d:]/,
    +    hex: /[0-9a-f]/i,
    +    sign: /[+-]/,
    +    exponent: /e/i,
    +    keyword_char: /[^\s\(\[\;\)\]]/,
    +    symbol: /[\w*+\-]/
    +  };
    +  function isNumber(ch, stream){
    +    // hex
    +    if ( ch === '0' && stream.eat(/x/i) ) {
    +      stream.eatWhile(tests.hex);
    +      return true;
    +    }
    +    // leading sign
    +    if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) {
    +      stream.eat(tests.sign);
    +      ch = stream.next();
    +    }
    +    if ( tests.digit.test(ch) ) {
    +      stream.eat(ch);
    +      stream.eatWhile(tests.digit);
    +      if ( '.' == stream.peek()) {
    +        stream.eat('.');
    +        stream.eatWhile(tests.digit);
    +      }
    +      if ( stream.eat(tests.exponent) ) {
    +        stream.eat(tests.sign);
    +        stream.eatWhile(tests.digit);
    +      }
    +      return true;
    +    }
    +    return false;
    +  }
    +  return {
    +    startState: function () {
    +      return {
    +        indentStack: null,
    +        indentation: 0,
    +        mode: false
    +      };
    +    },
    +    token: function (stream, state) {
    +      if (state.indentStack == null && stream.sol()) {
    +        // update indentation, but only if indentStack is empty
    +        state.indentation = 6 ; //stream.indentation();
    +      }
    +      // skip spaces
    +      if (stream.eatSpace()) {
    +        return null;
    +      }
    +      var returnType = null;
    +      switch(state.mode){
    +      case "string": // multi-line string parsing mode
    +        var next = false;
    +        while ((next = stream.next()) != null) {
    +          if (next == "\"" || next == "\'") {
    +            state.mode = false;
    +            break;
    +          }
    +        }
    +        returnType = STRING; // continue on in string mode
    +        break;
    +      default: // default parsing mode
    +        var ch = stream.next();
    +        var col = stream.column();
    +        if (col >= 0 && col <= 5) {
    +          returnType = COBOLLINENUM;
    +        } else if (col >= 72 && col <= 79) {
    +          stream.skipToEnd();
    +          returnType = MODTAG;
    +        } else if (ch == "*" && col == 6) { // comment
    +          stream.skipToEnd(); // rest of the line is a comment
    +          returnType = COMMENT;
    +        } else if (ch == "\"" || ch == "\'") {
    +          state.mode = "string";
    +          returnType = STRING;
    +        } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) {
    +          returnType = ATOM;
    +        } else if (ch == ".") {
    +          returnType = PERIOD;
    +        } else if (isNumber(ch,stream)){
    +          returnType = NUMBER;
    +        } else {
    +          if (stream.current().match(tests.symbol)) {
    +            while (col < 71) {
    +              if (stream.eat(tests.symbol) === undefined) {
    +                break;
    +              } else {
    +                col++;
    +              }
    +            }
    +          }
    +          if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) {
    +            returnType = KEYWORD;
    +          } else if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase())) {
    +            returnType = BUILTIN;
    +          } else if (atoms && atoms.propertyIsEnumerable(stream.current().toUpperCase())) {
    +            returnType = ATOM;
    +          } else returnType = null;
    +        }
    +      }
    +      return returnType;
    +    },
    +    indent: function (state) {
    +      if (state.indentStack == null) return state.indentation;
    +      return state.indentStack.indent;
    +    }
    +  };
    +});
    +
    +CodeMirror.defineMIME("text/x-cobol", "cobol");
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_mode_coffeescript_coffeescript.js.html b/Docs/files/third-party_codemirror-3.20_mode_coffeescript_coffeescript.js.html new file mode 100644 index 0000000..cc42455 --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_mode_coffeescript_coffeescript.js.html @@ -0,0 +1,697 @@ + + + + + third-party/codemirror-3.20/mode/coffeescript/coffeescript.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/mode/coffeescript/coffeescript.js

    + +
    +
    +/**
    + * Link to the project's GitHub page:
    + * https://github.com/pickhardt/coffeescript-codemirror-mode
    + */
    +CodeMirror.defineMode("coffeescript", function(conf) {
    +  var ERRORCLASS = "error";
    +
    +  function wordRegexp(words) {
    +    return new RegExp("^((" + words.join(")|(") + "))\\b");
    +  }
    +
    +  var operators = /^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?)/;
    +  var delimiters = /^(?:[()\[\]{},:`=;]|\.\.?\.?)/;
    +  var identifiers = /^[_A-Za-z$][_A-Za-z$0-9]*/;
    +  var properties = /^(@|this\.)[_A-Za-z$][_A-Za-z$0-9]*/;
    +
    +  var wordOperators = wordRegexp(["and", "or", "not",
    +                                  "is", "isnt", "in",
    +                                  "instanceof", "typeof"]);
    +  var indentKeywords = ["for", "while", "loop", "if", "unless", "else",
    +                        "switch", "try", "catch", "finally", "class"];
    +  var commonKeywords = ["break", "by", "continue", "debugger", "delete",
    +                        "do", "in", "of", "new", "return", "then",
    +                        "this", "throw", "when", "until"];
    +
    +  var keywords = wordRegexp(indentKeywords.concat(commonKeywords));
    +
    +  indentKeywords = wordRegexp(indentKeywords);
    +
    +
    +  var stringPrefixes = /^('{3}|\"{3}|['\"])/;
    +  var regexPrefixes = /^(\/{3}|\/)/;
    +  var commonConstants = ["Infinity", "NaN", "undefined", "null", "true", "false", "on", "off", "yes", "no"];
    +  var constants = wordRegexp(commonConstants);
    +
    +  // Tokenizers
    +  function tokenBase(stream, state) {
    +    // Handle scope changes
    +    if (stream.sol()) {
    +      if (state.scope.align === null) state.scope.align = false;
    +      var scopeOffset = state.scope.offset;
    +      if (stream.eatSpace()) {
    +        var lineOffset = stream.indentation();
    +        if (lineOffset > scopeOffset && state.scope.type == "coffee") {
    +          return "indent";
    +        } else if (lineOffset < scopeOffset) {
    +          return "dedent";
    +        }
    +        return null;
    +      } else {
    +        if (scopeOffset > 0) {
    +          dedent(stream, state);
    +        }
    +      }
    +    }
    +    if (stream.eatSpace()) {
    +      return null;
    +    }
    +
    +    var ch = stream.peek();
    +
    +    // Handle docco title comment (single line)
    +    if (stream.match("####")) {
    +      stream.skipToEnd();
    +      return "comment";
    +    }
    +
    +    // Handle multi line comments
    +    if (stream.match("###")) {
    +      state.tokenize = longComment;
    +      return state.tokenize(stream, state);
    +    }
    +
    +    // Single line comment
    +    if (ch === "#") {
    +      stream.skipToEnd();
    +      return "comment";
    +    }
    +
    +    // Handle number literals
    +    if (stream.match(/^-?[0-9\.]/, false)) {
    +      var floatLiteral = false;
    +      // Floats
    +      if (stream.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)) {
    +        floatLiteral = true;
    +      }
    +      if (stream.match(/^-?\d+\.\d*/)) {
    +        floatLiteral = true;
    +      }
    +      if (stream.match(/^-?\.\d+/)) {
    +        floatLiteral = true;
    +      }
    +
    +      if (floatLiteral) {
    +        // prevent from getting extra . on 1..
    +        if (stream.peek() == "."){
    +          stream.backUp(1);
    +        }
    +        return "number";
    +      }
    +      // Integers
    +      var intLiteral = false;
    +      // Hex
    +      if (stream.match(/^-?0x[0-9a-f]+/i)) {
    +        intLiteral = true;
    +      }
    +      // Decimal
    +      if (stream.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)) {
    +        intLiteral = true;
    +      }
    +      // Zero by itself with no other piece of number.
    +      if (stream.match(/^-?0(?![\dx])/i)) {
    +        intLiteral = true;
    +      }
    +      if (intLiteral) {
    +        return "number";
    +      }
    +    }
    +
    +    // Handle strings
    +    if (stream.match(stringPrefixes)) {
    +      state.tokenize = tokenFactory(stream.current(), "string");
    +      return state.tokenize(stream, state);
    +    }
    +    // Handle regex literals
    +    if (stream.match(regexPrefixes)) {
    +      if (stream.current() != "/" || stream.match(/^.*\//, false)) { // prevent highlight of division
    +        state.tokenize = tokenFactory(stream.current(), "string-2");
    +        return state.tokenize(stream, state);
    +      } else {
    +        stream.backUp(1);
    +      }
    +    }
    +
    +    // Handle operators and delimiters
    +    if (stream.match(operators) || stream.match(wordOperators)) {
    +      return "operator";
    +    }
    +    if (stream.match(delimiters)) {
    +      return "punctuation";
    +    }
    +
    +    if (stream.match(constants)) {
    +      return "atom";
    +    }
    +
    +    if (stream.match(keywords)) {
    +      return "keyword";
    +    }
    +
    +    if (stream.match(identifiers)) {
    +      return "variable";
    +    }
    +
    +    if (stream.match(properties)) {
    +      return "property";
    +    }
    +
    +    // Handle non-detected items
    +    stream.next();
    +    return ERRORCLASS;
    +  }
    +
    +  function tokenFactory(delimiter, outclass) {
    +    var singleline = delimiter.length == 1;
    +    return function(stream, state) {
    +      while (!stream.eol()) {
    +        stream.eatWhile(/[^'"\/\\]/);
    +        if (stream.eat("\\")) {
    +          stream.next();
    +          if (singleline && stream.eol()) {
    +            return outclass;
    +          }
    +        } else if (stream.match(delimiter)) {
    +          state.tokenize = tokenBase;
    +          return outclass;
    +        } else {
    +          stream.eat(/['"\/]/);
    +        }
    +      }
    +      if (singleline) {
    +        if (conf.mode.singleLineStringErrors) {
    +          outclass = ERRORCLASS;
    +        } else {
    +          state.tokenize = tokenBase;
    +        }
    +      }
    +      return outclass;
    +    };
    +  }
    +
    +  function longComment(stream, state) {
    +    while (!stream.eol()) {
    +      stream.eatWhile(/[^#]/);
    +      if (stream.match("###")) {
    +        state.tokenize = tokenBase;
    +        break;
    +      }
    +      stream.eatWhile("#");
    +    }
    +    return "comment";
    +  }
    +
    +  function indent(stream, state, type) {
    +    type = type || "coffee";
    +    var offset = 0, align = false, alignOffset = null;
    +    for (var scope = state.scope; scope; scope = scope.prev) {
    +      if (scope.type === "coffee") {
    +        offset = scope.offset + conf.indentUnit;
    +        break;
    +      }
    +    }
    +    if (type !== "coffee") {
    +      align = null;
    +      alignOffset = stream.column() + stream.current().length;
    +    } else if (state.scope.align) {
    +      state.scope.align = false;
    +    }
    +    state.scope = {
    +      offset: offset,
    +      type: type,
    +      prev: state.scope,
    +      align: align,
    +      alignOffset: alignOffset
    +    };
    +  }
    +
    +  function dedent(stream, state) {
    +    if (!state.scope.prev) return;
    +    if (state.scope.type === "coffee") {
    +      var _indent = stream.indentation();
    +      var matched = false;
    +      for (var scope = state.scope; scope; scope = scope.prev) {
    +        if (_indent === scope.offset) {
    +          matched = true;
    +          break;
    +        }
    +      }
    +      if (!matched) {
    +        return true;
    +      }
    +      while (state.scope.prev && state.scope.offset !== _indent) {
    +        state.scope = state.scope.prev;
    +      }
    +      return false;
    +    } else {
    +      state.scope = state.scope.prev;
    +      return false;
    +    }
    +  }
    +
    +  function tokenLexer(stream, state) {
    +    var style = state.tokenize(stream, state);
    +    var current = stream.current();
    +
    +    // Handle "." connected identifiers
    +    if (current === ".") {
    +      style = state.tokenize(stream, state);
    +      current = stream.current();
    +      if (/^\.[\w$]+$/.test(current)) {
    +        return "variable";
    +      } else {
    +        return ERRORCLASS;
    +      }
    +    }
    +
    +    // Handle scope changes.
    +    if (current === "return") {
    +      state.dedent += 1;
    +    }
    +    if (((current === "->" || current === "=>") &&
    +         !state.lambda &&
    +         !stream.peek())
    +        || style === "indent") {
    +      indent(stream, state);
    +    }
    +    var delimiter_index = "[({".indexOf(current);
    +    if (delimiter_index !== -1) {
    +      indent(stream, state, "])}".slice(delimiter_index, delimiter_index+1));
    +    }
    +    if (indentKeywords.exec(current)){
    +      indent(stream, state);
    +    }
    +    if (current == "then"){
    +      dedent(stream, state);
    +    }
    +
    +
    +    if (style === "dedent") {
    +      if (dedent(stream, state)) {
    +        return ERRORCLASS;
    +      }
    +    }
    +    delimiter_index = "])}".indexOf(current);
    +    if (delimiter_index !== -1) {
    +      while (state.scope.type == "coffee" && state.scope.prev)
    +        state.scope = state.scope.prev;
    +      if (state.scope.type == current)
    +        state.scope = state.scope.prev;
    +    }
    +    if (state.dedent > 0 && stream.eol() && state.scope.type == "coffee") {
    +      if (state.scope.prev) state.scope = state.scope.prev;
    +      state.dedent -= 1;
    +    }
    +
    +    return style;
    +  }
    +
    +  var external = {
    +    startState: function(basecolumn) {
    +      return {
    +        tokenize: tokenBase,
    +        scope: {offset:basecolumn || 0, type:"coffee", prev: null, align: false},
    +        lastToken: null,
    +        lambda: false,
    +        dedent: 0
    +      };
    +    },
    +
    +    token: function(stream, state) {
    +      var fillAlign = state.scope.align === null && state.scope;
    +      if (fillAlign && stream.sol()) fillAlign.align = false;
    +
    +      var style = tokenLexer(stream, state);
    +      if (fillAlign && style && style != "comment") fillAlign.align = true;
    +
    +      state.lastToken = {style:style, content: stream.current()};
    +
    +      if (stream.eol() && stream.lambda) {
    +        state.lambda = false;
    +      }
    +
    +      return style;
    +    },
    +
    +    indent: function(state, text) {
    +      if (state.tokenize != tokenBase) return 0;
    +      var scope = state.scope;
    +      var closer = text && "])}".indexOf(text.charAt(0)) > -1;
    +      if (closer) while (scope.type == "coffee" && scope.prev) scope = scope.prev;
    +      var closes = closer && scope.type === text.charAt(0);
    +      if (scope.align)
    +        return scope.alignOffset - (closes ? 1 : 0);
    +      else
    +        return (closes ? scope.prev : scope).offset;
    +    },
    +
    +    lineComment: "#",
    +    fold: "indent"
    +  };
    +  return external;
    +});
    +
    +CodeMirror.defineMIME("text/x-coffeescript", "coffeescript");
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_mode_livescript_livescript.js.html b/Docs/files/third-party_codemirror-3.20_mode_livescript_livescript.js.html new file mode 100644 index 0000000..cd1068a --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_mode_livescript_livescript.js.html @@ -0,0 +1,610 @@ + + + + + third-party/codemirror-3.20/mode/livescript/livescript.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/mode/livescript/livescript.js

    + +
    +
    +/**
    + * Link to the project's GitHub page:
    + * https://github.com/duralog/CodeMirror
    + */
    +(function() {
    +  CodeMirror.defineMode('livescript', function(){
    +    var tokenBase, external;
    +    tokenBase = function(stream, state){
    +      var next_rule, nr, i$, len$, r, m;
    +      if (next_rule = state.next || 'start') {
    +        state.next = state.next;
    +        if (Array.isArray(nr = Rules[next_rule])) {
    +          for (i$ = 0, len$ = nr.length; i$ < len$; ++i$) {
    +            r = nr[i$];
    +            if (r.regex && (m = stream.match(r.regex))) {
    +              state.next = r.next;
    +              return r.token;
    +            }
    +          }
    +          stream.next();
    +          return 'error';
    +        }
    +        if (stream.match(r = Rules[next_rule])) {
    +          if (r.regex && stream.match(r.regex)) {
    +            state.next = r.next;
    +            return r.token;
    +          } else {
    +            stream.next();
    +            return 'error';
    +          }
    +        }
    +      }
    +      stream.next();
    +      return 'error';
    +    };
    +    external = {
    +      startState: function(){
    +        return {
    +          next: 'start',
    +          lastToken: null
    +        };
    +      },
    +      token: function(stream, state){
    +        var style;
    +        style = tokenBase(stream, state);
    +        state.lastToken = {
    +          style: style,
    +          indent: stream.indentation(),
    +          content: stream.current()
    +        };
    +        return style.replace(/\./g, ' ');
    +      },
    +      indent: function(state){
    +        var indentation;
    +        indentation = state.lastToken.indent;
    +        if (state.lastToken.content.match(indenter)) {
    +          indentation += 2;
    +        }
    +        return indentation;
    +      }
    +    };
    +    return external;
    +  });
    +
    +  var identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*';
    +  var indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$');
    +  var keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))';
    +  var stringfill = {
    +    token: 'string',
    +    regex: '.+'
    +  };
    +  var Rules = {
    +    start: [
    +      {
    +        token: 'comment.doc',
    +        regex: '/\\*',
    +        next: 'comment'
    +      }, {
    +        token: 'comment',
    +        regex: '#.*'
    +      }, {
    +        token: 'keyword',
    +        regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend
    +      }, {
    +        token: 'constant.language',
    +        regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend
    +      }, {
    +        token: 'invalid.illegal',
    +        regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend
    +      }, {
    +        token: 'language.support.class',
    +        regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend
    +      }, {
    +        token: 'language.support.function',
    +        regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend
    +      }, {
    +        token: 'variable.language',
    +        regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend
    +      }, {
    +        token: 'identifier',
    +        regex: identifier + '\\s*:(?![:=])'
    +      }, {
    +        token: 'variable',
    +        regex: identifier
    +      }, {
    +        token: 'keyword.operator',
    +        regex: '(?:\\.{3}|\\s+\\?)'
    +      }, {
    +        token: 'keyword.variable',
    +        regex: '(?:@+|::|\\.\\.)',
    +        next: 'key'
    +      }, {
    +        token: 'keyword.operator',
    +        regex: '\\.\\s*',
    +        next: 'key'
    +      }, {
    +        token: 'string',
    +        regex: '\\\\\\S[^\\s,;)}\\]]*'
    +      }, {
    +        token: 'string.doc',
    +        regex: '\'\'\'',
    +        next: 'qdoc'
    +      }, {
    +        token: 'string.doc',
    +        regex: '"""',
    +        next: 'qqdoc'
    +      }, {
    +        token: 'string',
    +        regex: '\'',
    +        next: 'qstring'
    +      }, {
    +        token: 'string',
    +        regex: '"',
    +        next: 'qqstring'
    +      }, {
    +        token: 'string',
    +        regex: '`',
    +        next: 'js'
    +      }, {
    +        token: 'string',
    +        regex: '<\\[',
    +        next: 'words'
    +      }, {
    +        token: 'string.regex',
    +        regex: '//',
    +        next: 'heregex'
    +      }, {
    +        token: 'string.regex',
    +        regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}',
    +        next: 'key'
    +      }, {
    +        token: 'constant.numeric',
    +        regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)'
    +      }, {
    +        token: 'lparen',
    +        regex: '[({[]'
    +      }, {
    +        token: 'rparen',
    +        regex: '[)}\\]]',
    +        next: 'key'
    +      }, {
    +        token: 'keyword.operator',
    +        regex: '\\S+'
    +      }, {
    +        token: 'text',
    +        regex: '\\s+'
    +      }
    +    ],
    +    heregex: [
    +      {
    +        token: 'string.regex',
    +        regex: '.*?//[gimy$?]{0,4}',
    +        next: 'start'
    +      }, {
    +        token: 'string.regex',
    +        regex: '\\s*#{'
    +      }, {
    +        token: 'comment.regex',
    +        regex: '\\s+(?:#.*)?'
    +      }, {
    +        token: 'string.regex',
    +        regex: '\\S+'
    +      }
    +    ],
    +    key: [
    +      {
    +        token: 'keyword.operator',
    +        regex: '[.?@!]+'
    +      }, {
    +        token: 'identifier',
    +        regex: identifier,
    +        next: 'start'
    +      }, {
    +        token: 'text',
    +        regex: '.',
    +        next: 'start'
    +      }
    +    ],
    +    comment: [
    +      {
    +        token: 'comment.doc',
    +        regex: '.*?\\*/',
    +        next: 'start'
    +      }, {
    +        token: 'comment.doc',
    +        regex: '.+'
    +      }
    +    ],
    +    qdoc: [
    +      {
    +        token: 'string',
    +        regex: ".*?'''",
    +        next: 'key'
    +      }, stringfill
    +    ],
    +    qqdoc: [
    +      {
    +        token: 'string',
    +        regex: '.*?"""',
    +        next: 'key'
    +      }, stringfill
    +    ],
    +    qstring: [
    +      {
    +        token: 'string',
    +        regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'',
    +        next: 'key'
    +      }, stringfill
    +    ],
    +    qqstring: [
    +      {
    +        token: 'string',
    +        regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
    +        next: 'key'
    +      }, stringfill
    +    ],
    +    js: [
    +      {
    +        token: 'string',
    +        regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`',
    +        next: 'key'
    +      }, stringfill
    +    ],
    +    words: [
    +      {
    +        token: 'string',
    +        regex: '.*?\\]>',
    +        next: 'key'
    +      }, stringfill
    +    ]
    +  };
    +  for (var idx in Rules) {
    +    var r = Rules[idx];
    +    if (Array.isArray(r)) {
    +      for (var i = 0, len = r.length; i < len; ++i) {
    +        var rr = r[i];
    +        if (rr.regex) {
    +          Rules[idx][i].regex = new RegExp('^' + rr.regex);
    +        }
    +      }
    +    } else if (r.regex) {
    +      Rules[idx].regex = new RegExp('^' + r.regex);
    +    }
    +  }
    +})();
    +
    +CodeMirror.defineMIME('text/x-livescript', 'livescript');
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_mode_nginx_nginx.js.html b/Docs/files/third-party_codemirror-3.20_mode_nginx_nginx.js.html new file mode 100644 index 0000000..9e72796 --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_mode_nginx_nginx.js.html @@ -0,0 +1,506 @@ + + + + + third-party/codemirror-3.20/mode/nginx/nginx.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/mode/nginx/nginx.js

    + +
    +
    +CodeMirror.defineMode("nginx", function(config) {
    +
    +  function words(str) {
    +    var obj = {}, words = str.split(" ");
    +    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
    +    return obj;
    +  }
    +
    +  var keywords = words(
    +    /* ngxDirectiveControl */ "break return rewrite set" +
    +    /* ngxDirective */ " accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"
    +    );
    +
    +  var keywords_block = words(
    +    /* ngxDirectiveBlock */ "http mail events server types location upstream charset_map limit_except if geo map"
    +    );
    +
    +  var keywords_important = words(
    +    /* ngxDirectiveImportant */ "include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"
    +    );
    +
    +  var indentUnit = config.indentUnit, type;
    +  function ret(style, tp) {type = tp; return style;}
    +
    +  function tokenBase(stream, state) {
    +
    +
    +    stream.eatWhile(/[\w\$_]/);
    +
    +    var cur = stream.current();
    +
    +
    +    if (keywords.propertyIsEnumerable(cur)) {
    +      return "keyword";
    +    }
    +    else if (keywords_block.propertyIsEnumerable(cur)) {
    +      return "variable-2";
    +    }
    +    else if (keywords_important.propertyIsEnumerable(cur)) {
    +      return "string-2";
    +    }
    +    /**/
    +
    +    var ch = stream.next();
    +    if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("meta", stream.current());}
    +    else if (ch == "/" && stream.eat("*")) {
    +      state.tokenize = tokenCComment;
    +      return tokenCComment(stream, state);
    +    }
    +    else if (ch == "<" && stream.eat("!")) {
    +      state.tokenize = tokenSGMLComment;
    +      return tokenSGMLComment(stream, state);
    +    }
    +    else if (ch == "=") ret(null, "compare");
    +    else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare");
    +    else if (ch == "\"" || ch == "'") {
    +      state.tokenize = tokenString(ch);
    +      return state.tokenize(stream, state);
    +    }
    +    else if (ch == "#") {
    +      stream.skipToEnd();
    +      return ret("comment", "comment");
    +    }
    +    else if (ch == "!") {
    +      stream.match(/^\s*\w*/);
    +      return ret("keyword", "important");
    +    }
    +    else if (/\d/.test(ch)) {
    +      stream.eatWhile(/[\w.%]/);
    +      return ret("number", "unit");
    +    }
    +    else if (/[,.+>*\/]/.test(ch)) {
    +      return ret(null, "select-op");
    +    }
    +    else if (/[;{}:\[\]]/.test(ch)) {
    +      return ret(null, ch);
    +    }
    +    else {
    +      stream.eatWhile(/[\w\\\-]/);
    +      return ret("variable", "variable");
    +    }
    +  }
    +
    +  function tokenCComment(stream, state) {
    +    var maybeEnd = false, ch;
    +    while ((ch = stream.next()) != null) {
    +      if (maybeEnd && ch == "/") {
    +        state.tokenize = tokenBase;
    +        break;
    +      }
    +      maybeEnd = (ch == "*");
    +    }
    +    return ret("comment", "comment");
    +  }
    +
    +  function tokenSGMLComment(stream, state) {
    +    var dashes = 0, ch;
    +    while ((ch = stream.next()) != null) {
    +      if (dashes >= 2 && ch == ">") {
    +        state.tokenize = tokenBase;
    +        break;
    +      }
    +      dashes = (ch == "-") ? dashes + 1 : 0;
    +    }
    +    return ret("comment", "comment");
    +  }
    +
    +  function tokenString(quote) {
    +    return function(stream, state) {
    +      var escaped = false, ch;
    +      while ((ch = stream.next()) != null) {
    +        if (ch == quote && !escaped)
    +          break;
    +        escaped = !escaped && ch == "\\";
    +      }
    +      if (!escaped) state.tokenize = tokenBase;
    +      return ret("string", "string");
    +    };
    +  }
    +
    +  return {
    +    startState: function(base) {
    +      return {tokenize: tokenBase,
    +              baseIndent: base || 0,
    +              stack: []};
    +    },
    +
    +    token: function(stream, state) {
    +      if (stream.eatSpace()) return null;
    +      type = null;
    +      var style = state.tokenize(stream, state);
    +
    +      var context = state.stack[state.stack.length-1];
    +      if (type == "hash" && context == "rule") style = "atom";
    +      else if (style == "variable") {
    +        if (context == "rule") style = "number";
    +        else if (!context || context == "@media{") style = "tag";
    +      }
    +
    +      if (context == "rule" && /^[\{\};]$/.test(type))
    +        state.stack.pop();
    +      if (type == "{") {
    +        if (context == "@media") state.stack[state.stack.length-1] = "@media{";
    +        else state.stack.push("{");
    +      }
    +      else if (type == "}") state.stack.pop();
    +      else if (type == "@media") state.stack.push("@media");
    +      else if (context == "{" && type != "comment") state.stack.push("rule");
    +      return style;
    +    },
    +
    +    indent: function(state, textAfter) {
    +      var n = state.stack.length;
    +      if (/^\}/.test(textAfter))
    +        n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1;
    +      return state.baseIndent + n * indentUnit;
    +    },
    +
    +    electricChars: "}"
    +  };
    +});
    +
    +CodeMirror.defineMIME("text/nginx", "text/x-nginx-conf");
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_mode_ntriples_ntriples.js.html b/Docs/files/third-party_codemirror-3.20_mode_ntriples_ntriples.js.html new file mode 100644 index 0000000..cd05a73 --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_mode_ntriples_ntriples.js.html @@ -0,0 +1,513 @@ + + + + + third-party/codemirror-3.20/mode/ntriples/ntriples.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/mode/ntriples/ntriples.js

    + +
    +
    +/**********************************************************
    +* This script provides syntax highlighting support for
    +* the Ntriples format.
    +* Ntriples format specification:
    +*     http://www.w3.org/TR/rdf-testcases/#ntriples
    +***********************************************************/
    +
    +/*
    +    The following expression defines the defined ASF grammar transitions.
    +
    +    pre_subject ->
    +        {
    +        ( writing_subject_uri | writing_bnode_uri )
    +            -> pre_predicate
    +                -> writing_predicate_uri
    +                    -> pre_object
    +                        -> writing_object_uri | writing_object_bnode |
    +                          (
    +                            writing_object_literal
    +                                -> writing_literal_lang | writing_literal_type
    +                          )
    +                            -> post_object
    +                                -> BEGIN
    +         } otherwise {
    +             -> ERROR
    +         }
    +*/
    +CodeMirror.defineMode("ntriples", function() {
    +
    +  var Location = {
    +    PRE_SUBJECT         : 0,
    +    WRITING_SUB_URI     : 1,
    +    WRITING_BNODE_URI   : 2,
    +    PRE_PRED            : 3,
    +    WRITING_PRED_URI    : 4,
    +    PRE_OBJ             : 5,
    +    WRITING_OBJ_URI     : 6,
    +    WRITING_OBJ_BNODE   : 7,
    +    WRITING_OBJ_LITERAL : 8,
    +    WRITING_LIT_LANG    : 9,
    +    WRITING_LIT_TYPE    : 10,
    +    POST_OBJ            : 11,
    +    ERROR               : 12
    +  };
    +  function transitState(currState, c) {
    +    var currLocation = currState.location;
    +    var ret;
    +
    +    // Opening.
    +    if     (currLocation == Location.PRE_SUBJECT && c == '<') ret = Location.WRITING_SUB_URI;
    +    else if(currLocation == Location.PRE_SUBJECT && c == '_') ret = Location.WRITING_BNODE_URI;
    +    else if(currLocation == Location.PRE_PRED    && c == '<') ret = Location.WRITING_PRED_URI;
    +    else if(currLocation == Location.PRE_OBJ     && c == '<') ret = Location.WRITING_OBJ_URI;
    +    else if(currLocation == Location.PRE_OBJ     && c == '_') ret = Location.WRITING_OBJ_BNODE;
    +    else if(currLocation == Location.PRE_OBJ     && c == '"') ret = Location.WRITING_OBJ_LITERAL;
    +
    +    // Closing.
    +    else if(currLocation == Location.WRITING_SUB_URI     && c == '>') ret = Location.PRE_PRED;
    +    else if(currLocation == Location.WRITING_BNODE_URI   && c == ' ') ret = Location.PRE_PRED;
    +    else if(currLocation == Location.WRITING_PRED_URI    && c == '>') ret = Location.PRE_OBJ;
    +    else if(currLocation == Location.WRITING_OBJ_URI     && c == '>') ret = Location.POST_OBJ;
    +    else if(currLocation == Location.WRITING_OBJ_BNODE   && c == ' ') ret = Location.POST_OBJ;
    +    else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '"') ret = Location.POST_OBJ;
    +    else if(currLocation == Location.WRITING_LIT_LANG && c == ' ') ret = Location.POST_OBJ;
    +    else if(currLocation == Location.WRITING_LIT_TYPE && c == '>') ret = Location.POST_OBJ;
    +
    +    // Closing typed and language literal.
    +    else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '@') ret = Location.WRITING_LIT_LANG;
    +    else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '^') ret = Location.WRITING_LIT_TYPE;
    +
    +    // Spaces.
    +    else if( c == ' ' &&
    +             (
    +               currLocation == Location.PRE_SUBJECT ||
    +               currLocation == Location.PRE_PRED    ||
    +               currLocation == Location.PRE_OBJ     ||
    +               currLocation == Location.POST_OBJ
    +             )
    +           ) ret = currLocation;
    +
    +    // Reset.
    +    else if(currLocation == Location.POST_OBJ && c == '.') ret = Location.PRE_SUBJECT;
    +
    +    // Error
    +    else ret = Location.ERROR;
    +
    +    currState.location=ret;
    +  }
    +
    +  return {
    +    startState: function() {
    +       return {
    +           location : Location.PRE_SUBJECT,
    +           uris     : [],
    +           anchors  : [],
    +           bnodes   : [],
    +           langs    : [],
    +           types    : []
    +       };
    +    },
    +    token: function(stream, state) {
    +      var ch = stream.next();
    +      if(ch == '<') {
    +         transitState(state, ch);
    +         var parsedURI = '';
    +         stream.eatWhile( function(c) { if( c != '#' && c != '>' ) { parsedURI += c; return true; } return false;} );
    +         state.uris.push(parsedURI);
    +         if( stream.match('#', false) ) return 'variable';
    +         stream.next();
    +         transitState(state, '>');
    +         return 'variable';
    +      }
    +      if(ch == '#') {
    +        var parsedAnchor = '';
    +        stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false;});
    +        state.anchors.push(parsedAnchor);
    +        return 'variable-2';
    +      }
    +      if(ch == '>') {
    +          transitState(state, '>');
    +          return 'variable';
    +      }
    +      if(ch == '_') {
    +          transitState(state, ch);
    +          var parsedBNode = '';
    +          stream.eatWhile(function(c) { if( c != ' ' ) { parsedBNode += c; return true; } return false;});
    +          state.bnodes.push(parsedBNode);
    +          stream.next();
    +          transitState(state, ' ');
    +          return 'builtin';
    +      }
    +      if(ch == '"') {
    +          transitState(state, ch);
    +          stream.eatWhile( function(c) { return c != '"'; } );
    +          stream.next();
    +          if( stream.peek() != '@' && stream.peek() != '^' ) {
    +              transitState(state, '"');
    +          }
    +          return 'string';
    +      }
    +      if( ch == '@' ) {
    +          transitState(state, '@');
    +          var parsedLang = '';
    +          stream.eatWhile(function(c) { if( c != ' ' ) { parsedLang += c; return true; } return false;});
    +          state.langs.push(parsedLang);
    +          stream.next();
    +          transitState(state, ' ');
    +          return 'string-2';
    +      }
    +      if( ch == '^' ) {
    +          stream.next();
    +          transitState(state, '^');
    +          var parsedType = '';
    +          stream.eatWhile(function(c) { if( c != '>' ) { parsedType += c; return true; } return false;} );
    +          state.types.push(parsedType);
    +          stream.next();
    +          transitState(state, '>');
    +          return 'variable';
    +      }
    +      if( ch == ' ' ) {
    +          transitState(state, ch);
    +      }
    +      if( ch == '.' ) {
    +          transitState(state, ch);
    +      }
    +    }
    +  };
    +});
    +
    +CodeMirror.defineMIME("text/n-triples", "ntriples");
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_mode_scheme_scheme.js.html b/Docs/files/third-party_codemirror-3.20_mode_scheme_scheme.js.html new file mode 100644 index 0000000..61a3e59 --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_mode_scheme_scheme.js.html @@ -0,0 +1,575 @@ + + + + + third-party/codemirror-3.20/mode/scheme/scheme.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/mode/scheme/scheme.js

    + +
    +
    +/**
    + * Author: Koh Zi Han, based on implementation by Koh Zi Chun
    + */
    +CodeMirror.defineMode("scheme", function () {
    +    var BUILTIN = "builtin", COMMENT = "comment", STRING = "string",
    +        ATOM = "atom", NUMBER = "number", BRACKET = "bracket";
    +    var INDENT_WORD_SKIP = 2;
    +
    +    function makeKeywords(str) {
    +        var obj = {}, words = str.split(" ");
    +        for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
    +        return obj;
    +    }
    +
    +    var keywords = makeKeywords("λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?");
    +    var indentKeys = makeKeywords("define let letrec let* lambda");
    +
    +    function stateStack(indent, type, prev) { // represents a state stack object
    +        this.indent = indent;
    +        this.type = type;
    +        this.prev = prev;
    +    }
    +
    +    function pushStack(state, indent, type) {
    +        state.indentStack = new stateStack(indent, type, state.indentStack);
    +    }
    +
    +    function popStack(state) {
    +        state.indentStack = state.indentStack.prev;
    +    }
    +
    +    var binaryMatcher = new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i);
    +    var octalMatcher = new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i);
    +    var hexMatcher = new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i);
    +    var decimalMatcher = new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);
    +
    +    function isBinaryNumber (stream) {
    +        return stream.match(binaryMatcher);
    +    }
    +
    +    function isOctalNumber (stream) {
    +        return stream.match(octalMatcher);
    +    }
    +
    +    function isDecimalNumber (stream, backup) {
    +        if (backup === true) {
    +            stream.backUp(1);
    +        }
    +        return stream.match(decimalMatcher);
    +    }
    +
    +    function isHexNumber (stream) {
    +        return stream.match(hexMatcher);
    +    }
    +
    +    return {
    +        startState: function () {
    +            return {
    +                indentStack: null,
    +                indentation: 0,
    +                mode: false,
    +                sExprComment: false
    +            };
    +        },
    +
    +        token: function (stream, state) {
    +            if (state.indentStack == null && stream.sol()) {
    +                // update indentation, but only if indentStack is empty
    +                state.indentation = stream.indentation();
    +            }
    +
    +            // skip spaces
    +            if (stream.eatSpace()) {
    +                return null;
    +            }
    +            var returnType = null;
    +
    +            switch(state.mode){
    +                case "string": // multi-line string parsing mode
    +                    var next, escaped = false;
    +                    while ((next = stream.next()) != null) {
    +                        if (next == "\"" && !escaped) {
    +
    +                            state.mode = false;
    +                            break;
    +                        }
    +                        escaped = !escaped && next == "\\";
    +                    }
    +                    returnType = STRING; // continue on in scheme-string mode
    +                    break;
    +                case "comment": // comment parsing mode
    +                    var next, maybeEnd = false;
    +                    while ((next = stream.next()) != null) {
    +                        if (next == "#" && maybeEnd) {
    +
    +                            state.mode = false;
    +                            break;
    +                        }
    +                        maybeEnd = (next == "|");
    +                    }
    +                    returnType = COMMENT;
    +                    break;
    +                case "s-expr-comment": // s-expr commenting mode
    +                    state.mode = false;
    +                    if(stream.peek() == "(" || stream.peek() == "["){
    +                        // actually start scheme s-expr commenting mode
    +                        state.sExprComment = 0;
    +                    }else{
    +                        // if not we just comment the entire of the next token
    +                        stream.eatWhile(/[^/s]/); // eat non spaces
    +                        returnType = COMMENT;
    +                        break;
    +                    }
    +                default: // default parsing mode
    +                    var ch = stream.next();
    +
    +                    if (ch == "\"") {
    +                        state.mode = "string";
    +                        returnType = STRING;
    +
    +                    } else if (ch == "'") {
    +                        returnType = ATOM;
    +                    } else if (ch == '#') {
    +                        if (stream.eat("|")) {                    // Multi-line comment
    +                            state.mode = "comment"; // toggle to comment mode
    +                            returnType = COMMENT;
    +                        } else if (stream.eat(/[tf]/i)) {            // #t/#f (atom)
    +                            returnType = ATOM;
    +                        } else if (stream.eat(';')) {                // S-Expr comment
    +                            state.mode = "s-expr-comment";
    +                            returnType = COMMENT;
    +                        } else {
    +                            var numTest = null, hasExactness = false, hasRadix = true;
    +                            if (stream.eat(/[ei]/i)) {
    +                                hasExactness = true;
    +                            } else {
    +                                stream.backUp(1);       // must be radix specifier
    +                            }
    +                            if (stream.match(/^#b/i)) {
    +                                numTest = isBinaryNumber;
    +                            } else if (stream.match(/^#o/i)) {
    +                                numTest = isOctalNumber;
    +                            } else if (stream.match(/^#x/i)) {
    +                                numTest = isHexNumber;
    +                            } else if (stream.match(/^#d/i)) {
    +                                numTest = isDecimalNumber;
    +                            } else if (stream.match(/^[-+0-9.]/, false)) {
    +                                hasRadix = false;
    +                                numTest = isDecimalNumber;
    +                            // re-consume the intial # if all matches failed
    +                            } else if (!hasExactness) {
    +                                stream.eat('#');
    +                            }
    +                            if (numTest != null) {
    +                                if (hasRadix && !hasExactness) {
    +                                    // consume optional exactness after radix
    +                                    stream.match(/^#[ei]/i);
    +                                }
    +                                if (numTest(stream))
    +                                    returnType = NUMBER;
    +                            }
    +                        }
    +                    } else if (/^[-+0-9.]/.test(ch) && isDecimalNumber(stream, true)) { // match non-prefixed number, must be decimal
    +                        returnType = NUMBER;
    +                    } else if (ch == ";") { // comment
    +                        stream.skipToEnd(); // rest of the line is a comment
    +                        returnType = COMMENT;
    +                    } else if (ch == "(" || ch == "[") {
    +                      var keyWord = ''; var indentTemp = stream.column(), letter;
    +                        /**
    +                        Either
    +                        (indent-word ..
    +                        (non-indent-word ..
    +                        (;something else, bracket, etc.
    +                        */
    +
    +                        while ((letter = stream.eat(/[^\s\(\[\;\)\]]/)) != null) {
    +                            keyWord += letter;
    +                        }
    +
    +                        if (keyWord.length > 0 && indentKeys.propertyIsEnumerable(keyWord)) { // indent-word
    +
    +                            pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);
    +                        } else { // non-indent word
    +                            // we continue eating the spaces
    +                            stream.eatSpace();
    +                            if (stream.eol() || stream.peek() == ";") {
    +                                // nothing significant after
    +                                // we restart indentation 1 space after
    +                                pushStack(state, indentTemp + 1, ch);
    +                            } else {
    +                                pushStack(state, indentTemp + stream.current().length, ch); // else we match
    +                            }
    +                        }
    +                        stream.backUp(stream.current().length - 1); // undo all the eating
    +
    +                        if(typeof state.sExprComment == "number") state.sExprComment++;
    +
    +                        returnType = BRACKET;
    +                    } else if (ch == ")" || ch == "]") {
    +                        returnType = BRACKET;
    +                        if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : "[")) {
    +                            popStack(state);
    +
    +                            if(typeof state.sExprComment == "number"){
    +                                if(--state.sExprComment == 0){
    +                                    returnType = COMMENT; // final closing bracket
    +                                    state.sExprComment = false; // turn off s-expr commenting mode
    +                                }
    +                            }
    +                        }
    +                    } else {
    +                        stream.eatWhile(/[\w\$_\-!$%&*+\.\/:<=>?@\^~]/);
    +
    +                        if (keywords && keywords.propertyIsEnumerable(stream.current())) {
    +                            returnType = BUILTIN;
    +                        } else returnType = "variable";
    +                    }
    +            }
    +            return (typeof state.sExprComment == "number") ? COMMENT : returnType;
    +        },
    +
    +        indent: function (state) {
    +            if (state.indentStack == null) return state.indentation;
    +            return state.indentStack.indent;
    +        },
    +
    +        lineComment: ";;"
    +    };
    +});
    +
    +CodeMirror.defineMIME("text/x-scheme", "scheme");
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_mode_smarty_smarty.js.html b/Docs/files/third-party_codemirror-3.20_mode_smarty_smarty.js.html new file mode 100644 index 0000000..99452b2 --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_mode_smarty_smarty.js.html @@ -0,0 +1,548 @@ + + + + + third-party/codemirror-3.20/mode/smarty/smarty.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/mode/smarty/smarty.js

    + +
    +
    +/**
    + * Smarty 2 and 3 mode.
    + */
    +CodeMirror.defineMode("smarty", function(config) {
    +  "use strict";
    +
    +  // our default settings; check to see if they're overridden
    +  var settings = {
    +    rightDelimiter: '}',
    +    leftDelimiter: '{',
    +    smartyVersion: 2 // for backward compatibility
    +  };
    +  if (config.hasOwnProperty("leftDelimiter")) {
    +    settings.leftDelimiter = config.leftDelimiter;
    +  }
    +  if (config.hasOwnProperty("rightDelimiter")) {
    +    settings.rightDelimiter = config.rightDelimiter;
    +  }
    +  if (config.hasOwnProperty("smartyVersion") && config.smartyVersion === 3) {
    +    settings.smartyVersion = 3;
    +  }
    +
    +  var keyFunctions = ["debug", "extends", "function", "include", "literal"];
    +  var last;
    +  var regs = {
    +    operatorChars: /[+\-*&%=<>!?]/,
    +    validIdentifier: /[a-zA-Z0-9_]/,
    +    stringChar: /['"]/
    +  };
    +
    +  var helpers = {
    +    cont: function(style, lastType) {
    +      last = lastType;
    +      return style;
    +    },
    +    chain: function(stream, state, parser) {
    +      state.tokenize = parser;
    +      return parser(stream, state);
    +    }
    +  };
    +
    +
    +  // our various parsers
    +  var parsers = {
    +
    +    // the main tokenizer
    +    tokenizer: function(stream, state) {
    +      if (stream.match(settings.leftDelimiter, true)) {
    +        if (stream.eat("*")) {
    +          return helpers.chain(stream, state, parsers.inBlock("comment", "*" + settings.rightDelimiter));
    +        } else {
    +          // Smarty 3 allows { and } surrounded by whitespace to NOT slip into Smarty mode
    +          state.depth++;
    +          var isEol = stream.eol();
    +          var isFollowedByWhitespace = /\s/.test(stream.peek());
    +          if (settings.smartyVersion === 3 && settings.leftDelimiter === "{" && (isEol || isFollowedByWhitespace)) {
    +            state.depth--;
    +            return null;
    +          } else {
    +            state.tokenize = parsers.smarty;
    +            last = "startTag";
    +            return "tag";
    +          }
    +        }
    +      } else {
    +        stream.next();
    +        return null;
    +      }
    +    },
    +
    +    // parsing Smarty content
    +    smarty: function(stream, state) {
    +      if (stream.match(settings.rightDelimiter, true)) {
    +        if (settings.smartyVersion === 3) {
    +          state.depth--;
    +          if (state.depth <= 0) {
    +            state.tokenize = parsers.tokenizer;
    +          }
    +        } else {
    +          state.tokenize = parsers.tokenizer;
    +        }
    +        return helpers.cont("tag", null);
    +      }
    +
    +      if (stream.match(settings.leftDelimiter, true)) {
    +        state.depth++;
    +        return helpers.cont("tag", "startTag");
    +      }
    +
    +      var ch = stream.next();
    +      if (ch == "$") {
    +        stream.eatWhile(regs.validIdentifier);
    +        return helpers.cont("variable-2", "variable");
    +      } else if (ch == "|") {
    +        return helpers.cont("operator", "pipe");
    +      } else if (ch == ".") {
    +        return helpers.cont("operator", "property");
    +      } else if (regs.stringChar.test(ch)) {
    +        state.tokenize = parsers.inAttribute(ch);
    +        return helpers.cont("string", "string");
    +      } else if (regs.operatorChars.test(ch)) {
    +        stream.eatWhile(regs.operatorChars);
    +        return helpers.cont("operator", "operator");
    +      } else if (ch == "[" || ch == "]") {
    +        return helpers.cont("bracket", "bracket");
    +      } else if (ch == "(" || ch == ")") {
    +        return helpers.cont("bracket", "operator");
    +      } else if (/\d/.test(ch)) {
    +        stream.eatWhile(/\d/);
    +        return helpers.cont("number", "number");
    +      } else {
    +
    +        if (state.last == "variable") {
    +          if (ch == "@") {
    +            stream.eatWhile(regs.validIdentifier);
    +            return helpers.cont("property", "property");
    +          } else if (ch == "|") {
    +            stream.eatWhile(regs.validIdentifier);
    +            return helpers.cont("qualifier", "modifier");
    +          }
    +        } else if (state.last == "pipe") {
    +          stream.eatWhile(regs.validIdentifier);
    +          return helpers.cont("qualifier", "modifier");
    +        } else if (state.last == "whitespace") {
    +          stream.eatWhile(regs.validIdentifier);
    +          return helpers.cont("attribute", "modifier");
    +        } if (state.last == "property") {
    +          stream.eatWhile(regs.validIdentifier);
    +          return helpers.cont("property", null);
    +        } else if (/\s/.test(ch)) {
    +          last = "whitespace";
    +          return null;
    +        }
    +
    +        var str = "";
    +        if (ch != "/") {
    +          str += ch;
    +        }
    +        var c = null;
    +        while (c = stream.eat(regs.validIdentifier)) {
    +          str += c;
    +        }
    +        for (var i=0, j=keyFunctions.length; i<j; i++) {
    +          if (keyFunctions[i] == str) {
    +            return helpers.cont("keyword", "keyword");
    +          }
    +        }
    +        if (/\s/.test(ch)) {
    +          return null;
    +        }
    +        return helpers.cont("tag", "tag");
    +      }
    +    },
    +
    +    inAttribute: function(quote) {
    +      return function(stream, state) {
    +        var prevChar = null;
    +        var currChar = null;
    +        while (!stream.eol()) {
    +          currChar = stream.peek();
    +          if (stream.next() == quote && prevChar !== '\\') {
    +            state.tokenize = parsers.smarty;
    +            break;
    +          }
    +          prevChar = currChar;
    +        }
    +        return "string";
    +      };
    +    },
    +
    +    inBlock: function(style, terminator) {
    +      return function(stream, state) {
    +        while (!stream.eol()) {
    +          if (stream.match(terminator)) {
    +            state.tokenize = parsers.tokenizer;
    +            break;
    +          }
    +          stream.next();
    +        }
    +        return style;
    +      };
    +    }
    +  };
    +
    +
    +  // the public API for CodeMirror
    +  return {
    +    startState: function() {
    +      return {
    +        tokenize: parsers.tokenizer,
    +        mode: "smarty",
    +        last: null,
    +        depth: 0
    +      };
    +    },
    +    token: function(stream, state) {
    +      var style = state.tokenize(stream, state);
    +      state.last = last;
    +      return style;
    +    },
    +    electricChars: ""
    +  };
    +});
    +
    +CodeMirror.defineMIME("text/x-smarty", "smarty");
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_mode_smartymixed_smartymixed.js.html b/Docs/files/third-party_codemirror-3.20_mode_smartymixed_smartymixed.js.html new file mode 100644 index 0000000..9dc8ab4 --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_mode_smartymixed_smartymixed.js.html @@ -0,0 +1,518 @@ + + + + + third-party/codemirror-3.20/mode/smartymixed/smartymixed.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/mode/smartymixed/smartymixed.js

    + +
    +
    +/**
    +* @file smartymixed.js
    +* @brief Smarty Mixed Codemirror mode (Smarty + Mixed HTML)
    +* @author Ruslan Osmanov <rrosmanov at gmail dot com>
    +* @version 3.0
    +* @date 05.07.2013
    +*/
    +CodeMirror.defineMode("smartymixed", function(config) {
    +  var settings, regs, helpers, parsers,
    +  htmlMixedMode = CodeMirror.getMode(config, "htmlmixed"),
    +  smartyMode = CodeMirror.getMode(config, "smarty"),
    +
    +  settings = {
    +    rightDelimiter: '}',
    +    leftDelimiter: '{'
    +  };
    +
    +  if (config.hasOwnProperty("leftDelimiter")) {
    +    settings.leftDelimiter = config.leftDelimiter;
    +  }
    +  if (config.hasOwnProperty("rightDelimiter")) {
    +    settings.rightDelimiter = config.rightDelimiter;
    +  }
    +
    +  regs = {
    +    smartyComment: new RegExp("^" + settings.leftDelimiter + "\\*"),
    +    literalOpen: new RegExp(settings.leftDelimiter + "literal" + settings.rightDelimiter),
    +    literalClose: new RegExp(settings.leftDelimiter + "\/literal" + settings.rightDelimiter),
    +    hasLeftDelimeter: new RegExp(".*" + settings.leftDelimiter),
    +    htmlHasLeftDelimeter: new RegExp("[^<>]*" + settings.leftDelimiter)
    +  };
    +
    +  helpers = {
    +    chain: function(stream, state, parser) {
    +      state.tokenize = parser;
    +      return parser(stream, state);
    +    },
    +
    +    cleanChain: function(stream, state, parser) {
    +      state.tokenize = null;
    +      state.localState = null;
    +      state.localMode = null;
    +      return (typeof parser == "string") ? (parser ? parser : null) : parser(stream, state);
    +    },
    +
    +    maybeBackup: function(stream, pat, style) {
    +      var cur = stream.current();
    +      var close = cur.search(pat),
    +      m;
    +      if (close > - 1) stream.backUp(cur.length - close);
    +      else if (m = cur.match(/<\/?$/)) {
    +        stream.backUp(cur.length);
    +        if (!stream.match(pat, false)) stream.match(cur[0]);
    +      }
    +      return style;
    +    }
    +  };
    +
    +  parsers = {
    +    html: function(stream, state) {
    +      if (!state.inLiteral && stream.match(regs.htmlHasLeftDelimeter, false) && state.htmlMixedState.htmlState.tagName === null) {
    +        state.tokenize = parsers.smarty;
    +        state.localMode = smartyMode;
    +        state.localState = smartyMode.startState(htmlMixedMode.indent(state.htmlMixedState, ""));
    +        return helpers.maybeBackup(stream, settings.leftDelimiter, smartyMode.token(stream, state.localState));
    +      } else if (!state.inLiteral && stream.match(settings.leftDelimiter, false)) {
    +        state.tokenize = parsers.smarty;
    +        state.localMode = smartyMode;
    +        state.localState = smartyMode.startState(htmlMixedMode.indent(state.htmlMixedState, ""));
    +        return helpers.maybeBackup(stream, settings.leftDelimiter, smartyMode.token(stream, state.localState));
    +      }
    +      return htmlMixedMode.token(stream, state.htmlMixedState);
    +    },
    +
    +    smarty: function(stream, state) {
    +      if (stream.match(settings.leftDelimiter, false)) {
    +        if (stream.match(regs.smartyComment, false)) {
    +          return helpers.chain(stream, state, parsers.inBlock("comment", "*" + settings.rightDelimiter));
    +        }
    +      } else if (stream.match(settings.rightDelimiter, false)) {
    +        stream.eat(settings.rightDelimiter);
    +        state.tokenize = parsers.html;
    +        state.localMode = htmlMixedMode;
    +        state.localState = state.htmlMixedState;
    +        return "tag";
    +      }
    +
    +      return helpers.maybeBackup(stream, settings.rightDelimiter, smartyMode.token(stream, state.localState));
    +    },
    +
    +    inBlock: function(style, terminator) {
    +      return function(stream, state) {
    +        while (!stream.eol()) {
    +          if (stream.match(terminator)) {
    +            helpers.cleanChain(stream, state, "");
    +            break;
    +          }
    +          stream.next();
    +        }
    +        return style;
    +      };
    +    }
    +  };
    +
    +  return {
    +    startState: function() {
    +      var state = htmlMixedMode.startState();
    +      return {
    +        token: parsers.html,
    +        localMode: null,
    +        localState: null,
    +        htmlMixedState: state,
    +        tokenize: null,
    +        inLiteral: false
    +      };
    +    },
    +
    +    copyState: function(state) {
    +      var local = null, tok = (state.tokenize || state.token);
    +      if (state.localState) {
    +        local = CodeMirror.copyState((tok != parsers.html ? smartyMode : htmlMixedMode), state.localState);
    +      }
    +      return {
    +        token: state.token,
    +        tokenize: state.tokenize,
    +        localMode: state.localMode,
    +        localState: local,
    +        htmlMixedState: CodeMirror.copyState(htmlMixedMode, state.htmlMixedState),
    +        inLiteral: state.inLiteral
    +      };
    +    },
    +
    +    token: function(stream, state) {
    +      if (stream.match(settings.leftDelimiter, false)) {
    +        if (!state.inLiteral && stream.match(regs.literalOpen, true)) {
    +          state.inLiteral = true;
    +          return "keyword";
    +        } else if (state.inLiteral && stream.match(regs.literalClose, true)) {
    +          state.inLiteral = false;
    +          return "keyword";
    +        }
    +      }
    +      if (state.inLiteral && state.localState != state.htmlMixedState) {
    +        state.tokenize = parsers.html;
    +        state.localMode = htmlMixedMode;
    +        state.localState = state.htmlMixedState;
    +      }
    +
    +      var style = (state.tokenize || state.token)(stream, state);
    +      return style;
    +    },
    +
    +    indent: function(state, textAfter) {
    +      if (state.localMode == smartyMode
    +          || (state.inLiteral && !state.localMode)
    +         || regs.hasLeftDelimeter.test(textAfter)) {
    +        return CodeMirror.Pass;
    +      }
    +      return htmlMixedMode.indent(state.htmlMixedState, textAfter);
    +    },
    +
    +    electricChars: "/{}:",
    +
    +    innerMode: function(state) {
    +      return {
    +        state: state.localState || state.htmlMixedState,
    +        mode: state.localMode || htmlMixedMode
    +      };
    +    }
    +  };
    +},
    +"htmlmixed");
    +
    +CodeMirror.defineMIME("text/x-smarty", "smartymixed");
    +// vim: et ts=2 sts=2 sw=2
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_mode_tiddlywiki_tiddlywiki.js.html b/Docs/files/third-party_codemirror-3.20_mode_tiddlywiki_tiddlywiki.js.html new file mode 100644 index 0000000..e0645e2 --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_mode_tiddlywiki_tiddlywiki.js.html @@ -0,0 +1,696 @@ + + + + + third-party/codemirror-3.20/mode/tiddlywiki/tiddlywiki.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/mode/tiddlywiki/tiddlywiki.js

    + +
    +
    +/***
    +    |''Name''|tiddlywiki.js|
    +    |''Description''|Enables TiddlyWikiy syntax highlighting using CodeMirror|
    +    |''Author''|PMario|
    +    |''Version''|0.1.7|
    +    |''Status''|''stable''|
    +    |''Source''|[[GitHub|https://github.com/pmario/CodeMirror2/blob/tw-syntax/mode/tiddlywiki]]|
    +    |''Documentation''|http://codemirror.tiddlyspace.com/|
    +    |''License''|[[MIT License|http://www.opensource.org/licenses/mit-license.php]]|
    +    |''CoreVersion''|2.5.0|
    +    |''Requires''|codemirror.js|
    +    |''Keywords''|syntax highlighting color code mirror codemirror|
    +    ! Info
    +    CoreVersion parameter is needed for TiddlyWiki only!
    +***/
    +//{{{
    +CodeMirror.defineMode("tiddlywiki", function () {
    +  // Tokenizer
    +  var textwords = {};
    +
    +  var keywords = function () {
    +    function kw(type) {
    +      return { type: type, style: "macro"};
    +    }
    +    return {
    +      "allTags": kw('allTags'), "closeAll": kw('closeAll'), "list": kw('list'),
    +      "newJournal": kw('newJournal'), "newTiddler": kw('newTiddler'),
    +      "permaview": kw('permaview'), "saveChanges": kw('saveChanges'),
    +      "search": kw('search'), "slider": kw('slider'),   "tabs": kw('tabs'),
    +      "tag": kw('tag'), "tagging": kw('tagging'),       "tags": kw('tags'),
    +      "tiddler": kw('tiddler'), "timeline": kw('timeline'),
    +      "today": kw('today'), "version": kw('version'),   "option": kw('option'),
    +
    +      "with": kw('with'),
    +      "filter": kw('filter')
    +    };
    +  }();
    +
    +  var isSpaceName = /[\w_\-]/i,
    +  reHR = /^\-\-\-\-+$/,                                 // <hr>
    +  reWikiCommentStart = /^\/\*\*\*$/,            // /***
    +  reWikiCommentStop = /^\*\*\*\/$/,             // ***/
    +  reBlockQuote = /^<<<$/,
    +
    +  reJsCodeStart = /^\/\/\{\{\{$/,                       // //{{{ js block start
    +  reJsCodeStop = /^\/\/\}\}\}$/,                        // //}}} js stop
    +  reXmlCodeStart = /^<!--\{\{\{-->$/,           // xml block start
    +  reXmlCodeStop = /^<!--\}\}\}-->$/,            // xml stop
    +
    +  reCodeBlockStart = /^\{\{\{$/,                        // {{{ TW text div block start
    +  reCodeBlockStop = /^\}\}\}$/,                 // }}} TW text stop
    +
    +  reUntilCodeStop = /.*?\}\}\}/;
    +
    +  function chain(stream, state, f) {
    +    state.tokenize = f;
    +    return f(stream, state);
    +  }
    +
    +  // Used as scratch variables to communicate multiple values without
    +  // consing up tons of objects.
    +  var type, content;
    +
    +  function ret(tp, style, cont) {
    +    type = tp;
    +    content = cont;
    +    return style;
    +  }
    +
    +  function jsTokenBase(stream, state) {
    +    var sol = stream.sol(), ch;
    +
    +    state.block = false;        // indicates the start of a code block.
    +
    +    ch = stream.peek();         // don't eat, to make matching simpler
    +
    +    // check start of  blocks
    +    if (sol && /[<\/\*{}\-]/.test(ch)) {
    +      if (stream.match(reCodeBlockStart)) {
    +        state.block = true;
    +        return chain(stream, state, twTokenCode);
    +      }
    +      if (stream.match(reBlockQuote)) {
    +        return ret('quote', 'quote');
    +      }
    +      if (stream.match(reWikiCommentStart) || stream.match(reWikiCommentStop)) {
    +        return ret('code', 'comment');
    +      }
    +      if (stream.match(reJsCodeStart) || stream.match(reJsCodeStop) || stream.match(reXmlCodeStart) || stream.match(reXmlCodeStop)) {
    +        return ret('code', 'comment');
    +      }
    +      if (stream.match(reHR)) {
    +        return ret('hr', 'hr');
    +      }
    +    } // sol
    +    ch = stream.next();
    +
    +    if (sol && /[\/\*!#;:>|]/.test(ch)) {
    +      if (ch == "!") { // tw header
    +        stream.skipToEnd();
    +        return ret("header", "header");
    +      }
    +      if (ch == "*") { // tw list
    +        stream.eatWhile('*');
    +        return ret("list", "comment");
    +      }
    +      if (ch == "#") { // tw numbered list
    +        stream.eatWhile('#');
    +        return ret("list", "comment");
    +      }
    +      if (ch == ";") { // definition list, term
    +        stream.eatWhile(';');
    +        return ret("list", "comment");
    +      }
    +      if (ch == ":") { // definition list, description
    +        stream.eatWhile(':');
    +        return ret("list", "comment");
    +      }
    +      if (ch == ">") { // single line quote
    +        stream.eatWhile(">");
    +        return ret("quote", "quote");
    +      }
    +      if (ch == '|') {
    +        return ret('table', 'header');
    +      }
    +    }
    +
    +    if (ch == '{' && stream.match(/\{\{/)) {
    +      return chain(stream, state, twTokenCode);
    +    }
    +
    +    // rudimentary html:// file:// link matching. TW knows much more ...
    +    if (/[hf]/i.test(ch)) {
    +      if (/[ti]/i.test(stream.peek()) && stream.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i)) {
    +        return ret("link", "link");
    +      }
    +    }
    +    // just a little string indicator, don't want to have the whole string covered
    +    if (ch == '"') {
    +      return ret('string', 'string');
    +    }
    +    if (ch == '~') {    // _no_ CamelCase indicator should be bold
    +      return ret('text', 'brace');
    +    }
    +    if (/[\[\]]/.test(ch)) { // check for [[..]]
    +      if (stream.peek() == ch) {
    +        stream.next();
    +        return ret('brace', 'brace');
    +      }
    +    }
    +    if (ch == "@") {    // check for space link. TODO fix @@...@@ highlighting
    +      stream.eatWhile(isSpaceName);
    +      return ret("link", "link");
    +    }
    +    if (/\d/.test(ch)) {        // numbers
    +      stream.eatWhile(/\d/);
    +      return ret("number", "number");
    +    }
    +    if (ch == "/") { // tw invisible comment
    +      if (stream.eat("%")) {
    +        return chain(stream, state, twTokenComment);
    +      }
    +      else if (stream.eat("/")) { //
    +        return chain(stream, state, twTokenEm);
    +      }
    +    }
    +    if (ch == "_") { // tw underline
    +      if (stream.eat("_")) {
    +        return chain(stream, state, twTokenUnderline);
    +      }
    +    }
    +    // strikethrough and mdash handling
    +    if (ch == "-") {
    +      if (stream.eat("-")) {
    +        // if strikethrough looks ugly, change CSS.
    +        if (stream.peek() != ' ')
    +          return chain(stream, state, twTokenStrike);
    +        // mdash
    +        if (stream.peek() == ' ')
    +          return ret('text', 'brace');
    +      }
    +    }
    +    if (ch == "'") { // tw bold
    +      if (stream.eat("'")) {
    +        return chain(stream, state, twTokenStrong);
    +      }
    +    }
    +    if (ch == "<") { // tw macro
    +      if (stream.eat("<")) {
    +        return chain(stream, state, twTokenMacro);
    +      }
    +    }
    +    else {
    +      return ret(ch);
    +    }
    +
    +    // core macro handling
    +    stream.eatWhile(/[\w\$_]/);
    +    var word = stream.current(),
    +    known = textwords.propertyIsEnumerable(word) && textwords[word];
    +
    +    return known ? ret(known.type, known.style, word) : ret("text", null, word);
    +
    +  } // jsTokenBase()
    +
    +  // tw invisible comment
    +  function twTokenComment(stream, state) {
    +    var maybeEnd = false,
    +    ch;
    +    while (ch = stream.next()) {
    +      if (ch == "/" && maybeEnd) {
    +        state.tokenize = jsTokenBase;
    +        break;
    +      }
    +      maybeEnd = (ch == "%");
    +    }
    +    return ret("comment", "comment");
    +  }
    +
    +  // tw strong / bold
    +  function twTokenStrong(stream, state) {
    +    var maybeEnd = false,
    +    ch;
    +    while (ch = stream.next()) {
    +      if (ch == "'" && maybeEnd) {
    +        state.tokenize = jsTokenBase;
    +        break;
    +      }
    +      maybeEnd = (ch == "'");
    +    }
    +    return ret("text", "strong");
    +  }
    +
    +  // tw code
    +  function twTokenCode(stream, state) {
    +    var ch, sb = state.block;
    +
    +    if (sb && stream.current()) {
    +      return ret("code", "comment");
    +    }
    +
    +    if (!sb && stream.match(reUntilCodeStop)) {
    +      state.tokenize = jsTokenBase;
    +      return ret("code", "comment");
    +    }
    +
    +    if (sb && stream.sol() && stream.match(reCodeBlockStop)) {
    +      state.tokenize = jsTokenBase;
    +      return ret("code", "comment");
    +    }
    +
    +    ch = stream.next();
    +    return (sb) ? ret("code", "comment") : ret("code", "comment");
    +  }
    +
    +  // tw em / italic
    +  function twTokenEm(stream, state) {
    +    var maybeEnd = false,
    +    ch;
    +    while (ch = stream.next()) {
    +      if (ch == "/" && maybeEnd) {
    +        state.tokenize = jsTokenBase;
    +        break;
    +      }
    +      maybeEnd = (ch == "/");
    +    }
    +    return ret("text", "em");
    +  }
    +
    +  // tw underlined text
    +  function twTokenUnderline(stream, state) {
    +    var maybeEnd = false,
    +    ch;
    +    while (ch = stream.next()) {
    +      if (ch == "_" && maybeEnd) {
    +        state.tokenize = jsTokenBase;
    +        break;
    +      }
    +      maybeEnd = (ch == "_");
    +    }
    +    return ret("text", "underlined");
    +  }
    +
    +  // tw strike through text looks ugly
    +  // change CSS if needed
    +  function twTokenStrike(stream, state) {
    +    var maybeEnd = false, ch;
    +
    +    while (ch = stream.next()) {
    +      if (ch == "-" && maybeEnd) {
    +        state.tokenize = jsTokenBase;
    +        break;
    +      }
    +      maybeEnd = (ch == "-");
    +    }
    +    return ret("text", "strikethrough");
    +  }
    +
    +  // macro
    +  function twTokenMacro(stream, state) {
    +    var ch, word, known;
    +
    +    if (stream.current() == '<<') {
    +      return ret('brace', 'macro');
    +    }
    +
    +    ch = stream.next();
    +    if (!ch) {
    +      state.tokenize = jsTokenBase;
    +      return ret(ch);
    +    }
    +    if (ch == ">") {
    +      if (stream.peek() == '>') {
    +        stream.next();
    +        state.tokenize = jsTokenBase;
    +        return ret("brace", "macro");
    +      }
    +    }
    +
    +    stream.eatWhile(/[\w\$_]/);
    +    word = stream.current();
    +    known = keywords.propertyIsEnumerable(word) && keywords[word];
    +
    +    if (known) {
    +      return ret(known.type, known.style, word);
    +    }
    +    else {
    +      return ret("macro", null, word);
    +    }
    +  }
    +
    +  // Interface
    +  return {
    +    startState: function () {
    +      return {
    +        tokenize: jsTokenBase,
    +        indented: 0,
    +        level: 0
    +      };
    +    },
    +
    +    token: function (stream, state) {
    +      if (stream.eatSpace()) return null;
    +      var style = state.tokenize(stream, state);
    +      return style;
    +    },
    +
    +    electricChars: ""
    +  };
    +});
    +
    +CodeMirror.defineMIME("text/x-tiddlywiki", "tiddlywiki");
    +//}}}
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_test_mode_test.js.html b/Docs/files/third-party_codemirror-3.20_test_mode_test.js.html new file mode 100644 index 0000000..9a008df --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_test_mode_test.js.html @@ -0,0 +1,543 @@ + + + + + third-party/codemirror-3.20/test/mode_test.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/test/mode_test.js

    + +
    +
    +/**
    + * Helper to test CodeMirror highlighting modes. It pretty prints output of the
    + * highlighter and can check against expected styles.
    + *
    + * Mode tests are registered by calling test.mode(testName, mode,
    + * tokens), where mode is a mode object as returned by
    + * CodeMirror.getMode, and tokens is an array of lines that make up
    + * the test.
    + *
    + * These lines are strings, in which styled stretches of code are
    + * enclosed in brackets `[]`, and prefixed by their style. For
    + * example, `[keyword if]`. Brackets in the code itself must be
    + * duplicated to prevent them from being interpreted as token
    + * boundaries. For example `a[[i]]` for `a[i]`. If a token has
    + * multiple styles, the styles must be separated by ampersands, for
    + * example `[tag&error </hmtl>]`.
    + *
    + * See the test.js files in the css, markdown, gfm, and stex mode
    + * directories for examples.
    + */
    +(function() {
    +  function findSingle(str, pos, ch) {
    +    for (;;) {
    +      var found = str.indexOf(ch, pos);
    +      if (found == -1) return null;
    +      if (str.charAt(found + 1) != ch) return found;
    +      pos = found + 2;
    +    }
    +  }
    +
    +  var styleName = /[\w&-_]+/g;
    +  function parseTokens(strs) {
    +    var tokens = [], plain = "";
    +    for (var i = 0; i < strs.length; ++i) {
    +      if (i) plain += "\n";
    +      var str = strs[i], pos = 0;
    +      while (pos < str.length) {
    +        var style = null, text;
    +        if (str.charAt(pos) == "[" && str.charAt(pos+1) != "[") {
    +          styleName.lastIndex = pos + 1;
    +          var m = styleName.exec(str);
    +          style = m[0].replace(/&/g, " ");
    +          var textStart = pos + style.length + 2;
    +          var end = findSingle(str, textStart, "]");
    +          if (end == null) throw new Error("Unterminated token at " + pos + " in '" + str + "'" + style);
    +          text = str.slice(textStart, end);
    +          pos = end + 1;
    +        } else {
    +          var end = findSingle(str, pos, "[");
    +          if (end == null) end = str.length;
    +          text = str.slice(pos, end);
    +          pos = end;
    +        }
    +        text = text.replace(/\[\[|\]\]/g, function(s) {return s.charAt(0);});
    +        tokens.push(style, text);
    +        plain += text;
    +      }
    +    }
    +    return {tokens: tokens, plain: plain};
    +  }
    +
    +  test.indentation = function(name, mode, tokens, modeName) {
    +    var data = parseTokens(tokens);
    +    return test((modeName || mode.name) + "_indent_" + name, function() {
    +      return compare(data.plain, data.tokens, mode, true);
    +    });
    +  };
    +
    +  test.mode = function(name, mode, tokens, modeName) {
    +    var data = parseTokens(tokens);
    +    return test((modeName || mode.name) + "_" + name, function() {
    +      return compare(data.plain, data.tokens, mode);
    +    });
    +  };
    +
    +  function compare(text, expected, mode, compareIndentation) {
    +
    +    var expectedOutput = [];
    +    for (var i = 0; i < expected.length; i += 2) {
    +      var sty = expected[i];
    +      if (sty && sty.indexOf(" ")) sty = sty.split(' ').sort().join(' ');
    +      expectedOutput.push(sty, expected[i + 1]);
    +    }
    +
    +    var observedOutput = highlight(text, mode, compareIndentation);
    +
    +    var pass, passStyle = "";
    +    pass = highlightOutputsEqual(expectedOutput, observedOutput);
    +    passStyle = pass ? 'mt-pass' : 'mt-fail';
    +
    +    var s = '';
    +    if (pass) {
    +      s += '<div class="mt-test ' + passStyle + '">';
    +      s +=   '<pre>' + text.replace('&', '&amp;').replace('<', '&lt;') + '</pre>';
    +      s +=   '<div class="cm-s-default">';
    +      s +=   prettyPrintOutputTable(observedOutput);
    +      s +=   '</div>';
    +      s += '</div>';
    +      return s;
    +    } else {
    +      s += '<div class="mt-test ' + passStyle + '">';
    +      s +=   '<pre>' + text.replace('&', '&amp;').replace('<', '&lt;') + '</pre>';
    +      s +=   '<div class="cm-s-default">';
    +      s += 'expected:';
    +      s +=   prettyPrintOutputTable(expectedOutput);
    +      s += 'observed:';
    +      s +=   prettyPrintOutputTable(observedOutput);
    +      s +=   '</div>';
    +      s += '</div>';
    +      throw s;
    +    }
    +  }
    +
    +  /**
    +   * Emulation of CodeMirror's internal highlight routine for testing. Multi-line
    +   * input is supported.
    +   *
    +   * @param string to highlight
    +   *
    +   * @param mode the mode that will do the actual highlighting
    +   *
    +   * @return array of [style, token] pairs
    +   */
    +  function highlight(string, mode, compareIndentation) {
    +    var state = mode.startState()
    +
    +    var lines = string.replace(/\r\n/g,'\n').split('\n');
    +    var st = [], pos = 0;
    +    for (var i = 0; i < lines.length; ++i) {
    +      var line = lines[i], newLine = true;
    +      var stream = new CodeMirror.StringStream(line);
    +      if (line == "" && mode.blankLine) mode.blankLine(state);
    +      /* Start copied code from CodeMirror.highlight */
    +      while (!stream.eol()) {
    +				var compare = mode.token(stream, state), substr = stream.current();
    +				if(compareIndentation) compare = mode.indent(state) || null;
    +        else if (compare && compare.indexOf(" ") > -1) compare = compare.split(' ').sort().join(' ');
    +
    +				stream.start = stream.pos;
    +        if (pos && st[pos-2] == compare && !newLine) {
    +          st[pos-1] += substr;
    +        } else if (substr) {
    +          st[pos++] = compare; st[pos++] = substr;
    +        }
    +        // Give up when line is ridiculously long
    +        if (stream.pos > 5000) {
    +          st[pos++] = null; st[pos++] = this.text.slice(stream.pos);
    +          break;
    +        }
    +        newLine = false;
    +      }
    +    }
    +
    +    return st;
    +  }
    +
    +  /**
    +   * Compare two arrays of output from highlight.
    +   *
    +   * @param o1 array of [style, token] pairs
    +   *
    +   * @param o2 array of [style, token] pairs
    +   *
    +   * @return boolean; true iff outputs equal
    +   */
    +  function highlightOutputsEqual(o1, o2) {
    +    if (o1.length != o2.length) return false;
    +    for (var i = 0; i < o1.length; ++i)
    +      if (o1[i] != o2[i]) return false;
    +    return true;
    +  }
    +
    +  /**
    +   * Print tokens and corresponding styles in a table. Spaces in the token are
    +   * replaced with 'interpunct' dots (&middot;).
    +   *
    +   * @param output array of [style, token] pairs
    +   *
    +   * @return html string
    +   */
    +  function prettyPrintOutputTable(output) {
    +    var s = '<table class="mt-output">';
    +    s += '<tr>';
    +    for (var i = 0; i < output.length; i += 2) {
    +      var style = output[i], val = output[i+1];
    +      s +=
    +      '<td class="mt-token">' +
    +        '<span class="cm-' + String(style).replace(/ +/g, " cm-") + '">' +
    +        val.replace(/ /g,'\xb7').replace('&', '&amp;').replace('<', '&lt;') +
    +        '</span>' +
    +        '</td>';
    +    }
    +    s += '</tr><tr>';
    +    for (var i = 0; i < output.length; i += 2) {
    +      s += '<td class="mt-style"><span>' + (output[i] || null) + '</span></td>';
    +    }
    +    s += '</table>';
    +    return s;
    +  }
    +})();
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_codemirror-3.20_test_vim_test.js.html b/Docs/files/third-party_codemirror-3.20_test_vim_test.js.html new file mode 100644 index 0000000..3410abd --- /dev/null +++ b/Docs/files/third-party_codemirror-3.20_test_vim_test.js.html @@ -0,0 +1,2734 @@ + + + + + third-party/codemirror-3.20/test/vim_test.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/codemirror-3.20/test/vim_test.js

    + +
    +
    +var code = '' +
    +' wOrd1 (#%\n' +
    +' word3] \n' +
    +'aopop pop 0 1 2 3 4\n' +
    +' (a) [b] {c} \n' +
    +'int getchar(void) {\n' +
    +'  static char buf[BUFSIZ];\n' +
    +'  static char *bufp = buf;\n' +
    +'  if (n == 0) {  /* buffer is empty */\n' +
    +'    n = read(0, buf, sizeof buf);\n' +
    +'    bufp = buf;\n' +
    +'  }\n' +
    +'\n' +
    +'  return (--n >= 0) ? (unsigned char) *bufp++ : EOF;\n' +
    +' \n' +
    +'}\n';
    +
    +var lines = (function() {
    +  lineText = code.split('\n');
    +  var ret = [];
    +  for (var i = 0; i < lineText.length; i++) {
    +    ret[i] = {
    +      line: i,
    +      length: lineText[i].length,
    +      lineText: lineText[i],
    +      textStart: /^\s*/.exec(lineText[i])[0].length
    +    };
    +  }
    +  return ret;
    +})();
    +var endOfDocument = makeCursor(lines.length - 1,
    +    lines[lines.length - 1].length);
    +var wordLine = lines[0];
    +var bigWordLine = lines[1];
    +var charLine = lines[2];
    +var bracesLine = lines[3];
    +var seekBraceLine = lines[4];
    +
    +var word1 = {
    +  start: { line: wordLine.line, ch: 1 },
    +  end: { line: wordLine.line, ch: 5 }
    +};
    +var word2 = {
    +  start: { line: wordLine.line, ch: word1.end.ch + 2 },
    +  end: { line: wordLine.line, ch: word1.end.ch + 4 }
    +};
    +var word3 = {
    +  start: { line: bigWordLine.line, ch: 1 },
    +  end: { line: bigWordLine.line, ch: 5 }
    +};
    +var bigWord1 = word1;
    +var bigWord2 = word2;
    +var bigWord3 = {
    +  start: { line: bigWordLine.line, ch: 1 },
    +  end: { line: bigWordLine.line, ch: 7 }
    +};
    +var bigWord4 = {
    +  start: { line: bigWordLine.line, ch: bigWord1.end.ch + 3 },
    +  end: { line: bigWordLine.line, ch: bigWord1.end.ch + 7 }
    +};
    +
    +var oChars = [ { line: charLine.line, ch: 1 },
    +    { line: charLine.line, ch: 3 },
    +    { line: charLine.line, ch: 7 } ];
    +var pChars = [ { line: charLine.line, ch: 2 },
    +    { line: charLine.line, ch: 4 },
    +    { line: charLine.line, ch: 6 },
    +    { line: charLine.line, ch: 8 } ];
    +var numChars = [ { line: charLine.line, ch: 10 },
    +    { line: charLine.line, ch: 12 },
    +    { line: charLine.line, ch: 14 },
    +    { line: charLine.line, ch: 16 },
    +    { line: charLine.line, ch: 18 }];
    +var parens1 = {
    +  start: { line: bracesLine.line, ch: 1 },
    +  end: { line: bracesLine.line, ch: 3 }
    +};
    +var squares1 = {
    +  start: { line: bracesLine.line, ch: 5 },
    +  end: { line: bracesLine.line, ch: 7 }
    +};
    +var curlys1 = {
    +  start: { line: bracesLine.line, ch: 9 },
    +  end: { line: bracesLine.line, ch: 11 }
    +};
    +var seekOutside = {
    +  start: { line: seekBraceLine.line, ch: 1 },
    +  end: { line: seekBraceLine.line, ch: 16 }
    +};
    +var seekInside = {
    +  start: { line: seekBraceLine.line, ch: 14 },
    +  end: { line: seekBraceLine.line, ch: 11 }
    +};
    +
    +function copyCursor(cur) {
    +  return { ch: cur.ch, line: cur.line };
    +}
    +
    +function testVim(name, run, opts, expectedFail) {
    +  var vimOpts = {
    +    lineNumbers: true,
    +    vimMode: true,
    +    showCursorWhenSelecting: true,
    +    value: code
    +  };
    +  for (var prop in opts) {
    +    if (opts.hasOwnProperty(prop)) {
    +      vimOpts[prop] = opts[prop];
    +    }
    +  }
    +  return test('vim_' + name, function() {
    +    var place = document.getElementById("testground");
    +    var cm = CodeMirror(place, vimOpts);
    +    var vim = CodeMirror.Vim.maybeInitVimState_(cm);
    +
    +    function doKeysFn(cm) {
    +      return function(args) {
    +        if (args instanceof Array) {
    +          arguments = args;
    +        }
    +        for (var i = 0; i < arguments.length; i++) {
    +          CodeMirror.Vim.handleKey(cm, arguments[i]);
    +        }
    +      }
    +    }
    +    function doInsertModeKeysFn(cm) {
    +      return function(args) {
    +        if (args instanceof Array) { arguments = args; }
    +        function executeHandler(handler) {
    +          if (typeof handler == 'string') {
    +            CodeMirror.commands[handler](cm);
    +          } else {
    +            handler(cm);
    +          }
    +          return true;
    +        }
    +        for (var i = 0; i < arguments.length; i++) {
    +          var key = arguments[i];
    +          // Find key in keymap and handle.
    +          var handled = CodeMirror.lookupKey(key, ['vim-insert'], executeHandler);
    +          // Record for insert mode.
    +          if (handled === true && cm.state.vim.insertMode && arguments[i] != 'Esc') {
    +            var lastChange = CodeMirror.Vim.getVimGlobalState_().macroModeState.lastInsertModeChanges;
    +            if (lastChange) {
    +              lastChange.changes.push(new CodeMirror.Vim.InsertModeKey(key));
    +            }
    +          }
    +        }
    +      }
    +    }
    +    function doExFn(cm) {
    +      return function(command) {
    +        cm.openDialog = helpers.fakeOpenDialog(command);
    +        helpers.doKeys(':');
    +      }
    +    }
    +    function assertCursorAtFn(cm) {
    +      return function(line, ch) {
    +        var pos;
    +        if (ch == null && typeof line.line == 'number') {
    +          pos = line;
    +        } else {
    +          pos = makeCursor(line, ch);
    +        }
    +        eqPos(pos, cm.getCursor());
    +      }
    +    }
    +    function fakeOpenDialog(result) {
    +      return function(text, callback) {
    +        return callback(result);
    +      }
    +    }
    +    var helpers = {
    +      doKeys: doKeysFn(cm),
    +      // Warning: Only emulates keymap events, not character insertions. Use
    +      // replaceRange to simulate character insertions.
    +      // Keys are in CodeMirror format, NOT vim format.
    +      doInsertModeKeys: doInsertModeKeysFn(cm),
    +      doEx: doExFn(cm),
    +      assertCursorAt: assertCursorAtFn(cm),
    +      fakeOpenDialog: fakeOpenDialog,
    +      getRegisterController: function() {
    +        return CodeMirror.Vim.getRegisterController();
    +      }
    +    }
    +    CodeMirror.Vim.resetVimGlobalState_();
    +    var successful = false;
    +    try {
    +      run(cm, vim, helpers);
    +      successful = true;
    +    } finally {
    +      if ((debug && !successful) || verbose) {
    +        place.style.visibility = "visible";
    +      } else {
    +        place.removeChild(cm.getWrapperElement());
    +      }
    +    }
    +  }, expectedFail);
    +};
    +testVim('qq@q', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('q', 'q', 'l', 'l', 'q');
    +  helpers.assertCursorAt(0,2);
    +  helpers.doKeys('@', 'q');
    +  helpers.assertCursorAt(0,4);
    +}, { value: '            '});
    +testVim('@@', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('q', 'q', 'l', 'l', 'q');
    +  helpers.assertCursorAt(0,2);
    +  helpers.doKeys('@', 'q');
    +  helpers.assertCursorAt(0,4);
    +  helpers.doKeys('@', '@');
    +  helpers.assertCursorAt(0,6);
    +}, { value: '            '});
    +var jumplistScene = ''+
    +  'word\n'+
    +  '(word)\n'+
    +  '{word\n'+
    +  'word.\n'+
    +  '\n'+
    +  'word search\n'+
    +  '}word\n'+
    +  'word\n'+
    +  'word\n';
    +function testJumplist(name, keys, endPos, startPos, dialog) {
    +  endPos = makeCursor(endPos[0], endPos[1]);
    +  startPos = makeCursor(startPos[0], startPos[1]);
    +  testVim(name, function(cm, vim, helpers) {
    +    CodeMirror.Vim.resetVimGlobalState_();
    +    if(dialog)cm.openDialog = helpers.fakeOpenDialog('word');
    +    cm.setCursor(startPos);
    +    helpers.doKeys.apply(null, keys);
    +    helpers.assertCursorAt(endPos);
    +  }, {value: jumplistScene});
    +};
    +testJumplist('jumplist_H', ['H', '<C-o>'], [5,2], [5,2]);
    +testJumplist('jumplist_M', ['M', '<C-o>'], [2,2], [2,2]);
    +testJumplist('jumplist_L', ['L', '<C-o>'], [2,2], [2,2]);
    +testJumplist('jumplist_[[', ['[', '[', '<C-o>'], [5,2], [5,2]);
    +testJumplist('jumplist_]]', [']', ']', '<C-o>'], [2,2], [2,2]);
    +testJumplist('jumplist_G', ['G', '<C-o>'], [5,2], [5,2]);
    +testJumplist('jumplist_gg', ['g', 'g', '<C-o>'], [5,2], [5,2]);
    +testJumplist('jumplist_%', ['%', '<C-o>'], [1,5], [1,5]);
    +testJumplist('jumplist_{', ['{', '<C-o>'], [1,5], [1,5]);
    +testJumplist('jumplist_}', ['}', '<C-o>'], [1,5], [1,5]);
    +testJumplist('jumplist_\'', ['m', 'a', 'h', '\'', 'a', 'h', '<C-i>'], [1,5], [1,5]);
    +testJumplist('jumplist_`', ['m', 'a', 'h', '`', 'a', 'h', '<C-i>'], [1,5], [1,5]);
    +testJumplist('jumplist_*_cachedCursor', ['*', '<C-o>'], [1,3], [1,3]);
    +testJumplist('jumplist_#_cachedCursor', ['#', '<C-o>'], [1,3], [1,3]);
    +testJumplist('jumplist_n', ['#', 'n', '<C-o>'], [1,1], [2,3]);
    +testJumplist('jumplist_N', ['#', 'N', '<C-o>'], [1,1], [2,3]);
    +testJumplist('jumplist_repeat_<c-o>', ['*', '*', '*', '3', '<C-o>'], [2,3], [2,3]);
    +testJumplist('jumplist_repeat_<c-i>', ['*', '*', '*', '3', '<C-o>', '2', '<C-i>'], [5,0], [2,3]);
    +testJumplist('jumplist_repeated_motion', ['3', '*', '<C-o>'], [2,3], [2,3]);
    +testJumplist('jumplist_/', ['/', '<C-o>'], [2,3], [2,3], 'dialog');
    +testJumplist('jumplist_?', ['?', '<C-o>'], [2,3], [2,3], 'dialog');
    +testJumplist('jumplist_skip_delted_mark<c-o>',
    +             ['*', 'n', 'n', 'k', 'd', 'k', '<C-o>', '<C-o>', '<C-o>'],
    +             [0,2], [0,2]);
    +testJumplist('jumplist_skip_delted_mark<c-i>',
    +             ['*', 'n', 'n', 'k', 'd', 'k', '<C-o>', '<C-i>', '<C-i>'],
    +             [1,0], [0,2]);
    +/**
    + * @param name Name of the test
    + * @param keys An array of keys or a string with a single key to simulate.
    + * @param endPos The expected end position of the cursor.
    + * @param startPos The position the cursor should start at, defaults to 0, 0.
    + */
    +function testMotion(name, keys, endPos, startPos) {
    +  testVim(name, function(cm, vim, helpers) {
    +    if (!startPos) {
    +      startPos = { line: 0, ch: 0 };
    +    }
    +    cm.setCursor(startPos);
    +    helpers.doKeys(keys);
    +    helpers.assertCursorAt(endPos);
    +  });
    +};
    +
    +function makeCursor(line, ch) {
    +  return { line: line, ch: ch };
    +};
    +
    +function offsetCursor(cur, offsetLine, offsetCh) {
    +  return { line: cur.line + offsetLine, ch: cur.ch + offsetCh };
    +};
    +
    +// Motion tests
    +testMotion('|', '|', makeCursor(0, 0), makeCursor(0,4));
    +testMotion('|_repeat', ['3', '|'], makeCursor(0, 2), makeCursor(0,4));
    +testMotion('h', 'h', makeCursor(0, 0), word1.start);
    +testMotion('h_repeat', ['3', 'h'], offsetCursor(word1.end, 0, -3), word1.end);
    +testMotion('l', 'l', makeCursor(0, 1));
    +testMotion('l_repeat', ['2', 'l'], makeCursor(0, 2));
    +testMotion('j', 'j', offsetCursor(word1.end, 1, 0), word1.end);
    +testMotion('j_repeat', ['2', 'j'], offsetCursor(word1.end, 2, 0), word1.end);
    +testMotion('j_repeat_clip', ['1000', 'j'], endOfDocument);
    +testMotion('k', 'k', offsetCursor(word3.end, -1, 0), word3.end);
    +testMotion('k_repeat', ['2', 'k'], makeCursor(0, 4), makeCursor(2, 4));
    +testMotion('k_repeat_clip', ['1000', 'k'], makeCursor(0, 4), makeCursor(2, 4));
    +testMotion('w', 'w', word1.start);
    +testMotion('w_multiple_newlines_no_space', 'w', makeCursor(12, 2), makeCursor(11, 2));
    +testMotion('w_multiple_newlines_with_space', 'w', makeCursor(14, 0), makeCursor(12, 51));
    +testMotion('w_repeat', ['2', 'w'], word2.start);
    +testMotion('w_wrap', ['w'], word3.start, word2.start);
    +testMotion('w_endOfDocument', 'w', endOfDocument, endOfDocument);
    +testMotion('w_start_to_end', ['1000', 'w'], endOfDocument, makeCursor(0, 0));
    +testMotion('W', 'W', bigWord1.start);
    +testMotion('W_repeat', ['2', 'W'], bigWord3.start, bigWord1.start);
    +testMotion('e', 'e', word1.end);
    +testMotion('e_repeat', ['2', 'e'], word2.end);
    +testMotion('e_wrap', 'e', word3.end, word2.end);
    +testMotion('e_endOfDocument', 'e', endOfDocument, endOfDocument);
    +testMotion('e_start_to_end', ['1000', 'e'], endOfDocument, makeCursor(0, 0));
    +testMotion('b', 'b', word3.start, word3.end);
    +testMotion('b_repeat', ['2', 'b'], word2.start, word3.end);
    +testMotion('b_wrap', 'b', word2.start, word3.start);
    +testMotion('b_startOfDocument', 'b', makeCursor(0, 0), makeCursor(0, 0));
    +testMotion('b_end_to_start', ['1000', 'b'], makeCursor(0, 0), endOfDocument);
    +testMotion('ge', ['g', 'e'], word2.end, word3.end);
    +testMotion('ge_repeat', ['2', 'g', 'e'], word1.end, word3.start);
    +testMotion('ge_wrap', ['g', 'e'], word2.end, word3.start);
    +testMotion('ge_startOfDocument', ['g', 'e'], makeCursor(0, 0),
    +    makeCursor(0, 0));
    +testMotion('ge_end_to_start', ['1000', 'g', 'e'], makeCursor(0, 0), endOfDocument);
    +testMotion('gg', ['g', 'g'], makeCursor(lines[0].line, lines[0].textStart),
    +    makeCursor(3, 1));
    +testMotion('gg_repeat', ['3', 'g', 'g'],
    +    makeCursor(lines[2].line, lines[2].textStart));
    +testMotion('G', 'G',
    +    makeCursor(lines[lines.length - 1].line, lines[lines.length - 1].textStart),
    +    makeCursor(3, 1));
    +testMotion('G_repeat', ['3', 'G'], makeCursor(lines[2].line,
    +    lines[2].textStart));
    +// TODO: Make the test code long enough to test Ctrl-F and Ctrl-B.
    +testMotion('0', '0', makeCursor(0, 0), makeCursor(0, 8));
    +testMotion('^', '^', makeCursor(0, lines[0].textStart), makeCursor(0, 8));
    +testMotion('+', '+', makeCursor(1, lines[1].textStart), makeCursor(0, 8));
    +testMotion('-', '-', makeCursor(0, lines[0].textStart), makeCursor(1, 4));
    +testMotion('_', ['6','_'], makeCursor(5, lines[5].textStart), makeCursor(0, 8));
    +testMotion('$', '$', makeCursor(0, lines[0].length - 1), makeCursor(0, 1));
    +testMotion('$_repeat', ['2', '$'], makeCursor(1, lines[1].length - 1),
    +    makeCursor(0, 3));
    +testMotion('f', ['f', 'p'], pChars[0], makeCursor(charLine.line, 0));
    +testMotion('f_repeat', ['2', 'f', 'p'], pChars[2], pChars[0]);
    +testMotion('f_num', ['f', '2'], numChars[2], makeCursor(charLine.line, 0));
    +testMotion('t', ['t','p'], offsetCursor(pChars[0], 0, -1),
    +    makeCursor(charLine.line, 0));
    +testMotion('t_repeat', ['2', 't', 'p'], offsetCursor(pChars[2], 0, -1),
    +    pChars[0]);
    +testMotion('F', ['F', 'p'], pChars[0], pChars[1]);
    +testMotion('F_repeat', ['2', 'F', 'p'], pChars[0], pChars[2]);
    +testMotion('T', ['T', 'p'], offsetCursor(pChars[0], 0, 1), pChars[1]);
    +testMotion('T_repeat', ['2', 'T', 'p'], offsetCursor(pChars[0], 0, 1), pChars[2]);
    +testMotion('%_parens', ['%'], parens1.end, parens1.start);
    +testMotion('%_squares', ['%'], squares1.end, squares1.start);
    +testMotion('%_braces', ['%'], curlys1.end, curlys1.start);
    +testMotion('%_seek_outside', ['%'], seekOutside.end, seekOutside.start);
    +testMotion('%_seek_inside', ['%'], seekInside.end, seekInside.start);
    +testVim('%_seek_skip', function(cm, vim, helpers) {
    +  cm.setCursor(0,0);
    +  helpers.doKeys(['%']);
    +  helpers.assertCursorAt(0,9);
    +}, {value:'01234"("()'});
    +testVim('%_skip_string', function(cm, vim, helpers) {
    +  cm.setCursor(0,0);
    +  helpers.doKeys(['%']);
    +  helpers.assertCursorAt(0,4);
    +  cm.setCursor(0,2);
    +  helpers.doKeys(['%']);
    +  helpers.assertCursorAt(0,0);
    +}, {value:'(")")'});
    +(')')
    +testVim('%_skip_comment', function(cm, vim, helpers) {
    +  cm.setCursor(0,0);
    +  helpers.doKeys(['%']);
    +  helpers.assertCursorAt(0,6);
    +  cm.setCursor(0,3);
    +  helpers.doKeys(['%']);
    +  helpers.assertCursorAt(0,0);
    +}, {value:'(/*)*/)'});
    +// Make sure that moving down after going to the end of a line always leaves you
    +// at the end of a line, but preserves the offset in other cases
    +testVim('Changing lines after Eol operation', function(cm, vim, helpers) {
    +  cm.setCursor(0,0);
    +  helpers.doKeys(['$']);
    +  helpers.doKeys(['j']);
    +  // After moving to Eol and then down, we should be at Eol of line 2
    +  helpers.assertCursorAt({ line: 1, ch: lines[1].length - 1 });
    +  helpers.doKeys(['j']);
    +  // After moving down, we should be at Eol of line 3
    +  helpers.assertCursorAt({ line: 2, ch: lines[2].length - 1 });
    +  helpers.doKeys(['h']);
    +  helpers.doKeys(['j']);
    +  // After moving back one space and then down, since line 4 is shorter than line 2, we should
    +  // be at Eol of line 2 - 1
    +  helpers.assertCursorAt({ line: 3, ch: lines[3].length - 1 });
    +  helpers.doKeys(['j']);
    +  helpers.doKeys(['j']);
    +  // After moving down again, since line 3 has enough characters, we should be back to the
    +  // same place we were at on line 1
    +  helpers.assertCursorAt({ line: 5, ch: lines[2].length - 2 });
    +});
    +//making sure gj and gk recover from clipping
    +testVim('gj_gk_clipping', function(cm,vim,helpers){
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('g','j','g','j');
    +  helpers.assertCursorAt(2, 1);
    +  helpers.doKeys('g','k','g','k');
    +  helpers.assertCursorAt(0, 1);
    +},{value: 'line 1\n\nline 2'});
    +//testing a mix of j/k and gj/gk
    +testVim('j_k_and_gj_gk', function(cm,vim,helpers){
    +  cm.setSize(120);
    +  cm.setCursor(0, 0);
    +  //go to the last character on the first line
    +  helpers.doKeys('$');
    +  //move up/down on the column within the wrapped line
    +  //side-effect: cursor is not locked to eol anymore
    +  helpers.doKeys('g','k');
    +  var cur=cm.getCursor();
    +  eq(cur.line,0);
    +  is((cur.ch<176),'gk didn\'t move cursor back (1)');
    +  helpers.doKeys('g','j');
    +  helpers.assertCursorAt(0, 176);
    +  //should move to character 177 on line 2 (j/k preserve character index within line)
    +  helpers.doKeys('j');
    +  //due to different line wrapping, the cursor can be on a different screen-x now
    +  //gj and gk preserve screen-x on movement, much like moveV
    +  helpers.doKeys('3','g','k');
    +  cur=cm.getCursor();
    +  eq(cur.line,1);
    +  is((cur.ch<176),'gk didn\'t move cursor back (2)');
    +  helpers.doKeys('g','j','2','g','j');
    +  //should return to the same character-index
    +  helpers.doKeys('k');
    +  helpers.assertCursorAt(0, 176);
    +},{ lineWrapping:true, value: 'This line is intentially long to test movement of gj and gk over wrapped lines. I will start on the end of this line, then make a step up and back to set the origin for j and k.\nThis line is supposed to be even longer than the previous. I will jump here and make another wiggle with gj and gk, before I jump back to the line above. Both wiggles should not change my cursor\'s target character but both j/k and gj/gk change each other\'s reference position.'});
    +testVim('gj_gk', function(cm, vim, helpers) {
    +  if (phantom) return;
    +  cm.setSize(120);
    +  // Test top of document edge case.
    +  cm.setCursor(0, 4);
    +  helpers.doKeys('g', 'j');
    +  helpers.doKeys('10', 'g', 'k');
    +  helpers.assertCursorAt(0, 4);
    +
    +  // Test moving down preserves column position.
    +  helpers.doKeys('g', 'j');
    +  var pos1 = cm.getCursor();
    +  var expectedPos2 = { line: 0, ch: (pos1.ch - 4) * 2 + 4};
    +  helpers.doKeys('g', 'j');
    +  helpers.assertCursorAt(expectedPos2);
    +
    +  // Move to the last character
    +  cm.setCursor(0, 0);
    +  // Move left to reset HSPos
    +  helpers.doKeys('h');
    +  // Test bottom of document edge case.
    +  helpers.doKeys('100', 'g', 'j');
    +  var endingPos = cm.getCursor();
    +  is(endingPos != 0, 'gj should not be on wrapped line 0');
    +  var topLeftCharCoords = cm.charCoords(makeCursor(0, 0));
    +  var endingCharCoords = cm.charCoords(endingPos);
    +  is(topLeftCharCoords.left == endingCharCoords.left, 'gj should end up on column 0');
    +},{ lineNumbers: false, lineWrapping:true, value: 'Thislineisintentiallylongtotestmovementofgjandgkoverwrappedlines.' });
    +testVim('}', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('}');
    +  helpers.assertCursorAt(1, 0);
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('2', '}');
    +  helpers.assertCursorAt(4, 0);
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('6', '}');
    +  helpers.assertCursorAt(5, 0);
    +}, { value: 'a\n\nb\nc\n\nd' });
    +testVim('{', function(cm, vim, helpers) {
    +  cm.setCursor(5, 0);
    +  helpers.doKeys('{');
    +  helpers.assertCursorAt(4, 0);
    +  cm.setCursor(5, 0);
    +  helpers.doKeys('2', '{');
    +  helpers.assertCursorAt(1, 0);
    +  cm.setCursor(5, 0);
    +  helpers.doKeys('6', '{');
    +  helpers.assertCursorAt(0, 0);
    +}, { value: 'a\n\nb\nc\n\nd' });
    +
    +// Operator tests
    +testVim('dl', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 0);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('d', 'l');
    +  eq('word1 ', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(' ', register.text);
    +  is(!register.linewise);
    +  eqPos(curStart, cm.getCursor());
    +}, { value: ' word1 ' });
    +testVim('dl_eol', function(cm, vim, helpers) {
    +  cm.setCursor(0, 6);
    +  helpers.doKeys('d', 'l');
    +  eq(' word1', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(' ', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 5);
    +}, { value: ' word1 ' });
    +testVim('dl_repeat', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 0);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('2', 'd', 'l');
    +  eq('ord1 ', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(' w', register.text);
    +  is(!register.linewise);
    +  eqPos(curStart, cm.getCursor());
    +}, { value: ' word1 ' });
    +testVim('dh', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 3);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('d', 'h');
    +  eq(' wrd1 ', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('o', register.text);
    +  is(!register.linewise);
    +  eqPos(offsetCursor(curStart, 0 , -1), cm.getCursor());
    +}, { value: ' word1 ' });
    +testVim('dj', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 3);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('d', 'j');
    +  eq(' word3', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(' word1\nword2\n', register.text);
    +  is(register.linewise);
    +  helpers.assertCursorAt(0, 1);
    +}, { value: ' word1\nword2\n word3' });
    +testVim('dj_end_of_document', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 3);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('d', 'j');
    +  eq(' word1 ', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 3);
    +}, { value: ' word1 ' });
    +testVim('dk', function(cm, vim, helpers) {
    +  var curStart = makeCursor(1, 3);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('d', 'k');
    +  eq(' word3', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(' word1\nword2\n', register.text);
    +  is(register.linewise);
    +  helpers.assertCursorAt(0, 1);
    +}, { value: ' word1\nword2\n word3' });
    +testVim('dk_start_of_document', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 3);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('d', 'k');
    +  eq(' word1 ', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 3);
    +}, { value: ' word1 ' });
    +testVim('dw_space', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 0);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('d', 'w');
    +  eq('word1 ', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(' ', register.text);
    +  is(!register.linewise);
    +  eqPos(curStart, cm.getCursor());
    +}, { value: ' word1 ' });
    +testVim('dw_word', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 1);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('d', 'w');
    +  eq(' word2', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('word1 ', register.text);
    +  is(!register.linewise);
    +  eqPos(curStart, cm.getCursor());
    +}, { value: ' word1 word2' });
    +testVim('dw_only_word', function(cm, vim, helpers) {
    +  // Test that if there is only 1 word left, dw deletes till the end of the
    +  // line.
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('d', 'w');
    +  eq(' ', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('word1 ', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 0);
    +}, { value: ' word1 ' });
    +testVim('dw_eol', function(cm, vim, helpers) {
    +  // Assert that dw does not delete the newline if last word to delete is at end
    +  // of line.
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('d', 'w');
    +  eq(' \nword2', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('word1', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 0);
    +}, { value: ' word1\nword2' });
    +testVim('dw_eol_with_multiple_newlines', function(cm, vim, helpers) {
    +  // Assert that dw does not delete the newline if last word to delete is at end
    +  // of line and it is followed by multiple newlines.
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('d', 'w');
    +  eq(' \n\nword2', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('word1', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 0);
    +}, { value: ' word1\n\nword2' });
    +testVim('dw_empty_line_followed_by_whitespace', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', 'w');
    +  eq('  \nword', cm.getValue());
    +}, { value: '\n  \nword' });
    +testVim('dw_empty_line_followed_by_word', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', 'w');
    +  eq('word', cm.getValue());
    +}, { value: '\nword' });
    +testVim('dw_empty_line_followed_by_empty_line', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', 'w');
    +  eq('\n', cm.getValue());
    +}, { value: '\n\n' });
    +testVim('dw_whitespace_followed_by_whitespace', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', 'w');
    +  eq('\n   \n', cm.getValue());
    +}, { value: '  \n   \n' });
    +testVim('dw_whitespace_followed_by_empty_line', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', 'w');
    +  eq('\n\n', cm.getValue());
    +}, { value: '  \n\n' });
    +testVim('dw_word_whitespace_word', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', 'w');
    +  eq('\n   \nword2', cm.getValue());
    +}, { value: 'word1\n   \nword2'})
    +testVim('dw_end_of_document', function(cm, vim, helpers) {
    +  cm.setCursor(1, 2);
    +  helpers.doKeys('d', 'w');
    +  eq('\nab', cm.getValue());
    +}, { value: '\nabc' });
    +testVim('dw_repeat', function(cm, vim, helpers) {
    +  // Assert that dw does delete newline if it should go to the next line, and
    +  // that repeat works properly.
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('d', '2', 'w');
    +  eq(' ', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('word1\nword2', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 0);
    +}, { value: ' word1\nword2' });
    +testVim('de_word_start_and_empty_lines', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', 'e');
    +  eq('\n\n', cm.getValue());
    +}, { value: 'word\n\n' });
    +testVim('de_word_end_and_empty_lines', function(cm, vim, helpers) {
    +  cm.setCursor(0, 3);
    +  helpers.doKeys('d', 'e');
    +  eq('wor', cm.getValue());
    +}, { value: 'word\n\n\n' });
    +testVim('de_whitespace_and_empty_lines', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', 'e');
    +  eq('', cm.getValue());
    +}, { value: '   \n\n\n' });
    +testVim('de_end_of_document', function(cm, vim, helpers) {
    +  cm.setCursor(1, 2);
    +  helpers.doKeys('d', 'e');
    +  eq('\nab', cm.getValue());
    +}, { value: '\nabc' });
    +testVim('db_empty_lines', function(cm, vim, helpers) {
    +  cm.setCursor(2, 0);
    +  helpers.doKeys('d', 'b');
    +  eq('\n\n', cm.getValue());
    +}, { value: '\n\n\n' });
    +testVim('db_word_start_and_empty_lines', function(cm, vim, helpers) {
    +  cm.setCursor(2, 0);
    +  helpers.doKeys('d', 'b');
    +  eq('\nword', cm.getValue());
    +}, { value: '\n\nword' });
    +testVim('db_word_end_and_empty_lines', function(cm, vim, helpers) {
    +  cm.setCursor(2, 3);
    +  helpers.doKeys('d', 'b');
    +  eq('\n\nd', cm.getValue());
    +}, { value: '\n\nword' });
    +testVim('db_whitespace_and_empty_lines', function(cm, vim, helpers) {
    +  cm.setCursor(2, 0);
    +  helpers.doKeys('d', 'b');
    +  eq('', cm.getValue());
    +}, { value: '\n   \n' });
    +testVim('db_start_of_document', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', 'b');
    +  eq('abc\n', cm.getValue());
    +}, { value: 'abc\n' });
    +testVim('dge_empty_lines', function(cm, vim, helpers) {
    +  cm.setCursor(1, 0);
    +  helpers.doKeys('d', 'g', 'e');
    +  // Note: In real VIM the result should be '', but it's not quite consistent,
    +  // since 2 newlines are deleted. But in the similar case of word\n\n, only
    +  // 1 newline is deleted. We'll diverge from VIM's behavior since it's much
    +  // easier this way.
    +  eq('\n', cm.getValue());
    +}, { value: '\n\n' });
    +testVim('dge_word_and_empty_lines', function(cm, vim, helpers) {
    +  cm.setCursor(1, 0);
    +  helpers.doKeys('d', 'g', 'e');
    +  eq('wor\n', cm.getValue());
    +}, { value: 'word\n\n'});
    +testVim('dge_whitespace_and_empty_lines', function(cm, vim, helpers) {
    +  cm.setCursor(2, 0);
    +  helpers.doKeys('d', 'g', 'e');
    +  eq('', cm.getValue());
    +}, { value: '\n  \n' });
    +testVim('dge_start_of_document', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', 'g', 'e');
    +  eq('bc\n', cm.getValue());
    +}, { value: 'abc\n' });
    +testVim('d_inclusive', function(cm, vim, helpers) {
    +  // Assert that when inclusive is set, the character the cursor is on gets
    +  // deleted too.
    +  var curStart = makeCursor(0, 1);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('d', 'e');
    +  eq('  ', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('word1', register.text);
    +  is(!register.linewise);
    +  eqPos(curStart, cm.getCursor());
    +}, { value: ' word1 ' });
    +testVim('d_reverse', function(cm, vim, helpers) {
    +  // Test that deleting in reverse works.
    +  cm.setCursor(1, 0);
    +  helpers.doKeys('d', 'b');
    +  eq(' word2 ', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('word1\n', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 1);
    +}, { value: ' word1\nword2 ' });
    +testVim('dd', function(cm, vim, helpers) {
    +  cm.setCursor(0, 3);
    +  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
    +    { line: 1, ch: 0 });
    +  var expectedLineCount = cm.lineCount() - 1;
    +  helpers.doKeys('d', 'd');
    +  eq(expectedLineCount, cm.lineCount());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(expectedBuffer, register.text);
    +  is(register.linewise);
    +  helpers.assertCursorAt(0, lines[1].textStart);
    +});
    +testVim('dd_prefix_repeat', function(cm, vim, helpers) {
    +  cm.setCursor(0, 3);
    +  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
    +    { line: 2, ch: 0 });
    +  var expectedLineCount = cm.lineCount() - 2;
    +  helpers.doKeys('2', 'd', 'd');
    +  eq(expectedLineCount, cm.lineCount());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(expectedBuffer, register.text);
    +  is(register.linewise);
    +  helpers.assertCursorAt(0, lines[2].textStart);
    +});
    +testVim('dd_motion_repeat', function(cm, vim, helpers) {
    +  cm.setCursor(0, 3);
    +  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
    +    { line: 2, ch: 0 });
    +  var expectedLineCount = cm.lineCount() - 2;
    +  helpers.doKeys('d', '2', 'd');
    +  eq(expectedLineCount, cm.lineCount());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(expectedBuffer, register.text);
    +  is(register.linewise);
    +  helpers.assertCursorAt(0, lines[2].textStart);
    +});
    +testVim('dd_multiply_repeat', function(cm, vim, helpers) {
    +  cm.setCursor(0, 3);
    +  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
    +    { line: 6, ch: 0 });
    +  var expectedLineCount = cm.lineCount() - 6;
    +  helpers.doKeys('2', 'd', '3', 'd');
    +  eq(expectedLineCount, cm.lineCount());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(expectedBuffer, register.text);
    +  is(register.linewise);
    +  helpers.assertCursorAt(0, lines[6].textStart);
    +});
    +testVim('dd_lastline', function(cm, vim, helpers) {
    +  cm.setCursor(cm.lineCount(), 0);
    +  var expectedLineCount = cm.lineCount() - 1;
    +  helpers.doKeys('d', 'd');
    +  eq(expectedLineCount, cm.lineCount());
    +  helpers.assertCursorAt(cm.lineCount() - 1, 0);
    +});
    +// Yank commands should behave the exact same as d commands, expect that nothing
    +// gets deleted.
    +testVim('yw_repeat', function(cm, vim, helpers) {
    +  // Assert that yw does yank newline if it should go to the next line, and
    +  // that repeat works properly.
    +  var curStart = makeCursor(0, 1);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('y', '2', 'w');
    +  eq(' word1\nword2', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('word1\nword2', register.text);
    +  is(!register.linewise);
    +  eqPos(curStart, cm.getCursor());
    +}, { value: ' word1\nword2' });
    +testVim('yy_multiply_repeat', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 3);
    +  cm.setCursor(curStart);
    +  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
    +    { line: 6, ch: 0 });
    +  var expectedLineCount = cm.lineCount();
    +  helpers.doKeys('2', 'y', '3', 'y');
    +  eq(expectedLineCount, cm.lineCount());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(expectedBuffer, register.text);
    +  is(register.linewise);
    +  eqPos(curStart, cm.getCursor());
    +});
    +// Change commands behave like d commands except that it also enters insert
    +// mode. In addition, when the change is linewise, an additional newline is
    +// inserted so that insert mode starts on that line.
    +testVim('cw', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('c', '2', 'w');
    +  eq(' word3', cm.getValue());
    +  helpers.assertCursorAt(0, 0);
    +}, { value: 'word1 word2 word3'});
    +testVim('cw_repeat', function(cm, vim, helpers) {
    +  // Assert that cw does delete newline if it should go to the next line, and
    +  // that repeat works properly.
    +  var curStart = makeCursor(0, 1);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('c', '2', 'w');
    +  eq(' ', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('word1\nword2', register.text);
    +  is(!register.linewise);
    +  eqPos(curStart, cm.getCursor());
    +  eq('vim-insert', cm.getOption('keyMap'));
    +}, { value: ' word1\nword2' });
    +testVim('cc_multiply_repeat', function(cm, vim, helpers) {
    +  cm.setCursor(0, 3);
    +  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
    +    { line: 6, ch: 0 });
    +  var expectedLineCount = cm.lineCount() - 5;
    +  helpers.doKeys('2', 'c', '3', 'c');
    +  eq(expectedLineCount, cm.lineCount());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq(expectedBuffer, register.text);
    +  is(register.linewise);
    +  eq('vim-insert', cm.getOption('keyMap'));
    +});
    +testVim('cc_append', function(cm, vim, helpers) {
    +  var expectedLineCount = cm.lineCount();
    +  cm.setCursor(cm.lastLine(), 0);
    +  helpers.doKeys('c', 'c');
    +  eq(expectedLineCount, cm.lineCount());
    +});
    +// Swapcase commands edit in place and do not modify registers.
    +testVim('g~w_repeat', function(cm, vim, helpers) {
    +  // Assert that dw does delete newline if it should go to the next line, and
    +  // that repeat works properly.
    +  var curStart = makeCursor(0, 1);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('g', '~', '2', 'w');
    +  eq(' WORD1\nWORD2', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('', register.text);
    +  is(!register.linewise);
    +  eqPos(curStart, cm.getCursor());
    +}, { value: ' word1\nword2' });
    +testVim('g~g~', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 3);
    +  cm.setCursor(curStart);
    +  var expectedLineCount = cm.lineCount();
    +  var expectedValue = cm.getValue().toUpperCase();
    +  helpers.doKeys('2', 'g', '~', '3', 'g', '~');
    +  eq(expectedValue, cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('', register.text);
    +  is(!register.linewise);
    +  eqPos(curStart, cm.getCursor());
    +}, { value: ' word1\nword2\nword3\nword4\nword5\nword6' });
    +testVim('>{motion}', function(cm, vim, helpers) {
    +  cm.setCursor(1, 3);
    +  var expectedLineCount = cm.lineCount();
    +  var expectedValue = '   word1\n  word2\nword3 ';
    +  helpers.doKeys('>', 'k');
    +  eq(expectedValue, cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 3);
    +}, { value: ' word1\nword2\nword3 ', indentUnit: 2 });
    +testVim('>>', function(cm, vim, helpers) {
    +  cm.setCursor(0, 3);
    +  var expectedLineCount = cm.lineCount();
    +  var expectedValue = '   word1\n  word2\nword3 ';
    +  helpers.doKeys('2', '>', '>');
    +  eq(expectedValue, cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 3);
    +}, { value: ' word1\nword2\nword3 ', indentUnit: 2 });
    +testVim('<{motion}', function(cm, vim, helpers) {
    +  cm.setCursor(1, 3);
    +  var expectedLineCount = cm.lineCount();
    +  var expectedValue = ' word1\nword2\nword3 ';
    +  helpers.doKeys('<', 'k');
    +  eq(expectedValue, cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 1);
    +}, { value: '   word1\n  word2\nword3 ', indentUnit: 2 });
    +testVim('<<', function(cm, vim, helpers) {
    +  cm.setCursor(0, 3);
    +  var expectedLineCount = cm.lineCount();
    +  var expectedValue = ' word1\nword2\nword3 ';
    +  helpers.doKeys('2', '<', '<');
    +  eq(expectedValue, cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 1);
    +}, { value: '   word1\n  word2\nword3 ', indentUnit: 2 });
    +
    +// Edit tests
    +function testEdit(name, before, pos, edit, after) {
    +  return testVim(name, function(cm, vim, helpers) {
    +             cm.setCursor(0, before.search(pos));
    +             helpers.doKeys.apply(this, edit.split(''));
    +             eq(after, cm.getValue());
    +           }, {value: before});
    +}
    +
    +// These Delete tests effectively cover word-wise Change, Visual & Yank.
    +// Tabs are used as differentiated whitespace to catch edge cases.
    +// Normal word:
    +testEdit('diw_mid_spc', 'foo \tbAr\t baz', /A/, 'diw', 'foo \t\t baz');
    +testEdit('daw_mid_spc', 'foo \tbAr\t baz', /A/, 'daw', 'foo \tbaz');
    +testEdit('diw_mid_punct', 'foo \tbAr.\t baz', /A/, 'diw', 'foo \t.\t baz');
    +testEdit('daw_mid_punct', 'foo \tbAr.\t baz', /A/, 'daw', 'foo.\t baz');
    +testEdit('diw_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'diw', 'foo \t,.\t baz');
    +testEdit('daw_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'daw', 'foo \t,.\t baz');
    +testEdit('diw_start_spc', 'bAr \tbaz', /A/, 'diw', ' \tbaz');
    +testEdit('daw_start_spc', 'bAr \tbaz', /A/, 'daw', 'baz');
    +testEdit('diw_start_punct', 'bAr. \tbaz', /A/, 'diw', '. \tbaz');
    +testEdit('daw_start_punct', 'bAr. \tbaz', /A/, 'daw', '. \tbaz');
    +testEdit('diw_end_spc', 'foo \tbAr', /A/, 'diw', 'foo \t');
    +testEdit('daw_end_spc', 'foo \tbAr', /A/, 'daw', 'foo');
    +testEdit('diw_end_punct', 'foo \tbAr.', /A/, 'diw', 'foo \t.');
    +testEdit('daw_end_punct', 'foo \tbAr.', /A/, 'daw', 'foo.');
    +// Big word:
    +testEdit('diW_mid_spc', 'foo \tbAr\t baz', /A/, 'diW', 'foo \t\t baz');
    +testEdit('daW_mid_spc', 'foo \tbAr\t baz', /A/, 'daW', 'foo \tbaz');
    +testEdit('diW_mid_punct', 'foo \tbAr.\t baz', /A/, 'diW', 'foo \t\t baz');
    +testEdit('daW_mid_punct', 'foo \tbAr.\t baz', /A/, 'daW', 'foo \tbaz');
    +testEdit('diW_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'diW', 'foo \t\t baz');
    +testEdit('daW_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'daW', 'foo \tbaz');
    +testEdit('diW_start_spc', 'bAr\t baz', /A/, 'diW', '\t baz');
    +testEdit('daW_start_spc', 'bAr\t baz', /A/, 'daW', 'baz');
    +testEdit('diW_start_punct', 'bAr.\t baz', /A/, 'diW', '\t baz');
    +testEdit('daW_start_punct', 'bAr.\t baz', /A/, 'daW', 'baz');
    +testEdit('diW_end_spc', 'foo \tbAr', /A/, 'diW', 'foo \t');
    +testEdit('daW_end_spc', 'foo \tbAr', /A/, 'daW', 'foo');
    +testEdit('diW_end_punct', 'foo \tbAr.', /A/, 'diW', 'foo \t');
    +testEdit('daW_end_punct', 'foo \tbAr.', /A/, 'daW', 'foo');
    +
    +// Operator-motion tests
    +testVim('D', function(cm, vim, helpers) {
    +  cm.setCursor(0, 3);
    +  helpers.doKeys('D');
    +  eq(' wo\nword2\n word3', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('rd1', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 2);
    +}, { value: ' word1\nword2\n word3' });
    +testVim('C', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 3);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('C');
    +  eq(' wo\nword2\n word3', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('rd1', register.text);
    +  is(!register.linewise);
    +  eqPos(curStart, cm.getCursor());
    +  eq('vim-insert', cm.getOption('keyMap'));
    +}, { value: ' word1\nword2\n word3' });
    +testVim('Y', function(cm, vim, helpers) {
    +  var curStart = makeCursor(0, 3);
    +  cm.setCursor(curStart);
    +  helpers.doKeys('Y');
    +  eq(' word1\nword2\n word3', cm.getValue());
    +  var register = helpers.getRegisterController().getRegister();
    +  eq('rd1', register.text);
    +  is(!register.linewise);
    +  helpers.assertCursorAt(0, 3);
    +}, { value: ' word1\nword2\n word3' });
    +testVim('~', function(cm, vim, helpers) {
    +  helpers.doKeys('3', '~');
    +  eq('ABCdefg', cm.getValue());
    +  helpers.assertCursorAt(0, 3);
    +}, { value: 'abcdefg' });
    +
    +// Action tests
    +testVim('ctrl-a', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('<C-a>');
    +  eq('-9', cm.getValue());
    +  helpers.assertCursorAt(0, 1);
    +  helpers.doKeys('2','<C-a>');
    +  eq('-7', cm.getValue());
    +}, {value: '-10'});
    +testVim('ctrl-x', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('<C-x>');
    +  eq('-1', cm.getValue());
    +  helpers.assertCursorAt(0, 1);
    +  helpers.doKeys('2','<C-x>');
    +  eq('-3', cm.getValue());
    +}, {value: '0'});
    +testVim('<C-x>/<C-a> search forward', function(cm, vim, helpers) {
    +  ['<C-x>', '<C-a>'].forEach(function(key) {
    +    cm.setCursor(0, 0);
    +    helpers.doKeys(key);
    +    helpers.assertCursorAt(0, 5);
    +    helpers.doKeys('l');
    +    helpers.doKeys(key);
    +    helpers.assertCursorAt(0, 10);
    +    cm.setCursor(0, 11);
    +    helpers.doKeys(key);
    +    helpers.assertCursorAt(0, 11);
    +  });
    +}, {value: '__jmp1 jmp2 jmp'});
    +testVim('a', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('a');
    +  helpers.assertCursorAt(0, 2);
    +  eq('vim-insert', cm.getOption('keyMap'));
    +});
    +testVim('a_eol', function(cm, vim, helpers) {
    +  cm.setCursor(0, lines[0].length - 1);
    +  helpers.doKeys('a');
    +  helpers.assertCursorAt(0, lines[0].length);
    +  eq('vim-insert', cm.getOption('keyMap'));
    +});
    +testVim('i', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('i');
    +  helpers.assertCursorAt(0, 1);
    +  eq('vim-insert', cm.getOption('keyMap'));
    +});
    +testVim('i_repeat', function(cm, vim, helpers) {
    +  helpers.doKeys('3', 'i');
    +  cm.replaceRange('test', cm.getCursor());
    +  helpers.doInsertModeKeys('Esc');
    +  eq('testtesttest', cm.getValue());
    +  helpers.assertCursorAt(0, 11);
    +}, { value: '' });
    +testVim('i_repeat_delete', function(cm, vim, helpers) {
    +  cm.setCursor(0, 4);
    +  helpers.doKeys('2', 'i');
    +  cm.replaceRange('z', cm.getCursor());
    +  helpers.doInsertModeKeys('Backspace', 'Backspace', 'Esc');
    +  eq('abe', cm.getValue());
    +  helpers.assertCursorAt(0, 1);
    +}, { value: 'abcde' });
    +testVim('A', function(cm, vim, helpers) {
    +  helpers.doKeys('A');
    +  helpers.assertCursorAt(0, lines[0].length);
    +  eq('vim-insert', cm.getOption('keyMap'));
    +});
    +testVim('I', function(cm, vim, helpers) {
    +  cm.setCursor(0, 4);
    +  helpers.doKeys('I');
    +  helpers.assertCursorAt(0, lines[0].textStart);
    +  eq('vim-insert', cm.getOption('keyMap'));
    +});
    +testVim('I_repeat', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('3', 'I');
    +  cm.replaceRange('test', cm.getCursor());
    +  helpers.doInsertModeKeys('Esc');
    +  eq('testtesttestblah', cm.getValue());
    +  helpers.assertCursorAt(0, 11);
    +}, { value: 'blah' });
    +testVim('o', function(cm, vim, helpers) {
    +  cm.setCursor(0, 4);
    +  helpers.doKeys('o');
    +  eq('word1\n\nword2', cm.getValue());
    +  helpers.assertCursorAt(1, 0);
    +  eq('vim-insert', cm.getOption('keyMap'));
    +}, { value: 'word1\nword2' });
    +testVim('o_repeat', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('3', 'o');
    +  cm.replaceRange('test', cm.getCursor());
    +  helpers.doInsertModeKeys('Esc');
    +  eq('\ntest\ntest\ntest', cm.getValue());
    +  helpers.assertCursorAt(3, 3);
    +}, { value: '' });
    +testVim('O', function(cm, vim, helpers) {
    +  cm.setCursor(0, 4);
    +  helpers.doKeys('O');
    +  eq('\nword1\nword2', cm.getValue());
    +  helpers.assertCursorAt(0, 0);
    +  eq('vim-insert', cm.getOption('keyMap'));
    +}, { value: 'word1\nword2' });
    +testVim('J', function(cm, vim, helpers) {
    +  cm.setCursor(0, 4);
    +  helpers.doKeys('J');
    +  var expectedValue = 'word1  word2\nword3\n word4';
    +  eq(expectedValue, cm.getValue());
    +  helpers.assertCursorAt(0, expectedValue.indexOf('word2') - 1);
    +}, { value: 'word1 \n    word2\nword3\n word4' });
    +testVim('J_repeat', function(cm, vim, helpers) {
    +  cm.setCursor(0, 4);
    +  helpers.doKeys('3', 'J');
    +  var expectedValue = 'word1  word2 word3\n word4';
    +  eq(expectedValue, cm.getValue());
    +  helpers.assertCursorAt(0, expectedValue.indexOf('word3') - 1);
    +}, { value: 'word1 \n    word2\nword3\n word4' });
    +testVim('p', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.getRegisterController().pushText('"', 'yank', 'abc\ndef', false);
    +  helpers.doKeys('p');
    +  eq('__abc\ndef_', cm.getValue());
    +  helpers.assertCursorAt(1, 2);
    +}, { value: '___' });
    +testVim('p_register', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.getRegisterController().getRegister('a').set('abc\ndef', false);
    +  helpers.doKeys('"', 'a', 'p');
    +  eq('__abc\ndef_', cm.getValue());
    +  helpers.assertCursorAt(1, 2);
    +}, { value: '___' });
    +testVim('p_wrong_register', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.getRegisterController().getRegister('a').set('abc\ndef', false);
    +  helpers.doKeys('p');
    +  eq('___', cm.getValue());
    +  helpers.assertCursorAt(0, 1);
    +}, { value: '___' });
    +testVim('p_line', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.getRegisterController().pushText('"', 'yank', '  a\nd\n', true);
    +  helpers.doKeys('2', 'p');
    +  eq('___\n  a\nd\n  a\nd', cm.getValue());
    +  helpers.assertCursorAt(1, 2);
    +}, { value: '___' });
    +testVim('p_lastline', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.getRegisterController().pushText('"', 'yank', '  a\nd', true);
    +  helpers.doKeys('2', 'p');
    +  eq('___\n  a\nd\n  a\nd', cm.getValue());
    +  helpers.assertCursorAt(1, 2);
    +}, { value: '___' });
    +testVim('P', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.getRegisterController().pushText('"', 'yank', 'abc\ndef', false);
    +  helpers.doKeys('P');
    +  eq('_abc\ndef__', cm.getValue());
    +  helpers.assertCursorAt(1, 3);
    +}, { value: '___' });
    +testVim('P_line', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.getRegisterController().pushText('"', 'yank', '  a\nd\n', true);
    +  helpers.doKeys('2', 'P');
    +  eq('  a\nd\n  a\nd\n___', cm.getValue());
    +  helpers.assertCursorAt(0, 2);
    +}, { value: '___' });
    +testVim('r', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('3', 'r', 'u');
    +  eq('wuuuet\nanother', cm.getValue(),'3r failed');
    +  helpers.assertCursorAt(0, 3);
    +  cm.setCursor(0, 4);
    +  helpers.doKeys('v', 'j', 'h', 'r', '<Space>');
    +  eq('wuuu  \n    her', cm.getValue(),'Replacing selection by space-characters failed');
    +}, { value: 'wordet\nanother' });
    +testVim('R', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('R');
    +  helpers.assertCursorAt(0, 1);
    +  eq('vim-replace', cm.getOption('keyMap'));
    +  is(cm.state.overwrite, 'Setting overwrite state failed');
    +});
    +testVim('mark', function(cm, vim, helpers) {
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 't');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('\'', 't');
    +  helpers.assertCursorAt(2, 2);
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('`', 't');
    +  helpers.assertCursorAt(2, 2);
    +});
    +testVim('jumpToMark_next', function(cm, vim, helpers) {
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 't');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys(']', '`');
    +  helpers.assertCursorAt(2, 2);
    +  cm.setCursor(0, 0);
    +  helpers.doKeys(']', '\'');
    +  helpers.assertCursorAt(2, 0);
    +});
    +testVim('jumpToMark_next_repeat', function(cm, vim, helpers) {
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(3, 2);
    +  helpers.doKeys('m', 'b');
    +  cm.setCursor(4, 2);
    +  helpers.doKeys('m', 'c');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('2', ']', '`');
    +  helpers.assertCursorAt(3, 2);
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('2', ']', '\'');
    +  helpers.assertCursorAt(3, 1);
    +});
    +testVim('jumpToMark_next_sameline', function(cm, vim, helpers) {
    +  cm.setCursor(2, 0);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(2, 4);
    +  helpers.doKeys('m', 'b');
    +  cm.setCursor(2, 2);
    +  helpers.doKeys(']', '`');
    +  helpers.assertCursorAt(2, 4);
    +});
    +testVim('jumpToMark_next_onlyprev', function(cm, vim, helpers) {
    +  cm.setCursor(2, 0);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(4, 0);
    +  helpers.doKeys(']', '`');
    +  helpers.assertCursorAt(4, 0);
    +});
    +testVim('jumpToMark_next_nomark', function(cm, vim, helpers) {
    +  cm.setCursor(2, 2);
    +  helpers.doKeys(']', '`');
    +  helpers.assertCursorAt(2, 2);
    +  helpers.doKeys(']', '\'');
    +  helpers.assertCursorAt(2, 0);
    +});
    +testVim('jumpToMark_next_linewise_over', function(cm, vim, helpers) {
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(3, 4);
    +  helpers.doKeys('m', 'b');
    +  cm.setCursor(2, 1);
    +  helpers.doKeys(']', '\'');
    +  helpers.assertCursorAt(3, 1);
    +});
    +testVim('jumpToMark_next_action', function(cm, vim, helpers) {
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 't');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', ']', '`');
    +  helpers.assertCursorAt(0, 0);
    +  var actual = cm.getLine(0);
    +  var expected = 'pop pop 0 1 2 3 4';
    +  eq(actual, expected, "Deleting while jumping to the next mark failed.");
    +});
    +testVim('jumpToMark_next_line_action', function(cm, vim, helpers) {
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 't');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', ']', '\'');
    +  helpers.assertCursorAt(0, 1);
    +  var actual = cm.getLine(0);
    +  var expected = ' (a) [b] {c} '
    +  eq(actual, expected, "Deleting while jumping to the next mark line failed.");
    +});
    +testVim('jumpToMark_prev', function(cm, vim, helpers) {
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 't');
    +  cm.setCursor(4, 0);
    +  helpers.doKeys('[', '`');
    +  helpers.assertCursorAt(2, 2);
    +  cm.setCursor(4, 0);
    +  helpers.doKeys('[', '\'');
    +  helpers.assertCursorAt(2, 0);
    +});
    +testVim('jumpToMark_prev_repeat', function(cm, vim, helpers) {
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(3, 2);
    +  helpers.doKeys('m', 'b');
    +  cm.setCursor(4, 2);
    +  helpers.doKeys('m', 'c');
    +  cm.setCursor(5, 0);
    +  helpers.doKeys('2', '[', '`');
    +  helpers.assertCursorAt(3, 2);
    +  cm.setCursor(5, 0);
    +  helpers.doKeys('2', '[', '\'');
    +  helpers.assertCursorAt(3, 1);
    +});
    +testVim('jumpToMark_prev_sameline', function(cm, vim, helpers) {
    +  cm.setCursor(2, 0);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(2, 4);
    +  helpers.doKeys('m', 'b');
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('[', '`');
    +  helpers.assertCursorAt(2, 0);
    +});
    +testVim('jumpToMark_prev_onlynext', function(cm, vim, helpers) {
    +  cm.setCursor(4, 4);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(2, 0);
    +  helpers.doKeys('[', '`');
    +  helpers.assertCursorAt(2, 0);
    +});
    +testVim('jumpToMark_prev_nomark', function(cm, vim, helpers) {
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('[', '`');
    +  helpers.assertCursorAt(2, 2);
    +  helpers.doKeys('[', '\'');
    +  helpers.assertCursorAt(2, 0);
    +});
    +testVim('jumpToMark_prev_linewise_over', function(cm, vim, helpers) {
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(3, 4);
    +  helpers.doKeys('m', 'b');
    +  cm.setCursor(3, 6);
    +  helpers.doKeys('[', '\'');
    +  helpers.assertCursorAt(2, 0);
    +});
    +testVim('delmark_single', function(cm, vim, helpers) {
    +  cm.setCursor(1, 2);
    +  helpers.doKeys('m', 't');
    +  helpers.doEx('delmarks t');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('`', 't');
    +  helpers.assertCursorAt(0, 0);
    +});
    +testVim('delmark_range', function(cm, vim, helpers) {
    +  cm.setCursor(1, 2);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 'b');
    +  cm.setCursor(3, 2);
    +  helpers.doKeys('m', 'c');
    +  cm.setCursor(4, 2);
    +  helpers.doKeys('m', 'd');
    +  cm.setCursor(5, 2);
    +  helpers.doKeys('m', 'e');
    +  helpers.doEx('delmarks b-d');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('`', 'a');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'b');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'c');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'd');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'e');
    +  helpers.assertCursorAt(5, 2);
    +});
    +testVim('delmark_multi', function(cm, vim, helpers) {
    +  cm.setCursor(1, 2);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 'b');
    +  cm.setCursor(3, 2);
    +  helpers.doKeys('m', 'c');
    +  cm.setCursor(4, 2);
    +  helpers.doKeys('m', 'd');
    +  cm.setCursor(5, 2);
    +  helpers.doKeys('m', 'e');
    +  helpers.doEx('delmarks bcd');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('`', 'a');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'b');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'c');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'd');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'e');
    +  helpers.assertCursorAt(5, 2);
    +});
    +testVim('delmark_multi_space', function(cm, vim, helpers) {
    +  cm.setCursor(1, 2);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 'b');
    +  cm.setCursor(3, 2);
    +  helpers.doKeys('m', 'c');
    +  cm.setCursor(4, 2);
    +  helpers.doKeys('m', 'd');
    +  cm.setCursor(5, 2);
    +  helpers.doKeys('m', 'e');
    +  helpers.doEx('delmarks b c d');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('`', 'a');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'b');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'c');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'd');
    +  helpers.assertCursorAt(1, 2);
    +  helpers.doKeys('`', 'e');
    +  helpers.assertCursorAt(5, 2);
    +});
    +testVim('delmark_all', function(cm, vim, helpers) {
    +  cm.setCursor(1, 2);
    +  helpers.doKeys('m', 'a');
    +  cm.setCursor(2, 2);
    +  helpers.doKeys('m', 'b');
    +  cm.setCursor(3, 2);
    +  helpers.doKeys('m', 'c');
    +  cm.setCursor(4, 2);
    +  helpers.doKeys('m', 'd');
    +  cm.setCursor(5, 2);
    +  helpers.doKeys('m', 'e');
    +  helpers.doEx('delmarks a b-de');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('`', 'a');
    +  helpers.assertCursorAt(0, 0);
    +  helpers.doKeys('`', 'b');
    +  helpers.assertCursorAt(0, 0);
    +  helpers.doKeys('`', 'c');
    +  helpers.assertCursorAt(0, 0);
    +  helpers.doKeys('`', 'd');
    +  helpers.assertCursorAt(0, 0);
    +  helpers.doKeys('`', 'e');
    +  helpers.assertCursorAt(0, 0);
    +});
    +testVim('visual', function(cm, vim, helpers) {
    +  helpers.doKeys('l', 'v', 'l', 'l');
    +  helpers.assertCursorAt(0, 3);
    +  eqPos(makeCursor(0, 1), cm.getCursor('anchor'));
    +  helpers.doKeys('d');
    +  eq('15', cm.getValue());
    +}, { value: '12345' });
    +testVim('visual_line', function(cm, vim, helpers) {
    +  helpers.doKeys('l', 'V', 'l', 'j', 'j', 'd');
    +  eq(' 4\n 5', cm.getValue());
    +}, { value: ' 1\n 2\n 3\n 4\n 5' });
    +testVim('visual_marks', function(cm, vim, helpers) {
    +  helpers.doKeys('l', 'v', 'l', 'l', 'v');
    +  // Test visual mode marks
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('\'', '<');
    +  helpers.assertCursorAt(0, 1);
    +  helpers.doKeys('\'', '>');
    +  helpers.assertCursorAt(0, 3);
    +});
    +testVim('visual_join', function(cm, vim, helpers) {
    +  helpers.doKeys('l', 'V', 'l', 'j', 'j', 'J');
    +  eq(' 1 2 3\n 4\n 5', cm.getValue());
    +}, { value: ' 1\n 2\n 3\n 4\n 5' });
    +testVim('visual_blank', function(cm, vim, helpers) {
    +  helpers.doKeys('v', 'k');
    +  eq(vim.visualMode, true);
    +}, { value: '\n' });
    +testVim('s_normal', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('s');
    +  helpers.doInsertModeKeys('Esc');
    +  helpers.assertCursorAt(0, 0);
    +  eq('ac', cm.getValue());
    +}, { value: 'abc'});
    +testVim('s_visual', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('v', 's');
    +  helpers.doInsertModeKeys('Esc');
    +  helpers.assertCursorAt(0, 0);
    +  eq('ac', cm.getValue());
    +}, { value: 'abc'});
    +testVim('S_normal', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('j', 'S');
    +  helpers.doInsertModeKeys('Esc');
    +  helpers.assertCursorAt(1, 0);
    +  eq('aa\n\ncc', cm.getValue());
    +}, { value: 'aa\nbb\ncc'});
    +testVim('S_visual', function(cm, vim, helpers) {
    +  cm.setCursor(0, 1);
    +  helpers.doKeys('v', 'j', 'S');
    +  helpers.doInsertModeKeys('Esc');
    +  helpers.assertCursorAt(0, 0);
    +  eq('\ncc', cm.getValue());
    +}, { value: 'aa\nbb\ncc'});
    +testVim('/ and n/N', function(cm, vim, helpers) {
    +  cm.openDialog = helpers.fakeOpenDialog('match');
    +  helpers.doKeys('/');
    +  helpers.assertCursorAt(0, 11);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(1, 6);
    +  helpers.doKeys('N');
    +  helpers.assertCursorAt(0, 11);
    +
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('2', '/');
    +  helpers.assertCursorAt(1, 6);
    +}, { value: 'match nope match \n nope Match' });
    +testVim('/_case', function(cm, vim, helpers) {
    +  cm.openDialog = helpers.fakeOpenDialog('Match');
    +  helpers.doKeys('/');
    +  helpers.assertCursorAt(1, 6);
    +}, { value: 'match nope match \n nope Match' });
    +testVim('/_nongreedy', function(cm, vim, helpers) {
    +  cm.openDialog = helpers.fakeOpenDialog('aa');
    +  helpers.doKeys('/');
    +  helpers.assertCursorAt(0, 4);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(1, 3);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 0);
    +}, { value: 'aaa aa \n a aa'});
    +testVim('?_nongreedy', function(cm, vim, helpers) {
    +  cm.openDialog = helpers.fakeOpenDialog('aa');
    +  helpers.doKeys('?');
    +  helpers.assertCursorAt(1, 3);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 4);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 0);
    +}, { value: 'aaa aa \n a aa'});
    +testVim('/_greedy', function(cm, vim, helpers) {
    +  cm.openDialog = helpers.fakeOpenDialog('a+');
    +  helpers.doKeys('/');
    +  helpers.assertCursorAt(0, 4);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(1, 1);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(1, 3);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 0);
    +}, { value: 'aaa aa \n a aa'});
    +testVim('?_greedy', function(cm, vim, helpers) {
    +  cm.openDialog = helpers.fakeOpenDialog('a+');
    +  helpers.doKeys('?');
    +  helpers.assertCursorAt(1, 3);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(1, 1);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 4);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 0);
    +}, { value: 'aaa aa \n a aa'});
    +testVim('/_greedy_0_or_more', function(cm, vim, helpers) {
    +  cm.openDialog = helpers.fakeOpenDialog('a*');
    +  helpers.doKeys('/');
    +  helpers.assertCursorAt(0, 3);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 4);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 5);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(1, 0);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(1, 1);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 0);
    +}, { value: 'aaa  aa\n aa'});
    +testVim('?_greedy_0_or_more', function(cm, vim, helpers) {
    +  cm.openDialog = helpers.fakeOpenDialog('a*');
    +  helpers.doKeys('?');
    +  helpers.assertCursorAt(1, 1);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(1, 0);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 5);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 4);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 3);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 0);
    +}, { value: 'aaa  aa\n aa'});
    +testVim('? and n/N', function(cm, vim, helpers) {
    +  cm.openDialog = helpers.fakeOpenDialog('match');
    +  helpers.doKeys('?');
    +  helpers.assertCursorAt(1, 6);
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 11);
    +  helpers.doKeys('N');
    +  helpers.assertCursorAt(1, 6);
    +
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('2', '?');
    +  helpers.assertCursorAt(0, 11);
    +}, { value: 'match nope match \n nope Match' });
    +testVim('*', function(cm, vim, helpers) {
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('*');
    +  helpers.assertCursorAt(0, 22);
    +
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('2', '*');
    +  helpers.assertCursorAt(1, 8);
    +}, { value: 'nomatch match nomatch match \nnomatch Match' });
    +testVim('*_no_word', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('*');
    +  helpers.assertCursorAt(0, 0);
    +}, { value: ' \n match \n' });
    +testVim('*_symbol', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('*');
    +  helpers.assertCursorAt(1, 0);
    +}, { value: ' /}\n/} match \n' });
    +testVim('#', function(cm, vim, helpers) {
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('#');
    +  helpers.assertCursorAt(1, 8);
    +
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('2', '#');
    +  helpers.assertCursorAt(0, 22);
    +}, { value: 'nomatch match nomatch match \nnomatch Match' });
    +testVim('*_seek', function(cm, vim, helpers) {
    +  // Should skip over space and symbols.
    +  cm.setCursor(0, 3);
    +  helpers.doKeys('*');
    +  helpers.assertCursorAt(0, 22);
    +}, { value: '    :=  match nomatch match \nnomatch Match' });
    +testVim('#', function(cm, vim, helpers) {
    +  // Should skip over space and symbols.
    +  cm.setCursor(0, 3);
    +  helpers.doKeys('#');
    +  helpers.assertCursorAt(1, 8);
    +}, { value: '    :=  match nomatch match \nnomatch Match' });
    +testVim('.', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('2', 'd', 'w');
    +  helpers.doKeys('.');
    +  eq('5 6', cm.getValue());
    +}, { value: '1 2 3 4 5 6'});
    +testVim('._repeat', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('2', 'd', 'w');
    +  helpers.doKeys('3', '.');
    +  eq('6', cm.getValue());
    +}, { value: '1 2 3 4 5 6'});
    +testVim('._insert', function(cm, vim, helpers) {
    +  helpers.doKeys('i');
    +  cm.replaceRange('test', cm.getCursor());
    +  helpers.doInsertModeKeys('Esc');
    +  helpers.doKeys('.');
    +  eq('testestt', cm.getValue());
    +  helpers.assertCursorAt(0, 6);
    +}, { value: ''});
    +testVim('._insert_repeat', function(cm, vim, helpers) {
    +  helpers.doKeys('i');
    +  cm.replaceRange('test', cm.getCursor());
    +  cm.setCursor(0, 4);
    +  helpers.doInsertModeKeys('Esc');
    +  helpers.doKeys('2', '.');
    +  eq('testesttestt', cm.getValue());
    +  helpers.assertCursorAt(0, 10);
    +}, { value: ''});
    +testVim('._repeat_insert', function(cm, vim, helpers) {
    +  helpers.doKeys('3', 'i');
    +  cm.replaceRange('te', cm.getCursor());
    +  cm.setCursor(0, 2);
    +  helpers.doInsertModeKeys('Esc');
    +  helpers.doKeys('.');
    +  eq('tetettetetee', cm.getValue());
    +  helpers.assertCursorAt(0, 10);
    +}, { value: ''});
    +testVim('._insert_o', function(cm, vim, helpers) {
    +  helpers.doKeys('o');
    +  cm.replaceRange('z', cm.getCursor());
    +  cm.setCursor(1, 1);
    +  helpers.doInsertModeKeys('Esc');
    +  helpers.doKeys('.');
    +  eq('\nz\nz', cm.getValue());
    +  helpers.assertCursorAt(2, 0);
    +}, { value: ''});
    +testVim('._insert_o_repeat', function(cm, vim, helpers) {
    +  helpers.doKeys('o');
    +  cm.replaceRange('z', cm.getCursor());
    +  helpers.doInsertModeKeys('Esc');
    +  cm.setCursor(1, 0);
    +  helpers.doKeys('2', '.');
    +  eq('\nz\nz\nz', cm.getValue());
    +  helpers.assertCursorAt(3, 0);
    +}, { value: ''});
    +testVim('._insert_o_indent', function(cm, vim, helpers) {
    +  helpers.doKeys('o');
    +  cm.replaceRange('z', cm.getCursor());
    +  helpers.doInsertModeKeys('Esc');
    +  cm.setCursor(1, 2);
    +  helpers.doKeys('.');
    +  eq('{\n  z\n  z', cm.getValue());
    +  helpers.assertCursorAt(2, 2);
    +}, { value: '{'});
    +testVim('._insert_cw', function(cm, vim, helpers) {
    +  helpers.doKeys('c', 'w');
    +  cm.replaceRange('test', cm.getCursor());
    +  helpers.doInsertModeKeys('Esc');
    +  cm.setCursor(0, 3);
    +  helpers.doKeys('2', 'l');
    +  helpers.doKeys('.');
    +  eq('test test word3', cm.getValue());
    +  helpers.assertCursorAt(0, 8);
    +}, { value: 'word1 word2 word3' });
    +testVim('._insert_cw_repeat', function(cm, vim, helpers) {
    +  // For some reason, repeat cw in desktop VIM will does not repeat insert mode
    +  // changes. Will conform to that behavior.
    +  helpers.doKeys('c', 'w');
    +  cm.replaceRange('test', cm.getCursor());
    +  helpers.doInsertModeKeys('Esc');
    +  cm.setCursor(0, 4);
    +  helpers.doKeys('l');
    +  helpers.doKeys('2', '.');
    +  eq('test test', cm.getValue());
    +  helpers.assertCursorAt(0, 8);
    +}, { value: 'word1 word2 word3' });
    +testVim('._delete', function(cm, vim, helpers) {
    +  cm.setCursor(0, 5);
    +  helpers.doKeys('i');
    +  helpers.doInsertModeKeys('Backspace', 'Esc');
    +  helpers.doKeys('.');
    +  eq('zace', cm.getValue());
    +  helpers.assertCursorAt(0, 1);
    +}, { value: 'zabcde'});
    +testVim('._delete_repeat', function(cm, vim, helpers) {
    +  cm.setCursor(0, 6);
    +  helpers.doKeys('i');
    +  helpers.doInsertModeKeys('Backspace', 'Esc');
    +  helpers.doKeys('2', '.');
    +  eq('zzce', cm.getValue());
    +  helpers.assertCursorAt(0, 1);
    +}, { value: 'zzabcde'});
    +testVim('f;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('f', 'x');
    +  helpers.doKeys(';');
    +  helpers.doKeys('2', ';');
    +  eq(9, cm.getCursor().ch);
    +}, { value: '01x3xx678x'});
    +testVim('F;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 8);
    +  helpers.doKeys('F', 'x');
    +  helpers.doKeys(';');
    +  helpers.doKeys('2', ';');
    +  eq(2, cm.getCursor().ch);
    +}, { value: '01x3xx6x8x'});
    +testVim('t;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('t', 'x');
    +  helpers.doKeys(';');
    +  helpers.doKeys('2', ';');
    +  eq(8, cm.getCursor().ch);
    +}, { value: '01x3xx678x'});
    +testVim('T;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('T', 'x');
    +  helpers.doKeys(';');
    +  helpers.doKeys('2', ';');
    +  eq(2, cm.getCursor().ch);
    +}, { value: '0xx3xx678x'});
    +testVim('f,', function(cm, vim, helpers) {
    +  cm.setCursor(0, 6);
    +  helpers.doKeys('f', 'x');
    +  helpers.doKeys(',');
    +  helpers.doKeys('2', ',');
    +  eq(2, cm.getCursor().ch);
    +}, { value: '01x3xx678x'});
    +testVim('F,', function(cm, vim, helpers) {
    +  cm.setCursor(0, 3);
    +  helpers.doKeys('F', 'x');
    +  helpers.doKeys(',');
    +  helpers.doKeys('2', ',');
    +  eq(9, cm.getCursor().ch);
    +}, { value: '01x3xx678x'});
    +testVim('t,', function(cm, vim, helpers) {
    +  cm.setCursor(0, 6);
    +  helpers.doKeys('t', 'x');
    +  helpers.doKeys(',');
    +  helpers.doKeys('2', ',');
    +  eq(3, cm.getCursor().ch);
    +}, { value: '01x3xx678x'});
    +testVim('T,', function(cm, vim, helpers) {
    +  cm.setCursor(0, 4);
    +  helpers.doKeys('T', 'x');
    +  helpers.doKeys(',');
    +  helpers.doKeys('2', ',');
    +  eq(8, cm.getCursor().ch);
    +}, { value: '01x3xx67xx'});
    +testVim('fd,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('f', '4');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', ';');
    +  eq('56789', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('d', ',');
    +  eq('01239', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('Fd,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('F', '4');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('d', ';');
    +  eq('01239', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', ',');
    +  eq('56789', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('td,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('t', '4');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', ';');
    +  eq('456789', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('d', ',');
    +  eq('012349', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('Td,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('T', '4');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('d', ';');
    +  eq('012349', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('d', ',');
    +  eq('456789', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('fc,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('f', '4');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('c', ';', 'Esc');
    +  eq('56789', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('c', ',');
    +  eq('01239', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('Fc,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('F', '4');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('c', ';', 'Esc');
    +  eq('01239', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('c', ',');
    +  eq('56789', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('tc,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('t', '4');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('c', ';', 'Esc');
    +  eq('456789', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('c', ',');
    +  eq('012349', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('Tc,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('T', '4');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('c', ';', 'Esc');
    +  eq('012349', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('c', ',');
    +  eq('456789', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('fy,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('f', '4');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('y', ';', 'P');
    +  eq('012340123456789', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('y', ',', 'P');
    +  eq('012345678456789', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('Fy,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('F', '4');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('y', ';', 'p');
    +  eq('012345678945678', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('y', ',', 'P');
    +  eq('012340123456789', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('ty,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('t', '4');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('y', ';', 'P');
    +  eq('01230123456789', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('y', ',', 'p');
    +  eq('01234567895678', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('Ty,;', function(cm, vim, helpers) {
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('T', '4');
    +  cm.setCursor(0, 9);
    +  helpers.doKeys('y', ';', 'p');
    +  eq('01234567895678', cm.getValue());
    +  helpers.doKeys('u');
    +  cm.setCursor(0, 0);
    +  helpers.doKeys('y', ',', 'P');
    +  eq('01230123456789', cm.getValue());
    +}, { value: '0123456789'});
    +testVim('HML', function(cm, vim, helpers) {
    +  var lines = 35;
    +  var textHeight = cm.defaultTextHeight();
    +  cm.setSize(600, lines*textHeight);
    +  cm.setCursor(120, 0);
    +  helpers.doKeys('H');
    +  helpers.assertCursorAt(86, 2);
    +  helpers.doKeys('L');
    +  helpers.assertCursorAt(120, 4);
    +  helpers.doKeys('M');
    +  helpers.assertCursorAt(103,4);
    +}, { value: (function(){
    +  var lines = new Array(100);
    +  var upper = '  xx\n';
    +  var lower = '    xx\n';
    +  upper = lines.join(upper);
    +  lower = lines.join(lower);
    +  return upper + lower;
    +})()});
    +
    +var zVals = ['zb','zz','zt','z-','z.','z<CR>'].map(function(e, idx){
    +  var lineNum = 250;
    +  var lines = 35;
    +  testVim(e, function(cm, vim, helpers) {
    +    var k1 = e[0];
    +    var k2 = e.substring(1);
    +    var textHeight = cm.defaultTextHeight();
    +    cm.setSize(600, lines*textHeight);
    +    cm.setCursor(lineNum, 0);
    +    helpers.doKeys(k1, k2);
    +    zVals[idx] = cm.getScrollInfo().top;
    +  }, { value: (function(){
    +    return new Array(500).join('\n');
    +  })()});
    +});
    +testVim('zb<zz', function(cm, vim, helpers){
    +  eq(zVals[0]<zVals[1], true);
    +});
    +testVim('zz<zt', function(cm, vim, helpers){
    +  eq(zVals[1]<zVals[2], true);
    +});
    +testVim('zb==z-', function(cm, vim, helpers){
    +  eq(zVals[0], zVals[3]);
    +});
    +testVim('zz==z.', function(cm, vim, helpers){
    +  eq(zVals[1], zVals[4]);
    +});
    +testVim('zt==z<CR>', function(cm, vim, helpers){
    +  eq(zVals[2], zVals[5]);
    +});
    +
    +var squareBracketMotionSandbox = ''+
    +  '({\n'+//0
    +  '  ({\n'+//11
    +  '  /*comment {\n'+//2
    +  '            */(\n'+//3
    +  '#else                \n'+//4
    +  '  /*       )\n'+//5
    +  '#if        }\n'+//6
    +  '  )}*/\n'+//7
    +  ')}\n'+//8
    +  '{}\n'+//9
    +  '#else {{\n'+//10
    +  '{}\n'+//11
    +  '}\n'+//12
    +  '{\n'+//13
    +  '#endif\n'+//14
    +  '}\n'+//15
    +  '}\n'+//16
    +  '#else';//17
    +testVim('[[, ]]', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys(']', ']');
    +  helpers.assertCursorAt(9,0);
    +  helpers.doKeys('2', ']', ']');
    +  helpers.assertCursorAt(13,0);
    +  helpers.doKeys(']', ']');
    +  helpers.assertCursorAt(17,0);
    +  helpers.doKeys('[', '[');
    +  helpers.assertCursorAt(13,0);
    +  helpers.doKeys('2', '[', '[');
    +  helpers.assertCursorAt(9,0);
    +  helpers.doKeys('[', '[');
    +  helpers.assertCursorAt(0,0);
    +}, { value: squareBracketMotionSandbox});
    +testVim('[], ][', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doKeys(']', '[');
    +  helpers.assertCursorAt(12,0);
    +  helpers.doKeys('2', ']', '[');
    +  helpers.assertCursorAt(16,0);
    +  helpers.doKeys(']', '[');
    +  helpers.assertCursorAt(17,0);
    +  helpers.doKeys('[', ']');
    +  helpers.assertCursorAt(16,0);
    +  helpers.doKeys('2', '[', ']');
    +  helpers.assertCursorAt(12,0);
    +  helpers.doKeys('[', ']');
    +  helpers.assertCursorAt(0,0);
    +}, { value: squareBracketMotionSandbox});
    +testVim('[{, ]}', function(cm, vim, helpers) {
    +  cm.setCursor(4, 10);
    +  helpers.doKeys('[', '{');
    +  helpers.assertCursorAt(2,12);
    +  helpers.doKeys('2', '[', '{');
    +  helpers.assertCursorAt(0,1);
    +  cm.setCursor(4, 10);
    +  helpers.doKeys(']', '}');
    +  helpers.assertCursorAt(6,11);
    +  helpers.doKeys('2', ']', '}');
    +  helpers.assertCursorAt(8,1);
    +  cm.setCursor(0,1);
    +  helpers.doKeys(']', '}');
    +  helpers.assertCursorAt(8,1);
    +  helpers.doKeys('[', '{');
    +  helpers.assertCursorAt(0,1);
    +}, { value: squareBracketMotionSandbox});
    +testVim('[(, ])', function(cm, vim, helpers) {
    +  cm.setCursor(4, 10);
    +  helpers.doKeys('[', '(');
    +  helpers.assertCursorAt(3,14);
    +  helpers.doKeys('2', '[', '(');
    +  helpers.assertCursorAt(0,0);
    +  cm.setCursor(4, 10);
    +  helpers.doKeys(']', ')');
    +  helpers.assertCursorAt(5,11);
    +  helpers.doKeys('2', ']', ')');
    +  helpers.assertCursorAt(8,0);
    +  helpers.doKeys('[', '(');
    +  helpers.assertCursorAt(0,0);
    +  helpers.doKeys(']', ')');
    +  helpers.assertCursorAt(8,0);
    +}, { value: squareBracketMotionSandbox});
    +testVim('[*, ]*, [/, ]/', function(cm, vim, helpers) {
    +  ['*', '/'].forEach(function(key){
    +    cm.setCursor(7, 0);
    +    helpers.doKeys('2', '[', key);
    +    helpers.assertCursorAt(2,2);
    +    helpers.doKeys('2', ']', key);
    +    helpers.assertCursorAt(7,5);
    +  });
    +}, { value: squareBracketMotionSandbox});
    +testVim('[#, ]#', function(cm, vim, helpers) {
    +  cm.setCursor(10, 3);
    +  helpers.doKeys('2', '[', '#');
    +  helpers.assertCursorAt(4,0);
    +  helpers.doKeys('5', ']', '#');
    +  helpers.assertCursorAt(17,0);
    +  cm.setCursor(10, 3);
    +  helpers.doKeys(']', '#');
    +  helpers.assertCursorAt(14,0);
    +}, { value: squareBracketMotionSandbox});
    +testVim('[m, ]m, [M, ]M', function(cm, vim, helpers) {
    +  cm.setCursor(11, 0);
    +  helpers.doKeys('[', 'm');
    +  helpers.assertCursorAt(10,7);
    +  helpers.doKeys('4', '[', 'm');
    +  helpers.assertCursorAt(1,3);
    +  helpers.doKeys('5', ']', 'm');
    +  helpers.assertCursorAt(11,0);
    +  helpers.doKeys('[', 'M');
    +  helpers.assertCursorAt(9,1);
    +  helpers.doKeys('3', ']', 'M');
    +  helpers.assertCursorAt(15,0);
    +  helpers.doKeys('5', '[', 'M');
    +  helpers.assertCursorAt(7,3);
    +}, { value: squareBracketMotionSandbox});
    +
    +// Ex mode tests
    +testVim('ex_go_to_line', function(cm, vim, helpers) {
    +  cm.setCursor(0, 0);
    +  helpers.doEx('4');
    +  helpers.assertCursorAt(3, 0);
    +}, { value: 'a\nb\nc\nd\ne\n'});
    +testVim('ex_write', function(cm, vim, helpers) {
    +  var tmp = CodeMirror.commands.save;
    +  var written;
    +  var actualCm;
    +  CodeMirror.commands.save = function(cm) {
    +    written = true;
    +    actualCm = cm;
    +  };
    +  // Test that w, wr, wri ... write all trigger :write.
    +  var command = 'write';
    +  for (var i = 1; i < command.length; i++) {
    +    written = false;
    +    actualCm = null;
    +    helpers.doEx(command.substring(0, i));
    +    eq(written, true);
    +    eq(actualCm, cm);
    +  }
    +  CodeMirror.commands.save = tmp;
    +});
    +testVim('ex_sort', function(cm, vim, helpers) {
    +  helpers.doEx('sort');
    +  eq('Z\na\nb\nc\nd', cm.getValue());
    +}, { value: 'b\nZ\nd\nc\na'});
    +testVim('ex_sort_reverse', function(cm, vim, helpers) {
    +  helpers.doEx('sort!');
    +  eq('d\nc\nb\na', cm.getValue());
    +}, { value: 'b\nd\nc\na'});
    +testVim('ex_sort_range', function(cm, vim, helpers) {
    +  helpers.doEx('2,3sort');
    +  eq('b\nc\nd\na', cm.getValue());
    +}, { value: 'b\nd\nc\na'});
    +testVim('ex_sort_oneline', function(cm, vim, helpers) {
    +  helpers.doEx('2sort');
    +  // Expect no change.
    +  eq('b\nd\nc\na', cm.getValue());
    +}, { value: 'b\nd\nc\na'});
    +testVim('ex_sort_ignoreCase', function(cm, vim, helpers) {
    +  helpers.doEx('sort i');
    +  eq('a\nb\nc\nd\nZ', cm.getValue());
    +}, { value: 'b\nZ\nd\nc\na'});
    +testVim('ex_sort_unique', function(cm, vim, helpers) {
    +  helpers.doEx('sort u');
    +  eq('Z\na\nb\nc\nd', cm.getValue());
    +}, { value: 'b\nZ\na\na\nd\na\nc\na'});
    +testVim('ex_sort_decimal', function(cm, vim, helpers) {
    +  helpers.doEx('sort d');
    +  eq('d3\n s5\n6\n.9', cm.getValue());
    +}, { value: '6\nd3\n s5\n.9'});
    +testVim('ex_sort_decimal_negative', function(cm, vim, helpers) {
    +  helpers.doEx('sort d');
    +  eq('z-9\nd3\n s5\n6\n.9', cm.getValue());
    +}, { value: '6\nd3\n s5\n.9\nz-9'});
    +testVim('ex_sort_decimal_reverse', function(cm, vim, helpers) {
    +  helpers.doEx('sort! d');
    +  eq('.9\n6\n s5\nd3', cm.getValue());
    +}, { value: '6\nd3\n s5\n.9'});
    +testVim('ex_sort_hex', function(cm, vim, helpers) {
    +  helpers.doEx('sort x');
    +  eq(' s5\n6\n.9\n&0xB\nd3', cm.getValue());
    +}, { value: '6\nd3\n s5\n&0xB\n.9'});
    +testVim('ex_sort_octal', function(cm, vim, helpers) {
    +  helpers.doEx('sort o');
    +  eq('.8\n.9\nd3\n s5\n6', cm.getValue());
    +}, { value: '6\nd3\n s5\n.9\n.8'});
    +testVim('ex_sort_decimal_mixed', function(cm, vim, helpers) {
    +  helpers.doEx('sort d');
    +  eq('y\nz\nc1\nb2\na3', cm.getValue());
    +}, { value: 'a3\nz\nc1\ny\nb2'});
    +testVim('ex_sort_decimal_mixed_reverse', function(cm, vim, helpers) {
    +  helpers.doEx('sort! d');
    +  eq('a3\nb2\nc1\nz\ny', cm.getValue());
    +}, { value: 'a3\nz\nc1\ny\nb2'});
    +testVim('ex_substitute_same_line', function(cm, vim, helpers) {
    +  cm.setCursor(1, 0);
    +  helpers.doEx('s/one/two');
    +  eq('one one\n two two', cm.getValue());
    +}, { value: 'one one\n one one'});
    +testVim('ex_substitute_global', function(cm, vim, helpers) {
    +  cm.setCursor(1, 0);
    +  helpers.doEx('%s/one/two');
    +  eq('two two\n two two', cm.getValue());
    +}, { value: 'one one\n one one'});
    +testVim('ex_substitute_input_range', function(cm, vim, helpers) {
    +  cm.setCursor(1, 0);
    +  helpers.doEx('1,3s/\\d/0');
    +  eq('0\n0\n0\n4', cm.getValue());
    +}, { value: '1\n2\n3\n4' });
    +testVim('ex_substitute_visual_range', function(cm, vim, helpers) {
    +  cm.setCursor(1, 0);
    +  // Set last visual mode selection marks '< and '> at lines 2 and 4
    +  helpers.doKeys('V', '2', 'j', 'v');
    +  helpers.doEx('\'<,\'>s/\\d/0');
    +  eq('1\n0\n0\n0\n5', cm.getValue());
    +}, { value: '1\n2\n3\n4\n5' });
    +testVim('ex_substitute_capture', function(cm, vim, helpers) {
    +  cm.setCursor(1, 0);
    +  helpers.doEx('s/(\\d+)/$1$1/')
    +  eq('a1111 a1212 a1313', cm.getValue());
    +}, { value: 'a11 a12 a13' });
    +testVim('ex_substitute_empty_query', function(cm, vim, helpers) {
    +  // If the query is empty, use last query.
    +  cm.setCursor(1, 0);
    +  cm.openDialog = helpers.fakeOpenDialog('1');
    +  helpers.doKeys('/');
    +  helpers.doEx('s//b');
    +  eq('abb ab2 ab3', cm.getValue());
    +}, { value: 'a11 a12 a13' });
    +testVim('ex_substitute_count', function(cm, vim, helpers) {
    +  cm.setCursor(1, 0);
    +  helpers.doEx('s/\\d/0/i 2');
    +  eq('1\n0\n0\n4', cm.getValue());
    +}, { value: '1\n2\n3\n4' });
    +testVim('ex_substitute_count_with_range', function(cm, vim, helpers) {
    +  cm.setCursor(1, 0);
    +  helpers.doEx('1,3s/\\d/0/ 3');
    +  eq('1\n2\n0\n0', cm.getValue());
    +}, { value: '1\n2\n3\n4' });
    +function testSubstituteConfirm(name, command, initialValue, expectedValue, keys, finalPos) {
    +  testVim(name, function(cm, vim, helpers) {
    +    var savedOpenDialog = cm.openDialog;
    +    var savedKeyName = CodeMirror.keyName;
    +    var onKeyDown;
    +    var recordedCallback;
    +    var closed = true; // Start out closed, set false on second openDialog.
    +    function close() {
    +      closed = true;
    +    }
    +    // First openDialog should save callback.
    +    cm.openDialog = function(template, callback, options) {
    +      recordedCallback = callback;
    +    }
    +    // Do first openDialog.
    +    helpers.doKeys(':');
    +    // Second openDialog should save keyDown handler.
    +    cm.openDialog = function(template, callback, options) {
    +      onKeyDown = options.onKeyDown;
    +      closed = false;
    +    };
    +    // Return the command to Vim and trigger second openDialog.
    +    recordedCallback(command);
    +    // The event should really use keyCode, but here just mock it out and use
    +    // key and replace keyName to just return key.
    +    CodeMirror.keyName = function (e) { return e.key; }
    +    keys = keys.toUpperCase();
    +    for (var i = 0; i < keys.length; i++) {
    +      is(!closed);
    +      onKeyDown({ key: keys.charAt(i) }, '', close);
    +    }
    +    try {
    +      eq(expectedValue, cm.getValue());
    +      helpers.assertCursorAt(finalPos);
    +      is(closed);
    +    } catch(e) {
    +      throw e
    +    } finally {
    +      // Restore overriden functions.
    +      CodeMirror.keyName = savedKeyName;
    +      cm.openDialog = savedOpenDialog;
    +    }
    +  }, { value: initialValue });
    +};
    +testSubstituteConfirm('ex_substitute_confirm_emptydoc',
    +    '%s/x/b/c', '', '', '', makeCursor(0, 0));
    +testSubstituteConfirm('ex_substitute_confirm_nomatch',
    +    '%s/x/b/c', 'ba a\nbab', 'ba a\nbab', '', makeCursor(0, 0));
    +testSubstituteConfirm('ex_substitute_confirm_accept',
    +    '%s/a/b/c', 'ba a\nbab', 'bb b\nbbb', 'yyy', makeCursor(1, 1));
    +testSubstituteConfirm('ex_substitute_confirm_random_keys',
    +    '%s/a/b/c', 'ba a\nbab', 'bb b\nbbb', 'ysdkywerty', makeCursor(1, 1));
    +testSubstituteConfirm('ex_substitute_confirm_some',
    +    '%s/a/b/c', 'ba a\nbab', 'bb a\nbbb', 'yny', makeCursor(1, 1));
    +testSubstituteConfirm('ex_substitute_confirm_all',
    +    '%s/a/b/c', 'ba a\nbab', 'bb b\nbbb', 'a', makeCursor(1, 1));
    +testSubstituteConfirm('ex_substitute_confirm_accept_then_all',
    +    '%s/a/b/c', 'ba a\nbab', 'bb b\nbbb', 'ya', makeCursor(1, 1));
    +testSubstituteConfirm('ex_substitute_confirm_quit',
    +    '%s/a/b/c', 'ba a\nbab', 'bb a\nbab', 'yq', makeCursor(0, 3));
    +testSubstituteConfirm('ex_substitute_confirm_last',
    +    '%s/a/b/c', 'ba a\nbab', 'bb b\nbab', 'yl', makeCursor(0, 3));
    +testSubstituteConfirm('ex_substitute_confirm_oneline',
    +    '1s/a/b/c', 'ba a\nbab', 'bb b\nbab', 'yl', makeCursor(0, 3));
    +testSubstituteConfirm('ex_substitute_confirm_range_accept',
    +    '1,2s/a/b/c', 'aa\na \na\na', 'bb\nb \na\na', 'yyy', makeCursor(1, 0));
    +testSubstituteConfirm('ex_substitute_confirm_range_some',
    +    '1,3s/a/b/c', 'aa\na \na\na', 'ba\nb \nb\na', 'ynyy', makeCursor(2, 0));
    +testSubstituteConfirm('ex_substitute_confirm_range_all',
    +    '1,3s/a/b/c', 'aa\na \na\na', 'bb\nb \nb\na', 'a', makeCursor(2, 0));
    +testSubstituteConfirm('ex_substitute_confirm_range_last',
    +    '1,3s/a/b/c', 'aa\na \na\na', 'bb\nb \na\na', 'yyl', makeCursor(1, 0));
    +//:noh should clear highlighting of search-results but allow to resume search through n
    +testVim('ex_noh_clearSearchHighlight', function(cm, vim, helpers) {
    +  cm.openDialog = helpers.fakeOpenDialog('match');
    +  helpers.doKeys('?');
    +  helpers.doEx('noh');
    +  eq(vim.searchState_.getOverlay(),null,'match-highlighting wasn\'t cleared');
    +  helpers.doKeys('n');
    +  helpers.assertCursorAt(0, 11,'can\'t resume search after clearing highlighting');
    +}, { value: 'match nope match \n nope Match' });
    +// TODO: Reset key maps after each test.
    +testVim('ex_map_key2key', function(cm, vim, helpers) {
    +  helpers.doEx('map a x');
    +  helpers.doKeys('a');
    +  helpers.assertCursorAt(0, 0);
    +  eq('bc', cm.getValue());
    +}, { value: 'abc' });
    +testVim('ex_map_key2key_to_colon', function(cm, vim, helpers) {
    +  helpers.doEx('map ; :');
    +  var dialogOpened = false;
    +  cm.openDialog = function() {
    +    dialogOpened = true;
    +  }
    +  helpers.doKeys(';');
    +  eq(dialogOpened, true);
    +});
    +testVim('ex_map_ex2key:', function(cm, vim, helpers) {
    +  helpers.doEx('map :del x');
    +  helpers.doEx('del');
    +  helpers.assertCursorAt(0, 0);
    +  eq('bc', cm.getValue());
    +}, { value: 'abc' });
    +testVim('ex_map_ex2ex', function(cm, vim, helpers) {
    +  helpers.doEx('map :del :w');
    +  var tmp = CodeMirror.commands.save;
    +  var written = false;
    +  var actualCm;
    +  CodeMirror.commands.save = function(cm) {
    +    written = true;
    +    actualCm = cm;
    +  };
    +  helpers.doEx('del');
    +  CodeMirror.commands.save = tmp;
    +  eq(written, true);
    +  eq(actualCm, cm);
    +});
    +testVim('ex_map_key2ex', function(cm, vim, helpers) {
    +  helpers.doEx('map a :w');
    +  var tmp = CodeMirror.commands.save;
    +  var written = false;
    +  var actualCm;
    +  CodeMirror.commands.save = function(cm) {
    +    written = true;
    +    actualCm = cm;
    +  };
    +  helpers.doKeys('a');
    +  CodeMirror.commands.save = tmp;
    +  eq(written, true);
    +  eq(actualCm, cm);
    +});
    +// Testing registration of functions as ex-commands and mapping to <Key>-keys
    +testVim('ex_api_test', function(cm, vim, helpers) {
    +  var res=false;
    +  var val='from';
    +  CodeMirror.Vim.defineEx('extest','ext',function(cm,params){
    +    if(params.args)val=params.args[0];
    +    else res=true;
    +  });
    +  helpers.doEx(':ext to');
    +  eq(val,'to','Defining ex-command failed');
    +  CodeMirror.Vim.map('<C-CR><Space>',':ext');
    +  helpers.doKeys('<C-CR>','<Space>');
    +  is(res,'Mapping to key failed');
    +});
    +// For now, this test needs to be last because it messes up : for future tests.
    +testVim('ex_map_key2key_from_colon', function(cm, vim, helpers) {
    +  helpers.doEx('map : x');
    +  helpers.doKeys(':');
    +  helpers.assertCursorAt(0, 0);
    +  eq('bc', cm.getValue());
    +}, { value: 'abc' });
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_postprocessing_BloomPass.js.html b/Docs/files/third-party_three.js_postprocessing_BloomPass.js.html new file mode 100644 index 0000000..bfe6166 --- /dev/null +++ b/Docs/files/third-party_three.js_postprocessing_BloomPass.js.html @@ -0,0 +1,451 @@ + + + + + third-party/three.js/postprocessing/BloomPass.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/postprocessing/BloomPass.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + */
    +
    +THREE.BloomPass = function ( strength, kernelSize, sigma, resolution ) {
    +
    +	strength = ( strength !== undefined ) ? strength : 1;
    +	kernelSize = ( kernelSize !== undefined ) ? kernelSize : 25;
    +	sigma = ( sigma !== undefined ) ? sigma : 4.0;
    +	resolution = ( resolution !== undefined ) ? resolution : 256;
    +
    +	// render targets
    +
    +	var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat };
    +
    +	this.renderTargetX = new THREE.WebGLRenderTarget( resolution, resolution, pars );
    +	this.renderTargetY = new THREE.WebGLRenderTarget( resolution, resolution, pars );
    +
    +	// copy material
    +
    +	if ( THREE.CopyShader === undefined )
    +		console.error( "THREE.BloomPass relies on THREE.CopyShader" );
    +
    +	var copyShader = THREE.CopyShader;
    +
    +	this.copyUniforms = THREE.UniformsUtils.clone( copyShader.uniforms );
    +
    +	this.copyUniforms[ "opacity" ].value = strength;
    +
    +	this.materialCopy = new THREE.ShaderMaterial( {
    +
    +		uniforms: this.copyUniforms,
    +		vertexShader: copyShader.vertexShader,
    +		fragmentShader: copyShader.fragmentShader,
    +		blending: THREE.AdditiveBlending,
    +		transparent: true
    +
    +	} );
    +
    +	// convolution material
    +
    +	if ( THREE.ConvolutionShader === undefined )
    +		console.error( "THREE.BloomPass relies on THREE.ConvolutionShader" );
    +
    +	var convolutionShader = THREE.ConvolutionShader;
    +
    +	this.convolutionUniforms = THREE.UniformsUtils.clone( convolutionShader.uniforms );
    +
    +	this.convolutionUniforms[ "uImageIncrement" ].value = THREE.BloomPass.blurx;
    +	this.convolutionUniforms[ "cKernel" ].value = THREE.ConvolutionShader.buildKernel( sigma );
    +
    +	this.materialConvolution = new THREE.ShaderMaterial( {
    +
    +		uniforms: this.convolutionUniforms,
    +		vertexShader:  convolutionShader.vertexShader,
    +		fragmentShader: convolutionShader.fragmentShader,
    +		defines: {
    +			"KERNEL_SIZE_FLOAT": kernelSize.toFixed( 1 ),
    +			"KERNEL_SIZE_INT": kernelSize.toFixed( 0 )
    +		}
    +
    +	} );
    +
    +	this.enabled = true;
    +	this.needsSwap = false;
    +	this.clear = false;
    +
    +};
    +
    +THREE.BloomPass.prototype = {
    +
    +	render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
    +
    +		if ( maskActive ) renderer.context.disable( renderer.context.STENCIL_TEST );
    +
    +		// Render quad with blured scene into texture (convolution pass 1)
    +
    +		THREE.EffectComposer.quad.material = this.materialConvolution;
    +
    +		this.convolutionUniforms[ "tDiffuse" ].value = readBuffer;
    +		this.convolutionUniforms[ "uImageIncrement" ].value = THREE.BloomPass.blurX;
    +
    +		renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera, this.renderTargetX, true );
    +
    +
    +		// Render quad with blured scene into texture (convolution pass 2)
    +
    +		this.convolutionUniforms[ "tDiffuse" ].value = this.renderTargetX;
    +		this.convolutionUniforms[ "uImageIncrement" ].value = THREE.BloomPass.blurY;
    +
    +		renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera, this.renderTargetY, true );
    +
    +		// Render original scene with superimposed blur to texture
    +
    +		THREE.EffectComposer.quad.material = this.materialCopy;
    +
    +		this.copyUniforms[ "tDiffuse" ].value = this.renderTargetY;
    +
    +		if ( maskActive ) renderer.context.enable( renderer.context.STENCIL_TEST );
    +
    +		renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera, readBuffer, this.clear );
    +
    +	}
    +
    +};
    +
    +THREE.BloomPass.blurX = new THREE.Vector2( 0.001953125, 0.0 );
    +THREE.BloomPass.blurY = new THREE.Vector2( 0.0, 0.001953125 );
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_postprocessing_DotScreenPass.js.html b/Docs/files/third-party_three.js_postprocessing_DotScreenPass.js.html new file mode 100644 index 0000000..d815fee --- /dev/null +++ b/Docs/files/third-party_three.js_postprocessing_DotScreenPass.js.html @@ -0,0 +1,396 @@ + + + + + third-party/three.js/postprocessing/DotScreenPass.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/postprocessing/DotScreenPass.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + */
    +
    +THREE.DotScreenPass = function ( center, angle, scale ) {
    +
    +	if ( THREE.DotScreenShader === undefined )
    +		console.error( "THREE.DotScreenPass relies on THREE.DotScreenShader" );
    +
    +	var shader = THREE.DotScreenShader;
    +
    +	this.uniforms = THREE.UniformsUtils.clone( shader.uniforms );
    +
    +	if ( center !== undefined ) this.uniforms[ "center" ].value.copy( center );
    +	if ( angle !== undefined ) this.uniforms[ "angle"].value = angle;
    +	if ( scale !== undefined ) this.uniforms[ "scale"].value = scale;
    +
    +	this.material = new THREE.ShaderMaterial( {
    +
    +		uniforms: this.uniforms,
    +		vertexShader: shader.vertexShader,
    +		fragmentShader: shader.fragmentShader
    +
    +	} );
    +
    +	this.enabled = true;
    +	this.renderToScreen = false;
    +	this.needsSwap = true;
    +
    +};
    +
    +THREE.DotScreenPass.prototype = {
    +
    +	render: function ( renderer, writeBuffer, readBuffer, delta ) {
    +
    +		this.uniforms[ "tDiffuse" ].value = readBuffer;
    +		this.uniforms[ "tSize" ].value.set( readBuffer.width, readBuffer.height );
    +
    +		THREE.EffectComposer.quad.material = this.material;
    +
    +		if ( this.renderToScreen ) {
    +
    +			renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera );
    +
    +		} else {
    +
    +			renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera, writeBuffer, false );
    +
    +		}
    +
    +	}
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_postprocessing_EffectComposer.js.html b/Docs/files/third-party_three.js_postprocessing_EffectComposer.js.html new file mode 100644 index 0000000..6a60f9a --- /dev/null +++ b/Docs/files/third-party_three.js_postprocessing_EffectComposer.js.html @@ -0,0 +1,487 @@ + + + + + third-party/three.js/postprocessing/EffectComposer.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/postprocessing/EffectComposer.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + */
    +
    +THREE.EffectComposer = function ( renderer, renderTarget ) {
    +
    +	this.renderer = renderer;
    +
    +	if ( renderTarget === undefined ) {
    +
    +		var width = window.innerWidth || 1;
    +		var height = window.innerHeight || 1;
    +		var parameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat, stencilBuffer: false };
    +
    +		renderTarget = new THREE.WebGLRenderTarget( width, height, parameters );
    +
    +	}
    +
    +	this.renderTarget1 = renderTarget;
    +	this.renderTarget2 = renderTarget.clone();
    +
    +	this.writeBuffer = this.renderTarget1;
    +	this.readBuffer = this.renderTarget2;
    +
    +	this.passes = [];
    +
    +	if ( THREE.CopyShader === undefined )
    +		console.error( "THREE.EffectComposer relies on THREE.CopyShader" );
    +
    +	this.copyPass = new THREE.ShaderPass( THREE.CopyShader );
    +
    +};
    +
    +THREE.EffectComposer.prototype = {
    +
    +	swapBuffers: function() {
    +
    +		var tmp = this.readBuffer;
    +		this.readBuffer = this.writeBuffer;
    +		this.writeBuffer = tmp;
    +
    +	},
    +
    +	addPass: function ( pass ) {
    +
    +		this.passes.push( pass );
    +
    +	},
    +
    +	insertPass: function ( pass, index ) {
    +
    +		this.passes.splice( index, 0, pass );
    +
    +	},
    +
    +	render: function ( delta ) {
    +
    +		this.writeBuffer = this.renderTarget1;
    +		this.readBuffer = this.renderTarget2;
    +
    +		var maskActive = false;
    +
    +		var pass, i, il = this.passes.length;
    +
    +		for ( i = 0; i < il; i ++ ) {
    +
    +			pass = this.passes[ i ];
    +
    +			if ( !pass.enabled ) continue;
    +
    +			pass.render( this.renderer, this.writeBuffer, this.readBuffer, delta, maskActive );
    +
    +			if ( pass.needsSwap ) {
    +
    +				if ( maskActive ) {
    +
    +					var context = this.renderer.context;
    +
    +					context.stencilFunc( context.NOTEQUAL, 1, 0xffffffff );
    +
    +					this.copyPass.render( this.renderer, this.writeBuffer, this.readBuffer, delta );
    +
    +					context.stencilFunc( context.EQUAL, 1, 0xffffffff );
    +
    +				}
    +
    +				this.swapBuffers();
    +
    +			}
    +
    +			if ( pass instanceof THREE.MaskPass ) {
    +
    +				maskActive = true;
    +
    +			} else if ( pass instanceof THREE.ClearMaskPass ) {
    +
    +				maskActive = false;
    +
    +			}
    +
    +		}
    +
    +	},
    +
    +	reset: function ( renderTarget ) {
    +
    +		if ( renderTarget === undefined ) {
    +
    +			renderTarget = this.renderTarget1.clone();
    +
    +			renderTarget.width = window.innerWidth;
    +			renderTarget.height = window.innerHeight;
    +
    +		}
    +
    +		this.renderTarget1 = renderTarget;
    +		this.renderTarget2 = renderTarget.clone();
    +
    +		this.writeBuffer = this.renderTarget1;
    +		this.readBuffer = this.renderTarget2;
    +
    +	},
    +
    +	setSize: function ( width, height ) {
    +
    +		var renderTarget = this.renderTarget1.clone();
    +
    +		renderTarget.width = width;
    +		renderTarget.height = height;
    +
    +		this.reset( renderTarget );
    +
    +	}
    +
    +};
    +
    +// shared ortho camera
    +
    +THREE.EffectComposer.camera = new THREE.OrthographicCamera( -1, 1, 1, -1, 0, 1 );
    +
    +THREE.EffectComposer.quad = new THREE.Mesh( new THREE.PlaneGeometry( 2, 2 ), null );
    +
    +THREE.EffectComposer.scene = new THREE.Scene();
    +THREE.EffectComposer.scene.add( THREE.EffectComposer.quad );
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_postprocessing_FilmPass.js.html b/Docs/files/third-party_three.js_postprocessing_FilmPass.js.html new file mode 100644 index 0000000..af1eb83 --- /dev/null +++ b/Docs/files/third-party_three.js_postprocessing_FilmPass.js.html @@ -0,0 +1,397 @@ + + + + + third-party/three.js/postprocessing/FilmPass.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/postprocessing/FilmPass.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + */
    +
    +THREE.FilmPass = function ( noiseIntensity, scanlinesIntensity, scanlinesCount, grayscale ) {
    +
    +	if ( THREE.FilmShader === undefined )
    +		console.error( "THREE.FilmPass relies on THREE.FilmShader" );
    +
    +	var shader = THREE.FilmShader;
    +
    +	this.uniforms = THREE.UniformsUtils.clone( shader.uniforms );
    +
    +	this.material = new THREE.ShaderMaterial( {
    +
    +		uniforms: this.uniforms,
    +		vertexShader: shader.vertexShader,
    +		fragmentShader: shader.fragmentShader
    +
    +	} );
    +
    +	if ( grayscale !== undefined )	this.uniforms.grayscale.value = grayscale;
    +	if ( noiseIntensity !== undefined ) this.uniforms.nIntensity.value = noiseIntensity;
    +	if ( scanlinesIntensity !== undefined ) this.uniforms.sIntensity.value = scanlinesIntensity;
    +	if ( scanlinesCount !== undefined ) this.uniforms.sCount.value = scanlinesCount;
    +
    +	this.enabled = true;
    +	this.renderToScreen = false;
    +	this.needsSwap = true;
    +
    +};
    +
    +THREE.FilmPass.prototype = {
    +
    +	render: function ( renderer, writeBuffer, readBuffer, delta ) {
    +
    +		this.uniforms[ "tDiffuse" ].value = readBuffer;
    +		this.uniforms[ "time" ].value += delta;
    +
    +		THREE.EffectComposer.quad.material = this.material;
    +
    +		if ( this.renderToScreen ) {
    +
    +			renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera );
    +
    +		} else {
    +
    +			renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera, writeBuffer, false );
    +
    +		}
    +
    +	}
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_postprocessing_MaskPass.js.html b/Docs/files/third-party_three.js_postprocessing_MaskPass.js.html new file mode 100644 index 0000000..21d2c93 --- /dev/null +++ b/Docs/files/third-party_three.js_postprocessing_MaskPass.js.html @@ -0,0 +1,429 @@ + + + + + third-party/three.js/postprocessing/MaskPass.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/postprocessing/MaskPass.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + */
    +
    +THREE.MaskPass = function ( scene, camera ) {
    +
    +	this.scene = scene;
    +	this.camera = camera;
    +
    +	this.enabled = true;
    +	this.clear = true;
    +	this.needsSwap = false;
    +
    +	this.inverse = false;
    +
    +};
    +
    +THREE.MaskPass.prototype = {
    +
    +	render: function ( renderer, writeBuffer, readBuffer, delta ) {
    +
    +		var context = renderer.context;
    +
    +		// don't update color or depth
    +
    +		context.colorMask( false, false, false, false );
    +		context.depthMask( false );
    +
    +		// set up stencil
    +
    +		var writeValue, clearValue;
    +
    +		if ( this.inverse ) {
    +
    +			writeValue = 0;
    +			clearValue = 1;
    +
    +		} else {
    +
    +			writeValue = 1;
    +			clearValue = 0;
    +
    +		}
    +
    +		context.enable( context.STENCIL_TEST );
    +		context.stencilOp( context.REPLACE, context.REPLACE, context.REPLACE );
    +		context.stencilFunc( context.ALWAYS, writeValue, 0xffffffff );
    +		context.clearStencil( clearValue );
    +
    +		// draw into the stencil buffer
    +
    +		renderer.render( this.scene, this.camera, readBuffer, this.clear );
    +		renderer.render( this.scene, this.camera, writeBuffer, this.clear );
    +
    +		// re-enable update of color and depth
    +
    +		context.colorMask( true, true, true, true );
    +		context.depthMask( true );
    +
    +		// only render where stencil is set to 1
    +
    +		context.stencilFunc( context.EQUAL, 1, 0xffffffff );  // draw if == 1
    +		context.stencilOp( context.KEEP, context.KEEP, context.KEEP );
    +
    +	}
    +
    +};
    +
    +
    +THREE.ClearMaskPass = function () {
    +
    +	this.enabled = true;
    +
    +};
    +
    +THREE.ClearMaskPass.prototype = {
    +
    +	render: function ( renderer, writeBuffer, readBuffer, delta ) {
    +
    +		var context = renderer.context;
    +
    +		context.disable( context.STENCIL_TEST );
    +
    +	}
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_postprocessing_RenderPass.js.html b/Docs/files/third-party_three.js_postprocessing_RenderPass.js.html new file mode 100644 index 0000000..8e17d5b --- /dev/null +++ b/Docs/files/third-party_three.js_postprocessing_RenderPass.js.html @@ -0,0 +1,394 @@ + + + + + third-party/three.js/postprocessing/RenderPass.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/postprocessing/RenderPass.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + */
    +
    +THREE.RenderPass = function ( scene, camera, overrideMaterial, clearColor, clearAlpha ) {
    +
    +	this.scene = scene;
    +	this.camera = camera;
    +
    +	this.overrideMaterial = overrideMaterial;
    +
    +	this.clearColor = clearColor;
    +	this.clearAlpha = ( clearAlpha !== undefined ) ? clearAlpha : 1;
    +
    +	this.oldClearColor = new THREE.Color();
    +	this.oldClearAlpha = 1;
    +
    +	this.enabled = true;
    +	this.clear = true;
    +	this.needsSwap = false;
    +
    +};
    +
    +THREE.RenderPass.prototype = {
    +
    +	render: function ( renderer, writeBuffer, readBuffer, delta ) {
    +
    +		this.scene.overrideMaterial = this.overrideMaterial;
    +
    +		if ( this.clearColor ) {
    +
    +			this.oldClearColor.copy( renderer.getClearColor() );
    +			this.oldClearAlpha = renderer.getClearAlpha();
    +
    +			renderer.setClearColor( this.clearColor, this.clearAlpha );
    +
    +		}
    +
    +		renderer.render( this.scene, this.camera, readBuffer, this.clear );
    +
    +		if ( this.clearColor ) {
    +
    +			renderer.setClearColor( this.oldClearColor, this.oldClearAlpha );
    +
    +		}
    +
    +		this.scene.overrideMaterial = null;
    +
    +	}
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_postprocessing_SavePass.js.html b/Docs/files/third-party_three.js_postprocessing_SavePass.js.html new file mode 100644 index 0000000..f8f86fd --- /dev/null +++ b/Docs/files/third-party_three.js_postprocessing_SavePass.js.html @@ -0,0 +1,398 @@ + + + + + third-party/three.js/postprocessing/SavePass.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/postprocessing/SavePass.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + */
    +
    +THREE.SavePass = function ( renderTarget ) {
    +
    +	if ( THREE.CopyShader === undefined )
    +		console.error( "THREE.SavePass relies on THREE.CopyShader" );
    +
    +	var shader = THREE.CopyShader;
    +
    +	this.textureID = "tDiffuse";
    +
    +	this.uniforms = THREE.UniformsUtils.clone( shader.uniforms );
    +
    +	this.material = new THREE.ShaderMaterial( {
    +
    +		uniforms: this.uniforms,
    +		vertexShader: shader.vertexShader,
    +		fragmentShader: shader.fragmentShader
    +
    +	} );
    +
    +	this.renderTarget = renderTarget;
    +
    +	if ( this.renderTarget === undefined ) {
    +
    +		this.renderTargetParameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat, stencilBuffer: false };
    +		this.renderTarget = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, this.renderTargetParameters );
    +
    +	}
    +
    +	this.enabled = true;
    +	this.needsSwap = false;
    +	this.clear = false;
    +
    +};
    +
    +THREE.SavePass.prototype = {
    +
    +	render: function ( renderer, writeBuffer, readBuffer, delta ) {
    +
    +		if ( this.uniforms[ this.textureID ] ) {
    +
    +			this.uniforms[ this.textureID ].value = readBuffer;
    +
    +		}
    +
    +		THREE.EffectComposer.quad.material = this.material;
    +
    +		renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera, this.renderTarget, this.clear );
    +
    +	}
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_postprocessing_ShaderPass.js.html b/Docs/files/third-party_three.js_postprocessing_ShaderPass.js.html new file mode 100644 index 0000000..acc3e79 --- /dev/null +++ b/Docs/files/third-party_three.js_postprocessing_ShaderPass.js.html @@ -0,0 +1,394 @@ + + + + + third-party/three.js/postprocessing/ShaderPass.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/postprocessing/ShaderPass.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + */
    +
    +THREE.ShaderPass = function ( shader, textureID ) {
    +
    +	this.textureID = ( textureID !== undefined ) ? textureID : "tDiffuse";
    +
    +	this.uniforms = THREE.UniformsUtils.clone( shader.uniforms );
    +
    +	this.material = new THREE.ShaderMaterial( {
    +
    +		uniforms: this.uniforms,
    +		vertexShader: shader.vertexShader,
    +		fragmentShader: shader.fragmentShader
    +
    +	} );
    +
    +	this.renderToScreen = false;
    +
    +	this.enabled = true;
    +	this.needsSwap = true;
    +	this.clear = false;
    +
    +};
    +
    +THREE.ShaderPass.prototype = {
    +
    +	render: function ( renderer, writeBuffer, readBuffer, delta ) {
    +
    +		if ( this.uniforms[ this.textureID ] ) {
    +
    +			this.uniforms[ this.textureID ].value = readBuffer;
    +
    +		}
    +
    +		THREE.EffectComposer.quad.material = this.material;
    +
    +		if ( this.renderToScreen ) {
    +
    +			renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera );
    +
    +		} else {
    +
    +			renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera, writeBuffer, this.clear );
    +
    +		}
    +
    +	}
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_postprocessing_TexturePass.js.html b/Docs/files/third-party_three.js_postprocessing_TexturePass.js.html new file mode 100644 index 0000000..50db7b5 --- /dev/null +++ b/Docs/files/third-party_three.js_postprocessing_TexturePass.js.html @@ -0,0 +1,383 @@ + + + + + third-party/three.js/postprocessing/TexturePass.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/postprocessing/TexturePass.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + */
    +
    +THREE.TexturePass = function ( texture, opacity ) {
    +
    +	if ( THREE.CopyShader === undefined )
    +		console.error( "THREE.TexturePass relies on THREE.CopyShader" );
    +
    +	var shader = THREE.CopyShader;
    +
    +	this.uniforms = THREE.UniformsUtils.clone( shader.uniforms );
    +
    +	this.uniforms[ "opacity" ].value = ( opacity !== undefined ) ? opacity : 1.0;
    +	this.uniforms[ "tDiffuse" ].value = texture;
    +
    +	this.material = new THREE.ShaderMaterial( {
    +
    +		uniforms: this.uniforms,
    +		vertexShader: shader.vertexShader,
    +		fragmentShader: shader.fragmentShader
    +
    +	} );
    +
    +	this.enabled = true;
    +	this.needsSwap = false;
    +
    +};
    +
    +THREE.TexturePass.prototype = {
    +
    +	render: function ( renderer, writeBuffer, readBuffer, delta ) {
    +
    +		THREE.EffectComposer.quad.material = this.material;
    +
    +		renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera, readBuffer );
    +
    +	}
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_BasicShader.js.html b/Docs/files/third-party_three.js_shaders_BasicShader.js.html new file mode 100644 index 0000000..2e09156 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_BasicShader.js.html @@ -0,0 +1,374 @@ + + + + + third-party/three.js/shaders/BasicShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/BasicShader.js

    + +
    +
    +/**
    + * @author mrdoob / http://www.mrdoob.com
    + *
    + * Simple test shader
    + */
    +
    +THREE.BasicShader = {
    +
    +	uniforms: {},
    +
    +	vertexShader: [
    +
    +		"void main() {",
    +
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"void main() {",
    +
    +			"gl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_BleachBypassShader.js.html b/Docs/files/third-party_three.js_shaders_BleachBypassShader.js.html new file mode 100644 index 0000000..1d07746 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_BleachBypassShader.js.html @@ -0,0 +1,407 @@ + + + + + third-party/three.js/shaders/BleachBypassShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/BleachBypassShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Bleach bypass shader [http://en.wikipedia.org/wiki/Bleach_bypass]
    + * - based on Nvidia example
    + * http://developer.download.nvidia.com/shaderlibrary/webpages/shader_library.html#post_bleach_bypass
    + */
    +
    +THREE.BleachBypassShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"opacity":  { type: "f", value: 1.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform float opacity;",
    +
    +		"uniform sampler2D tDiffuse;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 base = texture2D( tDiffuse, vUv );",
    +
    +			"vec3 lumCoeff = vec3( 0.25, 0.65, 0.1 );",
    +			"float lum = dot( lumCoeff, base.rgb );",
    +			"vec3 blend = vec3( lum );",
    +
    +			"float L = min( 1.0, max( 0.0, 10.0 * ( lum - 0.45 ) ) );",
    +
    +			"vec3 result1 = 2.0 * base.rgb * blend;",
    +			"vec3 result2 = 1.0 - 2.0 * ( 1.0 - blend ) * ( 1.0 - base.rgb );",
    +
    +			"vec3 newColor = mix( result1, result2, L );",
    +
    +			"float A2 = opacity * base.a;",
    +			"vec3 mixRGB = A2 * newColor.rgb;",
    +			"mixRGB += ( ( 1.0 - A2 ) * base.rgb );",
    +
    +			"gl_FragColor = vec4( mixRGB, base.a );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_BlendShader.js.html b/Docs/files/third-party_three.js_shaders_BlendShader.js.html new file mode 100644 index 0000000..81ad6df --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_BlendShader.js.html @@ -0,0 +1,394 @@ + + + + + third-party/three.js/shaders/BlendShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/BlendShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Blend two textures
    + */
    +
    +THREE.BlendShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse1": { type: "t", value: null },
    +		"tDiffuse2": { type: "t", value: null },
    +		"mixRatio":  { type: "f", value: 0.5 },
    +		"opacity":   { type: "f", value: 1.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform float opacity;",
    +		"uniform float mixRatio;",
    +
    +		"uniform sampler2D tDiffuse1;",
    +		"uniform sampler2D tDiffuse2;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 texel1 = texture2D( tDiffuse1, vUv );",
    +			"vec4 texel2 = texture2D( tDiffuse2, vUv );",
    +			"gl_FragColor = opacity * mix( texel1, texel2, mixRatio );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_BokehShader.js.html b/Docs/files/third-party_three.js_shaders_BokehShader.js.html new file mode 100644 index 0000000..73a43bc --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_BokehShader.js.html @@ -0,0 +1,459 @@ + + + + + third-party/three.js/shaders/BokehShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/BokehShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Depth-of-field shader with bokeh
    + * ported from GLSL shader by Martins Upitis
    + * http://artmartinsh.blogspot.com/2010/02/glsl-lens-blur-filter-with-bokeh.html
    + */
    +
    +THREE.BokehShader = {
    +
    +	uniforms: {
    +
    +		"tColor":   { type: "t", value: null },
    +		"tDepth":   { type: "t", value: null },
    +		"focus":    { type: "f", value: 1.0 },
    +		"aspect":   { type: "f", value: 1.0 },
    +		"aperture": { type: "f", value: 0.025 },
    +		"maxblur":  { type: "f", value: 1.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"uniform sampler2D tColor;",
    +		"uniform sampler2D tDepth;",
    +
    +		"uniform float maxblur;",  // max blur amount
    +		"uniform float aperture;", // aperture - bigger values for shallower depth of field
    +
    +		"uniform float focus;",
    +		"uniform float aspect;",
    +
    +		"void main() {",
    +
    +			"vec2 aspectcorrect = vec2( 1.0, aspect );",
    +
    +			"vec4 depth1 = texture2D( tDepth, vUv );",
    +
    +			"float factor = depth1.x - focus;",
    +
    +			"vec2 dofblur = vec2 ( clamp( factor * aperture, -maxblur, maxblur ) );",
    +
    +			"vec2 dofblur9 = dofblur * 0.9;",
    +			"vec2 dofblur7 = dofblur * 0.7;",
    +			"vec2 dofblur4 = dofblur * 0.4;",
    +
    +			"vec4 col = vec4( 0.0 );",
    +
    +			"col += texture2D( tColor, vUv.xy );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,   0.4  ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.15,  0.37 ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29,  0.29 ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.37,  0.15 ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.40,  0.0  ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.37, -0.15 ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29, -0.29 ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,  -0.4  ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.15,  0.37 ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29,  0.29 ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.37,  0.15 ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.4,   0.0  ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.15, -0.37 ) * aspectcorrect ) * dofblur );",
    +
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.15,  0.37 ) * aspectcorrect ) * dofblur9 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.37,  0.15 ) * aspectcorrect ) * dofblur9 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.37, -0.15 ) * aspectcorrect ) * dofblur9 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur9 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.15,  0.37 ) * aspectcorrect ) * dofblur9 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.37,  0.15 ) * aspectcorrect ) * dofblur9 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur9 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.15, -0.37 ) * aspectcorrect ) * dofblur9 );",
    +
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29,  0.29 ) * aspectcorrect ) * dofblur7 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.40,  0.0  ) * aspectcorrect ) * dofblur7 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29, -0.29 ) * aspectcorrect ) * dofblur7 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,  -0.4  ) * aspectcorrect ) * dofblur7 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29,  0.29 ) * aspectcorrect ) * dofblur7 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.4,   0.0  ) * aspectcorrect ) * dofblur7 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur7 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,   0.4  ) * aspectcorrect ) * dofblur7 );",
    +
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29,  0.29 ) * aspectcorrect ) * dofblur4 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.4,   0.0  ) * aspectcorrect ) * dofblur4 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29, -0.29 ) * aspectcorrect ) * dofblur4 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,  -0.4  ) * aspectcorrect ) * dofblur4 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29,  0.29 ) * aspectcorrect ) * dofblur4 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.4,   0.0  ) * aspectcorrect ) * dofblur4 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur4 );",
    +			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,   0.4  ) * aspectcorrect ) * dofblur4 );",
    +
    +			"gl_FragColor = col / 41.0;",
    +			"gl_FragColor.a = 1.0;",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_BrightnessContrastShader.js.html b/Docs/files/third-party_three.js_shaders_BrightnessContrastShader.js.html new file mode 100644 index 0000000..dc2d832 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_BrightnessContrastShader.js.html @@ -0,0 +1,401 @@ + + + + + third-party/three.js/shaders/BrightnessContrastShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/BrightnessContrastShader.js

    + +
    +
    +/**
    + * @author tapio / http://tapio.github.com/
    + *
    + * Brightness and contrast adjustment
    + * https://github.com/evanw/glfx.js
    + * brightness: -1 to 1 (-1 is solid black, 0 is no change, and 1 is solid white)
    + * contrast: -1 to 1 (-1 is solid gray, 0 is no change, and 1 is maximum contrast)
    + */
    +
    +THREE.BrightnessContrastShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse":   { type: "t", value: null },
    +		"brightness": { type: "f", value: 0 },
    +		"contrast":   { type: "f", value: 0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform float brightness;",
    +		"uniform float contrast;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"gl_FragColor = texture2D( tDiffuse, vUv );",
    +
    +			"gl_FragColor.rgb += brightness;",
    +
    +			"if (contrast > 0.0) {",
    +				"gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) / (1.0 - contrast) + 0.5;",
    +			"} else {",
    +				"gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + contrast) + 0.5;",
    +			"}",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_ColorCorrectionShader.js.html b/Docs/files/third-party_three.js_shaders_ColorCorrectionShader.js.html new file mode 100644 index 0000000..f00a400 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_ColorCorrectionShader.js.html @@ -0,0 +1,391 @@ + + + + + third-party/three.js/shaders/ColorCorrectionShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/ColorCorrectionShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Color correction
    + */
    +
    +THREE.ColorCorrectionShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"powRGB":   { type: "v3", value: new THREE.Vector3( 2, 2, 2 ) },
    +		"mulRGB":   { type: "v3", value: new THREE.Vector3( 1, 1, 1 ) }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform vec3 powRGB;",
    +		"uniform vec3 mulRGB;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"gl_FragColor = texture2D( tDiffuse, vUv );",
    +			"gl_FragColor.rgb = mulRGB * pow( gl_FragColor.rgb, powRGB );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_ColorifyShader.js.html b/Docs/files/third-party_three.js_shaders_ColorifyShader.js.html new file mode 100644 index 0000000..e2c6146 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_ColorifyShader.js.html @@ -0,0 +1,392 @@ + + + + + third-party/three.js/shaders/ColorifyShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/ColorifyShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Colorify shader
    + */
    +
    +THREE.ColorifyShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"color":    { type: "c", value: new THREE.Color( 0xffffff ) }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform vec3 color;",
    +		"uniform sampler2D tDiffuse;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 texel = texture2D( tDiffuse, vUv );",
    +
    +			"vec3 luma = vec3( 0.299, 0.587, 0.114 );",
    +			"float v = dot( texel.xyz, luma );",
    +
    +			"gl_FragColor = vec4( v * color, texel.w );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_ConvolutionShader.js.html b/Docs/files/third-party_three.js_shaders_ConvolutionShader.js.html new file mode 100644 index 0000000..392619d --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_ConvolutionShader.js.html @@ -0,0 +1,444 @@ + + + + + third-party/three.js/shaders/ConvolutionShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/ConvolutionShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Convolution shader
    + * ported from o3d sample to WebGL / GLSL
    + * http://o3d.googlecode.com/svn/trunk/samples/convolution.html
    + */
    +
    +THREE.ConvolutionShader = {
    +
    +	defines: {
    +
    +		"KERNEL_SIZE_FLOAT": "25.0",
    +		"KERNEL_SIZE_INT": "25"
    +
    +	},
    +
    +	uniforms: {
    +
    +		"tDiffuse":        { type: "t", value: null },
    +		"uImageIncrement": { type: "v2", value: new THREE.Vector2( 0.001953125, 0.0 ) },
    +		"cKernel":         { type: "fv1", value: [] }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"uniform vec2 uImageIncrement;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv - ( ( KERNEL_SIZE_FLOAT - 1.0 ) / 2.0 ) * uImageIncrement;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform float cKernel[ KERNEL_SIZE_INT ];",
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform vec2 uImageIncrement;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec2 imageCoord = vUv;",
    +			"vec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 );",
    +
    +			"for( int i = 0; i < KERNEL_SIZE_INT; i ++ ) {",
    +
    +				"sum += texture2D( tDiffuse, imageCoord ) * cKernel[ i ];",
    +				"imageCoord += uImageIncrement;",
    +
    +			"}",
    +
    +			"gl_FragColor = sum;",
    +
    +		"}"
    +
    +
    +	].join("\n"),
    +
    +	buildKernel: function ( sigma ) {
    +
    +		// We lop off the sqrt(2 * pi) * sigma term, since we're going to normalize anyway.
    +
    +		function gauss( x, sigma ) {
    +
    +			return Math.exp( - ( x * x ) / ( 2.0 * sigma * sigma ) );
    +
    +		}
    +
    +		var i, values, sum, halfWidth, kMaxKernelSize = 25, kernelSize = 2 * Math.ceil( sigma * 3.0 ) + 1;
    +
    +		if ( kernelSize > kMaxKernelSize ) kernelSize = kMaxKernelSize;
    +		halfWidth = ( kernelSize - 1 ) * 0.5;
    +
    +		values = new Array( kernelSize );
    +		sum = 0.0;
    +		for ( i = 0; i < kernelSize; ++i ) {
    +
    +			values[ i ] = gauss( i - halfWidth, sigma );
    +			sum += values[ i ];
    +
    +		}
    +
    +		// normalize the kernel
    +
    +		for ( i = 0; i < kernelSize; ++i ) values[ i ] /= sum;
    +
    +		return values;
    +
    +	}
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_CopyShader.js.html b/Docs/files/third-party_three.js_shaders_CopyShader.js.html new file mode 100644 index 0000000..575000c --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_CopyShader.js.html @@ -0,0 +1,389 @@ + + + + + third-party/three.js/shaders/CopyShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/CopyShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Full-screen textured quad shader
    + */
    +
    +THREE.CopyShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"opacity":  { type: "f", value: 1.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform float opacity;",
    +
    +		"uniform sampler2D tDiffuse;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 texel = texture2D( tDiffuse, vUv );",
    +			"gl_FragColor = opacity * texel;",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_DOFMipMapShader.js.html b/Docs/files/third-party_three.js_shaders_DOFMipMapShader.js.html new file mode 100644 index 0000000..da16a93 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_DOFMipMapShader.js.html @@ -0,0 +1,401 @@ + + + + + third-party/three.js/shaders/DOFMipMapShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/DOFMipMapShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Depth-of-field shader using mipmaps
    + * - from Matt Handley @applmak
    + * - requires power-of-2 sized render target with enabled mipmaps
    + */
    +
    +THREE.DOFMipMapShader = {
    +
    +	uniforms: {
    +
    +		"tColor":   { type: "t", value: null },
    +		"tDepth":   { type: "t", value: null },
    +		"focus":    { type: "f", value: 1.0 },
    +		"maxblur":  { type: "f", value: 1.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform float focus;",
    +		"uniform float maxblur;",
    +
    +		"uniform sampler2D tColor;",
    +		"uniform sampler2D tDepth;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 depth = texture2D( tDepth, vUv );",
    +
    +			"float factor = depth.x - focus;",
    +
    +			"vec4 col = texture2D( tColor, vUv, 2.0 * maxblur * abs( focus - depth.x ) );",
    +
    +			"gl_FragColor = col;",
    +			"gl_FragColor.a = 1.0;",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_DotScreenShader.js.html b/Docs/files/third-party_three.js_shaders_DotScreenShader.js.html new file mode 100644 index 0000000..0c2752e --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_DotScreenShader.js.html @@ -0,0 +1,411 @@ + + + + + third-party/three.js/shaders/DotScreenShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/DotScreenShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Dot screen shader
    + * based on glfx.js sepia shader
    + * https://github.com/evanw/glfx.js
    + */
    +
    +THREE.DotScreenShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"tSize":    { type: "v2", value: new THREE.Vector2( 256, 256 ) },
    +		"center":   { type: "v2", value: new THREE.Vector2( 0.5, 0.5 ) },
    +		"angle":    { type: "f", value: 1.57 },
    +		"scale":    { type: "f", value: 1.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform vec2 center;",
    +		"uniform float angle;",
    +		"uniform float scale;",
    +		"uniform vec2 tSize;",
    +
    +		"uniform sampler2D tDiffuse;",
    +
    +		"varying vec2 vUv;",
    +
    +		"float pattern() {",
    +
    +			"float s = sin( angle ), c = cos( angle );",
    +
    +			"vec2 tex = vUv * tSize - center;",
    +			"vec2 point = vec2( c * tex.x - s * tex.y, s * tex.x + c * tex.y ) * scale;",
    +
    +			"return ( sin( point.x ) * sin( point.y ) ) * 4.0;",
    +
    +		"}",
    +
    +		"void main() {",
    +
    +			"vec4 color = texture2D( tDiffuse, vUv );",
    +
    +			"float average = ( color.r + color.g + color.b ) / 3.0;",
    +
    +			"gl_FragColor = vec4( vec3( average * 10.0 - 5.0 + pattern() ), color.a );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_EdgeShader.js.html b/Docs/files/third-party_three.js_shaders_EdgeShader.js.html new file mode 100644 index 0000000..b82f7ce --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_EdgeShader.js.html @@ -0,0 +1,436 @@ + + + + + third-party/three.js/shaders/EdgeShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/EdgeShader.js

    + +
    +
    +/**
    + * @author zz85 / https://github.com/zz85 | https://www.lab4games.net/zz85/blog
    + *
    + * Edge Detection Shader using Frei-Chen filter
    + * Based on http://rastergrid.com/blog/2011/01/frei-chen-edge-detector
    + *
    + * aspect: vec2 of (1/width, 1/height)
    + */
    +
    +THREE.EdgeShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"aspect":    { type: "v2", value: new THREE.Vector2( 512, 512 ) }
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"varying vec2 vUv;",
    +
    +		"uniform vec2 aspect;",
    +
    +		"vec2 texel = vec2(1.0 / aspect.x, 1.0 / aspect.y);",
    +
    +
    +		"mat3 G[9];",
    +
    +		// hard coded matrix values!!!! as suggested in https://github.com/neilmendoza/ofxPostProcessing/blob/master/src/EdgePass.cpp#L45
    +
    +		"const mat3 g0 = mat3( 0.3535533845424652, 0, -0.3535533845424652, 0.5, 0, -0.5, 0.3535533845424652, 0, -0.3535533845424652 );",
    +		"const mat3 g1 = mat3( 0.3535533845424652, 0.5, 0.3535533845424652, 0, 0, 0, -0.3535533845424652, -0.5, -0.3535533845424652 );",
    +		"const mat3 g2 = mat3( 0, 0.3535533845424652, -0.5, -0.3535533845424652, 0, 0.3535533845424652, 0.5, -0.3535533845424652, 0 );",
    +		"const mat3 g3 = mat3( 0.5, -0.3535533845424652, 0, -0.3535533845424652, 0, 0.3535533845424652, 0, 0.3535533845424652, -0.5 );",
    +		"const mat3 g4 = mat3( 0, -0.5, 0, 0.5, 0, 0.5, 0, -0.5, 0 );",
    +		"const mat3 g5 = mat3( -0.5, 0, 0.5, 0, 0, 0, 0.5, 0, -0.5 );",
    +		"const mat3 g6 = mat3( 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.6666666865348816, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204 );",
    +		"const mat3 g7 = mat3( -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, 0.6666666865348816, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408 );",
    +		"const mat3 g8 = mat3( 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408 );",
    +
    +		"void main(void)",
    +		"{",
    +
    +			"G[0] = g0,",
    +			"G[1] = g1,",
    +			"G[2] = g2,",
    +			"G[3] = g3,",
    +			"G[4] = g4,",
    +			"G[5] = g5,",
    +			"G[6] = g6,",
    +			"G[7] = g7,",
    +			"G[8] = g8;",
    +
    +			"mat3 I;",
    +			"float cnv[9];",
    +			"vec3 sample;",
    +
    +			/* fetch the 3x3 neighbourhood and use the RGB vector's length as intensity value */
    +			"for (float i=0.0; i<3.0; i++) {",
    +				"for (float j=0.0; j<3.0; j++) {",
    +					"sample = texture2D(tDiffuse, vUv + texel * vec2(i-1.0,j-1.0) ).rgb;",
    +					"I[int(i)][int(j)] = length(sample);",
    +				"}",
    +			"}",
    +
    +			/* calculate the convolution values for all the masks */
    +			"for (int i=0; i<9; i++) {",
    +				"float dp3 = dot(G[i][0], I[0]) + dot(G[i][1], I[1]) + dot(G[i][2], I[2]);",
    +				"cnv[i] = dp3 * dp3;",
    +			"}",
    +
    +			"float M = (cnv[0] + cnv[1]) + (cnv[2] + cnv[3]);",
    +			"float S = (cnv[4] + cnv[5]) + (cnv[6] + cnv[7]) + (cnv[8] + M);",
    +
    +			"gl_FragColor = vec4(vec3(sqrt(M/S)), 1.0);",
    +		"}"
    +
    +	].join("\n")
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_EdgeShader2.js.html b/Docs/files/third-party_three.js_shaders_EdgeShader2.js.html new file mode 100644 index 0000000..dde68dd --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_EdgeShader2.js.html @@ -0,0 +1,416 @@ + + + + + third-party/three.js/shaders/EdgeShader2.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/EdgeShader2.js

    + +
    +
    +/**
    + * @author zz85 / https://github.com/zz85 | https://www.lab4games.net/zz85/blog
    + *
    + * Edge Detection Shader using Sobel filter
    + * Based on http://rastergrid.com/blog/2011/01/frei-chen-edge-detector
    + *
    + * aspect: vec2 of (1/width, 1/height)
    + */
    +
    +THREE.EdgeShader2 = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"aspect":    { type: "v2", value: new THREE.Vector2( 512, 512 ) }
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"varying vec2 vUv;",
    +		"uniform vec2 aspect;",
    +
    +
    +		"vec2 texel = vec2(1.0 / aspect.x, 1.0 / aspect.y);",
    +
    +		"mat3 G[2];",
    +
    +		"const mat3 g0 = mat3( 1.0, 2.0, 1.0, 0.0, 0.0, 0.0, -1.0, -2.0, -1.0 );",
    +		"const mat3 g1 = mat3( 1.0, 0.0, -1.0, 2.0, 0.0, -2.0, 1.0, 0.0, -1.0 );",
    +
    +
    +		"void main(void)",
    +		"{",
    +			"mat3 I;",
    +			"float cnv[2];",
    +			"vec3 sample;",
    +
    +			"G[0] = g0;",
    +			"G[1] = g1;",
    +
    +			/* fetch the 3x3 neighbourhood and use the RGB vector's length as intensity value */
    +			"for (float i=0.0; i<3.0; i++)",
    +			"for (float j=0.0; j<3.0; j++) {",
    +				"sample = texture2D( tDiffuse, vUv + texel * vec2(i-1.0,j-1.0) ).rgb;",
    +				"I[int(i)][int(j)] = length(sample);",
    +			"}",
    +
    +			/* calculate the convolution values for all the masks */
    +			"for (int i=0; i<2; i++) {",
    +				"float dp3 = dot(G[i][0], I[0]) + dot(G[i][1], I[1]) + dot(G[i][2], I[2]);",
    +				"cnv[i] = dp3 * dp3; ",
    +			"}",
    +
    +			"gl_FragColor = vec4(0.5 * sqrt(cnv[0]*cnv[0]+cnv[1]*cnv[1]));",
    +		"} "
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_FXAAShader.js.html b/Docs/files/third-party_three.js_shaders_FXAAShader.js.html new file mode 100644 index 0000000..fc48b00 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_FXAAShader.js.html @@ -0,0 +1,442 @@ + + + + + third-party/three.js/shaders/FXAAShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/FXAAShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + * @author davidedc / http://www.sketchpatch.net/
    + *
    + * NVIDIA FXAA by Timothy Lottes
    + * http://timothylottes.blogspot.com/2011/06/fxaa3-source-released.html
    + * - WebGL port by @supereggbert
    + * http://www.glge.org/demos/fxaa/
    + */
    +
    +THREE.FXAAShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse":   { type: "t", value: null },
    +		"resolution": { type: "v2", value: new THREE.Vector2( 1 / 1024, 1 / 512 )  }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform vec2 resolution;",
    +
    +		"varying vec2 vUv;",
    +
    +		"#define FXAA_REDUCE_MIN   (1.0/128.0)",
    +		"#define FXAA_REDUCE_MUL   (1.0/8.0)",
    +		"#define FXAA_SPAN_MAX     8.0",
    +
    +		"void main() {",
    +
    +			"vec3 rgbNW = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ).xyz;",
    +			"vec3 rgbNE = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ).xyz;",
    +			"vec3 rgbSW = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ).xyz;",
    +			"vec3 rgbSE = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ).xyz;",
    +			"vec4 rgbaM  = texture2D( tDiffuse,  gl_FragCoord.xy  * resolution );",
    +			"vec3 rgbM  = rgbaM.xyz;",
    +			"float opacity  = rgbaM.w;",
    +
    +			"vec3 luma = vec3( 0.299, 0.587, 0.114 );",
    +
    +			"float lumaNW = dot( rgbNW, luma );",
    +			"float lumaNE = dot( rgbNE, luma );",
    +			"float lumaSW = dot( rgbSW, luma );",
    +			"float lumaSE = dot( rgbSE, luma );",
    +			"float lumaM  = dot( rgbM,  luma );",
    +			"float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );",
    +			"float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );",
    +
    +			"vec2 dir;",
    +			"dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));",
    +			"dir.y =  ((lumaNW + lumaSW) - (lumaNE + lumaSE));",
    +
    +			"float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );",
    +
    +			"float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );",
    +			"dir = min( vec2( FXAA_SPAN_MAX,  FXAA_SPAN_MAX),",
    +				  "max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),",
    +						"dir * rcpDirMin)) * resolution;",
    +
    +			"vec3 rgbA = 0.5 * (",
    +				"texture2D( tDiffuse, gl_FragCoord.xy  * resolution + dir * ( 1.0 / 3.0 - 0.5 ) ).xyz +",
    +				"texture2D( tDiffuse, gl_FragCoord.xy  * resolution + dir * ( 2.0 / 3.0 - 0.5 ) ).xyz );",
    +
    +			"vec3 rgbB = rgbA * 0.5 + 0.25 * (",
    +				"texture2D( tDiffuse, gl_FragCoord.xy  * resolution + dir * -0.5 ).xyz +",
    +				"texture2D( tDiffuse, gl_FragCoord.xy  * resolution + dir * 0.5 ).xyz );",
    +
    +			"float lumaB = dot( rgbB, luma );",
    +
    +			"if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) ) {",
    +
    +				"gl_FragColor = vec4( rgbA, opacity );",
    +
    +			"} else {",
    +
    +				"gl_FragColor = vec4( rgbB, opacity );",
    +
    +			"}",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_FilmShader.js.html b/Docs/files/third-party_three.js_shaders_FilmShader.js.html new file mode 100644 index 0000000..6e9e59c --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_FilmShader.js.html @@ -0,0 +1,447 @@ + + + + + third-party/three.js/shaders/FilmShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/FilmShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Film grain & scanlines shader
    + *
    + * - ported from HLSL to WebGL / GLSL
    + * http://www.truevision3d.com/forums/showcase/staticnoise_colorblackwhite_scanline_shaders-t18698.0.html
    + *
    + * Screen Space Static Postprocessor
    + *
    + * Produces an analogue noise overlay similar to a film grain / TV static
    + *
    + * Original implementation and noise algorithm
    + * Pat 'Hawthorne' Shearon
    + *
    + * Optimized scanlines + noise version with intensity scaling
    + * Georg 'Leviathan' Steinrohder
    + *
    + * This version is provided under a Creative Commons Attribution 3.0 License
    + * http://creativecommons.org/licenses/by/3.0/
    + */
    +
    +THREE.FilmShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse":   { type: "t", value: null },
    +		"time":       { type: "f", value: 0.0 },
    +		"nIntensity": { type: "f", value: 0.5 },
    +		"sIntensity": { type: "f", value: 0.05 },
    +		"sCount":     { type: "f", value: 4096 },
    +		"grayscale":  { type: "i", value: 1 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		// control parameter
    +		"uniform float time;",
    +
    +		"uniform bool grayscale;",
    +
    +		// noise effect intensity value (0 = no effect, 1 = full effect)
    +		"uniform float nIntensity;",
    +
    +		// scanlines effect intensity value (0 = no effect, 1 = full effect)
    +		"uniform float sIntensity;",
    +
    +		// scanlines effect count value (0 = no effect, 4096 = full effect)
    +		"uniform float sCount;",
    +
    +		"uniform sampler2D tDiffuse;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			// sample the source
    +			"vec4 cTextureScreen = texture2D( tDiffuse, vUv );",
    +
    +			// make some noise
    +			"float x = vUv.x * vUv.y * time *  1000.0;",
    +			"x = mod( x, 13.0 ) * mod( x, 123.0 );",
    +			"float dx = mod( x, 0.01 );",
    +
    +			// add noise
    +			"vec3 cResult = cTextureScreen.rgb + cTextureScreen.rgb * clamp( 0.1 + dx * 100.0, 0.0, 1.0 );",
    +
    +			// get us a sine and cosine
    +			"vec2 sc = vec2( sin( vUv.y * sCount ), cos( vUv.y * sCount ) );",
    +
    +			// add scanlines
    +			"cResult += cTextureScreen.rgb * vec3( sc.x, sc.y, sc.x ) * sIntensity;",
    +
    +			// interpolate between source and result by intensity
    +			"cResult = cTextureScreen.rgb + clamp( nIntensity, 0.0,1.0 ) * ( cResult - cTextureScreen.rgb );",
    +
    +			// convert to grayscale if desired
    +			"if( grayscale ) {",
    +
    +				"cResult = vec3( cResult.r * 0.3 + cResult.g * 0.59 + cResult.b * 0.11 );",
    +
    +			"}",
    +
    +			"gl_FragColor =  vec4( cResult, cTextureScreen.a );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_FocusShader.js.html b/Docs/files/third-party_three.js_shaders_FocusShader.js.html new file mode 100644 index 0000000..3a87add --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_FocusShader.js.html @@ -0,0 +1,434 @@ + + + + + third-party/three.js/shaders/FocusShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/FocusShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Focus shader
    + * based on PaintEffect postprocess from ro.me
    + * http://code.google.com/p/3-dreams-of-black/source/browse/deploy/js/effects/PaintEffect.js
    + */
    +
    +THREE.FocusShader = {
    +
    +	uniforms : {
    +
    +		"tDiffuse":       { type: "t", value: null },
    +		"screenWidth":    { type: "f", value: 1024 },
    +		"screenHeight":   { type: "f", value: 1024 },
    +		"sampleDistance": { type: "f", value: 0.94 },
    +		"waveFactor":     { type: "f", value: 0.00125 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform float screenWidth;",
    +		"uniform float screenHeight;",
    +		"uniform float sampleDistance;",
    +		"uniform float waveFactor;",
    +
    +		"uniform sampler2D tDiffuse;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 color, org, tmp, add;",
    +			"float sample_dist, f;",
    +			"vec2 vin;",
    +			"vec2 uv = vUv;",
    +
    +			"add = color = org = texture2D( tDiffuse, uv );",
    +
    +			"vin = ( uv - vec2( 0.5 ) ) * vec2( 1.4 );",
    +			"sample_dist = dot( vin, vin ) * 2.0;",
    +
    +			"f = ( waveFactor * 100.0 + sample_dist ) * sampleDistance * 4.0;",
    +
    +			"vec2 sampleSize = vec2(  1.0 / screenWidth, 1.0 / screenHeight ) * vec2( f );",
    +
    +			"add += tmp = texture2D( tDiffuse, uv + vec2( 0.111964, 0.993712 ) * sampleSize );",
    +			"if( tmp.b < color.b ) color = tmp;",
    +
    +			"add += tmp = texture2D( tDiffuse, uv + vec2( 0.846724, 0.532032 ) * sampleSize );",
    +			"if( tmp.b < color.b ) color = tmp;",
    +
    +			"add += tmp = texture2D( tDiffuse, uv + vec2( 0.943883, -0.330279 ) * sampleSize );",
    +			"if( tmp.b < color.b ) color = tmp;",
    +
    +			"add += tmp = texture2D( tDiffuse, uv + vec2( 0.330279, -0.943883 ) * sampleSize );",
    +			"if( tmp.b < color.b ) color = tmp;",
    +
    +			"add += tmp = texture2D( tDiffuse, uv + vec2( -0.532032, -0.846724 ) * sampleSize );",
    +			"if( tmp.b < color.b ) color = tmp;",
    +
    +			"add += tmp = texture2D( tDiffuse, uv + vec2( -0.993712, -0.111964 ) * sampleSize );",
    +			"if( tmp.b < color.b ) color = tmp;",
    +
    +			"add += tmp = texture2D( tDiffuse, uv + vec2( -0.707107, 0.707107 ) * sampleSize );",
    +			"if( tmp.b < color.b ) color = tmp;",
    +
    +			"color = color * vec4( 2.0 ) - ( add / vec4( 8.0 ) );",
    +			"color = color + ( add / vec4( 8.0 ) - color ) * ( vec4( 1.0 ) - vec4( sample_dist * 0.5 ) );",
    +
    +			"gl_FragColor = vec4( color.rgb * color.rgb * vec3( 0.95 ) + color.rgb, 1.0 );",
    +
    +		"}"
    +
    +
    +	].join("\n")
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_FresnelShader.js.html b/Docs/files/third-party_three.js_shaders_FresnelShader.js.html new file mode 100644 index 0000000..e04f95d --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_FresnelShader.js.html @@ -0,0 +1,417 @@ + + + + + third-party/three.js/shaders/FresnelShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/FresnelShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Based on Nvidia Cg tutorial
    + */
    +
    +THREE.FresnelShader = {
    +
    +	uniforms: {
    +
    +		"mRefractionRatio": { type: "f", value: 1.02 },
    +		"mFresnelBias": { type: "f", value: 0.1 },
    +		"mFresnelPower": { type: "f", value: 2.0 },
    +		"mFresnelScale": { type: "f", value: 1.0 },
    +		"tCube": { type: "t", value: null }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"uniform float mRefractionRatio;",
    +		"uniform float mFresnelBias;",
    +		"uniform float mFresnelScale;",
    +		"uniform float mFresnelPower;",
    +
    +		"varying vec3 vReflect;",
    +		"varying vec3 vRefract[3];",
    +		"varying float vReflectionFactor;",
    +
    +		"void main() {",
    +
    +			"vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",
    +			"vec4 worldPosition = modelMatrix * vec4( position, 1.0 );",
    +
    +			"vec3 worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );",
    +
    +			"vec3 I = worldPosition.xyz - cameraPosition;",
    +
    +			"vReflect = reflect( I, worldNormal );",
    +			"vRefract[0] = refract( normalize( I ), worldNormal, mRefractionRatio );",
    +			"vRefract[1] = refract( normalize( I ), worldNormal, mRefractionRatio * 0.99 );",
    +			"vRefract[2] = refract( normalize( I ), worldNormal, mRefractionRatio * 0.98 );",
    +			"vReflectionFactor = mFresnelBias + mFresnelScale * pow( 1.0 + dot( normalize( I ), worldNormal ), mFresnelPower );",
    +
    +			"gl_Position = projectionMatrix * mvPosition;",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform samplerCube tCube;",
    +
    +		"varying vec3 vReflect;",
    +		"varying vec3 vRefract[3];",
    +		"varying float vReflectionFactor;",
    +
    +		"void main() {",
    +
    +			"vec4 reflectedColor = textureCube( tCube, vec3( -vReflect.x, vReflect.yz ) );",
    +			"vec4 refractedColor = vec4( 1.0 );",
    +
    +			"refractedColor.r = textureCube( tCube, vec3( -vRefract[0].x, vRefract[0].yz ) ).r;",
    +			"refractedColor.g = textureCube( tCube, vec3( -vRefract[1].x, vRefract[1].yz ) ).g;",
    +			"refractedColor.b = textureCube( tCube, vec3( -vRefract[2].x, vRefract[2].yz ) ).b;",
    +
    +			"gl_FragColor = mix( refractedColor, reflectedColor, clamp( vReflectionFactor, 0.0, 1.0 ) );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_HorizontalBlurShader.js.html b/Docs/files/third-party_three.js_shaders_HorizontalBlurShader.js.html new file mode 100644 index 0000000..e263871 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_HorizontalBlurShader.js.html @@ -0,0 +1,405 @@ + + + + + third-party/three.js/shaders/HorizontalBlurShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/HorizontalBlurShader.js

    + +
    +
    +/**
    + * @author zz85 / http://www.lab4games.net/zz85/blog
    + *
    + * Two pass Gaussian blur filter (horizontal and vertical blur shaders)
    + * - described in http://www.gamerendering.com/2008/10/11/gaussian-blur-filter-shader/
    + *   and used in http://www.cake23.de/traveling-wavefronts-lit-up.html
    + *
    + * - 9 samples per pass
    + * - standard deviation 2.7
    + * - "h" and "v" parameters should be set to "1 / width" and "1 / height"
    + */
    +
    +THREE.HorizontalBlurShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"h":        { type: "f", value: 1.0 / 512.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform float h;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 sum = vec4( 0.0 );",
    +
    +			"sum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;",
    +
    +			"gl_FragColor = sum;",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_HorizontalTiltShiftShader.js.html b/Docs/files/third-party_three.js_shaders_HorizontalTiltShiftShader.js.html new file mode 100644 index 0000000..858406f --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_HorizontalTiltShiftShader.js.html @@ -0,0 +1,408 @@ + + + + + third-party/three.js/shaders/HorizontalTiltShiftShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/HorizontalTiltShiftShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Simple fake tilt-shift effect, modulating two pass Gaussian blur (see above) by vertical position
    + *
    + * - 9 samples per pass
    + * - standard deviation 2.7
    + * - "h" and "v" parameters should be set to "1 / width" and "1 / height"
    + * - "r" parameter control where "focused" horizontal line lies
    + */
    +
    +THREE.HorizontalTiltShiftShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"h":        { type: "f", value: 1.0 / 512.0 },
    +		"r":        { type: "f", value: 0.35 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform float h;",
    +		"uniform float r;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 sum = vec4( 0.0 );",
    +
    +			"float hh = h * abs( r - vUv.y );",
    +
    +			"sum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * hh, vUv.y ) ) * 0.051;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * hh, vUv.y ) ) * 0.0918;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * hh, vUv.y ) ) * 0.12245;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * hh, vUv.y ) ) * 0.1531;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * hh, vUv.y ) ) * 0.1531;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * hh, vUv.y ) ) * 0.12245;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * hh, vUv.y ) ) * 0.0918;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * hh, vUv.y ) ) * 0.051;",
    +
    +			"gl_FragColor = sum;",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_HueSaturationShader.js.html b/Docs/files/third-party_three.js_shaders_HueSaturationShader.js.html new file mode 100644 index 0000000..ce97640 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_HueSaturationShader.js.html @@ -0,0 +1,412 @@ + + + + + third-party/three.js/shaders/HueSaturationShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/HueSaturationShader.js

    + +
    +
    +/**
    + * @author tapio / http://tapio.github.com/
    + *
    + * Hue and saturation adjustment
    + * https://github.com/evanw/glfx.js
    + * hue: -1 to 1 (-1 is 180 degrees in the negative direction, 0 is no change, etc.
    + * saturation: -1 to 1 (-1 is solid gray, 0 is no change, and 1 is maximum contrast)
    + */
    +
    +THREE.HueSaturationShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse":   { type: "t", value: null },
    +		"hue":        { type: "f", value: 0 },
    +		"saturation": { type: "f", value: 0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform float hue;",
    +		"uniform float saturation;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"gl_FragColor = texture2D( tDiffuse, vUv );",
    +
    +			// hue
    +			"float angle = hue * 3.14159265;",
    +			"float s = sin(angle), c = cos(angle);",
    +			"vec3 weights = (vec3(2.0 * c, -sqrt(3.0) * s - c, sqrt(3.0) * s - c) + 1.0) / 3.0;",
    +			"float len = length(gl_FragColor.rgb);",
    +			"gl_FragColor.rgb = vec3(",
    +				"dot(gl_FragColor.rgb, weights.xyz),",
    +				"dot(gl_FragColor.rgb, weights.zxy),",
    +				"dot(gl_FragColor.rgb, weights.yzx)",
    +			");",
    +
    +			// saturation
    +			"float average = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;",
    +			"if (saturation > 0.0) {",
    +				"gl_FragColor.rgb += (average - gl_FragColor.rgb) * (1.0 - 1.0 / (1.001 - saturation));",
    +			"} else {",
    +				"gl_FragColor.rgb += (average - gl_FragColor.rgb) * (-saturation);",
    +			"}",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_KaleidoShader.js.html b/Docs/files/third-party_three.js_shaders_KaleidoShader.js.html new file mode 100644 index 0000000..ed17542 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_KaleidoShader.js.html @@ -0,0 +1,403 @@ + + + + + third-party/three.js/shaders/KaleidoShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/KaleidoShader.js

    + +
    +
    +/**
    + * @author felixturner / http://airtight.cc/
    + *
    + * Kaleidoscope Shader
    + * Radial reflection around center point
    + * Ported from: http://pixelshaders.com/editor/
    + * by Toby Schachman / http://tobyschachman.com/
    + *
    + * sides: number of reflections
    + * angle: initial angle in radians
    + */
    +
    +THREE.KaleidoShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"sides":    { type: "f", value: 6.0 },
    +		"angle":    { type: "f", value: 0.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform float sides;",
    +		"uniform float angle;",
    +		
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec2 p = vUv - 0.5;",
    +			"float r = length(p);",
    +			"float a = atan(p.y, p.x) + angle;",
    +			"float tau = 2. * 3.1416 ;",
    +			"a = mod(a, tau/sides);",
    +			"a = abs(a - tau/sides/2.) ;",
    +			"p = r * vec2(cos(a), sin(a));",
    +			"vec4 color = texture2D(tDiffuse, p + 0.5);",
    +			"gl_FragColor = color;",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_LuminosityShader.js.html b/Docs/files/third-party_three.js_shaders_LuminosityShader.js.html new file mode 100644 index 0000000..c3c7152 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_LuminosityShader.js.html @@ -0,0 +1,393 @@ + + + + + third-party/three.js/shaders/LuminosityShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/LuminosityShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Luminosity
    + * http://en.wikipedia.org/wiki/Luminosity
    + */
    +
    +THREE.LuminosityShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 texel = texture2D( tDiffuse, vUv );",
    +
    +			"vec3 luma = vec3( 0.299, 0.587, 0.114 );",
    +
    +			"float v = dot( texel.xyz, luma );",
    +
    +			"gl_FragColor = vec4( v, v, v, texel.w );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_MirrorShader.js.html b/Docs/files/third-party_three.js_shaders_MirrorShader.js.html new file mode 100644 index 0000000..ce44fd8 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_MirrorShader.js.html @@ -0,0 +1,401 @@ + + + + + third-party/three.js/shaders/MirrorShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/MirrorShader.js

    + +
    +
    +/**
    + * @author felixturner / http://airtight.cc/
    + *
    + * Mirror Shader
    + * Copies half the input to the other half
    + *
    + * side: side of input to mirror (0 = left, 1 = right, 2 = top, 3 = bottom)
    + */
    +
    +THREE.MirrorShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"side":     { type: "i", value: 1 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform int side;",
    +		
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec2 p = vUv;",
    +			"if (side == 0){",
    +				"if (p.x > 0.5) p.x = 1.0 - p.x;",
    +			"}else if (side == 1){",
    +				"if (p.x < 0.5) p.x = 1.0 - p.x;",
    +			"}else if (side == 2){",
    +				"if (p.y < 0.5) p.y = 1.0 - p.y;",
    +			"}else if (side == 3){",
    +				"if (p.y > 0.5) p.y = 1.0 - p.y;",
    +			"} ",
    +			"vec4 color = texture2D(tDiffuse, p);",
    +			"gl_FragColor = color;",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_NormalMapShader.js.html b/Docs/files/third-party_three.js_shaders_NormalMapShader.js.html new file mode 100644 index 0000000..0fabf02 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_NormalMapShader.js.html @@ -0,0 +1,396 @@ + + + + + third-party/three.js/shaders/NormalMapShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/NormalMapShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Normal map shader
    + * - compute normals from heightmap
    + */
    +
    +THREE.NormalMapShader = {
    +
    +	uniforms: {
    +
    +		"heightMap":  { type: "t", value: null },
    +		"resolution": { type: "v2", value: new THREE.Vector2( 512, 512 ) },
    +		"scale":      { type: "v2", value: new THREE.Vector2( 1, 1 ) },
    +		"height":     { type: "f", value: 0.05 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform float height;",
    +		"uniform vec2 resolution;",
    +		"uniform sampler2D heightMap;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"float val = texture2D( heightMap, vUv ).x;",
    +
    +			"float valU = texture2D( heightMap, vUv + vec2( 1.0 / resolution.x, 0.0 ) ).x;",
    +			"float valV = texture2D( heightMap, vUv + vec2( 0.0, 1.0 / resolution.y ) ).x;",
    +
    +			"gl_FragColor = vec4( ( 0.5 * normalize( vec3( val - valU, val - valV, height  ) ) + 0.5 ), 1.0 );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_RGBShiftShader.js.html b/Docs/files/third-party_three.js_shaders_RGBShiftShader.js.html new file mode 100644 index 0000000..676196c --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_RGBShiftShader.js.html @@ -0,0 +1,399 @@ + + + + + third-party/three.js/shaders/RGBShiftShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/RGBShiftShader.js

    + +
    +
    +/**
    + * @author felixturner / http://airtight.cc/
    + *
    + * RGB Shift Shader
    + * Shifts red and blue channels from center in opposite directions
    + * Ported from http://kriss.cx/tom/2009/05/rgb-shift/
    + * by Tom Butterworth / http://kriss.cx/tom/
    + *
    + * amount: shift distance (1 is width of input)
    + * angle: shift angle in radians
    + */
    +
    +THREE.RGBShiftShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"amount":   { type: "f", value: 0.005 },
    +		"angle":    { type: "f", value: 0.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform float amount;",
    +		"uniform float angle;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec2 offset = amount * vec2( cos(angle), sin(angle));",
    +			"vec4 cr = texture2D(tDiffuse, vUv + offset);",
    +			"vec4 cga = texture2D(tDiffuse, vUv);",
    +			"vec4 cb = texture2D(tDiffuse, vUv - offset);",
    +			"gl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_SSAOShader.js.html b/Docs/files/third-party_three.js_shaders_SSAOShader.js.html new file mode 100644 index 0000000..02e01a1 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_SSAOShader.js.html @@ -0,0 +1,602 @@ + + + + + third-party/three.js/shaders/SSAOShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/SSAOShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Screen-space ambient occlusion shader
    + * - ported from
    + *   SSAO GLSL shader v1.2
    + *   assembled by Martins Upitis (martinsh) (http://devlog-martinsh.blogspot.com)
    + *   original technique is made by ArKano22 (http://www.gamedev.net/topic/550699-ssao-no-halo-artifacts/)
    + * - modifications
    + * - modified to use RGBA packed depth texture (use clear color 1,1,1,1 for depth pass)
    + * - made fog more compatible with three.js linear fog
    + * - refactoring and optimizations
    + */
    +
    +THREE.SSAOShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse":     { type: "t", value: null },
    +		"tDepth":       { type: "t", value: null },
    +		"size":         { type: "v2", value: new THREE.Vector2( 512, 512 ) },
    +		"cameraNear":   { type: "f", value: 1 },
    +		"cameraFar":    { type: "f", value: 100 },
    +		"fogNear":      { type: "f", value: 5 },
    +		"fogFar":       { type: "f", value: 100 },
    +		"fogEnabled":   { type: "i", value: 0 },
    +		"onlyAO":       { type: "i", value: 0 },
    +		"aoClamp":      { type: "f", value: 0.3 },
    +		"lumInfluence": { type: "f", value: 0.9 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform float cameraNear;",
    +		"uniform float cameraFar;",
    +
    +		"uniform float fogNear;",
    +		"uniform float fogFar;",
    +
    +		"uniform bool fogEnabled;",  // attenuate AO with linear fog
    +		"uniform bool onlyAO;",      // use only ambient occlusion pass?
    +
    +		"uniform vec2 size;",        // texture width, height
    +		"uniform float aoClamp;",    // depth clamp - reduces haloing at screen edges
    +
    +		"uniform float lumInfluence;",  // how much luminance affects occlusion
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform sampler2D tDepth;",
    +
    +		"varying vec2 vUv;",
    +
    +		// "#define PI 3.14159265",
    +		"#define DL 2.399963229728653",  // PI * ( 3.0 - sqrt( 5.0 ) )
    +		"#define EULER 2.718281828459045",
    +
    +		// helpers
    +
    +		"float width = size.x;",   // texture width
    +		"float height = size.y;",  // texture height
    +
    +		"float cameraFarPlusNear = cameraFar + cameraNear;",
    +		"float cameraFarMinusNear = cameraFar - cameraNear;",
    +		"float cameraCoef = 2.0 * cameraNear;",
    +
    +		// user variables
    +
    +		"const int samples = 8;",     // ao sample count
    +		"const float radius = 5.0;",  // ao radius
    +
    +		"const bool useNoise = false;",      // use noise instead of pattern for sample dithering
    +		"const float noiseAmount = 0.0003;", // dithering amount
    +
    +		"const float diffArea = 0.4;",   // self-shadowing reduction
    +		"const float gDisplace = 0.4;",  // gauss bell center
    +
    +		"const vec3 onlyAOColor = vec3( 1.0, 0.7, 0.5 );",
    +		// "const vec3 onlyAOColor = vec3( 1.0, 1.0, 1.0 );",
    +
    +
    +		// RGBA depth
    +
    +		"float unpackDepth( const in vec4 rgba_depth ) {",
    +
    +			"const vec4 bit_shift = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );",
    +			"float depth = dot( rgba_depth, bit_shift );",
    +			"return depth;",
    +
    +		"}",
    +
    +		// generating noise / pattern texture for dithering
    +
    +		"vec2 rand( const vec2 coord ) {",
    +
    +			"vec2 noise;",
    +
    +			"if ( useNoise ) {",
    +
    +				"float nx = dot ( coord, vec2( 12.9898, 78.233 ) );",
    +				"float ny = dot ( coord, vec2( 12.9898, 78.233 ) * 2.0 );",
    +
    +				"noise = clamp( fract ( 43758.5453 * sin( vec2( nx, ny ) ) ), 0.0, 1.0 );",
    +
    +			"} else {",
    +
    +				"float ff = fract( 1.0 - coord.s * ( width / 2.0 ) );",
    +				"float gg = fract( coord.t * ( height / 2.0 ) );",
    +
    +				"noise = vec2( 0.25, 0.75 ) * vec2( ff ) + vec2( 0.75, 0.25 ) * gg;",
    +
    +			"}",
    +
    +			"return ( noise * 2.0  - 1.0 ) * noiseAmount;",
    +
    +		"}",
    +
    +		"float doFog() {",
    +
    +			"float zdepth = unpackDepth( texture2D( tDepth, vUv ) );",
    +			"float depth = -cameraFar * cameraNear / ( zdepth * cameraFarMinusNear - cameraFar );",
    +
    +			"return smoothstep( fogNear, fogFar, depth );",
    +
    +		"}",
    +
    +		"float readDepth( const in vec2 coord ) {",
    +
    +			// "return ( 2.0 * cameraNear ) / ( cameraFar + cameraNear - unpackDepth( texture2D( tDepth, coord ) ) * ( cameraFar - cameraNear ) );",
    +			"return cameraCoef / ( cameraFarPlusNear - unpackDepth( texture2D( tDepth, coord ) ) * cameraFarMinusNear );",
    +
    +
    +		"}",
    +
    +		"float compareDepths( const in float depth1, const in float depth2, inout int far ) {",
    +
    +			"float garea = 2.0;",                         // gauss bell width
    +			"float diff = ( depth1 - depth2 ) * 100.0;",  // depth difference (0-100)
    +
    +			// reduce left bell width to avoid self-shadowing
    +
    +			"if ( diff < gDisplace ) {",
    +
    +				"garea = diffArea;",
    +
    +			"} else {",
    +
    +				"far = 1;",
    +
    +			"}",
    +
    +			"float dd = diff - gDisplace;",
    +			"float gauss = pow( EULER, -2.0 * dd * dd / ( garea * garea ) );",
    +			"return gauss;",
    +
    +		"}",
    +
    +		"float calcAO( float depth, float dw, float dh ) {",
    +
    +			"float dd = radius - depth * radius;",
    +			"vec2 vv = vec2( dw, dh );",
    +
    +			"vec2 coord1 = vUv + dd * vv;",
    +			"vec2 coord2 = vUv - dd * vv;",
    +
    +			"float temp1 = 0.0;",
    +			"float temp2 = 0.0;",
    +
    +			"int far = 0;",
    +			"temp1 = compareDepths( depth, readDepth( coord1 ), far );",
    +
    +			// DEPTH EXTRAPOLATION
    +
    +			"if ( far > 0 ) {",
    +
    +				"temp2 = compareDepths( readDepth( coord2 ), depth, far );",
    +				"temp1 += ( 1.0 - temp1 ) * temp2;",
    +
    +			"}",
    +
    +			"return temp1;",
    +
    +		"}",
    +
    +		"void main() {",
    +
    +			"vec2 noise = rand( vUv );",
    +			"float depth = readDepth( vUv );",
    +
    +			"float tt = clamp( depth, aoClamp, 1.0 );",
    +
    +			"float w = ( 1.0 / width )  / tt + ( noise.x * ( 1.0 - noise.x ) );",
    +			"float h = ( 1.0 / height ) / tt + ( noise.y * ( 1.0 - noise.y ) );",
    +
    +			"float pw;",
    +			"float ph;",
    +
    +			"float ao;",
    +
    +			"float dz = 1.0 / float( samples );",
    +			"float z = 1.0 - dz / 2.0;",
    +			"float l = 0.0;",
    +
    +			"for ( int i = 0; i <= samples; i ++ ) {",
    +
    +				"float r = sqrt( 1.0 - z );",
    +
    +				"pw = cos( l ) * r;",
    +				"ph = sin( l ) * r;",
    +				"ao += calcAO( depth, pw * w, ph * h );",
    +				"z = z - dz;",
    +				"l = l + DL;",
    +
    +			"}",
    +
    +			"ao /= float( samples );",
    +			"ao = 1.0 - ao;",
    +
    +			"if ( fogEnabled ) {",
    +
    +				"ao = mix( ao, 1.0, doFog() );",
    +
    +			"}",
    +
    +			"vec3 color = texture2D( tDiffuse, vUv ).rgb;",
    +
    +			"vec3 lumcoeff = vec3( 0.299, 0.587, 0.114 );",
    +			"float lum = dot( color.rgb, lumcoeff );",
    +			"vec3 luminance = vec3( lum );",
    +
    +			"vec3 final = vec3( color * mix( vec3( ao ), vec3( 1.0 ), luminance * lumInfluence ) );",  // mix( color * ao, white, luminance )
    +
    +			"if ( onlyAO ) {",
    +
    +				"final = onlyAOColor * vec3( mix( vec3( ao ), vec3( 1.0 ), luminance * lumInfluence ) );",  // ambient occlusion only
    +
    +			"}",
    +
    +			"gl_FragColor = vec4( final, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_SepiaShader.js.html b/Docs/files/third-party_three.js_shaders_SepiaShader.js.html new file mode 100644 index 0000000..177f21e --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_SepiaShader.js.html @@ -0,0 +1,397 @@ + + + + + third-party/three.js/shaders/SepiaShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/SepiaShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Sepia tone shader
    + * based on glfx.js sepia shader
    + * https://github.com/evanw/glfx.js
    + */
    +
    +THREE.SepiaShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"amount":   { type: "f", value: 1.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform float amount;",
    +
    +		"uniform sampler2D tDiffuse;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 color = texture2D( tDiffuse, vUv );",
    +			"vec3 c = color.rgb;",
    +
    +			"color.r = dot( c, vec3( 1.0 - 0.607 * amount, 0.769 * amount, 0.189 * amount ) );",
    +			"color.g = dot( c, vec3( 0.349 * amount, 1.0 - 0.314 * amount, 0.168 * amount ) );",
    +			"color.b = dot( c, vec3( 0.272 * amount, 0.534 * amount, 1.0 - 0.869 * amount ) );",
    +
    +			"gl_FragColor = vec4( min( vec3( 1.0 ), color.rgb ), color.a );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_TriangleBlurShader.js.html b/Docs/files/third-party_three.js_shaders_TriangleBlurShader.js.html new file mode 100644 index 0000000..4839d14 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_TriangleBlurShader.js.html @@ -0,0 +1,421 @@ + + + + + third-party/three.js/shaders/TriangleBlurShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/TriangleBlurShader.js

    + +
    +
    +/**
    + * @author zz85 / http://www.lab4games.net/zz85/blog
    + *
    + * Triangle blur shader
    + * based on glfx.js triangle blur shader
    + * https://github.com/evanw/glfx.js
    + *
    + * A basic blur filter, which convolves the image with a
    + * pyramid filter. The pyramid filter is separable and is applied as two
    + * perpendicular triangle filters.
    + */
    +
    +THREE.TriangleBlurShader = {
    +
    +	uniforms : {
    +
    +		"texture": { type: "t", value: null },
    +		"delta":   { type: "v2", value:new THREE.Vector2( 1, 1 )  }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"#define ITERATIONS 10.0",
    +
    +		"uniform sampler2D texture;",
    +		"uniform vec2 delta;",
    +
    +		"varying vec2 vUv;",
    +
    +		"float random( vec3 scale, float seed ) {",
    +
    +			// use the fragment position for a different seed per-pixel
    +
    +			"return fract( sin( dot( gl_FragCoord.xyz + seed, scale ) ) * 43758.5453 + seed );",
    +
    +		"}",
    +
    +		"void main() {",
    +
    +			"vec4 color = vec4( 0.0 );",
    +
    +			"float total = 0.0;",
    +
    +			// randomize the lookup values to hide the fixed number of samples
    +
    +			"float offset = random( vec3( 12.9898, 78.233, 151.7182 ), 0.0 );",
    +
    +			"for ( float t = -ITERATIONS; t <= ITERATIONS; t ++ ) {",
    +
    +				"float percent = ( t + offset - 0.5 ) / ITERATIONS;",
    +				"float weight = 1.0 - abs( percent );",
    +
    +				"color += texture2D( texture, vUv + delta * percent ) * weight;",
    +				"total += weight;",
    +
    +			"}",
    +
    +			"gl_FragColor = color / total;",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_UnpackDepthRGBAShader.js.html b/Docs/files/third-party_three.js_shaders_UnpackDepthRGBAShader.js.html new file mode 100644 index 0000000..5b76c58 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_UnpackDepthRGBAShader.js.html @@ -0,0 +1,400 @@ + + + + + third-party/three.js/shaders/UnpackDepthRGBAShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/UnpackDepthRGBAShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Unpack RGBA depth shader
    + * - show RGBA encoded depth as monochrome color
    + */
    +
    +THREE.UnpackDepthRGBAShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"opacity":  { type: "f", value: 1.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform float opacity;",
    +
    +		"uniform sampler2D tDiffuse;",
    +
    +		"varying vec2 vUv;",
    +
    +		// RGBA depth
    +
    +		"float unpackDepth( const in vec4 rgba_depth ) {",
    +
    +			"const vec4 bit_shift = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );",
    +			"float depth = dot( rgba_depth, bit_shift );",
    +			"return depth;",
    +
    +		"}",
    +
    +		"void main() {",
    +
    +			"float depth = 1.0 - unpackDepth( texture2D( tDiffuse, vUv ) );",
    +			"gl_FragColor = opacity * vec4( vec3( depth ), 1.0 );",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_VerticalBlurShader.js.html b/Docs/files/third-party_three.js_shaders_VerticalBlurShader.js.html new file mode 100644 index 0000000..9b0d383 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_VerticalBlurShader.js.html @@ -0,0 +1,405 @@ + + + + + third-party/three.js/shaders/VerticalBlurShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/VerticalBlurShader.js

    + +
    +
    +/**
    + * @author zz85 / http://www.lab4games.net/zz85/blog
    + *
    + * Two pass Gaussian blur filter (horizontal and vertical blur shaders)
    + * - described in http://www.gamerendering.com/2008/10/11/gaussian-blur-filter-shader/
    + *   and used in http://www.cake23.de/traveling-wavefronts-lit-up.html
    + *
    + * - 9 samples per pass
    + * - standard deviation 2.7
    + * - "h" and "v" parameters should be set to "1 / width" and "1 / height"
    + */
    +
    +THREE.VerticalBlurShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"v":        { type: "f", value: 1.0 / 512.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform float v;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 sum = vec4( 0.0 );",
    +
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;",
    +
    +			"gl_FragColor = sum;",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_VerticalTiltShiftShader.js.html b/Docs/files/third-party_three.js_shaders_VerticalTiltShiftShader.js.html new file mode 100644 index 0000000..b14a027 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_VerticalTiltShiftShader.js.html @@ -0,0 +1,408 @@ + + + + + third-party/three.js/shaders/VerticalTiltShiftShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/VerticalTiltShiftShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Simple fake tilt-shift effect, modulating two pass Gaussian blur (see above) by vertical position
    + *
    + * - 9 samples per pass
    + * - standard deviation 2.7
    + * - "h" and "v" parameters should be set to "1 / width" and "1 / height"
    + * - "r" parameter control where "focused" horizontal line lies
    + */
    +
    +THREE.VerticalTiltShiftShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"v":        { type: "f", value: 1.0 / 512.0 },
    +		"r":        { type: "f", value: 0.35 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform sampler2D tDiffuse;",
    +		"uniform float v;",
    +		"uniform float r;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vec4 sum = vec4( 0.0 );",
    +
    +			"float vv = v * abs( r - vUv.y );",
    +
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * vv ) ) * 0.051;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * vv ) ) * 0.0918;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * vv ) ) * 0.12245;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * vv ) ) * 0.1531;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * vv ) ) * 0.1531;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * vv ) ) * 0.12245;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * vv ) ) * 0.0918;",
    +			"sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * vv ) ) * 0.051;",
    +
    +			"gl_FragColor = sum;",
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_three.js_shaders_VignetteShader.js.html b/Docs/files/third-party_three.js_shaders_VignetteShader.js.html new file mode 100644 index 0000000..38ef902 --- /dev/null +++ b/Docs/files/third-party_three.js_shaders_VignetteShader.js.html @@ -0,0 +1,406 @@ + + + + + third-party/three.js/shaders/VignetteShader.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/three.js/shaders/VignetteShader.js

    + +
    +
    +/**
    + * @author alteredq / http://alteredqualia.com/
    + *
    + * Vignette shader
    + * based on PaintEffect postprocess from ro.me
    + * http://code.google.com/p/3-dreams-of-black/source/browse/deploy/js/effects/PaintEffect.js
    + */
    +
    +THREE.VignetteShader = {
    +
    +	uniforms: {
    +
    +		"tDiffuse": { type: "t", value: null },
    +		"offset":   { type: "f", value: 1.0 },
    +		"darkness": { type: "f", value: 1.0 }
    +
    +	},
    +
    +	vertexShader: [
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			"vUv = uv;",
    +			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    +
    +		"}"
    +
    +	].join("\n"),
    +
    +	fragmentShader: [
    +
    +		"uniform float offset;",
    +		"uniform float darkness;",
    +
    +		"uniform sampler2D tDiffuse;",
    +
    +		"varying vec2 vUv;",
    +
    +		"void main() {",
    +
    +			// Eskil's vignette
    +
    +			"vec4 texel = texture2D( tDiffuse, vUv );",
    +			"vec2 uv = ( vUv - vec2( 0.5 ) ) * vec2( offset );",
    +			"gl_FragColor = vec4( mix( texel.rgb, vec3( 1.0 - darkness ), dot( uv, uv ) ), texel.a );",
    +
    +			/*
    +			// alternative version from glfx.js
    +			// this one makes more "dusty" look (as opposed to "burned")
    +
    +			"vec4 color = texture2D( tDiffuse, vUv );",
    +			"float dist = distance( vUv, vec2( 0.5 ) );",
    +			"color.rgb *= smoothstep( 0.8, offset * 0.799, dist *( darkness + offset ) );",
    +			"gl_FragColor = color;",
    +			*/
    +
    +		"}"
    +
    +	].join("\n")
    +
    +};
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/files/third-party_webgl-utils.js.html b/Docs/files/third-party_webgl-utils.js.html new file mode 100644 index 0000000..086b9c2 --- /dev/null +++ b/Docs/files/third-party_webgl-utils.js.html @@ -0,0 +1,517 @@ + + + + + third-party/webgl-utils.js - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    File: third-party/webgl-utils.js

    + +
    +
    +/*
    + * Copyright 2010, Google Inc.
    + * All rights reserved.
    + *
    + * Redistribution and use in source and binary forms, with or without
    + * modification, are permitted provided that the following conditions are
    + * met:
    + *
    + *     * Redistributions of source code must retain the above copyright
    + * notice, this list of conditions and the following disclaimer.
    + *     * Redistributions in binary form must reproduce the above
    + * copyright notice, this list of conditions and the following disclaimer
    + * in the documentation and/or other materials provided with the
    + * distribution.
    + *     * Neither the name of Google Inc. nor the names of its
    + * contributors may be used to endorse or promote products derived from
    + * this software without specific prior written permission.
    + *
    + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    + */
    +
    +
    +/**
    + * @fileoverview This file contains functions every webgl program will need
    + * a version of one way or another.
    + *
    + * Instead of setting up a context manually it is recommended to
    + * use. This will check for success or failure. On failure it
    + * will attempt to present an approriate message to the user.
    + *
    + *       gl = WebGLUtils.setupWebGL(canvas);
    + *
    + * For animated WebGL apps use of setTimeout or setInterval are
    + * discouraged. It is recommended you structure your rendering
    + * loop like this.
    + *
    + *       function render() {
    + *         window.requestAnimFrame(render, canvas);
    + *
    + *         // do rendering
    + *         ...
    + *       }
    + *       render();
    + *
    + * This will call your rendering function up to the refresh rate
    + * of your display but will stop rendering if your app is not
    + * visible.
    + */
    +
    +WebGLUtils = function() {
    +
    +/**
    + * Creates the HTLM for a failure message
    + * @param {string} canvasContainerId id of container of th
    + *        canvas.
    + * @return {string} The html.
    + */
    +var makeFailHTML = function(msg) {
    +  return '' +
    +    '<table style="background-color: #8CE; width: 100%; height: 100%;"><tr>' +
    +    '<td align="center">' +
    +    '<div style="display: table-cell; vertical-align: middle;">' +
    +    '<div style="">' + msg + '</div>' +
    +    '</div>' +
    +    '</td></tr></table>';
    +};
    +
    +/**
    + * Mesasge for getting a webgl browser
    + * @type {string}
    + */
    +var GET_A_WEBGL_BROWSER = '' +
    +  'This page requires a browser that supports WebGL.<br/>' +
    +  '<a href="http://get.webgl.org">Click here to upgrade your browser.</a>';
    +
    +/**
    + * Mesasge for need better hardware
    + * @type {string}
    + */
    +var OTHER_PROBLEM = '' +
    +  "It doesn't appear your computer can support WebGL.<br/>" +
    +  '<a href="http://get.webgl.org/troubleshooting/">Click here for more information.</a>';
    +
    +/**
    + * Creates a webgl context. If creation fails it will
    + * change the contents of the container of the <canvas>
    + * tag to an error message with the correct links for WebGL.
    + * @param {Element} canvas. The canvas element to create a
    + *     context from.
    + * @param {WebGLContextCreationAttirbutes} opt_attribs Any
    + *     creation attributes you want to pass in.
    + * @param {function:(msg)} opt_onError An function to call
    + *     if there is an error during creation.
    + * @return {WebGLRenderingContext} The created context.
    + */
    +var setupWebGL = function(canvas, opt_attribs, opt_onError) {
    +  function handleCreationError(msg) {
    +    var container = canvas.parentNode;
    +    if (container) {
    +      var str = window.WebGLRenderingContext ?
    +           OTHER_PROBLEM :
    +           GET_A_WEBGL_BROWSER;
    +      if (msg) {
    +        str += "<br/><br/>Status: " + msg;
    +      }
    +      container.innerHTML = makeFailHTML(str);
    +    }
    +  };
    +
    +  opt_onError = opt_onError || handleCreationError;
    +
    +  if (canvas.addEventListener) {
    +    canvas.addEventListener("webglcontextcreationerror", function(event) {
    +          opt_onError(event.statusMessage);
    +        }, false);
    +  }
    +  var context = create3DContext(canvas, opt_attribs);
    +  if (!context) {
    +    if (!window.WebGLRenderingContext) {
    +      opt_onError("");
    +    }
    +  }
    +  return context;
    +};
    +
    +/**
    + * Creates a webgl context.
    + * @param {!Canvas} canvas The canvas tag to get context
    + *     from. If one is not passed in one will be created.
    + * @return {!WebGLContext} The created context.
    + */
    +var create3DContext = function(canvas, opt_attribs) {
    +  var names = ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"];
    +  var context = null;
    +  for (var ii = 0; ii < names.length; ++ii) {
    +    try {
    +      context = canvas.getContext(names[ii], opt_attribs);
    +    } catch(e) {}
    +    if (context) {
    +      break;
    +    }
    +  }
    +  return context;
    +}
    +
    +return {
    +  create3DContext: create3DContext,
    +  setupWebGL: setupWebGL
    +};
    +}();
    +
    +/**
    + * Provides requestAnimationFrame in a cross browser way.
    + */
    +window.requestAnimFrame = (function() {
    +  return window.requestAnimationFrame ||
    +         window.webkitRequestAnimationFrame ||
    +         window.mozRequestAnimationFrame ||
    +         window.oRequestAnimationFrame ||
    +         window.msRequestAnimationFrame ||
    +         function(/* function FrameRequestCallback */ callback, /* DOMElement Element */ element) {
    +           window.setTimeout(callback, 1000/60);
    +         };
    +})();
    +
    +    
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/index.html b/Docs/index.html index 92cc8c3..be263df 100644 --- a/Docs/index.html +++ b/Docs/index.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    diff --git a/Docs/modules/Bitwise Operators.html b/Docs/modules/Bitwise Operators.html new file mode 100644 index 0000000..48754d3 --- /dev/null +++ b/Docs/modules/Bitwise Operators.html @@ -0,0 +1,398 @@ + + + + + Bitwise Operators - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    Bitwise Operators Module

    + + +

    Summary

    +
    +

    Bitwise Operators. TODO: fix all examples

    + +
    + + + +
    +
    + +

    This module provides the following functions:

    + + + +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/modules/Buffers.html b/Docs/modules/Buffers.html new file mode 100644 index 0000000..c9a3d4d --- /dev/null +++ b/Docs/modules/Buffers.html @@ -0,0 +1,368 @@ + + + + + Buffers - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    Buffers Module

    + + +

    Summary

    +
    +

    Buffers.

    + +
    + + + +
    +
    + +

    This module provides the following functions:

    + + + +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/modules/Chaos.html b/Docs/modules/Chaos.html index 91095cf..b439729 100644 --- a/Docs/modules/Chaos.html +++ b/Docs/modules/Chaos.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    diff --git a/Docs/modules/Delays.html b/Docs/modules/Delays.html index b58a00a..a7a059e 100644 --- a/Docs/modules/Delays.html +++ b/Docs/modules/Delays.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -212,8 +340,56 @@

    Summary

  • - - allpassN + + bufAllpassC + +
  • + +
  • + + bufAllpassL + +
  • + +
  • + + bufAllpassN + +
  • + +
  • + + bufCombC + +
  • + +
  • + + bufCombL + +
  • + +
  • + + bufCombN + +
  • + +
  • + + bufDelayC + +
  • + +
  • + + bufDelayL + +
  • + +
  • + + bufDelayN
  • diff --git a/Docs/modules/Distortions.html b/Docs/modules/Distortions.html new file mode 100644 index 0000000..91982c5 --- /dev/null +++ b/Docs/modules/Distortions.html @@ -0,0 +1,392 @@ + + + + + Distortions - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    Distortions Module

    + + +

    Summary

    +
    +

    Distortions.

    + +
    + + + +
    +
    + +

    This module provides the following functions:

    + + + +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/modules/Envelopes.html b/Docs/modules/Envelopes.html index 5014beb..b9d8ffb 100644 --- a/Docs/modules/Envelopes.html +++ b/Docs/modules/Envelopes.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    diff --git a/Docs/modules/Filters.html b/Docs/modules/Filters.html index e6fadd0..bab0ad0 100644 --- a/Docs/modules/Filters.html +++ b/Docs/modules/Filters.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    @@ -199,6 +327,12 @@

    Summary

    @@ -199,6 +327,12 @@

    Summary

    @@ -217,6 +345,12 @@

    Summary

    +
  • + + auxIn + +
  • +
  • bandpass @@ -235,6 +369,60 @@

    Summary

  • +
  • + + bufAllpassC + +
  • + +
  • + + bufAllpassL + +
  • + +
  • + + bufAllpassN + +
  • + +
  • + + bufCombC + +
  • + +
  • + + bufCombL + +
  • + +
  • + + bufCombN + +
  • + +
  • + + bufDelayC + +
  • + +
  • + + bufDelayL + +
  • + +
  • + + bufDelayN + +
  • +
  • clipNoise @@ -313,6 +501,12 @@

    Summary

  • +
  • + + dup + +
  • +
  • dust @@ -373,6 +567,12 @@

    Summary

  • +
  • + + localBuf + +
  • +
  • lowpass @@ -403,6 +603,12 @@

    Summary

  • +
  • + + pan + +
  • +
  • perc @@ -433,6 +639,276 @@

    Summary

  • +
  • + + scAbs + +
  • + +
  • + + scACos + +
  • + +
  • + + scAmpDb + +
  • + +
  • + + scASin + +
  • + +
  • + + scATan + +
  • + +
  • + + scBitAnd + +
  • + +
  • + + scBitLeftShift + +
  • + +
  • + + scBitOr + +
  • + +
  • + + scBitRightShift + +
  • + +
  • + + scBitXor + +
  • + +
  • + + scCeil + +
  • + +
  • + + scClip + +
  • + +
  • + + scCos + +
  • + +
  • + + scCosh + +
  • + +
  • + + scCpsMidi + +
  • + +
  • + + scCubed + +
  • + +
  • + + scDbAmp + +
  • + +
  • + + scDistort + +
  • + +
  • + + scExpRand + +
  • + +
  • + + scFloor + +
  • + +
  • + + scFold + +
  • + +
  • + + scIRand + +
  • + +
  • + + scLinRand + +
  • + +
  • + + scLog + +
  • + +
  • + + scLog10 + +
  • + +
  • + + scLog2 + +
  • + +
  • + + scMidiCps + +
  • + +
  • + + scMod + +
  • + +
  • + + scNeg + +
  • + +
  • + + scNRand + +
  • + +
  • + + scPow + +
  • + +
  • + + scRand + +
  • + +
  • + + scReciprocal + +
  • + +
  • + + scRound + +
  • + +
  • + + scSin + +
  • + +
  • + + scSinh + +
  • + +
  • + + scSoftClip + +
  • + +
  • + + scSqrt + +
  • + +
  • + + scSquared + +
  • + +
  • + + scTan + +
  • + +
  • + + scTanh + +
  • + +
  • + + scTExpRand + +
  • + +
  • + + scTIRand + +
  • + +
  • + + scTRand + +
  • + +
  • + + scWrap + +
  • +
  • sin @@ -467,6 +943,26 @@

    Summary

  • +
  • + + Distortions + + +
    + Distortions. +
    +
  • +
  • Envelopes @@ -537,6 +1043,36 @@

    Summary

  • +
  • + + Panning + + +
    + Panning UGens +
    +
  • + +
  • + + Random + + +
    + Random Number Generators. +
    +
  • + +
  • + + Signal Math + + +
    + Signal Math. TODO: fix all the examples +
    +
  • +
    diff --git a/Docs/modules/Noise.html b/Docs/modules/Noise.html index 047f894..eb24adb 100644 --- a/Docs/modules/Noise.html +++ b/Docs/modules/Noise.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    diff --git a/Docs/modules/Oscillators.html b/Docs/modules/Oscillators.html index 7319b98..fd5a63c 100644 --- a/Docs/modules/Oscillators.html +++ b/Docs/modules/Oscillators.html @@ -46,12 +46,32 @@

    APIs

  • allpassN
  • +
  • auxIn
  • +
  • bandpass
  • blip
  • brown
  • +
  • bufAllpassC
  • + +
  • bufAllpassL
  • + +
  • bufAllpassN
  • + +
  • bufCombC
  • + +
  • bufCombL
  • + +
  • bufCombN
  • + +
  • bufDelayC
  • + +
  • bufDelayL
  • + +
  • bufDelayN
  • +
  • clipNoise
  • combC
  • @@ -78,6 +98,8 @@

    APIs

  • delayN
  • +
  • dup
  • +
  • dust
  • env
  • @@ -98,6 +120,8 @@

    APIs

  • lag
  • +
  • localBuf
  • +
  • lowpass
  • noiseL
  • @@ -108,6 +132,8 @@

    APIs

  • out
  • +
  • pan
  • +
  • perc
  • perc2
  • @@ -118,6 +144,96 @@

    APIs

  • saw
  • +
  • scAbs
  • + +
  • scACos
  • + +
  • scAmpDb
  • + +
  • scASin
  • + +
  • scATan
  • + +
  • scBitAnd
  • + +
  • scBitLeftShift
  • + +
  • scBitOr
  • + +
  • scBitRightShift
  • + +
  • scBitXor
  • + +
  • scCeil
  • + +
  • scClip
  • + +
  • scCos
  • + +
  • scCosh
  • + +
  • scCpsMidi
  • + +
  • scCubed
  • + +
  • scDbAmp
  • + +
  • scDistort
  • + +
  • scExpRand
  • + +
  • scFloor
  • + +
  • scFold
  • + +
  • scIRand
  • + +
  • scLinRand
  • + +
  • scLog
  • + +
  • scLog10
  • + +
  • scLog2
  • + +
  • scMidiCps
  • + +
  • scMod
  • + +
  • scNeg
  • + +
  • scNRand
  • + +
  • scPow
  • + +
  • scRand
  • + +
  • scReciprocal
  • + +
  • scRound
  • + +
  • scSin
  • + +
  • scSinh
  • + +
  • scSoftClip
  • + +
  • scSqrt
  • + +
  • scSquared
  • + +
  • scTan
  • + +
  • scTanh
  • + +
  • scTExpRand
  • + +
  • scTIRand
  • + +
  • scTRand
  • + +
  • scWrap
  • +
  • sin
  • square
  • @@ -130,10 +246,16 @@

    APIs

    diff --git a/Docs/modules/Panning.html b/Docs/modules/Panning.html new file mode 100644 index 0000000..1930208 --- /dev/null +++ b/Docs/modules/Panning.html @@ -0,0 +1,374 @@ + + + + + Panning - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    Panning Module

    + + +

    Summary

    +
    +

    Panning UGens

    + +
    + + + +
    +
    + +

    This module provides the following functions:

    + + + +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/modules/Random.html b/Docs/modules/Random.html new file mode 100644 index 0000000..9f3df0b --- /dev/null +++ b/Docs/modules/Random.html @@ -0,0 +1,404 @@ + + + + + Random - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    Random Module

    + + +

    Summary

    +
    +

    Random Number Generators.

    + +
    + + + +
    +
    + +

    This module provides the following functions:

    + + + +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/Docs/modules/Signal Math.html b/Docs/modules/Signal Math.html new file mode 100644 index 0000000..8c9220d --- /dev/null +++ b/Docs/modules/Signal Math.html @@ -0,0 +1,524 @@ + + + + + Signal Math - Lich.sc + + + + + + + + + +
    +
    +
    +

    Lich.sc

    +
    +
    + API Docs for: 0.1 +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +

    Signal Math Module

    + + +

    Summary

    +
    +

    Signal Math. TODO: fix all the examples

    + +
    + + + +
    +
    + +

    This module provides the following functions:

    + + + +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + +