added more input parameters to the scope
This commit is contained in:
parent
f3437c895d
commit
2f307a3c2e
2 changed files with 52 additions and 5 deletions
|
@ -579,6 +579,7 @@ use crate::fa_smap_mode;
|
|||
use crate::fa_test_s;
|
||||
use crate::fa_tseq_cmode;
|
||||
use crate::fa_vosc_ovrsmpl;
|
||||
use crate::fa_scope_tsrc;
|
||||
|
||||
use node_ad::Ad;
|
||||
use node_allp::AllP;
|
||||
|
@ -1409,7 +1410,17 @@ macro_rules! node_list {
|
|||
scope => Scope UIType::Generic UICategory::IOUtil
|
||||
(0 in1 n_id d_id r_id f_def stp_d -1.0, 1.0, 0.0)
|
||||
(1 in2 n_id d_id r_id f_def stp_d -1.0, 1.0, 0.0)
|
||||
(2 in3 n_id d_id r_id f_def stp_d -1.0, 1.0, 0.0),
|
||||
(2 in3 n_id d_id r_id f_def stp_d -1.0, 1.0, 0.0)
|
||||
(3 time n_lfot d_lfot r_lfot f_lfot stp_f 0.0, 1.0, 1000.0)
|
||||
(4 trig n_id d_id r_id f_def stp_d -1.0, 1.0, 0.0)
|
||||
(5 thrsh n_id d_id r_id f_def stp_d -1.0, 1.0, 0.0)
|
||||
(6 off1 n_id d_id r_id f_def stp_d -1.0, 1.0, 0.0)
|
||||
(7 off2 n_id d_id r_id f_def stp_d -1.0, 1.0, 0.0)
|
||||
(8 off3 n_id d_id r_id f_def stp_d -1.0, 1.0, 0.0)
|
||||
(9 gain1 n_ogin d_ogin r_id f_def stp_d 0.0, 1.0, 1.0)
|
||||
(10 gain2 n_ogin d_ogin r_id f_def stp_d 0.0, 1.0, 1.0)
|
||||
(11 gain3 n_ogin d_ogin r_id f_def stp_d 0.0, 1.0, 1.0)
|
||||
{12 0 tsrc setting(0) mode fa_scope_tsrc 0 1},
|
||||
ad => Ad UIType::Generic UICategory::Mod
|
||||
(0 inp n_id d_id r_id f_def stp_d -1.0, 1.0, 1.0)
|
||||
(1 trig n_id d_id r_id f_def stp_d -1.0, 1.0, 0.0)
|
||||
|
|
|
@ -9,6 +9,19 @@ use crate::nodes::{NodeAudioContext, NodeExecContext};
|
|||
use crate::ScopeHandle;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! fa_scope_tsrc {
|
||||
($formatter: expr, $v: expr, $denorm_v: expr) => {{
|
||||
let s = match ($v.round() as usize) {
|
||||
0 => "Off",
|
||||
1 => "Intern",
|
||||
2 => "Extern",
|
||||
_ => "?",
|
||||
};
|
||||
write!($formatter, "{}", s)
|
||||
}};
|
||||
}
|
||||
|
||||
/// A simple signal scope
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Scope {
|
||||
|
@ -23,15 +36,38 @@ impl Scope {
|
|||
pub const in1: &'static str = "Scope in1\nSignal input 1.\nRange: (-1..1)\n";
|
||||
pub const in2: &'static str = "Scope in2\nSignal input 2.\nRange: (-1..1)\n";
|
||||
pub const in3: &'static str = "Scope in3\nSignal input 3.\nRange: (-1..1)\n";
|
||||
pub const time: &'static str = "Scope time\nDisplayed time range of the oscilloscope view.\nRange: (0..1)\n";
|
||||
pub const trig: &'static str = "Scope trig\nExternal trigger input. Only active if 'tsrc' is set to 'Extern'. 'thrsh' applies also for external triggers.\nRange: (-1..1)\n";
|
||||
pub const thrsh: &'static str = "Scope thrsh\nTrigger threshold. If the threshold is passed by the signal from low to high the signal recording will be reset. Either for internal or for external triggering. Trigger is only active if 'tsrc' is not 'Off'.\nRange: (-1..1)\n";
|
||||
pub const off1: &'static str = "Scope off1\nVisual offset of signal input 1.\nRange: (-1..1)\n";
|
||||
pub const off2: &'static str = "Scope off2\nVisual offset of signal input 2.\nRange: (-1..1)\n";
|
||||
pub const off3: &'static str = "Scope off3\nVisual offset of signal input 3.\nRange: (-1..1)\n";
|
||||
pub const gain1: &'static str = "Scope gain1\nVisual amplification/attenuation of the signal input 1.\nRange: (0..1)\n";
|
||||
pub const gain2: &'static str = "Scope gain2\nVisual amplification/attenuation of the signal input 2.\nRange: (0..1)\n";
|
||||
pub const gain3: &'static str = "Scope gain3\nVisual amplification/attenuation of the signal input 3.\nRange: (0..1)\n";
|
||||
pub const tsrc: &'static str = "Scope tsrc\nTriggering allows you to capture fast signals or pinning fast waveforms into the scope view for better inspection.\nRange: (-1..1)\n";
|
||||
pub const DESC: &'static str = r#"Signal Oscilloscope Probe
|
||||
|
||||
This is a signal oscilloscope probe node, you can capture up to 3 signals.
|
||||
This is a signal oscilloscope probe node, you can capture up to 3 signals. You can enable internal or external triggering for capturing signals or pinning fast waveforms.
|
||||
"#;
|
||||
pub const HELP: &'static str = r#"Scope - Signal Oscilloscope Probe
|
||||
|
||||
You can have up to 8 different scopes in your patch. That means you can in theory
|
||||
record up to 24 signals. The received signal will be forwarded to the GUI and
|
||||
you can inspect the waveform there.
|
||||
You can have up to 8 different scopes in your patch. That means you can
|
||||
in record up to 24 signals for displaying them in the scope view.
|
||||
The received signal will be forwarded to the GUI and you can inspect
|
||||
the waveform there.
|
||||
|
||||
You can enable an internal trigger with the 'tsrc'. The 'thrsh' parameter
|
||||
is the trigger detection parameter. That means, if your signal passes that
|
||||
trigger from negative to positive, the signal recording will be
|
||||
reset to that point.
|
||||
|
||||
You can also route in an external trigger to capture signals with the 'trig'
|
||||
input and 'tsrc' set to 'Extern'.
|
||||
|
||||
The inputs 'off1', 'off2' and 'off3' define a vertical offset of the signal
|
||||
waveform in the scope view. Use 'gain1', 'gain2' and 'gain3' for scaling
|
||||
the input signals up/down.
|
||||
"#;
|
||||
|
||||
pub fn set_scope_handle(&mut self, handle: Arc<ScopeHandle>) {
|
||||
|
|
Loading…
Reference in a new issue