groovebox: display input meters!

This commit is contained in:
🪞👃🪞 2025-05-11 00:25:04 +03:00
parent e5752ea4b0
commit 7690549bdc
12 changed files with 239 additions and 117 deletions

View file

@ -9,7 +9,7 @@ impl Sampler {
//todo!();
//}
///// Immutable reference to sample at cursor.
//fn sample_selected (&self) -> MaybeSample {
//fn sample_selected (&self) -> Option<Arc<RwLock<Sample>>> {
//for (i, sample) in self.mapped.iter().enumerate() {
//if i == self.cursor().0 {
//return sample.as_ref()
@ -88,7 +88,7 @@ impl SamplerCommand {
//Self::Select(state.set_note_pos(i))
//}
///// Assign sample to pitch
//fn set (&self, pitch: u7, sample: MaybeSample) -> Option<Self> {
//fn set (&self, pitch: u7, sample: Option<Arc<RwLock<Sample>>>) -> Option<Self> {
//let i = pitch.as_int() as usize;
//let old = self.mapped[i].clone();
//self.mapped[i] = sample;
@ -106,7 +106,7 @@ impl SamplerCommand {
//fn note_off (&self, state: &mut Sampler, pitch: u7) -> Option<Self> {
//todo!()
//}
//fn set_sample (&self, state: &mut Sampler, pitch: u7, s: MaybeSample) -> Option<Self> {
//fn set_sample (&self, state: &mut Sampler, pitch: u7, s: Option<Arc<RwLock<Sample>>>) -> Option<Self> {
//Some(Self::SetSample(p, state.set_sample(p, s)))
//}
//fn import (&self, state: &mut Sampler, c: FileBrowserCommand) -> Option<Self> {
@ -131,7 +131,7 @@ impl SamplerCommand {
////(SetGain [p: u7, gain: f32] cmd_todo!("\n\rtodo: {self:?}"))
////(NoteOn [p: u7, velocity: u7] cmd_todo!("\n\rtodo: {self:?}"))
////(NoteOff [p: u7] cmd_todo!("\n\rtodo: {self:?}"))
////(SetSample [p: u7, s: MaybeSample] Some(Self::SetSample(p, state.set_sample(p, s))))
////(SetSample [p: u7, s: Option<Arc<RwLock<Sample>>>] Some(Self::SetSample(p, state.set_sample(p, s))))
////(Import [c: FileBrowserCommand] match c {
////FileBrowserCommand::Begin => {
//////let voices = &state.state.voices;
@ -154,7 +154,7 @@ impl SamplerCommand {
////Some(Self::RecordCancel))
////("record/finish" []
////Some(Self::RecordFinish))
////("set/sample" [i: u7, s: MaybeSample]
////("set/sample" [i: u7, s: Option<Arc<RwLock<Sample>>>]
////Some(Self::SetSample(i.expect("no index"), s.expect("no sampler"))))
////("set/start" [i: u7, s: usize]
////Some(Self::SetStart(i.expect("no index"), s.expect("no start"))))