// *mod* is the SinOsc which will modulate the phase of *carrier*
SinOsc mod => SinOsc carrier => dac;
440 => carrier.freq; // set carrier frequency
1 => mod.gain; // set modulation index
// set *carrier* oscillator to sync phase-wise with *mod*'s input
// just in case: 0 = sync frequency to input; 1 = sync phase; 2 = FM!
1 => carrier.sync;
// set modulation frequency
while(true) {
100 => mod.freq;
1::second => now;
}
// ==========================
So, question 1) About "1 => carrier.sync"; I don't get it. Why if I remove it I don't have phase modultion or any sound at all?
Question 2) Why changing the carrier frequency seems to have no effect?
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 verydirty 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 valueswhile(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@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@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck- users
--Jean Menezes da RochaCompositorProfessorDoutorando em Música pela Universidade Federal da Bahia
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck- users