sine wave question
Hi,
I am doing some tests with optascope and javelin: for the tests·I'm using the understanding signals text.·I want to create a single and dual sine wave for the duration of one second. The text only explains these tests in basic. Can somebody give me a sample in java?????
Thanks,
John
I am doing some tests with optascope and javelin: for the tests·I'm using the understanding signals text.·I want to create a single and dual sine wave for the duration of one second. The text only explains these tests in basic. Can somebody give me a sample in java?????
Thanks,
John
Comments
the attached program.
If the while (true) takes more than 20 ticks to complete,
the resulting frequency is lower than the calculated 160 Hz.
In that case you can try
··· while (true) {
····· v = sinetable[noparse][[/noparse]i];
····· p.update(v,202-v);
····· i = (i+10)%360;····· //step
··· }
to get the highest frequency. You can also increase the step but that will
degrade the generated sinewave (which I think is already of poor quality).
regards peter
Thx... for the sampel.
John