Got first rough prototype of the MidiP node going
This commit is contained in:
parent
ecd6b53c65
commit
90c948d272
2 changed files with 9 additions and 3 deletions
|
@ -85,8 +85,7 @@ impl DspNode for MidiP {
|
|||
outputs: &mut [ProcBuf],
|
||||
ctx_vals: LedPhaseVals,
|
||||
) {
|
||||
let out_i = out_idx::MidiP::freq();
|
||||
|
||||
let out_i = out_idx::MidiP::gate();
|
||||
let (freq, r) = outputs.split_at_mut(out_i);
|
||||
let (gate, vel) = r.split_at_mut(1);
|
||||
let freq = &mut freq[0];
|
||||
|
|
|
@ -42,11 +42,18 @@ impl NoteBuffer {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn step_to(&mut self, buf_idx: usize) {
|
||||
while self.buf_idx < (buf_idx % MAX_BLOCK_SIZE) {
|
||||
self.step();
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn step(&mut self) {
|
||||
let cur = self.buf_idx;
|
||||
let next = (self.buf_idx + 1) % MAX_BLOCK_SIZE;
|
||||
println!("COPY {}..{} => {}", (cur * 16), ((cur + 1) * 16), next * 16);
|
||||
//d// println!("COPY {}..{} => {}", (cur * 16), ((cur + 1) * 16), next * 16);
|
||||
self.interleaved_chans.copy_within((cur * 16)..((cur + 1) * 16), next * 16);
|
||||
self.buf_idx = next;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue