Skip to content

Commit 16c325b

Browse files
committed
wip
1 parent ded9a75 commit 16c325b

File tree

5 files changed

+191
-127
lines changed

5 files changed

+191
-127
lines changed

core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mod sig;
33
pub mod sig_ops;
44
pub use sig::{
55
Buf, Const, ConstBuf, Filter, GateToTrigRisingEdge, Sig, SigAbs, SigBoxed,
6-
SigBoxedVar, SigCtx, SigSampleIntoBufT, SigShared, SigT, SigVar,
6+
SigBoxedVar, SigConst, SigCtx, SigSampleIntoBufT, SigShared, SigT, SigVar,
77
Triggerable, Zip, Zip3, Zip4, sig_boxed, sig_boxed_var,
88
sig_option_first_some, sig_shared, sig_var,
99
};

interactive/examples/keyboard_and_mouse_polyphonic_interactive.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ use caw_core::*;
22
use caw_interactive::{Input, Visualization, Window};
33
use caw_keyboard::{IntoNoteFreqHz, KeyEventsT, MonoVoice, Note};
44
use caw_modules::*;
5+
use caw_player::PlayerConfig;
56

67
fn sig(input: Input, ch: Channel) -> Sig<impl SigT<Item = f32> + Send> {
78
input
89
.clone()
910
.keyboard
10-
.opinionated_key_events(Note::B2)
11-
.poly_voices(12)
11+
.opinionated_key_events(Note::B1)
12+
.poly_voices(2)
1213
.into_iter()
1314
.map(
1415
move |MonoVoice {
@@ -60,13 +61,16 @@ fn main() -> anyhow::Result<()> {
6061
let window = Window::builder()
6162
.sane_default()
6263
.visualization(Visualization::StereoOscillographics)
63-
.line_width(2)
64+
.line_width(3)
6465
.scale(0.7)
6566
.stride(2)
6667
.build();
6768
let input = window.input();
6869
window.play_stereo(
6970
Stereo::new_fn_channel(|ch| sig(input.clone(), ch)),
70-
Default::default(),
71+
PlayerConfig {
72+
system_latency_s: 0.05,
73+
..Default::default()
74+
},
7175
)
7276
}

live/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use caw_core::{Sig, SigBoxedVar, Stereo, StereoPair, svf32};
22
use caw_player::{
33
PlayerConfig, PlayerVisualizationData, VisualizationDataPolicy, play_stereo,
44
};
5-
use caw_viz_udp_app_lib::{VizAppConfig, VizUdpServer};
5+
use caw_viz_udp_app_lib::oscilloscope;
66
use lazy_static::lazy_static;
77
use std::{sync::Mutex, thread, time::Duration};
88

@@ -38,9 +38,9 @@ pub fn live_stereo_viz(
3838
(OUT.clone(), visualization_data_ref.clone())
3939
}
4040

41-
pub fn live_stereo_viz_udp(config: VizAppConfig) -> LiveStereoOut {
41+
pub fn live_stereo_viz_udp(config: oscilloscope::Config) -> LiveStereoOut {
4242
let (out, viz_data) = live_stereo_viz(VisualizationDataPolicy::All);
43-
let mut viz = VizUdpServer::new(config).unwrap();
43+
let mut viz = oscilloscope::Server::new(config).unwrap();
4444
thread::spawn(move || {
4545
loop {
4646
// TODO: Is it ok to ignore errors here?

0 commit comments

Comments
 (0)