Welcome to SynthEdit Q&A, where you can ask questions and receive answers from other members of the community.

Simple Oscillator code example please

0 votes
asked Nov 4, 2013 by JohnyDeSade (120 points)
I'm not asking for anything full blown. Here's my problem. First I made a code skeleton of the default oscillator, from there i basically did this in the processing section *audioOut = Wave(Frequency, _time, 4); wave is just a thing i made to output a sine, and it works fine. in mono, that is.. the problem is polyphony, and while it does seem to be cloning itself (acording to the scope, anyway) each successive clone doesn't get it's own pitch, instead the pitch seems accumulative with each clone ( comes out like bad FM). I didn't get much info on the mailing list. I was under the impression that an input would only take one pitch, then clone the module for each new pitch. doesn't seem to be working. does anyone have super basic code for an oscillator that clones with pitch correctly? I don't care if it sends out noise, just anything at this point. it's driving me nuts.

1 Answer

0 votes
answered Mar 17, 2014 by Jef (5,310 points)
Hi, here are some source code for various modules, including a sample playing oscillator. Might be some help. Also ensure you are not using any static or global variables, as the cause different instances of your module to interact with each other.