diff --git a/src/dsp/node_sampl.rs b/src/dsp/node_sampl.rs index 1815932..2401d16 100644 --- a/src/dsp/node_sampl.rs +++ b/src/dsp/node_sampl.rs @@ -20,11 +20,11 @@ impl Sampl { } } pub const freq : &'static str = - "Sampl freq\nPitch input for the sampler, giving the playback speed of the\ + "Sampl freq\nPitch input for the sampler, giving the playback speed of the \ sample.\nRange: (-1..1)\n"; pub const trig : &'static str = - "Sampl trig\nThe trigger input causes a resync of the playback phase\ + "Sampl trig\nThe trigger input causes a resync of the playback phase \ and triggers the playback if the 'pmode' is 'OneShot'"; pub const spos : &'static str = "Sampl spos\nStart position offset.\nRange: (-1..1)\n"; @@ -36,13 +36,13 @@ impl Sampl { pub const pmode : &'static str = "Sampl pmode\nThe playback mode of the sampler.\n\ - - 'Loop' constantly plays back the sample. You can reset/sync the phase\ + - 'Loop' constantly plays back the sample. You can reset/sync the phase \ using the 'trig' input in this case.\n\ - 'OneShot' plays back the sample if a trigger is received on 'trig' input.\n"; pub const dclick : &'static str = - "Sampl dclick\nIf this is enabled and the 'pmode' is 'OneShot'\ + "Sampl dclick\nIf this is enabled and the 'pmode' is 'OneShot' \ this will enable short fade in and out ramps.\n\ - This if useful if you don't want to add an envelope just for\ + This if useful if you don't want to add an envelope just for \ getting rid of the clicks if spos and epos are modulated."; pub const sig : &'static str = diff --git a/src/nodes/node_conf.rs b/src/nodes/node_conf.rs index 9408779..910d1c3 100644 --- a/src/nodes/node_conf.rs +++ b/src/nodes/node_conf.rs @@ -308,15 +308,20 @@ impl NodeConfigurator { if param.is_atom() { let at = if let SAtom::AudioSample((path, None)) = at.clone() { - match self.sample_lib.load(&path) { - Ok(sample) => sample.clone(), - Err(e) => { - self.errors.push( - format!( - "Couldn't load sample '{}': {:?}", - path, e)); - at - }, + if path.len() > 0 { + match self.sample_lib.load(&path) { + Ok(sample) => sample.clone(), + Err(e) => { + self.errors.push( + format!( + "Sample Loading Error\n\ + Couldn't load sample '{}':\n{:?}", + path, e)); + at + }, + } + } else { + at } } else { at