mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 20:26:42 +01:00
lanes and grids
This commit is contained in:
parent
788dc1ccde
commit
ac865824cc
12 changed files with 213 additions and 112 deletions
|
|
@ -14,7 +14,38 @@ impl Chain {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn render (state: &Chain, buf: &mut Buffer, area: Rect) {}
|
||||
pub fn render (state: &Chain, buf: &mut Buffer, area: Rect)
|
||||
-> Usually<(u16, u16)>
|
||||
{
|
||||
let Rect { x, y, width, height } = area;
|
||||
let area = Rect { x, y, width: 40, height: 30 };
|
||||
let mut y = area.y;
|
||||
buf.set_string(area.x, y, "│", Style::default().black());
|
||||
buf.set_string(area.x + area.width - 1, y, "│", Style::default().black());
|
||||
buf.set_string(area.x + 2, y, "Input...", Style::default().dim());
|
||||
let mut x = 0u16;
|
||||
y = y + 1;
|
||||
for device in state.devices.iter() {
|
||||
let (w, h) = device.render(buf, Rect {
|
||||
x: area.x,
|
||||
y: area.y + y,
|
||||
width: area.width,
|
||||
height: area.height - y
|
||||
})?;
|
||||
//buf.set_string(area.x, y, format!("{y}---TOP---+{h}"), Style::default().red());
|
||||
x = x.max(w);
|
||||
y = y + h;
|
||||
y = y + 1;
|
||||
buf.set_string(area.x, y, "│", Style::default().black());
|
||||
buf.set_string(area.x + area.width - 1, y, "│", Style::default().black());
|
||||
buf.set_string(area.x + 2, y, "Patch in... │ Patch out...", Style::default().dim());
|
||||
y = y + 1;
|
||||
//buf.set_string(area.x, y, format!("{y}---BOT---"), Style::default().red());
|
||||
//buf.set_string(area.x + area.width - 1, area.y + 1, "│", Style::default().black());
|
||||
//buf.set_string(area.x + 2, y, "Patch...", Style::default().dim());
|
||||
}
|
||||
Ok((x, y))
|
||||
}
|
||||
|
||||
pub fn handle (state: &mut Chain, event: &EngineEvent) -> Result<(), Box<dyn Error>> {
|
||||
Ok(())
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ impl Looper {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn render (state: &Looper, buf: &mut Buffer, area: Rect) {
|
||||
pub fn render (state: &Looper, buf: &mut Buffer, area: Rect)
|
||||
-> Usually<(u16, u16)>
|
||||
{
|
||||
//let move_to = |col, row| MoveTo(offset.0 + col, offset.1 + row);
|
||||
//stdout
|
||||
//.queue(move_to(0, 0))?.queue(Print(" Name Input Length Route"))?
|
||||
|
|
@ -20,6 +22,7 @@ pub fn render (state: &Looper, buf: &mut Buffer, area: Rect) {
|
|||
//.queue(move_to(0, 2))?.queue(PrintStyledContent(" Loop 1 [ ] ████ Track 1".bold()))?
|
||||
//.queue(move_to(0, 3))?.queue(PrintStyledContent(" Loop 2 [ ] ████████ Track 2".bold()))?
|
||||
//.queue(move_to(0, 4))?.queue(PrintStyledContent(" Loop 3 [ ] ████████ Track 3".bold()))?;
|
||||
Ok((20, 10))
|
||||
}
|
||||
|
||||
pub fn handle (state: &mut Looper, event: &EngineEvent) -> Result<(), Box<dyn Error>> {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,15 @@ impl Mixer {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn render (state: &Mixer, buf: &mut Buffer, area: Rect) {
|
||||
pub fn render (state: &Mixer, buf: &mut Buffer, mut area: Rect)
|
||||
-> Usually<(u16, u16)>
|
||||
{
|
||||
if area.height < 2 {
|
||||
return Ok((0, 0))
|
||||
}
|
||||
area.x = area.width.saturating_sub(80) / 2;
|
||||
area.width = area.width.min(80);
|
||||
area.height = state.tracks.len() as u16 + 2;
|
||||
draw_box(buf, area);
|
||||
let x = area.x + 1;
|
||||
let y = area.y + 1;
|
||||
|
|
@ -52,7 +60,7 @@ pub fn render (state: &Mixer, buf: &mut Buffer, area: Rect) {
|
|||
//&track.name, Style::default().bold().not_dim()
|
||||
//);
|
||||
for (j, (column, field)) in [
|
||||
(0, format!(" {:7} ", track.name)),
|
||||
(0, format!(" {:10} ", track.name)),
|
||||
(12, format!(" {:.1}dB ", track.gain)),
|
||||
(22, format!(" [ ] ")),
|
||||
(30, format!(" C ")),
|
||||
|
|
@ -94,6 +102,7 @@ pub fn render (state: &Mixer, buf: &mut Buffer, area: Rect) {
|
|||
//}
|
||||
}
|
||||
}
|
||||
Ok((20,10))
|
||||
}
|
||||
|
||||
pub fn handle (state: &mut Mixer, event: &EngineEvent) -> Result<(), Box<dyn Error>> {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,20 @@ impl Plugin {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn render (state: &Plugin, buf: &mut Buffer, area: Rect) {}
|
||||
pub fn render (state: &Plugin, buf: &mut Buffer, Rect { x, y, width, height }: Rect)
|
||||
-> Usually<(u16, u16)>
|
||||
{
|
||||
let style = Style::default().gray();
|
||||
draw_box(buf, Rect { x, y: y, width: 40, height: 8 });
|
||||
buf.set_string(x + 1, y + 1, &format!(" {}", state.name), style.white().bold());
|
||||
buf.set_string(x + 13, y + 1, &format!("│ Plugin Name"), style.not_dim());
|
||||
buf.set_string(x + 0, y + 2, &format!("├--------------------------------------┤"), style.dim());
|
||||
buf.set_string(x + 1, y + 3, &format!(" Parameter 1 0.0"), style);
|
||||
buf.set_string(x + 1, y + 4, &format!(" Parameter 2 0.0"), style);
|
||||
buf.set_string(x + 1, y + 5, &format!(" Parameter 3 0.0"), style);
|
||||
buf.set_string(x + 1, y + 6, &format!(" Parameter 4 0.0"), style);
|
||||
Ok((40, 7))
|
||||
}
|
||||
|
||||
pub fn handle (state: &mut Plugin, event: &EngineEvent) -> Result<(), Box<dyn Error>> {
|
||||
Ok(())
|
||||
|
|
|
|||
|
|
@ -106,9 +106,29 @@ impl Sample {
|
|||
|
||||
}
|
||||
|
||||
pub fn render (state: &Sampler, buf: &mut Buffer, area: Rect) {
|
||||
pub fn render (state: &Sampler, buf: &mut Buffer, Rect { x, y, width, height }: Rect)
|
||||
-> Usually<(u16, u16)>
|
||||
{
|
||||
let style = Style::default().gray();
|
||||
draw_box(buf, Rect { x, y: y, width: 40, height: 12 });
|
||||
buf.set_string(x + 1, y + 1, &format!(" {} │", state.name), style.white().bold());
|
||||
buf.set_string(x + 0, y + 2, &format!("├--------------------------------------┤"), style.dim());
|
||||
buf.set_string(x + 2, y + 3, &format!("C0 Sample#000"), style.bold());
|
||||
buf.set_string(x + 2, y + 4, &format!(" {:.03}s",
|
||||
100000.0/44100.0), style);
|
||||
buf.set_string(x + 2, y + 5, &format!("C#0 Sample#001"), style.bold());
|
||||
buf.set_string(x + 2, y + 6, &format!(" {:.03}-{:.03}s",
|
||||
50000.0/44100.0, 100000.0/44100.0), style);
|
||||
buf.set_string(x + 2, y + 7, &format!("D0 Sample#002"), style.bold());
|
||||
buf.set_string(x + 2, y + 8, &format!(" {:.03}-{:.03}/{:.03}s",
|
||||
0.0, 50000.0/44100.0, 100000.0/44100.0), style);
|
||||
buf.set_string(x + 2, y + 9, &format!("D#0 Sample#003"), style.bold());
|
||||
buf.set_string(x + 2, y + 10, &format!(" {:.03}-[{:.03}-{:.03}]/{:.03}s ",
|
||||
10000.0/44100.0, 25000.0/44100.0, 50000.0/44100.0, 100000.0/44100.0), style);
|
||||
//buf.set_string(x + 1, y + 7 + 6, &format!(" Inputs... │ Outputs... "), style.dim());
|
||||
//render_table(state, stdout, offset)?;
|
||||
//render_meters(state, stdout, offset)?;
|
||||
Ok((40, 11))
|
||||
}
|
||||
|
||||
//fn render_table (
|
||||
|
|
|
|||
|
|
@ -205,10 +205,53 @@ const KEYS_VERTICAL: [&'static str; 6] = [
|
|||
"▀", "▀", "▀", "█", "▄", "▄",
|
||||
];
|
||||
|
||||
fn render (sequencer: &Sequencer, buf: &mut Buffer, mut area: Rect) {
|
||||
fn render (sequencer: &Sequencer, buf: &mut Buffer, mut area: Rect)
|
||||
-> Usually<(u16, u16)>
|
||||
{
|
||||
let style = Style::default().gray();
|
||||
area.height = 18;
|
||||
//draw_box(buf, area);
|
||||
let Rect { x, y, width, height } = area;
|
||||
buf.set_string(x + 1, y + 1, &format!(" │ 00:00.00 / 00:00.00"), style);
|
||||
buf.set_string(x + 2, y + 1, &format!("{}", &sequencer.name), style.white().bold());
|
||||
buf.set_string(x + 1, y + 2, &format!(" ▶ PLAY │ ⏹ STOP │ ⏺ REC │ ⏺ DUB "), style);
|
||||
//buf.set_string(x + 1, y + 6, &format!(" │ Outputs... "), style.dim());
|
||||
|
||||
let mut h = 9;
|
||||
let toggle = true;
|
||||
if toggle {
|
||||
for i in 0..16 {
|
||||
buf.set_string(x + 2, y + 4 + i, &format!(" "), Style::default().on_black());
|
||||
h = h + 1;
|
||||
}
|
||||
}
|
||||
for i in 0..3 {
|
||||
buf.set_string(1 + i * 12 + x + 1, y + h - 5, &format!("▄"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 2, y + h - 5, &format!("▄"), Style::default().black());
|
||||
buf.set_string(1 + i * 12 + x + 3, y + h - 5, &format!("▄"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 4, y + h - 5, &format!("▄"), Style::default().black());
|
||||
buf.set_string(1 + i * 12 + x + 5, y + h - 5, &format!("▄"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 6, y + h - 5, &format!("▄"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 7, y + h - 5, &format!("▄"), Style::default().black());
|
||||
buf.set_string(1 + i * 12 + x + 8, y + h - 5, &format!("▄"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 9, y + h - 5, &format!("▄"), Style::default().black());
|
||||
buf.set_string(1 + i * 12 + x + 10, y + h - 5, &format!("▄"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 11, y + h - 5, &format!("▄"), Style::default().black());
|
||||
buf.set_string(1 + i * 12 + x + 12, y + h - 5, &format!("▄"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 1, y + h - 4, &format!("▀"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 2, y + h -4, &format!("▀"), Style::default().black());
|
||||
buf.set_string(1 + i * 12 + x + 3, y + h -4, &format!("▀"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 4, y + h -4, &format!("▀"), Style::default().black());
|
||||
buf.set_string(1 + i * 12 + x + 5, y + h -4, &format!("▀"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 6, y + h -4, &format!("▀"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 7, y + h -4, &format!("▀"), Style::default().black());
|
||||
buf.set_string(1 + i * 12 + x + 8, y + h -4, &format!("▀"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 9, y + h -4, &format!("▀"), Style::default().black());
|
||||
buf.set_string(1 + i * 12 + x + 10, y + h -4, &format!("▀"), Style::default().white());
|
||||
buf.set_string(1 + i * 12 + x + 11, y + h -4, &format!("▀"), Style::default().black());
|
||||
buf.set_string(1 + i * 12 + x + 12, y + h -4, &format!("▀"), Style::default().white());
|
||||
}
|
||||
draw_box(buf, Rect { x, y, width: 40, height: h - 2 });
|
||||
Ok((40,h-3))
|
||||
//{
|
||||
//let mut area = area.clone();
|
||||
//area.y = area.y + 3;
|
||||
|
|
@ -223,29 +266,7 @@ fn render (sequencer: &Sequencer, buf: &mut Buffer, mut area: Rect) {
|
|||
//}
|
||||
//draw_box(buf, Rect { x, y, width: 18, height });
|
||||
|
||||
draw_box(buf, Rect { x, y, width: 40, height: 8 });
|
||||
draw_box(buf, Rect { x, y, width: 40, height: 6 });
|
||||
let style = Style::default().gray();
|
||||
buf.set_string(x + 1, y + 1, &format!(" │ 00:00.00 / 00:00.00"), style);
|
||||
buf.set_string(x + 2, y + 1, &format!("{}", &sequencer.name), style.bold());
|
||||
buf.set_string(x + 1, y + 2, &format!(" ▶ PLAY │ ⏹ STOP │ ⏺ REC │ ⏺ DUB "), style);
|
||||
buf.set_string(x + 0, y + 3, &format!("├--------------------------------------┤"), style.dim());
|
||||
buf.set_string(x + 1, y + 6, &format!(" Inputs... │ Outputs... "), style);
|
||||
buf.set_string(x + 0, y + 5, &format!("├--------------------------------------┤"), style.dim());
|
||||
for i in 0..3 {
|
||||
buf.set_string(1 + i * 12 + x + 1, y + 4, &format!(" "), Style::default().on_white());
|
||||
buf.set_string(1 + i * 12 + x + 2, y + 4, &format!(" "), Style::default().on_black());
|
||||
buf.set_string(1 + i * 12 + x + 3, y + 4, &format!(" "), Style::default().on_white());
|
||||
buf.set_string(1 + i * 12 + x + 4, y + 4, &format!(" "), Style::default().on_black());
|
||||
buf.set_string(1 + i * 12 + x + 5, y + 4, &format!(" "), Style::default().on_white());
|
||||
buf.set_string(1 + i * 12 + x + 6, y + 4, &format!(" "), Style::default().on_white());
|
||||
buf.set_string(1 + i * 12 + x + 7, y + 4, &format!(" "), Style::default().on_black());
|
||||
buf.set_string(1 + i * 12 + x + 8, y + 4, &format!(" "), Style::default().on_white());
|
||||
buf.set_string(1 + i * 12 + x + 9, y + 4, &format!(" "), Style::default().on_black());
|
||||
buf.set_string(1 + i * 12 + x + 10, y + 4, &format!(" "), Style::default().on_white());
|
||||
buf.set_string(1 + i * 12 + x + 11, y + 4, &format!(" "), Style::default().on_black());
|
||||
buf.set_string(1 + i * 12 + x + 12, y + 4, &format!(" "), Style::default().on_white());
|
||||
}
|
||||
//draw_box(buf, Rect { x, y, width: 40, height: 8 });
|
||||
//buf.set_string(x + 1, y + 3,
|
||||
//&format!(" │ INPUT │ OUTPUT │"),
|
||||
//Style::default().gray());
|
||||
|
|
@ -259,11 +280,11 @@ fn render (sequencer: &Sequencer, buf: &mut Buffer, mut area: Rect) {
|
|||
//buf.set_string(x + 54, y + 1, "OUT", Style::default().green().bold());
|
||||
//}
|
||||
|
||||
let mut command = |y2: u16, c: &str, ommand: &str, value: &str| {
|
||||
buf.set_string(x + 1, y + y2, c, Style::default().bold());
|
||||
buf.set_string(x + 2, y + y2, ommand, Style::default().dim());
|
||||
buf.set_string(x + 4 + ommand.len() as u16, y + y2, value, Style::default().bold());
|
||||
};
|
||||
//let mut command = |y2: u16, c: &str, ommand: &str, value: &str| {
|
||||
//buf.set_string(x + 1, y + y2, c, Style::default().bold());
|
||||
//buf.set_string(x + 2, y + y2, ommand, Style::default().dim());
|
||||
//buf.set_string(x + 4 + ommand.len() as u16, y + y2, value, Style::default().bold());
|
||||
//};
|
||||
//for (y, c, ommand, value) in [
|
||||
////(5, "I", "nputs", "[+]"),
|
||||
////(6, "O", "utputs", "[+]"),
|
||||
|
|
@ -308,36 +329,6 @@ fn render (sequencer: &Sequencer, buf: &mut Buffer, mut area: Rect) {
|
|||
//}
|
||||
//}
|
||||
//
|
||||
let y = y + 8;
|
||||
draw_box(buf, Rect { x, y: y, width: 40, height: 10 });
|
||||
buf.set_string(x + 1, y + 1, &format!(" LV2Host#00"), style.bold());
|
||||
buf.set_string(x + 13, y + 1, &format!("│ Plugin Name"), style.not_dim());
|
||||
buf.set_string(x + 0, y + 2, &format!("├--------------------------------------┤"), style.dim());
|
||||
buf.set_string(x + 1, y + 3, &format!(" Parameter 1 0.0"), style);
|
||||
buf.set_string(x + 1, y + 4, &format!(" Parameter 2 0.0"), style);
|
||||
buf.set_string(x + 1, y + 5, &format!(" Parameter 3 0.0"), style);
|
||||
buf.set_string(x + 1, y + 6, &format!(" Parameter 4 0.0"), style);
|
||||
buf.set_string(x + 0, y + 7, &format!("├--------------------------------------┤"), style.dim());
|
||||
buf.set_string(x + 1, y + 8, &format!(" Inputs... │ Outputs... "), style);
|
||||
|
||||
let y = y + 10;
|
||||
draw_box(buf, Rect { x, y: y, width: 40, height: 14 });
|
||||
buf.set_string(x + 1, y + 1, &format!(" Sampler#00 │"), style.bold());
|
||||
buf.set_string(x + 0, y + 2, &format!("├--------------------------------------┤"), style.dim());
|
||||
buf.set_string(x + 2, y + 3, &format!("C0 Sample#000"), style.bold());
|
||||
buf.set_string(x + 2, y + 4, &format!(" {:.03}s",
|
||||
100000.0/44100.0), style);
|
||||
buf.set_string(x + 2, y + 5, &format!("C#0 Sample#001"), style.bold());
|
||||
buf.set_string(x + 2, y + 6, &format!(" {:.03}-{:.03}s",
|
||||
50000.0/44100.0, 100000.0/44100.0), style);
|
||||
buf.set_string(x + 2, y + 7, &format!("D0 Sample#002"), style.bold());
|
||||
buf.set_string(x + 2, y + 8, &format!(" {:.03}-{:.03}/{:.03}s",
|
||||
0.0, 50000.0/44100.0, 100000.0/44100.0), style);
|
||||
buf.set_string(x + 2, y + 9, &format!("D#0 Sample#003"), style.bold());
|
||||
buf.set_string(x + 2, y + 10, &format!(" {:.03}-[{:.03}-{:.03}]/{:.03}s ",
|
||||
10000.0/44100.0, 25000.0/44100.0, 50000.0/44100.0, 100000.0/44100.0), style);
|
||||
buf.set_string(x + 0, y + 7 + 4, &format!("├--------------------------------------┤"), style.dim());
|
||||
buf.set_string(x + 1, y + 7 + 5, &format!(" Inputs... │ Outputs... "), style);
|
||||
}
|
||||
|
||||
fn draw_sequence_button (
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@ pub struct Transport {
|
|||
transport: Option<::jack::Transport>,
|
||||
bpm: f64,
|
||||
timesig: (f32, f32),
|
||||
devices: Vec<Box<dyn Device>>,
|
||||
}
|
||||
|
||||
impl Transport {
|
||||
pub fn new (devices: Vec<Box<dyn Device>>)
|
||||
pub fn new ()
|
||||
-> Result<DynamicDevice<Self>, Box<dyn Error>>
|
||||
{
|
||||
//let transport = client.transport();
|
||||
|
|
@ -18,7 +17,6 @@ impl Transport {
|
|||
bpm: 113.0,
|
||||
timesig: (4.0, 4.0),
|
||||
transport: None,
|
||||
devices
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
@ -42,14 +40,20 @@ impl Transport {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn render (state: &Transport, buf: &mut Buffer, area: Rect) {
|
||||
draw_leaf(buf, area, 0, 0, "REC");
|
||||
draw_leaf(buf, area, 0, 5, "DUB");
|
||||
draw_leaf(buf, area, 0, 10, "STOP");
|
||||
draw_leaf(buf, area, 0, 16, "PLAY/PAUSE");
|
||||
draw_leaf(buf, area, 0, 28, "START");
|
||||
draw_leaf(buf, area, 0, 35, "Project: Witty Gerbil - Sha Na Na ");
|
||||
draw_leaf(buf, area, 2, 0, &format!("BPM {:03}.{:03}",
|
||||
pub fn render (state: &Transport, buf: &mut Buffer, mut area: Rect)
|
||||
-> Usually<(u16, u16)>
|
||||
{
|
||||
area.x = area.width.saturating_sub(80) / 2;
|
||||
area.width = area.width.min(80);
|
||||
area.height = 5;
|
||||
draw_box(buf, area);
|
||||
draw_leaf(buf, area, 1, 0, "REC");
|
||||
draw_leaf(buf, area, 1, 5, "DUB");
|
||||
draw_leaf(buf, area, 1, 10, "STOP");
|
||||
draw_leaf(buf, area, 1, 16, "PLAY/PAUSE");
|
||||
draw_leaf(buf, area, 1, 28, "START");
|
||||
draw_leaf(buf, area, 1, 35, "Project: Witty Gerbil - Sha Na Na ");
|
||||
draw_leaf(buf, area, 3, 0, &format!("BPM {:03}.{:03}",
|
||||
state.bpm as u64,
|
||||
((state.bpm % 1.0) * 1000.0) as u64
|
||||
));
|
||||
|
|
@ -70,23 +74,24 @@ pub fn render (state: &Transport, buf: &mut Buffer, area: Rect) {
|
|||
//format!("BBT {bars:04}:{beat:02}.{:02}", (beat_sub * 16.0) as u32),
|
||||
//Style::default()
|
||||
//);
|
||||
draw_leaf(buf, area, 2, 13, &format!("BBT {bars:04}:{beat:02}.{:02}",
|
||||
draw_leaf(buf, area, 3, 13, &format!("BBT {bars:04}:{beat:02}.{:02}",
|
||||
(beat_sub * 16.0) as u32
|
||||
));
|
||||
let time = frame as f64 / rate as f64;
|
||||
let time = frame as f64 / rate as f64;
|
||||
let seconds = time % 60.0;
|
||||
let msec = seconds % 1.0;
|
||||
let minutes = (time / 60.0) % 60.0;
|
||||
let hours = time / 3600.0;
|
||||
draw_leaf(buf, area, 2, 29, &format!("Time {:02}:{:02}:{:02}.{:03}",
|
||||
draw_leaf(buf, area, 3, 29, &format!("Time {:02}:{:02}:{:02}.{:03}",
|
||||
hours as u64,
|
||||
minutes as u64,
|
||||
seconds as u64,
|
||||
(msec * 1000.0) as u64
|
||||
));
|
||||
draw_leaf(buf, area, 2, 48, &format!("Rate {:>6}Hz", rate));
|
||||
draw_leaf(buf, area, 2, 63, &format!("Frame {:>10}", frame));
|
||||
draw_leaf(buf, area, 3, 48, &format!("Rate {:>6}Hz", rate));
|
||||
draw_leaf(buf, area, 3, 63, &format!("Frame {:>10}", frame));
|
||||
}
|
||||
Ok((area.width, area.height))
|
||||
//let bbt = position.pos.bbt().map(|mut bbt|*bbt
|
||||
//.with_bpm(state.bpm)
|
||||
//.with_timesig(state.timesig.0, state.timesig.1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue