clear all;
T = 5;
SR = 44100;
N = T*SR;
t = 0 : 1/SR : T;
Fq = 200;
left = sin(Fq*2*pi*t);
right = sin(Fq*2*pi*t)*(-pi);
stereosnd = [left ; right];
player2 = audioplayer(stereosnd, 44100)
playblocking(player2)
audiowrite('left1.wav', left,SR);
audiowrite('right1.wav', right,SR);
player2 =
audioplayer with properties:
SampleRate: 44100
BitsPerSample: 16
NumberOfChannels: 2
DeviceID: -1
CurrentSample: 1
TotalSamples: 220501
Running: 'off'
StartFcn: []
StopFcn: []
TimerFcn: []
TimerPeriod: 0.0500
Tag: ''
UserData: []
Type: 'audioplayer'
∞
Get results from here left1.wav right1.wav (right click on a mac)
Below I was trying to figure out how Matlab computes audio using vectors. CSound uses Gen Functions so it seems much easier.
Examples exported to a DAW so that we can magnify and see the wave forms being out of face and
distorted