diff --git a/build/common.jade b/build/common.jade index fcc039a..a8b426c 100644 --- a/build/common.jade +++ b/build/common.jade @@ -19,33 +19,31 @@ html(lang=lang) })(); body - .container - .row - #sidebar - h1 timbre.js - #index - #list - h2 Download (#{version}) + #sidebar + h1 timbre.js + #index + #list + h2 Download (#{version}) + ul + li + a(href="/timbre.js/timbre.js") timbre.js + li + a(href="/timbre.js/timbre.dev.js") timbre.dev.js + for items in categories + if indexes[items.key] && indexes[items.key].length + h2 #{items.caption} ul - li - a(href="/timbre.js/timbre.js") timbre.js - li - a(href="/timbre.js/timbre.dev.js") timbre.dev.js - for items in categories - if indexes[items.key] && indexes[items.key].length - h2 #{items.caption} - ul - each o in indexes[items.key] - li - a(href=o.url) #{o.title} - if o.dev - span(class="dev") dev - hr - #footer - a(href="/timbre.js/") English - a(href="/timbre.js/ja/") 日本語 - #main - !{main} + each o in indexes[items.key] + li + a(href=o.url) #{o.title} + if o.dev + span(class="dev") dev + hr + #footer + a(href="/timbre.js/") English + a(href="/timbre.js/ja/") 日本語 + #main + !{main} script(src="/timbre.js/misc/js/jquery.js") script(src="/timbre.js/misc/js/codemirror.js") script(src="/timbre.js/misc/js/javascript.js") diff --git a/build/html-builder.coffee b/build/html-builder.coffee index 37a9999..ec2a34f 100644 --- a/build/html-builder.coffee +++ b/build/html-builder.coffee @@ -102,7 +102,7 @@ class HTMLBuilder if not (m = /^(en|ja):/.exec line) items.push line else if m[1] is lang - items.push line.substr(3).replace /^\s+/, '' + items.push line.substr 3 marked.parser marked.lexer items.join '\n' lang_process = (doc)-> diff --git a/docs.md/E-chord.md b/docs.md/E-chord.md index 6ca7a31..2c67b07 100644 --- a/docs.md/E-chord.md +++ b/docs.md/E-chord.md @@ -11,8 +11,9 @@ var chords = [ ]; var msec = timbre.timevalue("BPM120 L16"); +var osc = T("saw"); var env = T("env", {table:[0.2, [1, msec * 48], [0.2, msec * 16]]}); -var gen = T("OscGen", {wave:"saw", env:env, mul:0.5}); +var gen = T("OscGen", {osc:osc, env:env, mul:0.5}); var pan = T("pan", gen); var synth = pan; @@ -20,7 +21,6 @@ var synth = pan; synth = T("+saw", {freq:(msec * 2)+"ms", add:0.5, mul:0.85}, synth); synth = T("lpf" , {cutoff:800, Q:12}, synth); synth = T("reverb", {room:0.95, damp:0.1, mix:0.75}, synth); -synth.play(); T("interval", {interval:msec * 64}, function() { var root = pattern.next(); @@ -28,7 +28,7 @@ T("interval", {interval:msec * 64}, function() { gen.noteOn(scale.wrapAt(root + i) +60, 80); }); pan.pos.value = Math.random() * 2 - 1; -}).start(); +}).set({buddies:synth}).start(); ``` using: [subcollider.js](http://mohayonao.github.com/subcollider.js) diff --git a/docs.md/E-khoomii.md b/docs.md/E-khoomii.md index f627347..01832f4 100644 --- a/docs.md/E-khoomii.md +++ b/docs.md/E-khoomii.md @@ -11,7 +11,7 @@ var formants = { }, freq, synth, f1, f2, f3; freq = 174.61412048339844; -freq = T("+", freq, T("sin", {freq:3, mul:0.8}).kr()).kr(); +freq = T("+.kr", freq, T("sin.kr", {freq:3, mul:0.8})); synth = T("saw", {freq:freq}); @@ -19,13 +19,12 @@ f1 = T("bpf", {freq:T("param", {value: 700}), Q:9}, synth); f2 = T("bpf", {freq:T("param", {value:1200}), Q:9}, synth); f3 = T("bpf", {freq:T("param", {value:2900}), Q:9}, synth); synth = T("+", f1, f2, f3); - -T("bpf", {freq:3200, Q:0.5}, synth).play(); +synth = T("bpf", {freq:3200, Q:0.5}, synth); T("interval", {interval:250}, function() { var f = formants["aiueo"[(Math.random()*5)|0]]; f1.freq.linTo(f[0], 150); f2.freq.linTo(f[1], 150); f3.freq.linTo(f[2], 150); -}).start(); +}).set({buddies:synth}).start(); ``` diff --git a/docs.md/R-10-BaseObject.md b/docs.md/R-10-BaseObject.md index 54f7fd4..1366691 100644 --- a/docs.md/R-10-BaseObject.md +++ b/docs.md/R-10-BaseObject.md @@ -1,9 +1,9 @@ -Base Object -=========== -The Base Object of Timbre Objects +TimbreObject +======-===== +The Base Class of Timbre Objects ## Description ## -en: The base object of timbre objects +en: The base class of all timbre objects ja: T-オブジェクトのベースとなるオブジェクト ## Properties ## @@ -15,6 +15,9 @@ ja: - 出力値を調整します。最終出力値は 出力値 * mul + add en: - adjust the output _(lastout\[i\] = out\[i\] * mul + add)_ ja: - 出力値を調整します。最終出力値は 出力値 * mul + add になります。 +- `buddies` _(list of TimbreObject)_ + - _todo_ + - `isAr` _(ReadOnly Boolean)_ en: - returns `true` if receiver is an **audio rate** ja: - **オーディオレート**のとき `true` を返す @@ -23,6 +26,9 @@ ja: - **オーディオレート**のとき `true` を返す en: - returns `true` if receiver is a **control rate** ja: - **コントロールレート**のとき `true` を返す +- `isEnded` _(ReadOnly boolean)_ + - _todo_ + ## Methods ## - `play()` en: - Start processing @@ -96,7 +102,13 @@ ja: - コントロールレートに切り換えします en: - Plots receiver's status. ja: - オブジェクトの状態を描画します +- `postMessage()` + - _todo_ + ## Events ## - `bang` en: - This event is emitted any time someone calls `bang()`. ja: - `bang()` が呼ばれたとき + +- `message` + - _todo_ diff --git a/docs.md/R-22-Function.md b/docs.md/R-22-Function.md index 885ecd3..e00c7f5 100644 --- a/docs.md/R-22-Function.md +++ b/docs.md/R-22-Function.md @@ -19,6 +19,7 @@ T("interval", {interval:100}, func).start(); ## Properties ## - `func` _(Function)_ en: - A function contained. Its default value is **NOP**. +en: Return value is the output value. ja: - 格納している関数 - `args` _(Array)_ diff --git a/docs.md/R-env.md b/docs.md/R-env.md index f83796a..bd9abc2 100644 --- a/docs.md/R-env.md +++ b/docs.md/R-env.md @@ -117,11 +117,11 @@ ja: `T("env")` クラスには便利なコンストラクタが用意されて ja: `T("perc")` はパーカッシブなエンベロープを作ります。 - a, attackTime: 10 -- d, decayTime: 300 +- r, releaseTime: 300 - lv, level: 0 ```timbre -var env = T("perc", {d:500}, T("sin")).on("ended", function() { +var env = T("perc", {r:500}, T("sin")).on("ended", function() { this.pause(); }).bang().play(); diff --git a/misc/css/common.css b/misc/css/common.css index 7fa55ee..89ef10e 100644 --- a/misc/css/common.css +++ b/misc/css/common.css @@ -9,6 +9,7 @@ body { line-height: 18px; color: #333; background: white; + letter-spacing: 2px; } ul { @@ -40,18 +41,16 @@ th { #sidebar { position: fixed; top: 0; left: 0; bottom: 0; - width: 175px; + width: 200px; overflow-y: auto; overflow-x: hidden; padding: 15px 0 30px 15px; border-right: 1px solid #BBB; - box-shadow: 0 0 20px #CCC; - -webkit-box-shadow: 0 0 20px #CCC; font-size: 14px; - background: #DBF0F6; + background: #f7fcfe; } #sidebar h1 { @@ -91,20 +90,22 @@ th { #main { width: 700px; - margin: 40px 0 50px 220px; + margin: 40px 0 50px 245px; font-size: 14px; line-height: 24px; + letter-spacing: 1px; } #main h1 { + color: #666; padding-bottom: 8px; margin-bottom: 0; font-family: 'Arial'; font-size: 32px; + font-weight: normal; text-shadow: 0 0 1px #ccc; border: solid 0 #E1E1E8; border-width: 0 0 1px 0; - letter-spacing: 2px; } #main h1 + p { @@ -124,8 +125,11 @@ th { } #main h2 { - font-size: 20px; - margin: 15px 0 5px; + font-size: 16px; + font-weight: normal; + margin: 40px 0 15px; + + letter-spacing: 8px; } #main h3 { @@ -157,16 +161,18 @@ th { } #main ul { + margin: 0; + list-style-type: none; line-height: 20px; } #main ul ul { - margin: 0 0 10px 5px; + margin: 0 0 10px 15px; list-style-type: none; } #main code { - color: #BF1E56; + color: #028760; font-family: 'Courier', monospace; }