loading empty samples is not done anymore
This commit is contained in:
parent
cd2bbafcb6
commit
663e88efeb
2 changed files with 19 additions and 14 deletions
|
@ -20,11 +20,11 @@ impl Sampl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub const freq : &'static str =
|
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";
|
sample.\nRange: (-1..1)\n";
|
||||||
|
|
||||||
pub const trig : &'static str =
|
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'";
|
and triggers the playback if the 'pmode' is 'OneShot'";
|
||||||
pub const spos : &'static str =
|
pub const spos : &'static str =
|
||||||
"Sampl spos\nStart position offset.\nRange: (-1..1)\n";
|
"Sampl spos\nStart position offset.\nRange: (-1..1)\n";
|
||||||
|
@ -36,13 +36,13 @@ impl Sampl {
|
||||||
|
|
||||||
pub const pmode : &'static str =
|
pub const pmode : &'static str =
|
||||||
"Sampl pmode\nThe playback mode of the sampler.\n\
|
"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\
|
using the 'trig' input in this case.\n\
|
||||||
- 'OneShot' plays back the sample if a trigger is received on 'trig' input.\n";
|
- 'OneShot' plays back the sample if a trigger is received on 'trig' input.\n";
|
||||||
pub const dclick : &'static str =
|
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 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.";
|
getting rid of the clicks if spos and epos are modulated.";
|
||||||
|
|
||||||
pub const sig : &'static str =
|
pub const sig : &'static str =
|
||||||
|
|
|
@ -308,18 +308,23 @@ impl NodeConfigurator {
|
||||||
if param.is_atom() {
|
if param.is_atom() {
|
||||||
let at =
|
let at =
|
||||||
if let SAtom::AudioSample((path, None)) = at.clone() {
|
if let SAtom::AudioSample((path, None)) = at.clone() {
|
||||||
|
if path.len() > 0 {
|
||||||
match self.sample_lib.load(&path) {
|
match self.sample_lib.load(&path) {
|
||||||
Ok(sample) => sample.clone(),
|
Ok(sample) => sample.clone(),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
self.errors.push(
|
self.errors.push(
|
||||||
format!(
|
format!(
|
||||||
"Couldn't load sample '{}': {:?}",
|
"Sample Loading Error\n\
|
||||||
|
Couldn't load sample '{}':\n{:?}",
|
||||||
path, e));
|
path, e));
|
||||||
at
|
at
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
at
|
at
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
at
|
||||||
};
|
};
|
||||||
|
|
||||||
self.atom_values.insert(param, at.clone());
|
self.atom_values.insert(param, at.clone());
|
||||||
|
|
Loading…
Reference in a new issue