| Author |
Message |
Inventor

Joined: Oct 13, 2007 Posts: 830 Location: Florida, USA
Audio files: 37
|
Posted: Mon Mar 17, 2008 6:03 pm Post subject:
SinOsc Weirdness Subject description: If you unChucK a SinOsc input, it goes silent |
 |
|
I noticed a problem with SinOsc's going silent in Synth Lab, so I made the following test code:
| Code: | // ChucK up a sinosc and hear the tone
SinOsc s1 => dac;
s1.freq (500);
5::second => now;
// set up a feedback loop and hear the humm
s1 => SinOsc s2 => s1;
s2.freq (1000);
s2.gain (1000);
5::second => now;
// unchuck the feedback and hear *nothing* ?
s2 =< s1;
5::second => now; |
I thought when you unChucKed the input to the SinOsc, it would revert to being an ordinary sine wave generator with no input, but apparently this is not the case. This is undesired behavior because one cannot return the SinOsc back to stand-alone operation, once it has been set for modulation. |
|
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 409 Location: bangkok, thailand
Audio files: 2
|
Posted: Mon Mar 17, 2008 9:42 pm Post subject:
|
 |
|
This is my reply:
| Code: | // ChucK up a sinosc and hear the tone
SinOsc s1 => dac;
s1.freq (500);
5::second => now;
// set up a feedback loop and hear the humm
s1 => SinOsc s2 => s1;
s2.freq (1000);
s2.gain (1000);
5::second => now;
// unchuck the feedback and hear *nothing* ?
s2 =< s1;
// because SinOsc is originally set the .sync to 0
// that means during the s2 => s1 above, .freq would be set to other values from syncing with s2
<<< s1.freq() >>>;
// how about if we reset the .freq value?
s1.freq(500);
5::second => now; |
I guess if you want to avoid the problem,
the .sync = 2 would be a nice default for the oscillators created.
So that chucking around won't make it stop at a different freq but rather add value to the frequency (FM).
Oh.. more idea on FMing,
if we want to do the Phase Modulation easily in modular synth like this,
i recommend using this method:
phasor => WhateverOsc;
and set WhateverOsc.sync(1); // for syncing Phase with the input
then, to set frequency, set at the phasor.freq
to add in Phase Modulation, just chuck another signal into WhateverOsc, it'll just add itself.
I recommend having this feature for modulation also is that some complex FM especially with feedback usually drives the synth out of tune,
if phase modulation is under control, it will not be that out of tune.
But I love all two heheh. .... hmm .. that's all folks. |
|
|
Back to top
|
|
 |
Inventor

Joined: Oct 13, 2007 Posts: 830 Location: Florida, USA
Audio files: 37
|
Posted: Mon Mar 17, 2008 9:56 pm Post subject:
|
 |
|
| kijjaz, that worked! Thanks for the insight. It seems strange that in my function to ChucK/unChucK I must also set frequencies, but that's OK as long as it works! Now Synth Lab is more stable. |
|
|
Back to top
|
|
 |
|