one of the two sX.freq() in a same while doesn't seem to get changed
today i learned about .5::second => dur T; T - (now % T) => now; and wanted to modify my isthisokay.ck to something more overtone sequencer oriented but nothing seemed to be working properly so comment outed a lot and went into the debug mode with the followings being chucked i can see things like s1 changed 34.747145 s2 changed 95.554650 s1 changed 56.208618 s2 changed 140.521544 s1 changed 32.703196 s2 changed 89.933788 s1 changed 45.988869 s2 changed 160.961041 --- get displayed but the sound itself doesn't seem to be doing this one of the two sinewave ... maybe s1.freq() seems to be playing the same long tone (freq never changing) and i don't seem to hear the rhythm pattern it should have created if am not wrong i think there is three sinewaves coming out isthisokay.ck: .5::second => dur T; T - (now % T) => now; SinOsc s1 => Gain g1 => dac; SinOsc s2 => g1; SinOsc s3 => PRCRev g3 => dac.left; SinOsc s4 => PRCRev g4 => dac.right; .25 => g1.gain; .25 => g3.gain; .25 => g4.gain; 27.5 * Math.pow(2.0,(3.0/12.0)) => float oilroot; 2 * oilroot => s2.freq; fun void ri() { while(true) { 300::ms => now; s2.freq() * Std.rand2(16, 32) / 16.0 => s3.freq; } } fun void ga() { while(true) { 330::ms => now; s2.freq() * Std.rand2(16, 32) / 16.0 => s4.freq; } } //spork ~ ri(); //spork ~ ga(); while( true ) { Std.rand2(32, 64) * oilroot / 32.0 => s1.freq; <<<"s1 changed", s1.freq()>>>; //1000::ms => now; 7::T => now; s1.freq() * Std.rand2(8, 16) / 4.0 => s2.freq; <<<"s2 changed", s2.freq()>>>; //250::ms => now; 1::T => now; } -- 2g http://micro.ispretty.com
2g;
but nothing seemed to be working properly so comment outed a lot and went into the debug mode
It looked fine to me, I listened to it and it sounded fine as well. Then, to make sure s1 was working properly I disconected everything but s1 from the DAC and listened to just s1. s1 does change it's pitch but it's very, very low. At times I couldn't hear it and needed to place my hand on the woofer to be sure it was playing as it was so low-pitched. In fact, I think many normal speakers would have a problem with playing sines of such a low frequency. I think that's where your issue is; the tones are very low and likely hidden because of higher overtones. Perhaps you would like to try the "Blit" or a similar band-limited Ugen. With those you can controll the amount of harmonics in the wave so you can still have a very low tone but you'll have more controll to make sure it has at least a few audible harmonics. Yours, Kas.
ah yes!
i didn't test it that way.
(i also forgot to check that Blit .. i will after this)
so i did that testing ..and found out that the long never moving long
tone was given by
SinOsc s3 => PRCRev g3 => dac.left;
SinOsc s4 => PRCRev g4 => dac.right;
which i left as is buy comment outing the funcs related to those
(the sum came in the middle so that was confusing)
so
as i asked in other thread
i learned that the initiation of the SinOsc is important
if i want everything go correct from in the beginning
am now even nervous to the order of this in the code
SinOsc s1 => Gain g1 => dac;
SinOsc s2 => g1;
SinOsc s3 => PRCRev g3 => dac.left;
SinOsc s4 => PRCRev g4 => dac.right;
and resulted into this(too nervous?):
.5::second => dur T;
T - (now % T) => now;
SinOsc s1 => Gain g1;
SinOsc s2 => g1;
SinOsc s3 => PRCRev g3;
SinOsc s4 => PRCRev g4;
.25 => g1.gain;
.25 => g3.gain;
.25 => g4.gain;
27.5 * Math.pow(2.0,(3.0/12.0)) => float oilroot;
2 * oilroot => s2.freq;
s2.freq() * Std.rand2(16, 32) / 16.0 => s3.freq;
s2.freq() * Std.rand2(16, 32) / 16.0 => s4.freq;
g1 => dac;
g3 => dac.left;
g4 => dac.right;
fun void ri()
{
while(true)
{
300::ms => now;
s2.freq() * Std.rand2(16, 32) / 16.0 => s3.freq;
}
}
fun void ga()
{
while(true)
{
330::ms => now;
s2.freq() * Std.rand2(16, 32) / 16.0 => s4.freq;
}
}
spork ~ ri();
spork ~ ga();
while( true ) {
Std.rand2(32, 64) * oilroot / 32.0 => s1.freq;
<<<"s1 changed", s1.freq()>>>;
//1000::ms => now;
3::T => now;
s1.freq() * Std.rand2(8, 16) / 4.0 => s2.freq;
<<<"s2 changed", s2.freq()>>>;
//250::ms => now;
1::T => now;
}
On 8/10/07, Kassen
2g;
but nothing seemed to be working properly so comment outed a lot and went into the debug mode
It looked fine to me, I listened to it and it sounded fine as well. Then, to make sure s1 was working properly I disconected everything but s1 from the DAC and listened to just s1. s1 does change it's pitch but it's very, very low. At times I couldn't hear it and needed to place my hand on the woofer to be sure it was playing as it was so low-pitched. In fact, I think many normal speakers would have a problem with playing sines of such a low frequency.
I think that's where your issue is; the tones are very low and likely hidden because of higher overtones. Perhaps you would like to try the "Blit" or a similar band-limited Ugen. With those you can controll the amount of harmonics in the wave so you can still have a very low tone but you'll have more controll to make sure it has at least a few audible harmonics.
Yours, Kas.
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On 8/10/07, 2g
ah yes! i didn't test it that way.
Well, then that's a important lesson in both programing and sound engineering; when something seems strange always try to pinpoint the issue in a simplified version of the situation. This will save you a lot of time in the long run. Also; mute-buttons and typing "//" are very fast and easy. i learned that the initiation of the SinOsc is important
if i want everything go correct from in the beginning
What I think is realy important in your code is that you should figure out what the lowest and highest frequency the random stuff can give are and try to tune them to make sure those are within the range of your speakers and ears. am now even nervous to the order of this in the code Don't be! The order of this code is definately very important but it's much better to be "adventurous" then it is to be "nervous", just relax and try things at a low volume and nothing can go wrong. Kas.
participants (2)
-
2g
-
Kassen