diff --git a/jp_makebeats.m b/jp_makebeats.m index 260f085..d815817 100644 --- a/jp_makebeats.m +++ b/jp_makebeats.m @@ -82,12 +82,12 @@ % If requested, add some silence before or after the sound if Cfg.padSoundBeginningSec > 0 - pad = zeros(Cfg.padSoundBeginningSec * fs, 1); + pad = zeros(round(Cfg.padSoundBeginningSec * fs), 1); y = [pad; y]; end if Cfg.padSoundEndSec > 0 - pad = zeros(Cfg.padSoundEndSec * fs, 1); + pad = zeros(round(Cfg.padSoundEndSec * fs), 1); y = [y; pad]; end diff --git a/jp_makebeats_wrapper.m b/jp_makebeats_wrapper.m index b0d515f..4df51c5 100644 --- a/jp_makebeats_wrapper.m +++ b/jp_makebeats_wrapper.m @@ -49,7 +49,7 @@ thisPattern = patterns{patternInd}; [y, fs, name] = jp_makebeats(thisPattern, Cfg); - outName = fullfile(outDir, sprintf('patterm%03i_%s', patternInd, name)); + outName = fullfile(outDir, sprintf('pattern%03i_%s', patternInd, name)); audiowrite(outName, y, fs); fprintf('done.\n');