1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

additive synthesis

Discussion in 'Building With Reaktor' started by gordontinnitus, Sep 9, 2008.

Thread Status:
Not open for further replies.
  1. gordontinnitus

    gordontinnitus New Member

    Messages:
    6
    hi all. I'm trying to create a simple synth which will combine several sine wave oscillators together to create a sawtooth wave. I know I can simply use a sawtooth osc but I have specific reasons for doing it manually which I will not go into here.

    the problems I am running into is that each sinewave needs to be played at a specific volume to represent the harmonics correctly. IE the fundamental at 1, 2nd harmonic at 1/2 the volume (-6db), 3rd at 1/3 of the first etc... However, I cannot figure out the scale in reaktor! I tried to use maths functions to create the relative volumes for each sine but it is definately wrong.

    I also have doubts that the actual numbers for my frequencies are correct too. The first sine is generated directly from the MIDI keyboard, then the pitch of the second uses the math function to multiply it by two, the third is x4, 4th x8 etc.... I am pretty sure though that the pitches are coming out all wrong!

    Can anyone help? I'm sure you have guessed by now that I am not very experienced in reaktor, but I am sure that it must be something simple that I am missing!

    Any help is seriously appreciated, thanks!
     
  2. Chet Singer

    Chet Singer NI Product Owner

    Messages:
    822
    Regarding the pitch, it sounds like you may be multiplying the P signals by your frequency ratio constants. Those signals are MIDI note numbers, not frequencies. One way to get an oscillator to track another via a frequency ratio is to follow these steps:

    1. Convert the MIDI note number to frequency by using a P>F module.
    2. Multiply the result by your frequency ratio constant.
    3. Convert it back to pitch by using an F>P module.

    Just describing it sounds kludgey. But it will work, and if done as events will consume little CPU.
     
  3. gordontinnitus

    gordontinnitus New Member

    Messages:
    6

    thanks I will try that, but (and now the dumb question)... where is the F>P module? I looked through all the items in built-in modules, core cells, macros etc but don't appear to have that module...

    edit: never mind, found it - trying it now, thanks
     
  4. gordontinnitus

    gordontinnitus New Member

    Messages:
    6
    hi, thanks a lot, that worked fine - although i think you put the logs the opposite way round. This also worked for the volume levels as there is a log converter to db also.

    Cheers

    Gordon
     
  5. gordontinnitus

    gordontinnitus New Member

    Messages:
    6
    still not working...!

    ok maybe not... I've compared the sawtooth made up from sines to an actual sawtooth oscillator both by ear and on the scope, but they do not match. I'm pretty sure my maths is wrong, or at least my useage of the log functions.

    Can someone please have a look at my screenshot? This is the harmonic number two of a sawtooth (so should be freq X2 and half the amplitude (-6dB))...

    Thanks to all for any help!

    Gordon
     

    Attached Files:

  6. Chet Singer

    Chet Singer NI Product Owner

    Messages:
    822
    It looks correct to me, although it can be done more simply.

    The second harmonic should sound one octave higher than the fundamental, and be quieter. Because the harmonics aren't phase-locked, the result won't look anything like a sawtooth waveform. But it should sound like one, if you add enough harmonics. You'll need a lot of them (dozens, and even hundreds on low notes) to duplicate a sawtooth spectrum.

    There's no need to convert the linear amplitude to decibels and then use a gain module. Just dividing the output of the oscillator by the harmonic number will do the job.
     
Thread Status:
Not open for further replies.