taro
July 16, 2019, 2:04pm
#83
I made a simple script referring to the article of Hack Audio.
A script for GNU Octave that creates a Wavetable by duplicating and crossfading two SCWs.
Put two SCWs and the following m flie in the same folder.
Note: Only 16 bit files can be created
Summary
%CrossFade
%Load waveforms
[x, FS] = audioread('1.wav');
[y, FS] = audioread('2.wav');
%Waveform length read
wavelength = length(y);
%Number of waveforms to copy
tnumber = 256 ; %Change the length freely
A = repmat(x,tnumber);
B = repmat(y,tnumber);
%Wavetable length
tablelength = wavelength * tnumber ;
%Linear FadeIn
linFadeIn = linspace(0,1,tablelength);
linFadeIn = linFadeIn(:);
for sample = 1 : length(linFadeIn)
FI(sample,1) = A(sample,1) * linFadeIn(sample,1);
end
%Linear FadeOut
linFadeOut = linspace(1,0,tablelength);
linFadeOut = linFadeOut(:);
for sample = 1 : length(linFadeOut)
FO(sample,1) = B(sample,1) * linFadeOut(sample,1);
end
%Fade In + Fade Out
out = FI + FO;
audiowrite('file.wav',out, FS);
Reference source
6 Likes
jb
July 16, 2019, 6:52pm
#84
just wondering @Ess why I cant get softcore through my monitors? it comes out of my laptop speaker and ive tried everything to get it to play through the speakers, seems it cant find my interface
also extremely minor criticism, I keep clicking the hole in the middle of the icon on my desktop which doesn’t work as if theres actually a hole in the icon. don’t know if anything can even be done about that, I just didn’t know it worked like that. other than that minor inconvenience excellent work
EDIT: figured it out, had to change the audio driver from coreaudio to ad_portaudio core audio in case anyone else was stuck
This looks really great and beautifully designed! Any plans for an iOS version? Would love to have it on my iPad, don’t usually use the laptop with the Elektrons for whatever reason… different headspace
This is great. Thank you very very much.
Ess
July 17, 2019, 10:53am
#87
I would love to, but since it’s a Max app it makes it quite difficult… Although, I’m sure it wouldn’t be too much work for an iOS dev to just remake it - the tech is pretty simple really. Sadly, I’m not a programmer. (At least not to that extent)
1 Like
Ah, I see! If you wanted to open up the Max patch, I might be interested in trying as a free iPad app at some point
1 Like
taro
July 20, 2019, 7:20am
#89
Script for GNU Octave
The script has been rewritten to load multiple wav files in a folder. The name of wav file can be anything.
Condition of file to put in folder
All files have the same length
Example
Load wav files named 1. wav, 2. wav, 3. wav, 4. wav and 5. wav
Extend each file by 5
CrossFade1 = 1.wav(Fade out) + 2. wav(Fade in)
CrossFade2 =2.wav(Fade out) + 3. wav(Fade in)
CrossFade3 =3.wav(Fade out) + 4. wav(Fade in)
CrossFade3 =4.wav(Fade out) + 5. wav(Fade in)
Wavetable = CrossFade1 CrossFade2 CrossFade3 CrossFade4
%CrossFade
tnumber = 5 ; %Number to extend (can be freely changed)
Files = dir(’*.wav’);
waves = zeros;
%Load waveforms
for n=1:length(Files)
[name, ext] = fileparts(Files(n).name);
[x,fs] = audioread(Files(n).name);
wl = length(x);
waves = [waves ; x];
end
waves(1, = [];
waves2 = reshape(waves,[],length(Files));
waves3 = repmat(waves2 , tnumber,1);
%Wavetable length
tablelength = wl * tnumber ;
%Linear FadeOut
linFadeOut = linspace(1,0,tablelength);
linFadeOut = linFadeOut(:);
linFadeOut = repelem(linFadeOut, 1,length(Files));
%Linear FadeIn
linFadeIn = linspace(0,1,tablelength);
linFadeIn = linFadeIn(:);
linFadeIn = repelem(linFadeIn, 1,length(Files));
for sample = 1 : length(linFadeOut)
FO(sample, = waves3(sample, .* linFadeOut(sample,:);
end
for sample = 1 : length(linFadeIn)
FI(sample, = waves3(sample, .* linFadeIn(sample,:);
end
waves4 = zeros;
for n = 1 : length(Files)-1
CF = FO(:,n) + FI(:,n+1);
waves4 = [waves4 ; CF];
end
waves4(1, = [];
out = waves4;
audiowrite(‘wavetable.wav’,out, fs, ‘BitsPerSample’ ,16);
rootname = ‘file’;
extension = ‘.wav’;
wavenumber = tnumber * (length(Files) -1);
for k=0:wavenumber-1
p=out(1+wlk:wl (k+1));
filename = [rootname, num2str(k+1), extension];
audiowrite(filename,p, fs, ‘BitsPerSample’ ,16);
end
24-bit waveforms cannot be output. 32bit can be output.
2 Likes
Having trouble exporting sounds.
Settings keep resetting themselves too. Anyone have this issue?
Thanks Ess! This thing rules.
1 Like
@Ess props for the Doom homage
1 Like
Gino
August 9, 2019, 2:51am
#93
Man, I almost missed this. Great tool!
Thank you @Ess !
I can never get any sound out of this. And it crashes. It makes me sad, because I have all these samplers xD
1 Like
@Ess This is super cool, I can see these being incredibly useful. Thanks so much for your work on these!
2 Likes
thank you very much to those involved with this handy little tool…
Yee haw sampling with these directly into the RYTM over usb. They sound incredible as @Unifono suggested they would! Thank you!
Sam
russv
November 8, 2019, 7:23pm
#98
Big thanks for these cool tools, I finally got around to messing with them. Play great in Ableton Simpler, excited to load them in OT.
Got a shoutout in the new make noise zine:
6 Likes
Thank you, @Ess , this is awesome.
Digitakt is incoming in december as a travelbox, so this will come in handy! OT and MD will munch on this, too.
You have a beer donation page or sth.?
That would be rad!
1 Like
Totally forgot about this utility. Had them on my old laptop, then the darn thing died. I’m about ready to start a new project with OT, so I’ll definitely give these programs a spin.
russv
November 12, 2019, 8:46pm
#102
@stankeev
This program will let you chain them up