[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: changing a sound signal while listening to it
In SuperCollider this code does a simple version of what you describe:
(
s.waitForBoot{
{
var centre = 440;
var beat = Integrator.kr(KeyState.kr(124) - KeyState.kr(123))
* 0.01 + 10;
var amp = Integrator.kr(KeyState.kr(126) - KeyState.kr(125))
.linexp(-5000, 5000, 0.001, 1);
(beat*2).poll(1, "beat freq");
SinOsc.ar([centre+beat, centre-beat], 0, amp).sum.dup;
}.play
}
)
arrow keys up/down for volume, left/right for beat freq.
Dan
On 10/08/2010 03:32, Daniel Bowling wrote:
Dear List,
I am trying to create a piece of software that will allow a subject to
change the beat frequency and amplitude of a signal while listening to
it in real time.
More specifically, the signal will consist of two pure tones (e.g. T1 +
T2), and the difference between them (T2 - T1) as well as the root mean
square amplitude will be under the control of the subject via the keyboard.
I have tried to execute this in Matlab using a loop, the problem is that
the sound stops and then starts again at the beginning of each loop
iteration.
Can anyone suggest a way this might be implemented on a computer? Or
perhaps just a suitable programming language?
Thanks,
Dan Bowling
--
Dan Stowell
Centre for Digital Music
Queen Mary, University of London
Mile End Road, London E1 4NS
http://www.elec.qmul.ac.uk/digitalmusic/people/dans.htm
http://www.mcld.co.uk/