[obsidian] vault backup: 2025-08-28 21:21:11[
All checks were successful
Build / build (push) Successful in 14m40s

This commit is contained in:
2025-08-28 21:21:11 +09:00
parent 308778d71a
commit 8bd1863da0

View File

@@ -154,24 +154,43 @@ fn sinosc(freq,amp){
// --ここから上はstage 1 value
//track_1はstage0として参照する
let track1 = Track(|| phasor(1.0)|> scale(_,0.0,1.0,100,4000))
let track1:`()->float = Track(|| phasor(1.0)|> scale(_,0.0,1.0,100,4000))
//track1をfrequencyとして参照することにする
let r1 = {
start: 100ms,
dur: 1000ms,
content: || sinosc(track1(), 1.0)
content: || sinosc($track1(), 1.0)
}
let regions = [r1,r2,...]//regionの列はstage0のvalue
let track3 = track_regions(regions)
```
```rust
fn track_regions(regions:[{start:float,dur:float,generator:()->float}]){
Track()
}
```
## トラックのランタイム構造
```
fn Track()
```rust
fn Track(content:()->float)->`()->float{
let thunk = bind_to_runtime(content)//ここでprobeも行うことで、波形とメーター表示をする
thunk
}
fn master(tracks:[`()->float])->`()->float{
`{ || map(tracks,|t| $t() ) |> sum}
}
let dsp = Track!($master([t1,t2,t3,...]))
```