Skip to content
This repository was archived by the owner on Jun 9, 2019. It is now read-only.

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mohayonao committed Apr 29, 2013
1 parent f70062f commit f519214
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 50 deletions.
50 changes: 24 additions & 26 deletions build/common.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion build/html-builder.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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)->
Expand Down
6 changes: 3 additions & 3 deletions docs.md/E-chord.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ 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;
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();
chords.choose().forEach(function(i) {
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)
7 changes: 3 additions & 4 deletions docs.md/E-khoomii.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@ 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});
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();
```
20 changes: 16 additions & 4 deletions docs.md/R-10-BaseObject.md
Original file line number Diff line number Diff line change
@@ -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 ##
Expand All @@ -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` を返す
Expand All @@ -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
Expand Down Expand Up @@ -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_
1 change: 1 addition & 0 deletions docs.md/R-22-Function.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)_
Expand Down
4 changes: 2 additions & 2 deletions docs.md/R-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
26 changes: 16 additions & 10 deletions misc/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ body {
line-height: 18px;
color: #333;
background: white;
letter-spacing: 2px;
}

ul {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit f519214

Please sign in to comment.