はじめに
Conchordalは、生成的な作曲のための生体音響楽器です。Rhaiは、この楽器にシナリオを 与えるための言語であり、音符を順番に並べるためのものではありません。音から Consonance Fieldをつくり、複数のVoiceがその中を移動し、生き残り、世代を重ねながら Populationを再編成します。
シナリオでは、まずPopulationSpecを定義します。それをplace()で配置すると、
世代交代を通じて同一性を保つPopulationになります。Populationを構成する一個の
生きた要素がVoiceです。同じLandscapeを共有するすべてのPopulationを合わせたものを
Communityと呼びます。和声は心理音響的なroughnessとharmonicityから生まれ、
リズムはCommunity自身が駆動する共有拍の上で創発します。スクリプトの役割は、音符を並べる
シーケンサーではなく、全体の条件と流れを整える演出者です。
Conchordal v0.4.0は、こうしたコンセプトを直接検討したい研究者と開発者のための research alphaです。機能は未完成で、不安定な場合があります。作曲家や制作者は beta版を待ってください。一般的な音楽制作の語彙で覆い隠さず、このモデル固有の 言葉で説明します。
本書の構成
- チュートリアルでは、最初の音を鳴らし、エディタを設定し、演奏の実行、analysisの 記録、再現を扱います: クイックスタート、 エディタ設定、 演奏。
- コンセプトでは、一つの生きたVoiceから、生態系と時間構造の全体までを 組み立てます: Population — Voiceをまとめる持続単位、 VoiceとLandscape — 音と環境のフィードバック、 Consonance Field — 音高を評価する地形、 リズム、 ルーティングとListenerTwin、 タイムラインと構造。
- リファレンスには、生成されたAPIリファレンスと、 順に試すためのサンプルがあります。APIは Core API、Core候補を試聴するExperimental、Mechanism Tuning、 Research Controlsの四層です。まずCoreから始め、作品が必要とするまでは 残りを無視してください。登録signatureとtier分類はengineから生成して照合し、 意味を説明する文章はdocumentation registryで管理します。
本書のすべてのrhaiコードブロックは、テストスイートによって実際の
スクリプトengine上で実行されます。これにより、現在のengineでcompile・実行
できることを確認します。ただし、説明文の意味まで自動的に証明するものではありません。
クイックスタート
リアルタイムinstrumentでシナリオを実行します。DSP性能のためrelease modeを推奨します。
cargo run --release -- samples/01_a_single_voice.rhai
最小の音
place(sine().amp(0.08).sustain(), at(440.0));
wait(2.0);
place(population_spec, placement)は、現在のスクリプト時刻にPopulationをただちに配置します。
返されたPopulationへの参照を使うと、実行中のPopulationを更新したり終了したりできます。
基本オブジェクト
- PopulationSpecは、初代として生成されるVoiceとPopulation全体の方針を記述します。
sine()、harmonic()、modal()、saw()、square()、noise()から始めます。 - Variantは
variant(population_spec)でspecificationを複製します。 - PlacementはPopulationをどこへ配置するかを決めます。協和、不協和、その境界、空いた音域を
consonance()、dissonance()、edge()、gap()で選べます。既定では候補を確率分布として 扱い、.peak()を付けると最も強い一点を選びます。ほかにrandom()、at()、line()があります。 - Populationは
place()が返す安定した参照です。この時点で初代のVoiceが 存在し始め、実行中に使えるメソッドは現在のVoiceを更新します。 - SectionはPopulationの有効範囲を定め、終了時に自動で解放します。
Populationは、配置後も同一性を保つ一つの安定した参照です。.count(6)を指定したPlacementでは、
そのPopulationに6つの初代のVoiceが生まれます。後でVoiceが死亡して再生成されても、構成員と世代が
変わるだけでPopulationの同一性は保たれます。詳しいオブジェクト構造と生存過程は
Population — Voiceをまとめる持続単位を参照してください。
let population_spec = harmonic()
.amp(0.08)
.sustain()
.brightness(0.35);
section("plain entry", || {
place(population_spec, line(220.0, 440.0).count(3));
wait(4.0);
});
Consonance Fieldへ配置する
consonance(root_hz).peak()は、基準周波数の周辺で協和の評価が高い位置へVoiceを
配置します。Fieldはsystemが知覚したものによって形づくられるため、anchorが入ると
peakの位置も変わります。
let anchor = harmonic()
.brain("drone")
.amp(0.06)
.sustain()
.anchor();
let voice = harmonic()
.amp(0.04)
.sustain();
section("field placement", || {
place(anchor, at(110.0));
wait(1.0);
place(voice, consonance(110.0).peak().range(1.0, 4.0).count(6).spacing(0.9));
wait(6.0);
});
Consonance Fieldの働きと、その中でVoiceが移動し、生き残り、再生成される仕組みは Consonance Field — 音高を評価する地形で説明します。
実行中のPopulationを更新する
発音体、振る舞い、生存過程、再生成の方針は、place()より前にPopulationSpecへ設定します。
返されたPopulationには、配置後に意味を持つ操作、つまり実行中の更新と終了だけが
公開されます。APIリファレンスには、両者のメソッドが区別して
表示されます。
let spec = harmonic().amp(0.04).sustain();
let population = place(
spec,
consonance(220.0).peak().count(3)
);
population.amp(0.02); // live patch on running voices
population.glide(0.8);
wait(3.0);
release(population);
完成した小品
seed(7);
let anchor = harmonic()
.brain("drone")
.amp(0.05)
.sustain();
let colony = harmonic()
.amp(0.035)
.sustain()
.seek_consonance()
.glide(0.4)
.avoid_neighbors(0.6);
section("emergence", || {
place(anchor, at(110.0));
wait(2.0);
place(colony, consonance(90.0, 900.0).count(8).spacing(0.8));
wait(8.0);
});
次に読む章
- エディタ設定 — completion、hover documentation、diagnostics。
- 演奏 — report、filter、
--seedによる再現。 - Population — Voiceをまとめる持続単位 — PopulationSpec、Voice、brain、phonation、生存、release。
- VoiceとLandscape — 音と環境のフィードバック — 音と知覚環境がfeedbackを作る仕組み。
- Consonance Field — 音高を評価する地形 — Field、density、movement、viability、respawn。
- リズム — 結合連続体とdirectorが形づくるリズム地形。
- ルーティングとListenerTwin — 生態系が知覚する音、聴衆が聴く音、観測される状態。
- タイムラインと構造 — 配置境界、有効範囲、再利用可能な身振り、並行する流れ。
- サンプル — 機能を順番に試すための道筋。
エディタ設定(LSP)
Conchordalには、名前を持つ呼び出し可能なスクリプティングAPIとhover documentationを
記述したRhai LSP定義ファイルが付属します。対応するclientへ接続すると、place、
harmonic、.brain()、.send(habitat_bus)などでcompletion、hover、定義への移動、
diagnosticsを利用できます。busを結合する| overloadは名前付き宣言ではなくoperatorなので、
定義ファイルには出力されません。
repository rootにある次の2ファイルが設定の中心です。
Rhai.toml—rhai-lspが読むworkspace設定rhai-defs/conchordal.d.rhai— doc comment付きの自動生成type/function宣言
upstreamのrhai-lspは、自らをexperimentalかつ incompleteとし、一般利用を推奨していません。保証されたproduction toolingではなく、 任意の開発補助として扱ってください。それでも使う場合は、crates.ioにはないため git repositoryから直接installします。
cargo install --git https://github.com/rhaiscript/lsp rhai-cli
これにより、lsp subcommandを持つrhai binaryが生成されます。
VS Code
公式Rhai extension
が現在提供するのはsyntax highlightだけで、rhai-lspは起動しません。LSP機能には、
Conchordal workspaceから次のcommandを起動できるLSP client/extensionを使います。
rhai lsp stdio --config Rhai.toml
Neovim 0.11以降
vim.lsp.config("rhai", {
cmd = { "rhai", "lsp", "stdio", "--config", "Rhai.toml" },
filetypes = { "rhai" },
root_markers = { "Rhai.toml", ".git" },
})
vim.lsp.enable("rhai")
Helix
~/.config/helix/languages.tomlへ追加します。
[[language]]
name = "rhai"
scope = "source.rhai"
file-types = ["rhai"]
language-servers = ["rhai-lsp"]
[language-server.rhai-lsp]
command = "rhai"
args = ["lsp", "stdio", "--config", "Rhai.toml"]
Emacs(eglot)
(add-to-list 'eglot-server-programs
'(rhai-mode . ("rhai" "lsp" "stdio" "--config" "Rhai.toml")))
(add-hook 'rhai-mode-hook #'eglot-ensure)
定義ファイルを再生成する
定義ファイル、英語版API Reference、日本語版
APIリファレンスは、engineのregister_fn surfaceと
documentation registry(src/scripting/docs.rs)を結合して生成されます。
新しいConchordal versionを取得した後にdiagnosticsが欠ける場合は、すべてを再生成します。
cargo run --bin gen_rhai_defs
commit済みartifactが古いとCI testが失敗します。これは登録signatureと生成textを検査しますが、 editor上の挙動はexperimentalなupstream serverとclient設定にも依存します。
演奏
クイックスタートでは、最小のscenarioを書いて実行するところまでを 説明しました。本章では、リアルタイムinstrumentを起動して演奏を始める、終了する、 GUIなしで演奏する、その結果を記録・再現する、という一連の手順を説明します。
GUIで演奏する
リアルタイムinstrumentでscenarioを起動します。
cargo run --release -- samples/10_generations.rhai
scenarioをcompileした後にGUIが開き、初期設定では自動的に演奏が始まります。scriptが
大まかな時間構造を与えます。place()がPopulationを導入し、wait()がscript上の時刻を進め、
section()とplay()は内部で作ったPopulationを有効範囲の終了時にreleaseします。その間も、
Voiceの振る舞い、Landscape、それらのfeedbackはリアルタイムに変化し続けます。
進行バーはscenario上の時刻を表示します。演奏中は、その右側にあるボタンを押すと 演奏を終了します。ウィンドウを閉じるかCtrl-Cを押しても終了します。このボタンは一時停止では なく、GUI上でscriptを実行中に書き換えることもできません。scenarioを変更するときは、演奏を終了し、 Rhai fileを編集して、もう一度起動します。
GUIを先に用意し、合図に合わせて開始するには--wait-user-startを付けます。準備ができたら
Spaceを押すか、開始ボタンをクリックします。
cargo run --release -- samples/10_generations.rhai --wait-user-start
scenarioが終わっても、初期設定では最終状態を確認できるようにGUIが残ります。進行バー
右端のボタンまたはウィンドウの閉じるボタンで終了します。scenarioの終了と同時に閉じるには
--wait-user-exit=falseを付けます。
GUIなしで演奏する
--noguiを付けると、すぐに演奏を始め、scenarioの終了時にプログラムも終了します。GUIは
表示しませんが、初期設定では既定の音声出力先から音を出します。
cargo run --release -- samples/10_generations.rhai --nogui
音を出さず、simulationやreport作成だけを行う場合に限り--play=falseを使います。
cargo run --release -- samples/10_generations.rhai --nogui --play=false --report run.jsonl
--noguiでは、開始待ちと終了待ちの両方が無効になります。offline WAV出力は別の操作で、
conchordal-renderが担当します。リアルタイムinstrumentであるconchordalはaudioを
記録しません。
聴く・確かめる・修正する
scenarioは、どのPopulationをいつ配置し、どのような方針で振る舞わせるかを指定します。 ただし、演奏中の正確な音高、リズム同期、生存、respawnの結果までは事前に決まりません。 それらは、変化し続けるLandscapeとの相互作用から生まれます。scenarioを実行して聴き、 実際に起きたことを確かめ、scriptを修正して、もう一度実行します。
instrumentであるconchordalは、どのbuild profileでもaudioをdiskへ書きません。
演奏は、音が鳴り終わるとinstrument内には残らない一過的な出来事(ephemeral)として
設計されています。
演奏を再現する
各runはseedをlogへ出します。
scenario seed: 3821650944810716341 (replay with --seed 3821650944810716341)
最上位のサンプルは毎回新しいseedから始まり、一つの固定結果ではなくsystemのvariationを 示します。残したいrunが得られたら、表示された値で正確に再現します。
cargo run --release -- samples/10_generations.rhai --seed 3821650944810716341
conchordal-renderでも同じ--seedを使い、保存した演奏をWAVにできます。
script内のseed(...)は実行中に初期seedを上書きするため、常にcommand-line flagより優先します。
呼び出し方に関係なくscript自体を再現可能にする必要がある場合だけ使ってください。
レポート
--reportへ書き込み先を指定して実行します。
cargo run --release -- samples/10_generations.rhai --report run.jsonl
--reportはconchordal instrumentのflagで、--noguiでも動作します。
audioを描画するconchordal-renderにはありません。
fileはJSON Linesで、1行が1 record、type fieldで種類を示します。
meta— 最初に記録される有効なscenario seed。scene_marker— 各section("name", || { ... })の開始位置。以後のrecordを直前の markerごとにまとめられます。spawn/respawn/death— Voiceごとの世代交代。出現周波数、親となるVoice、 設定寿命、energy枯渇時刻、envelope tailを含む観測寿命、初期consonance、死亡時PLV。onset— Voiceごとの発音開始時刻、強度、周波数、位相同期、足場の状態。population_step— 再生成待ちのalive_count: 0も含むPopulation size、 平均周波数、Consonance Field score/level、周波数entropy。listener_state—ListenerTwinの4つの知覚level、beat/subdivision/measure追跡、解析遅延。rhythm_observation— Community全体の瞬間的なKuramoto orderと環境rhythm state。rhythm_summary— Community全体およびPopulationごとのonset density、IOI規則性、 burstiness。Kuramoto summaryはCommunity全体にだけ付きます。listener_confidence_summary— beat confidenceのpeakと終盤window。dcc_pressure— listener由来のtension pressureとDCCが加えたpitch temperature bonus。phonation_gate_open— phonation gateが開いた時刻と、その時点のconsonance値。
未加工のJSONLは「Population 3の構成員が実際に入れ替わったのはいつか」「anchorが入った直後、
tension_levelはどう変化したか」といった狭い問いに直接答えます。
レポートを読む
streamはplain JSONLなので、任意のJSON toolでfilterできます。次は全deathについて寿命と 初期consonanceを取り出します。
jq -c 'select(.type == "death")
| {time_sec, population_id, configured_endurance_sec,
energy_depletion_sec, lifetime_sec, first_k_mean}' run.jsonl
scene_markerの時刻でbucketに分ければ、「第IV sectionでcolonyは飢えたか、その時の
consonanceはいくつか」を直接読めます。専用digest toolはありません。重要なsummaryは
作品ごとに異なるため、問いに合わせた一度限りのfilterやscriptの方が固定formatより有効です。
GUI
GUIは実行中のLandscapeとListenerTwinの状態をリアルタイムに表示します。レポートは、聴いて気づいたが すべての数値を同時には覚えられなかった瞬間を、演奏後に読むためのものです。
Population — Voiceをまとめる持続単位
Conchordalを理解するための最も簡単な捉え方は、音符の次に別の音符が来るというものでは ありません。PopulationSpecが、生きたVoiceからなる持続的なPopulationへ変わります。
PopulationSpec + Placement --place()--> Population --> Voice(s)
|
`-- later generations
Community = runtime terrainを共有するすべてのPopulation
PopulationSpecは再利用可能な配置前の定義です。初代のVoiceの初期値と、
生存過程、生存可能性、respawnなど、Population全体に属する方針を組み合わせます。
Placementは初代のVoiceがどこへ何体入るかを指定します。place()は両者を結合し、
ただちにPopulationを返します。これはVoiceごとの参照ではなく、配置されたPopulationを
表す一つの安定した参照です。実行時のCommunityは、Landscapeを共有するすべての
Populationを集約したものです。
let population_spec = harmonic()
.amp(0.035)
.sustain()
.respawn_capacity(6);
let population = place(
population_spec,
consonance(90.0, 900.0).count(6)
);
wait(3.0);
release(population);
ここでpopulationは6つの初代のVoiceをまとめて制御します。レポートでは共有する
population_idと、各々のVoiceのvoice_idを区別します。Voiceが死亡して代わりのVoiceに
置き換わるとvoice_idとgenerationは変わりますが、Populationとpopulation_idは
変わりません。
配置境界
place()だけが定義から実行時への遷移です。初期設定専用の属性は、先に
PopulationSpecへすべて設定します。配置後のPopulationが公開するのは実行中の更新と
releaseだけで、specificationへ戻したりfounder policyを書き換えたりはできません。
let spec = harmonic()
.brightness(0.4)
.brain("entrain")
.endurance(8.0);
let population = place(spec, consonance(220.0).count(3));
population.amp(0.03); // Live patch at the current script time.
flush(); // Emit pending live patches without advancing time.
wait(2.0);
release(population);
wait(seconds)も保留中の更新を発行してからスクリプト上の時刻を進めます。
wait()もflush()も、未配置のPopulationを作りません。初代のVoiceは
place()そのものによってschedule済みです。APIリファレンスでは、
PopulationSpecのメソッドを初期設定専用、Populationのメソッドを実行中に更新可能と表示します。
独立した五つの問い
PopulationSpecは、複数の独立した問いに答えます。分けて考えることで、ある音楽的判断を 別の判断と取り違えずに済みます。
| 問い | 主なcontrol | 意味 |
|---|---|---|
| 何が鳴るか | sine, harmonic, modal, brightness, modes | 初代のVoiceの発音体と周波数成分。 |
| どんな生を送るか | brain(name): entrain, seq, drone | articulationが生態系に参加するか、書かれた生を進むか、Landscapeのanchorとして持続するか。 |
| いつ鳴るか | sustain, repeat, metric, entrained, flow | phonationとonset timing。 |
| 音高はどこへ行くか | Placement、anchor, seek_consonance, temperature | 初代のVoiceが入る位置と、その後の移動。 |
| Populationはどう持続するか | endurance, recovery, viability, respawn | Voiceのエネルギー、死、Populationの世代交代。 |
別の行に属するcallは合成できます。同じ軸では通常、最後の指定が優先されます。正確な 構築時に各メソッドがどう働くかはAPIリファレンスに記載されています。
Articulation life:brain
brain(name)は、鳴っている間にVoiceがどのような生を送るかを選びます。
brain("entrain")は既定の、生きた発音様式です。代謝と生存過程の設定を 通じてconsonanceとrhythmic fitに応答できます。brain("seq")は固定された生を持つauthored eventです。Field viabilityとmetabolismを 無視します。brain("drone")は明示的にreleaseされるまで死にません。terrain anchorなど、 持続するmaterialに適します。
これはphonation timingとは別です。
brain("entrain")は生の種類を選び、.entrained()は反復onsetを共有meterへ 中程度に結合します。
似た名前ですが別の軸なので、同時に使用できます。
let colony = harmonic()
.brain("entrain")
.entrained()
.cycles(2)
.seek_consonance()
.endurance(8.0)
.recovery(4.0)
.consonance_viability(0.30, 0.80);
place(colony, consonance(90.0, 900.0).count(5));
wait(8.0);
brain()は発音体、Placement、音高の方針を選びません。droneは聴取可能にもhabitat-onlyにも
でき、生きたVoiceは固定も移動もできます。同じ共鳴発音体に任意のarticulation lifeを
組み合わせられます。
Phonationとduration
Phonationは、onsetがいつ起きるか、そのonsetがどれだけ開いたままかに答えます。
sustain()はVoiceが生きている間、音を保持します。repeat()は初期値が設定された反復発音を選びます。metric()、entrained()、flow()は共有meterとの結合連続体上の領域を選び、 re-attackを含意します。cycles(n)はdurationをrhythmic cycle数で表します。
presetで意図を表せない場合は、低水準のonce()、pulse(rate_hz)、while_alive()、
adaptive duration controlを使えます。まずpresetから始め、作品が必要とするときだけ
明示的timingを使ってください。
Releaseはdeathではない
release(population)はスクリプトによる終端判断です。以後そのPopulationへの更新は無視され、
現在のVoiceはrelease envelopeへ入り、Populationは閉じます。生態学的な死は実行時の
結果です。一つのVoiceがenergyを使い果たした後、Populationの再生成方針が代わりのVoiceを
作る場合があります。sectionやplayの有効範囲も、終了時に内部で作ったPopulationをreleaseします。
次章では、VoiceとLandscape — 音と環境のフィードバックを説明します。
VoiceとLandscape — 音と環境のフィードバック
habitat busへ送られたVoiceはLandscapeを変え、変化したLandscapeはplacement、movement、 viabilityへ影響します。この章では、その実行時feedbackと、そこから生じるenergy、death、 respawnの過程を追います。
Voice bodies
|-- presentation bus --> listener / ListenerTwin
|
`-- habitat bus --> Landscape --> placement, movement, viability
^ |
`------ new sound <------'
初期状態ではすべてのVoiceが両方のバスへ送られ、聴衆と生態系は同じ物理的な出来事を共有します。 意図的に分離する方法はルーティングとListenerTwinを参照してください。
音からLandscapeへ
Landscapeはhabitat busをlog-frequency spaceで解析し、次を計算します。
- roughness potential — critical band内の干渉とbeating。
- harmonicity potential — periodicityとvirtual rootへのsupport。
- Consonance Field — candidate frequencyの評価に使う合成地形。
Voiceがhabitat bus上の周波数成分を変えると、これらの走査結果も変わります。そのため
consonance(...).peak()は固定scale degreeを返しません。現在鳴っているものによって
答えが変わります。
Score、level、mass、density
同じLandscapeから複数の表現が導かれます。関連はありますが交換可能ではありません。
| 表現 | 範囲 | 用途 |
|---|---|---|
| potential | kernel依存 | raw roughness/harmonicity output。 |
| field score | 非有界の実数 | 位置比較、hill-climb、placement tension。 |
| field level | 0..1 | 振る舞いと生存可能性に使う有界な信号。 |
| density mass | 非負 | stochastic placementの正規化前weight。 |
| density / PMF | 選択範囲内で総和1 | 密度分布からの標本抽出。 |
.peak()は極値を選びます。既定の密度配置はPMFから標本を取るため、複数のVoiceは
一つの周波数区間へ重ならず、支えられた領域の周囲に分布します。
tension(degree)は最大peakより一定のfield-score stepだけ下を狙います。
生存可能性の範囲は、有界または環境相対の適合度を読みます。レポートの接尾辞も同じ区別を
保ち、mean_c_field_scoreとmean_c_field_levelは別の量です。
配置と移動は別の判断
配置はVoiceがどこへ入るか、音高の振る舞いは入った後に何が起きるかに答えます。
let fixed_strain = harmonic()
.amp(0.035)
.sustain()
.anchor();
let resolving_strain = harmonic()
.amp(0.035)
.sustain()
.seek_consonance()
.glide(0.4);
section("two responses to dissonance", || {
place(fixed_strain, dissonance(140.0, 900.0).count(3));
place(resolving_strain, dissonance(140.0, 900.0).count(3));
wait(6.0);
});
両方のPopulationが不協和な領域へ入ります。一方はその状態を保ち、もう一方は解決へ向かう 出発点として扱います。
自分ではなく環境を評価する
Voiceは、後で自ら評価するConsonance Fieldへ自身のエネルギーも加えます。そのままでは、強いVoiceは自分の
footprintを聴くことでviableに見えるかもしれません。そこでconsonance_viability()は
既定で環境相対評価を有効にし、自分の寄与を近似的に除いて適合度を判断します。
これは生存規則であり、音の送り先を決める規則ではありません。Voiceはhabitat busへ寄与し、ほかの
すべてのVoiceが読むConsonance Fieldを変え続けます。自分も含むConsonance Field全体への適合度を問いたい場合だけ
viability_scope("total")を使います。
Energy、death、replacement
生態学的lifecycleはbrain("entrain")に属し、energyは0..1へ正規化されます。
endurance(seconds)がzero-fit時の基準寿命を定める。- attackごとに
attack_cost_fractionを消費する。 - consonantなattackは最大
attack_recharge_fractionまで回復できる。 recovery(seconds)が連続回復を有効にし、viability windowが現在位置での回復量を決める。- energyがゼロになるとVoiceは死亡し、音の減衰へ入る。
- 再生成の方針があれば、Populationは代わりのVoiceを生み出せる。
let settlement = consonance(70.0, 1100.0).spacing(0.8);
let ecology = harmonic()
.brain("entrain")
.entrained()
.cycles(2)
.seek_consonance()
.endurance(8.0)
.recovery(4.0)
.attack_cost_fraction(0.017)
.attack_recharge_fraction(0.70)
.consonance_viability(0.32, 0.82)
.respawn_consonance()
.respawn_capacity(8)
.respawn_settle(settlement);
place(ecology, consonance(70.0, 1100.0).count(8));
wait(20.0);
respawn policyは異なる作曲上の問いに答えます。
respawn_random()— parentの系譜を作りません。Populationを最初に配置したPlacementから candidateを作り、現在のscene scoreで重み付けして選びます。一様random配置ではありません。respawn_hereditary(sigma_oct)— living parentをenergyで重み付けして選び、その近くへ offspring候補を作り、現在のField levelが最も高いcandidateを採用します。respawn_consonance()— living parentをenergyで重み付けして選び、そのparentの周辺へ 偏らせながらfield scoreの高いpeakから選びます。respawn_capacity(n)— Populationが維持する生存個体数の上限。未指定時は初代の個体数で、 明示値をfounder数より小さくはできない。respawn_settle(placement)— そのPlacementからcandidateを追加します。respawn policy本来の baseline candidateも一つ残ります。
respawn後もPopulationとpopulation_idは維持され、voice_idとgenerationが変わります。
レポートの記録により、この世代交代を観測できます。
実行時のfeedbackと人間による修正
- 実行時のfeedbackは自動です。音がLandscapeを変え、LandscapeがVoiceの振る舞いと 生存を変えます。
- 人間による修正はrunの間に行います。実行し、聴き、reportを調べ、scenarioを修正して 再実行します。
実行して結果を確かめ、修正する具体的な手順は演奏で説明します。
Consonance Field — 音高を評価する地形
Conchordalの知覚coreであるLandscapeはhabitat busを聴き、log-frequency spaceへ 変換して二つのpotentialを計算します。roughnessはcritical band内の振幅変動による 感覚的不協和、harmonicityはperiodicityとtemplate matchingです。この二つを 組み合わせたConsonance Fieldは、placement、movement、prediction、survivalが 読む、周波数上の評価地形です。
Consonance Fieldはhabitat busから計算されるため、そのbusへ送られたVoiceが ほかのVoiceの読むConsonance Fieldを変形します。presentation busだけへ送られたVoiceは 変形しません。和声はchord chartではなく、このfeedback loopから生まれます。 potential、score、level、mass、densityの関係は VoiceとLandscape — 音と環境のフィードバックを参照してください。
Consonance Fieldへの配置:consonance、dissonance、edge、gap
Consonance Fieldに応じたPlacementでは、Field内の対象領域を指定します。既定では確率分布から位置を選び、
.peak()を付けると決定的な極値を選びます。
consonance— consonanceが高い位置(harmonic center、fusion)。dissonance— consonanceが低い位置(tension、cluster、color)。edge— consonance/dissonanceの境界(metastableな中間)。gap— 空いたregister(空間を埋め、maskingを避ける)。
consonance(root)はroot周辺のharmonic windowを取り、range()で倍音範囲を指定します。
どの配置先にも、絶対周波数の(min_hz, max_hz)範囲を渡せます。
let anchor = harmonic()
.brain("drone")
.amp(0.06)
.sustain()
.anchor();
let voice = harmonic()
.amp(0.04)
.sustain();
section("field placement", || {
place(anchor, at(110.0));
wait(1.0);
place(voice, consonance(110.0).peak().range(1.0, 4.0).count(6).spacing(0.9));
wait(6.0);
});
追加指定のない配置先は密度分布として扱われます。「無作為だが調和的」なのではなく、
協和のモデルから導かれ、指定範囲内で正規化された分布です。配置は配置後の振る舞いから
独立しています。dissonanceへ入りanchor()でclusterを保持することも、
seek_consonance()で解決へ向かわせることもできます。
let cloud = harmonic().amp(0.035).sustain();
place(cloud, consonance(90.0, 1200.0).count(10).spacing(0.8));
wait(8.0);
配置時の緊張度:tension(τ)
tensionを指定しないConsonance Placementは、通常の方法で実現されます。.peak()なら
最も強いpeakを選び、既定のdensityなら通常のConsonance密度分布を作ります。
tension(τ)は、最大値より一段下のfield-scoreへ配置を偏らせます。
τ ∈ [0, 1]がtension degreeで、0は通常の配置を変えず、大きい値ほど弱く
metastableなstepを対象にします。指定範囲内の評価値で
target = L_max − τ·(L_max − L_min)です。movementにおけるsearch temperatureと
対になる、spawnをどれだけ解決した位置に置くかのdialです。.peak()なら最も近いstepへ
最寄りの段へ固定し、確率分布なら対象値の周辺へ重みを集中させます。
let tense = harmonic().amp(0.035).sustain();
// A metastable step below the strongest peak — placed, not resolved.
place(tense, consonance(110.0, 1200.0).peak().tension(0.4).count(6).spacing(0.8));
wait(6.0);
Consonance Fieldに依存しないPlacementには、対数周波数上で一様なrandom(min_hz, max_hz)と、幾何的な
at(hz)、line(start_hz, end_hz)があります。
周波数をroot比で名づける
at(hz)とline(start_hz, end_hz)は絶対周波数を取ります。標準的な書き方は、
鳴っている一つのrootをHzで名づけ、他のpitchをその比として導くことです。完全5度なら
root_hz * 1.5、完全4度ならroot_hz * 4.0/3.0、registerを上げるなら
root_hz * 2.0です。比はField自身が読む物理量なので、周波数関係として考えられます。
平均律のdecimal、たとえばD3を表す146.83も動作しますが、12音のsymbol gridを裏口から
持ち込みます。sceneで実際に鳴っているrootの比を優先してください。
let root_hz = 110.0;
let voice = harmonic().amp(0.04).sustain();
place(voice, at(root_hz * 1.5));
wait(2.0);
Consonance movement:seek_consonance
VoiceがConsonance Field上のより良い位置を能動的に探すときはseek_consonance()を使います。
自由な山登り探索と音高推移の初期値を設定します。同じ移動を遅く、または速く
動かしたいときはglide(tau_sec)を使います。
let mover = harmonic()
.amp(0.045)
.sustain()
.seek_consonance()
.glide(0.35)
.avoid_neighbors(0.6)
.global_peaks(8, 70.0)
.ratio_candidates(5);
place(mover, consonance(80.0, 900.0).count(8));
wait(12.0);
avoid_neighbors(strength)は混雑を避ける反発を加え、移動するVoiceがすべて同じ山へ重なるのを防ぎます。
移動の反対はanchor()です。固定されたVoiceは音高を保ち、ほかのVoiceが読むConsonance Fieldだけを
変形します。at()またはfreq()で指定したVoiceは暗黙に固定されます。
移動の反映方法は発音様式から決まります。持続するVoiceは滑らかに移り、再発音するVoice
(pulse()、metric()、entrained()、flow())は発音開始ごとに新しい音高へ
snapします。例外が必要ならpitch_apply_mode()を使います。研究scriptには
pitch_core()など機構水準のcontrolもありますが、作品ではseek_consonance()と
glide()を優先してください。
Consonance viabilityとrespawn
consonance_viability(low, high)はconsonance window、recovery(seconds)は最大回復に
要する時間を定義します。適合度の高いVoiceは支えられ、低いVoiceは基準
endurance(seconds)へ近づきます。既定では自分の音響的な痕跡を近似的に除く
環境相対評価です。Consonance Field全体への適合度を問う場合だけviability_scope("total")を使います。
再生成は循環を生態系として閉じます。Voiceが死亡すると、再生成の方針に従って代わりのVoiceが
現れます。respawn_consonance()は、energyで重み付けして選んだliving parentの周辺へ
偏らせながら、field scoreの高いpeakから選びます。respawn_capacity(count)はliving
membership上限です。respawn_settle(placement)はpolicy本来のcandidateを置き換えず、
replacementのcandidate poolへそのPlacementを追加します。
let settle = consonance(70.0, 1100.0).spacing(0.8);
let ecology = harmonic()
.amp(0.04)
.repeat()
.pulse(1.5)
.cycles(3)
.seek_consonance()
.glide(0.45)
.endurance(8.0)
.recovery(4.0)
.attack_cost_fraction(0.017)
.attack_recharge_fraction(0.70)
.consonance_viability(0.32, 0.82)
.respawn_consonance()
.respawn_capacity(14)
.respawn_settle(settle);
place(ecology, consonance(70.0, 1100.0).count(14));
wait(30.0);
完全なlifecycle/respawn surfaceはAPIリファレンス、articulation、 発音、音高の振る舞い、生存の区別はPopulation — Voiceをまとめる持続単位、 エネルギーと再生成のcycleは VoiceとLandscape — 音と環境のフィードバックを参照してください。
Landscape-awareな音色
Fieldはpitchだけでなく音色も形づくれます。modal() bodyはmode patternを取ります。
landscape_density_modes()はdensity massの強い位置を間隔を空けて決定的に選び、
landscape_peaks_modes()はField levelの強いlocal peakを間隔を空けて選びます。
そのため、bellのpartialをConsonance Fieldがすでにsupportする位置へ置けます。
let shimmer_modes = landscape_density_modes()
.count(10)
.range(1.0, 5.5)
.gamma(1.6)
.spacing(0.7);
let shimmer = modal()
.amp(0.025)
.sustain()
.seek_consonance()
.modes(shimmer_modes)
.brightness(0.7);
place(shimmer, consonance(200.0, 1600.0).count(4));
wait(8.0);
mode patternの生成関数にはharmonic_modes()、odd_modes()、power_modes(beta)、
stiff_string_modes(stiffness)、custom_modes([ratios])、modal_table(name)、
landscape_density_modes()、landscape_peaks_modes()があります。
リズム:一つの結合連続体
Conchordalのリズムは、別々の時計を寄せ集めたものではありません。Communityから生まれる 共有拍の上に、一つの結合連続体があります。 Communityは、結合振動子からなる一つの拍を 駆動します。個々のVoiceは位相振動子として働き、結合の強さに応じて発音位置をその拍へ 近づけます。外から押し付ける格子はありません。VoiceがCommunity自身の拍へどれほど強く 同期するかによって、まとまりも、その欠如も生まれます。
三つのrhythm「family」は連続体上の三領域にすぎません。
- metric — 強い結合。深いattractorとして安定したpulseに聞こえる。
- entrained — 中程度の結合。時間とともに同期するがdriftも残る。
- flow — ほぼゼロの結合。自由なrenewal processによる非metric texture。
リズムはconsonance、viability、movement、respawnと同じ生態系に属します。timingが生存へ 影響し、生存がtimingを再編成できます。
Director水準の地形
directorはConsonance Fieldの操作と対称的にrhythmic terrainを形づくります。これらは scheduleではなくsoft priorであり、創発が働き続けます。
meter_stability(value)—[0,1]のattractor depth。実在するperiodicityに対する basinを深くするだけで、非metric inputからbeatを捏造しない。temporal_basin(min_hz, max_hz)— 創発beatが引き寄せられるtempo領域。consonance(min, max)の時間軸版で、beatを配置したりmeasureを強制したりはしない。
Voiceごとのプリセットと調整
Tier 1 presetのmetric()、entrained()、flow()はrate引数を取りません。tempo領域は
Voiceごとではなく、演出者が一度だけ設定する地形の性質です。place()より前に
PopulationSpecへ設定します。
.entrained()とbrain("entrain")を混同しないでください。前者はonset timing、後者は
Voiceの発音上の生と代謝を選びます。独立しており併用できます。
Voiceごとの設定で、結合連続体上の位置を細かく調整できます。
entrainment(strength)—[0,1]の結合。free(0)からlocked(1)。rhythm_role("beat"|"subdivision"|"accent"|"texture")— metrical role。accentは共有meterを強く駆動するonsetを出し、反復downbeatからmeasureを創発できる。microtiming(amount)—[-0.5, 0.5]のsigned beat-phase offset。0.5は半beatずれ、 syncopationとして聞こえる。
meter_stability(0.85); // attractor depth: how readily a pulse forms
temporal_basin(1.8, 2.2); // tempo region the emergent beat gravitates toward
let beat = harmonic()
.metric()
.rhythm_role("accent") // a strong onset that drives the shared beat
.cycles(2);
let entrained = harmonic()
.entrained()
.cycles(2);
let drift = harmonic()
.flow()
.cycles(1);
let offbeat = harmonic()
.metric()
.microtiming(0.5) // a half-beat offset reads as syncopation
.cycles(2);
place(beat, at(110.0));
place(entrained, consonance(110.0).peak().count(3));
place(drift, consonance(300.0, 1200.0).count(4));
place(offbeat, at(220.0));
wait(12.0);
同じ軸では最後の指定が優先されます。調整値は記憶され、対応するプリセットを選んだ時に適用されるため、
entrainment(0.8).metric()とmetric().entrainment(0.8)は同等です。
duration_range(...).adaptive_duration()と逆順も同様です。
明示的なwhen/duration(Tier 2)
presetの下にはonce()、pulse(rate_hz)、while_alive()、cycles(n)、
adaptive_duration()があり、duration_range、duration_curve、shorten_on_dropで
調整できます。
生存としてのtiming(Tier 3)
timingを生存と再編成へ影響させるにはrhythm_coupling_vitality(lambda_v, v_floor)と
rhythm_reward(rho_t, "attack_phase_match")を使い、internal oscillatorの直接設定には
rhythm_freq(freq_hz)を使います。
let pulse_voice = harmonic()
.repeat()
.pulse(2.0)
.cycles(2)
.rhythm_freq(2.0)
.rhythm_coupling_vitality(0.8, 0.4)
.rhythm_reward(0.4, "attack_phase_match");
place(pulse_voice, at(165.0));
wait(8.0);
Scaffold(research control)
scaffold functionは比較assay用の外部pulseを強制します。
set_scaffold_off();
set_scaffold_shared(2.0);
set_scaffold_scrambled(2.0, 17);
demoやassayには有用ですが、リズム作曲の抽象ではありません。作曲されたリズムは結合連続体と 地形から生じるべきです。
ルーティングとListenerTwin
二つのbus
各々のVoiceは、独立した二つのモノラルバスへ寄与します。
- presentation bus → cpal出力 / offline render / UI metering(提示される作品)
- habitat bus → NSGT解析 → Landscape(ALife生態系が応答するもの)
初期状態では両方へ送られます。一方だけに送るにはsend()、両方を明示するには|で
結合します。
// Reference anchor: sensed by the ecology, absent from the presented sound.
let anchor = harmonic().brain("drone").send(habitat_bus);
// Presented decor that does not influence the ecology.
let decor = sine().send(presentation_bus);
// Explicitly both (the default).
let normal = harmonic().send(habitat_bus | presentation_bus);
place(anchor, at(110.0));
place(decor, at(880.0));
place(normal, consonance(110.0).peak().count(3));
wait(4.0);
バスの分離は作曲の道具です。send(habitat_bus)の隠れたanchorは聞こえずにPopulationの
組織化を変え、send(presentation_bus)のdecorは生態系を乱さずに聞こえます。
初期状態ですべてのVoiceを両方のバスへ送るのは、それがDirect Cognitive Couplingだからです。
聴き手が聴くものと生態系が知覚するものが同じ物理eventになります。分離は意図的な逸脱です。
send(habitat_bus)は聞こえずにFieldを形づくるterrain、send(presentation_bus)は
聞こえるが生態系の世界の外にあるdecorです。サンプルでは、scaffoldingは聞こえないか、
Voiceとしての発音体と生を与えられます。
ListenerTwin
Conchordalは、提示された音だけをmodel化するlistener側のListenerTwinを持ちます。
habitat busは読まないため、hidden scaffoldが偽のlistener tensionを作ることはありません。
listener_state reportには四つの知覚levelがあります。
stability_level— 現在聞こえる音の安定性 / consonance。resolvability_level— 近くに、より安定したもっともらしい継続状態があるか。tension_level—(1 - stability) * resolvability。現在は不安定だが改善経路がある状態。attention_level— presentation由来のonset / spectral-flux salience。
listener側のmeter推定も含みます。
beat_hz、beat_phase、beat_confidencesubdivision_ratio、subdivision_confidencemeasure_hz、measure_ratio、measure_confidence
generated_frame_id、analysis_frame_id、analysis_lag_framesは知覚遅延を明示します。
report eventと原因となった音を比較するときに重要です。
Twinを操作するscripting verbはありません。命令する対象ではなく観測する対象です。
report有効時にlistener_state recordを出し、GUIにも同じstateを表示します。generationへ
結合する前に、自分が聴くtensionとTwinのreportが一致するかを確認してください。
DCC:Twinを戻す結合
任意の結合であるDCCはscriptではなくconfig.toml(または--configで指定したfile)で
設定します。
[dcc]
# Listener pressure is report/UI-only by default.
# coupling_strength = 0.0
# max_temperature_bonus = 0.10
coupling_strength(0.0–1.0、既定値0.0):0.0ではレポートとUI専用で、 generationは変わりません。値を上げるとtension_pressure = tension_level * resolvability_level * coupling_strengthを 一時的な音高探索の加算値としてだけ使います。目標音高やリズム同期を 直接設定しません。max_temperature_bonus(既定値0.10):一時的な加算値の上限。
listener_stateが音楽的に読めることを確かめてからcoupling_strengthを少しずつ上げます。
結合中はdcc_pressure recordにpressureとtemperature bonusが記録されます。
タイムラインと構造
シナリオは音響標本を一つずつ予定表へ並べません。スクリプト上の時刻を進め、その時点で Populationを配置し、更新または終了する時刻を記述します。
place、wait、flush
place()は現在時刻に初代のVoiceをただちに配置し、安定したPopulationへの参照を
返します。wait(seconds)は保留中の更新を発行して時刻を進めます。flush()は
時刻を進めずに保留中の更新だけを発行します。
let spec = harmonic()
.amp(0.04)
.brightness(0.35)
.sustain();
let population = place(spec, consonance(220.0).count(3));
population.amp(0.025); // Live patch at the same script time.
flush(); // Emit it; the cursor does not move.
wait(2.0); // Advance two seconds.
release(population);
意味上の境界はwait()やflush()ではなくplace()です。発音体、振る舞い、生存過程、
再生成の初期設定はPopulationSpecに属し、実行中の更新と終了だけがPopulationに属します。
release、section、play
release(population)は明示的なreleaseです。section(name, callback)と
play(callback, ...)は有効範囲を作り、関数が戻ると内部で作られたPopulationを
自動的にreleaseします。有効範囲の終了時にはreleaseより前に保留中の更新を発行します。
名前の付いたformにはsectionを使います。名前はreportのscene_markerになります。
引数を取る再利用可能なgestureにはplayを使います。
let gesture = |root_hz, duration_sec| {
place(
harmonic().amp(0.035).sustain(),
consonance(root_hz).peak().count(3)
);
wait(duration_sec);
};
section("two gestures", || {
play(gesture, 110.0, 2.0);
play(gesture, 165.0, 2.0);
});
各playが作るPopulationは呼び出しの終了時にreleaseされます。外側のsectionはレポートの印を
提供し、その直下で作ったものを所有します。
Parallel timeline
parallel([callbacks])は現在時刻から複数のcursorをforkします。全branchは同時に始まり、
記述後の主時刻は最長の分岐の終端へ進みます。各分岐も一つの有効範囲であり、戻ると内部の
Populationをreleaseします。
section("overlap", || {
parallel([
|| {
place(sine().amp(0.05).sustain(), at(220.0));
wait(3.0);
},
|| {
wait(1.0);
place(harmonic().amp(0.03).sustain(), at(330.0));
wait(1.0);
}
]);
});
第一branchはforkから3秒後、第二branchは2秒後に終わるため、main cursorは3秒進みます。 両分岐の有効範囲が重なる区間だけ、両方のVoiceが同時に鳴ります。
スクリプト上の時刻と実行時の振る舞い
スクリプト上の時刻は制御事象の時刻を決めます。その時刻のLandscapeを予測するものでは
ありません。wait()でscenarioが進む間も、movement、coupled rhythm、death、respawnは
実行中も続きます。
- scriptはmacro structureを書く。
- Communityは瞬間ごとの振る舞いを生成する。
- レポートは、記述された区間で実際に起きたことを示す。
演奏で説明した手順を使って結果を確かめ、scenarioを修正します。
特定の実現を再現するときだけseed(...)または--seedを使います。
APIリファレンス
このページは、engineに登録されたスクリプティング面とドキュメントregistry (src/scripting/docs.rs)から生成されます。engineとの差異はCIテストで検出されます。再生成するには次を実行します:
cargo run --bin gen_rhai_defs
構築用のメソッドは操作対象を返すため、続けて呼び出せます。整数と小数は、両方のoverloadが登録されている箇所では交換可能です。正確なoverloadは生成されたLSP定義(rhai-defs/conchordal.d.rhai)に記載されています。
スクリプティング面は四層に分かれます。Core APIは選別された作曲用の面で、すべてのサンプルを記述できます。Experimentalは試聴中のCore候補です。Mechanism Tuningは、Coreでは表せない挙動を作品が必要とするとき、動詞の背後にある機構を調整します。Research Controlsは作曲ではなく、instrumentを研究するためのものです。関数ごとの技術説明は、LSP hoverと同じ英語の単一ソースを掲載しています。
型
| 型 | 説明 |
|---|---|
PopulationSpec | 再利用可能なPopulationSpec。初代のVoiceの特性に、生存過程、respawn、個体数の規則を組み合わせる。 |
Population | place()が返すPopulation。Voiceが死亡し世代交代しても、同一性を保つ安定した参照。 |
Placement | 初代のVoiceをどこへ配置するかを表す。at()、consonance()、dissonance()、edge()、gap()、random()、line()で作る。 |
ModePattern | モーダル合成の発音体に使う周波数構成。*_modes()関数で作る。 |
Bus | 二つのmono出力busの一つ。` |
BusSet | `bus |
組み込み定数
| 定数 | 型 | 説明 |
|---|---|---|
habitat_bus | Bus | 解析bus:NSGTからLandscapeへ送られ、生態系が知覚する。 |
presentation_bus | Bus | 提示bus:cpal出力、録音、UI meterへ送られ、聴き手が耳にする。 |
Core API
選別された作曲用の面です。すべてのサンプルは、ここにある動詞だけで記述できます。
PopulationSpec
PopulationSpecは、初代のVoiceの特性とPopulation全体の生存規則を定める。生成関数で作り、構築用メソッドで調整し、place()でPopulationにする。
sine
sine() -> PopulationSpec
PopulationSpec whose founder voices use a pure sine body.
harmonic
harmonic() -> PopulationSpec
PopulationSpec whose founder voices use a harmonic-series body.
modal
modal() -> PopulationSpec
PopulationSpec whose founder voices use a resonator-based modal body; shape it with modes().
saw
saw() -> PopulationSpec
Harmonic-body preset with brightness 0.85.
square
square() -> PopulationSpec
Harmonic-body preset with brightness 0.65.
noise
noise() -> PopulationSpec
Harmonic-body preset with full brightness and maximal spectral motion (jitter).
variant
variant(population_spec) -> PopulationSpec
Clone a PopulationSpec so the copy can be modified independently.
配置
Placementは、初代のVoiceが周波数空間へ入る場所を決める。生成関数で作り、place()へ渡す前に調整する。
at
at(freq_hz) -> Placement
Place at a fixed frequency in Hz.
consonance
consonance(root_hz) -> Placement
consonance(min_hz, max_hz) -> Placement
Target consonance maxima. Density cloud by default; .peak() for the extremum. consonance(root) takes a harmonic window around a root (default 1x-4x, set multiples with range()); consonance(min, max) takes an absolute range. Default spacing is 1.0 ERB.
dissonance
dissonance(min_hz, max_hz) -> Placement
Target consonance minima (tension, clusters). Density cloud by default; .peak() for the most dissonant point.
edge
edge(min_hz, max_hz) -> Placement
Target the consonance/dissonance boundary (C near its midpoint). The metastable region between fusion and beating. Density band by default; .peak() for the point closest to the boundary.
gap
gap(min_hz, max_hz) -> Placement
Target empty registers (low subjective intensity); fill the room. Density cloud by default; .peak() for the emptiest position.
peak
peak()
適用対象:Placement。
Realize a field target as its deterministic extremum.
density
density()
適用対象:Placement。
Realize a field target as a stochastic cloud (the default).
tension
tension(degree)
適用対象:Placement。
Bias Consonance placement toward a field-score step below the in-range maximum (degree 0..1). Consonance placement only. 0 leaves ordinary Consonance placement unchanged: peak() selects the strongest peak, while the default density remains the ordinary Consonance cloud. Higher values target a weaker, more tense step (target = L_max - degree*(L_max - L_min) over the range, in field_score). Pairs with peak() (nearest step, sharp) or density (a broader cloud around it).
random
random(min_hz, max_hz) -> Placement
Log-uniform random placement inside a frequency range.
line
line(start_hz, end_hz) -> Placement
Linear interpolation of positions between two frequencies.
count
count(n)
適用対象:Placement。
Positive number of founder voices to place (default 1).
range
range(min_mul, max_mul)
適用対象:Placement。
Multiplier range relative to the root; only valid on consonance(root).
spacing
spacing(min_erb)
適用対象:Placement。
Minimum ERB distance between placed voices; valid on field placements.
TimelineとPopulation
place()は現在のスクリプト時刻にPopulationを配置する。wait()は時刻を進め、flush()は時刻を進めずに保留中の更新を発行する。有効範囲が終わると、内部のPopulationは自動的に解放される。
place
place(population_spec, placement) -> Population
Create a Population at the current script time. place() is the sole Population boundary. Configure initial-only properties on the PopulationSpec first; the returned Population exposes only live patches and release.
wait
wait(seconds)
Emit pending live patches, then advance the timeline cursor.
flush
flush()
Emit pending live patches without advancing time.
release
release(population)
Close a live Population; its voices enter their release phase and fade out. Release is terminal at the scripting surface: later live patches on the same Population are ignored.
section
section(name, callback)
Named scope; populations placed inside are released when the callback returns.
play
play(callback)
play(callback, arg1)
play(callback, arg1, arg2)
play(callback, arg1, arg2, arg3)
play(callback, [args])
Scoped callback execution with automatic population release. Accepts 0-3 positional arguments, or an array of arguments.
parallel
parallel(callbacks)
Run an array of closures on parallel timelines from the current cursor. Each branch starts at the current cursor; the cursor advances to the latest branch end.
seed
seed(value)
Set the random seed for reproducible scenarios.
Bodyと音色
Voiceの音響bodyを構成するlevel、spectrum、detuning、envelope。
amp
amp(value)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Amplitude in 0.0-1.0.
freq
freq(hz)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Frequency lock in Hz; implies an anchored pitch (see anchor()).
brightness
brightness(value)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Spectral brightness in 0.0-1.0 (harmonic/modal bodies).
spread
spread(value)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Detuning spread.
unison
unison(count)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Number of unison detuning copies.
modes
modes(pattern)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Set the mode pattern of a modal body. See the Mode Patterns section for constructors and modifiers.
adsr
adsr(attack_sec, decay_sec, sustain_level, release_sec)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
ADSR amplitude envelope.
Phonationとリズム
Voiceがいつ、どれだけの間鳴るかを決める。Tier 1はリズム結合連続体の領域を選び、Tier 2はwhen/durationを明示し、Tier 3は専門的な調整を行う。同じ軸では最後の指定が優先される。
brain
brain(name)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Articulation life: "entrain" (default), "seq", or "drone". Selects how the voice lives while sounding; orthogonal to the rhythm coupling continuum (metric/entrained/flow). entrain is a living articulation whose vitality responds to consonance and rhythm fit, subject to the metabolism economy. seq holds for a fixed lifetime, ignoring the field and metabolism. drone is undying, sustaining forever with a slow sway – useful as terrain material.
sustain
sustain()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Sustain phonation mode (default).
repeat
repeat()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Repeated/pulsed phonation mode.
metric
metric()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
High coupling to the shared emergent meter: deep attractor, stable pulse. Takes no rate argument: the tempo region is director-level terrain (temporal_basin).
entrained
entrained()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Medium coupling: synchronization emerges over time, still drifts.
flow
flow()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Near-zero coupling: free renewal process, non-metric texture.
entrainment
entrainment(strength)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Override coupling strength in 0-1 (free .. locked). Order-independent with presets: entrainment(0.8).metric() and metric().entrainment(0.8) are equivalent.
rhythm_role
rhythm_role(name)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Metrical job: "beat", "subdivision", "accent", or "texture". accent emits a stronger onset that drives the shared meter harder, so a recurring downbeat can seed an emergent measure.
microtiming
microtiming(amount)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Signed beat-phase offset in -0.5..0.5; 0.5 reads as syncopation.
cycles
cycles(n)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Duration of n rhythm cycles.
Pitch Movement
VoiceがConsonance Field内をどう移動するかを決める。seek_consonance()、glide()、temperature()が基本の作曲用APIで、残りは山登り探索とpeak samplerを調整する。
anchor
anchor()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Hold the voice at its pitch: an anchored voice never moves. Voices placed with at() or given freq() are anchored implicitly; use anchor() to hold strategy-placed voices (consonance(), dissonance(), …) at their settled position, or to state the intent explicitly.
seek_consonance
seek_consonance()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Free hill-climb movement toward better field positions, with glide defaults. How pitch decisions land is resolved at placement unless pitch_apply_mode() was called: sustained voices glide, re-attacking voices (pulse(), metric(), entrained(), flow()) snap at onsets.
glide
glide(tau_sec)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Pitch glide time constant in seconds.
temperature
temperature(value)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Search temperature shared by both pitch cores: 0 settles greedily, higher is more exploratory. The single stochastic-search knob. At 0 the hill-climb is greedy (move only on a clear improvement, otherwise stay) and the peak sampler takes the argmax candidate. Higher values let the hill-climb accept downhill moves (Metropolis) and soften the peak sampler’s candidate choice. Musically the movement-tension dial; its placement twin is tension().
近傍の知覚
Fieldを評価するとき、ほかのVoiceと自分自身のspectrum footprintをどう知覚するかを決める。
avoid_neighbors
avoid_neighbors(strength)
avoid_neighbors(strength, sigma_cents)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Crowding repulsion from neighboring voices. With one argument the repulsion width uses the default; the two-argument form sets it explicitly in cents.
LifecycleとViability
時間に沿った生存と回復。endurance()は適合度がゼロのときの寿命、recovery()は最大の連続回復に要する時間を表す。consonance_viability()は回復範囲を定め、既定では環境相対評価を使う。
endurance
endurance(seconds)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Nominal survival time at zero field fit, excluding the release tail. Energy is normalized to 0-1. The runtime drain rate is derived at spawn; actual lifetime varies with field fit, attacks, recovery, and release time.
recovery
recovery(seconds)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Time to refill normalized energy from empty at full viability. Optional. If omitted, continuous recovery is disabled. This does not govern the separate per-attack economy.
attack_cost_fraction
attack_cost_fraction(value)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Fraction of normalized energy spent by a full-strength attack.
attack_recharge_fraction
attack_recharge_fraction(value)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Maximum normalized energy restored by a fully consonant attack.
sustain_drive
sustain_drive(value)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Continuous drive level for sustained voices.
consonance_viability
consonance_viability(low, high)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Consonance window used for viability scoring. Enables environment-relative scoring by default: a voice is evaluated against the field with its own footprint approximately removed (see viability_scope()).
dissonance_penalty
dissonance_penalty(value)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
How strongly good field fit extends life beyond zero-fit endurance. The zero-fit endurance remains fixed; the penalty changes how much longer a well-fit voice survives.
Respawn
Populationの世代交代。respawn policyはVoiceが死亡したときのreplacementの出現位置を決め、capacityとacceptance thresholdが生態系規模の挙動を形づくる。
respawn_random
respawn_random()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Respawn without parent inheritance. Candidates come from the Population’s original Placement and, when set, respawn_settle() adds alternative candidates. The current scene score weights the final choice, so this is not uniform random placement.
respawn_hereditary
respawn_hereditary(sigma_oct)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Respawn near an energy-weighted living parent, with frequency variance in octaves. Candidates share one selected parent. The candidate with the highest current Consonance Field level is used.
respawn_consonance
respawn_consonance()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Respawn from high field-score peaks, biased around an energy-weighted living parent. When living members exist, one parent is selected by energy. Candidate peaks come from the current Consonance Field and are weighted by scene score and their relation to the parent; without a usable peak, the policy falls back to the parent or original Placement.
respawn_capacity
respawn_capacity(count)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Maximum number of living members in the Population. Defaults to the number of founder Voices created by place() and cannot be lower than that founder count.
respawn_settle
respawn_settle(placement)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Add a Placement source to the replacement candidate pool. The policy’s own baseline still supplies one candidate; this Placement supplies the remaining alternatives. Requires a strategy-bearing placement: consonance(), dissonance(), edge(), gap(), random(), or line() (not at()).
respawn_min_c_level
respawn_min_c_level(level)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Minimum consonance level for respawn acceptance.
respawn_background_death_rate
respawn_background_death_rate(rate)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Background turnover rate per second.
Mode Pattern
modal()の発音体に使う周波数関係。生成関数はModePatternを返し、構築用メソッドで調整できる。Landscape-awareな構成は実行中のLandscapeから値を取る。
harmonic_modes
harmonic_modes() -> ModePattern
Harmonic series: f, 2f, 3f, …
odd_modes
odd_modes() -> ModePattern
Odd harmonics: f, 3f, 5f, …
power_modes
power_modes(beta) -> ModePattern
Power law: f * n^beta.
stiff_string_modes
stiff_string_modes(stiffness) -> ModePattern
Stiffness-adjusted harmonics.
custom_modes
custom_modes(ratios) -> ModePattern
Custom frequency ratios from an array.
modal_table
modal_table(name) -> ModePattern
Named mode table lookup. Falls back to harmonic_modes() with a warning if the name is unknown.
landscape_density_modes
landscape_density_modes() -> ModePattern
Modes selected from the strongest live landscape density-mass positions. Selection is deterministic: after each strongest position is chosen, nearby weights are suppressed according to spacing(). Falls back to harmonic modes when live landscape data yields no usable position.
landscape_peaks_modes
landscape_peaks_modes() -> ModePattern
Modes selected from the strongest local peaks of the live Consonance Field level. Selection is deterministic and enforces the ERB separation from spacing(). Falls back to harmonic modes when live landscape data yields no usable peak.
count
count(n)
適用対象:ModePattern。
Number of modes.
range
range(min_mul, max_mul)
適用対象:ModePattern。
Frequency range; only valid on landscape_*_modes().
spacing
spacing(min_erb)
適用対象:ModePattern。
Minimum ERB distance between modes; only valid on landscape_*_modes().
gamma
gamma(g)
適用対象:ModePattern。
Density sharpening exponent; only valid on landscape_density_modes().
jitter
jitter(cents)
適用対象:ModePattern。
Randomize mode frequencies by up to the given cents.
seed
seed(value)
適用対象:ModePattern。
Random seed for jittered patterns (>= 0).
Routing
各Voiceは、独立した二つのモノラルバスへ寄与する。presentation busは作品として聴かれる音、habitat busはNSGT解析を通じて生態系が知覚する音である。初期状態では両方へ送る。
send
send(bus)
適用対象:PopulationSpecのみ。
Route the voice to specific buses; accepts a Bus or a BusSet. PopulationSpec only. send(habitat_bus) makes a voice sensed by the ecology but absent from the presented sound; send(presentation_bus) is heard without perturbing the ecology; send(habitat_bus | presentation_bus) feeds both (the default).
Directorとglobal parameter
scene全体の地形形成と研究用control。director verbはsoft priorであり、地形を形づくるが、beatをscheduleしたりmeasureを強制したりはしない。
meter_stability
meter_stability(value)
Attractor depth in 0-1: how readily a pulse forms. A soft prior: it only deepens the basin for a real periodicity; it never fabricates a beat from non-metric input.
temporal_basin
temporal_basin(min_hz, max_hz)
Tempo region the emergent beat gravitates toward. The time-axis analogue of consonance(min, max): it shapes the terrain, does not place a beat, and never forces a measure.
Experimental
Core候補として試聴中の動詞です。作曲用ですが、検証が済むまでは研究段階の安定性です。
Phonationとリズム
phonate_when_viable
phonate_when_viable()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Withhold the first onset until perceived consonance is viable. Silently settles into the field until consonance reaches the low bound of the voice’s consonance-viability window (consonance_viability(), or always-viable if that window was never set), then phonates normally and never re-gates. A voice that never settles dies unheard and the respawn policy replaces it – there is no timeout parameter, the energy economy is the timeout.
Mechanism Tuning
Core動詞の背後にある機構を細かく制御します。既定値は調整済みです。Coreでは表せない特定の挙動を作品が必要とするときに使います。
Phonationとリズム
once
once()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Single trigger.
pulse
pulse(rate_hz)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Pulse at an explicit rate in Hz.
while_alive
while_alive()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Hold/sustain until release.
adaptive_duration
adaptive_duration()
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Duration follows field support.
pulse_lock
pulse_lock(depth)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Low-level pulse phase weighting in 0-1.
social
social(coupling)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Social coupling for entrained() or pulse(), in 0-1.
duration_range
duration_range(min_cycles, max_cycles)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Adaptive duration range in rhythm cycles.
duration_curve
duration_curve(k, x0)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Adaptive duration curve parameters.
shorten_on_drop
shorten_on_drop(gain)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Shorten adaptive duration when field support drops.
rhythm_freq
rhythm_freq(freq_hz)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Internal theta/rhythm oscillator frequency.
rhythm_coupling_vitality
rhythm_coupling_vitality(lambda_v, v_floor)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Vitality-modulated rhythm coupling.
rhythm_reward
rhythm_reward(rho_t, metric)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
Energy reward for timing fit; metric is "attack_phase_match" or "none".
Pitch Movement
pitch_smooth
pitch_smooth(tau_sec)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Pitch smoothing time constant in seconds.
pitch_apply_mode
pitch_apply_mode(name)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
"gate_snap" or "glide": override how pitch decisions are applied. Without an explicit call, moving voices resolve this at placement from their phonation: sustained voices glide, re-attacking voices snap at onsets.
landscape_weight
landscape_weight(value)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Weight of the landscape objective.
neighbor_step_cents
neighbor_step_cents(value)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Step size for neighbor exploration in cents.
move_cost
move_cost(coeff)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Cost multiplier for pitch changes.
move_cost_exp
move_cost_exp(exp)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Exponent for the move cost.
proposal_interval
proposal_interval(seconds)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Proposal generation interval in seconds.
tessitura_gravity
tessitura_gravity(value)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Gravity toward the tessitura center.
window_cents
window_cents(width)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Peak-sampler search window width in cents.
top_k
top_k(count)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Number of top candidates kept by the peak sampler.
sigma_cents
sigma_cents(spread)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Gaussian spread of the peak sampler in cents.
random_candidates
random_candidates(count)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Number of random candidates considered.
global_peaks
global_peaks(count)
global_peaks(count, min_sep_cents)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Global field peaks as movement candidates, with optional minimum separation.
ratio_candidates
ratio_candidates(count)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Ratio-based movement candidates; 0 disables.
近傍の知覚
crowding_target
crowding_target(same_visible, other_visible)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Which voices are visible to crowding: own population, other populations (booleans).
leave_self_out
leave_self_out(enabled)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Subtract the voice’s own spectral contribution when evaluating the field.
leave_self_out_harmonics
leave_self_out_harmonics(count)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
Number of harmonics used for approximate self-subtraction.
LifecycleとViability
viability_scope
viability_scope(name)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
"environment" (default) or "total" viability scoring scope. Use "total" only when the selection question should include the voice’s own contribution.
Directorとglobal parameter
set_roughness_k
set_roughness_k(value)
Roughness tolerance of the landscape.
set_global_coupling
set_global_coupling(value)
Voice interaction strength.
Research Controls
instrumentを研究するための面であり、作曲用ではありません。通常の作曲では触れません。研究上の問いが定まるにつれて変更または削除される可能性があります。
Pitch Movement
pitch_core
pitch_core(name)
適用対象:PopulationSpecのみ。 初期設定専用:place()より前にPopulationSpecへ設定する。
"hill_climb" or "peak_sampler". Research control.
move_cost_time_scale
move_cost_time_scale(name)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
"legacy"/"integration_window" or "proposal"/"proposal_interval".
近傍の知覚
leave_self_out_mode
leave_self_out_mode(name)
適用対象:PopulationSpecとPopulation。 実行中に更新可能:Population内で鳴っているVoiceを更新する。
"approx"/"approx_harmonics" or "exact"/"exact_scan".
LifecycleとViability
selection_approx_loo
selection_approx_loo(enabled)
適用対象:PopulationSpecのみ。
Override environment-relative viability scoring; research/reference control. PopulationSpec only. Use only for older reference assays that need the previous implementation-level control.
Directorとglobal parameter
set_pitch_objective
set_pitch_objective(name)
"consonance"/"positive" or "dissonance"/"negative". Research control.
set_control_update_mode
set_control_update_mode(name)
"snapshot_phased"/"snapshot" (default) or "sequential_rotating"/"sequential". Research control.
set_scaffold_off
set_scaffold_off()
Disable the external rhythm scaffold. Scaffolds are external comparison controls for demos and assays, not the rhythm-composition abstraction.
set_scaffold_shared
set_scaffold_shared(freq_hz)
Shared external scaffold pulse.
set_scaffold_scrambled
set_scaffold_scrambled(freq_hz, seed)
Per-voice scrambled scaffold pulse.
サンプル
12個の小さなサンプルを、順番に並べています。実行してscriptを読み、instrumentの主な機能を 一つずつ確認するためのものです。音楽作品ではなく、APIと挙動のデモです。
cargo run --release -- samples/01_a_single_voice.rhai
- A Single Voice — 一つのVoiceが現れ、息を保ち、去る。
- Constellation — line、peak、density、strain、gap、chanceという六つの入り方。
- Gravity — 二つのsunの下の同じroot。peakはchartではなく現在の音を聴く。
- Tension — Voiceが協和へ落ち着き、不安定になって離れ、再び冷えて落ち着く。
- Settling — 散らばったVoiceが、Consonance Fieldに支えられる場所へ滑らかに移る。
- Bells — 打撃されるbody。最後のbellはpartialをFieldに選ばせる。
- Heartbeat — 外部の足場なしにPopulationが共有pulseへ同期する。
- Murmuration — flockが命令されずに同期へ漂う。
- Rain — beatを持たず、Fieldに沿って落ちる時間。
- Generations — Voiceが生き、飢え、和声に支えられる場所へ生まれ直す。
- Autumn Cycle — directionを持つharmony。季節が巡り戻る。
- Emergence and Resolution — すべてを一つのarcへ曲げる。
サンプル1–6はConsonance terrain(placement、gravity、tension、movement、timbre)、
7–9はrhythm continuumを領域ごとに示し、10はloopをlifeとして閉じます。11–12は複数の
mechanismを組み合わせます。全サンプルはtest suiteでcompile-checkされ、現在のAPIとの
不一致を検出します。最上位のサンプルは意図的にseed(...)を呼ばず、毎runを新しい
scenario seedで始めます。
比較を再現可能にする必要があるresearch assayだけが固定seedを使います。
一つのcraft ruleが全体を貫きます:scaffoldingは聞こえないか、embodyされる。 terrain anchorは、drone自体が主題でない限りpresentationではなくhabitat busへ歌います。 pulse carrierには共鳴するbodyとlifeを与えるか、colonyからpulseが凝結するに任せます。
Research assay
samples/research/にはheredity/selection ablation、external-scaffold rhythm control、
mechanism studyなどの比較fixtureがあります。instrumentを演奏するのではなく研究するもので、
上の道筋には含まれません。
Offline rendering
conchordal instrumentはaudioをdiskへ書きません。演奏は、音が鳴り終わるとinstrument内には
残らない一過的な出来事(ephemeral)として設計されています。offline WAVには、同じcore engineを
共有する別binaryのconchordal-renderを使います。