[chuck-users] phase modulation and hard sync?
Jean Menezes da Rocha
jean at menezesdarocha.info
Sat Jun 3 11:43:11 EDT 2017
Hello, Alexandre, good to see you here (you don't know me but I know your
work)!
SinOsc has .phase and .sync attributes, which are pretty useful in this
case. I made a very
dirty and arbitrary example to show this working (using .sync, in this
case):
// *pmod* is the SinOsc which will modulate the phase of *main*
SinOsc pmod => SinOsc main => dac;
440 => main.freq;
// define index of modulation; it's fun to fiddle with this value!
50 => pmod.gain;
// set *main* to sync phase-wise with *pmod*'s input
// just in case: 0 = sync frequency to input; 1 = sync phase; 2 = FM!
1 => main.sync;
// loop to show phase modulation in action with random arbitrary values
while(true) {
Math.random2f(63, 880) => pmod.freq;
1::second => now;
}
You can also do everything "by hand", mapping arbitrary values directly
into SinOsc's .phase attribute.
Hope it helps!
Cheers!
Em sex, 2 de jun de 2017 às 19:21, Alexandre Torres Porres <porres at gmail.com>
escreveu:
> Hi, new to chuck here.
>
> Can SinOsc be hard synced by an impulse or something?
>
> And how would you do phase modulation with SinOsc?
>
> If you cannot do one or both with SinOsc, how would you do it?
>
> thanks
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
--
Jean Menezes da Rocha
Compositor
Professor
Doutorando em Música pela Universidade Federal da Bahia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20170603/432dec37/attachment.html>
More information about the chuck-users
mailing list