[obsidian] vault backup: 2025-10-09 19:33:16
All checks were successful
Build / build (push) Successful in 15m37s
All checks were successful
Build / build (push) Successful in 15m37s
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -184,3 +184,26 @@ fn alloc_midi_voice_4(channel){
|
|||||||
|
|
||||||
[[Computation Expression]]使ってIOの値を`let!`でバインドしていく、とかの方がわかりやすいかも
|
[[Computation Expression]]使ってIOの値を`let!`でバインドしていく、とかの方がわかりやすいかも
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
シンプルに、MIDIにコールバックを渡せるだけなら、どうやって作る?
|
||||||
|
|
||||||
|
```rust
|
||||||
|
|
||||||
|
fn __midi_note_callback(cb:{pitch:float,vel:float}->void ){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fn poly_midi_allocator()->()->[{pitch:float,vel:float}]{
|
||||||
|
let channels = array_new({pitch=0,vel=0},4)
|
||||||
|
let busymap = [0,0,0,0]
|
||||||
|
__midi_note_callback(|pitch,vel| {
|
||||||
|
|
||||||
|
})
|
||||||
|
channels//セルをupvalueとして返す
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
Reference in New Issue
Block a user