We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Good morning, I'd like to show two waves that I've created and their addition. So, in the window we'd see 3 waves. Wave 1, Wave2, and the result. I only can see the same wave1 three times. Thanks.
[See comments for code]
Answers
[source code image deleted, see below]
Edit post, highlight code, press Ctrl-o.
Don't post images of code. Don't code in a serif, proportional spaced font. What are you, a monster? 8)
That code looks like you are drawing the same thing 3 times. out.left.get(i), how is that different in the three for loops?
Does this help?
http://code.compartmental.net/minim/oscil_method_getwaveform.html
I'm hoping that's the waveform for the oscillators. You need to do this for the two waves and use out for the third to give the sum.
thanks koogs, I'd like to draw myWave1, myWave2, and the addition of both. Thanks. I'll check your link. Thanks in advance
Sigh.
I'm sorry , Ctrl-O doesn't work in my computer.
https://forum.processing.org/two/discussion/15473/readme-how-to-format-code-and-text
waveform() doesn't really cut it - it's only defined between 0 and 1 and it doesn't vary with the frequency (ie if it's a sine wave you'll get exactly 1 repeat of the sine wave)
stereo doesn't really make sense in your code. i'd ditch it, use mono instead.
and using different x values for point i and i+1 is also wrong
should be 320 and 320 imo (see the minim examples)
thanks a lot