Strings machine emulation: need advice

Discussion in 'Building With Reaktor' started by omx, Dec 16, 2007.

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

    omx Forum Member

    Messages:
    308
    Hi
    I'm actually dealing with an attempt to mimic the behaviour of VP330 Vocoder and I'm actually focusing on the excitation section; I would try to have a kind of divided down oscillator to provide both the 4' and the 8' manuals from one source; I'd start from a pulse or trapezoidal waveform to get a regular sawtooth: I tried the "frequency divider" audio module but didn't get the results I wanted (get an expo sawtooth from the pulse): I tried also to have a LP after the freq divider in order to get some more results but I'm getting poor results.
    Any hint ?

    Reason for not using standard materials:

    I could use simply 2 saw oscillators but they beat and phase each other at slow speed when played polyphonically, nor I can use the Equinoxe Deluxe's oscillator because it gives out an artifact when playing stacked octaves (a fake note one octave above).

    Any good advice?
    Thanks!
    M
     
  2. lxint

    lxint NI Product Owner

    Messages:
    764
    advise : use the equinox oscillator

    what you call artefact is actually a feature of the phase locking ( they are aligned from the center ) but you can change this :

    add 0.5 before the multiplication, and substract 0.5 after the mult ( before the wrap )
    then they align from the wrapping point ( well they should, didnt test it much, but Ive put a version into the libary nevertheless, in the "they called him shark" upload, hope it works)
     
  3. omx

    omx Forum Member

    Messages:
    308
    lxint
    It works! I just can notice a slight increase in volume if you play stacked octaves. Can you explain me what happened by adding these operations? I'd like to know more about the internal works of this module. Thank you again!
     
  4. lxint

    lxint NI Product Owner

    Messages:
    764
    the increased volume on stacked notes is as much a feature of the alignment as the perceived ghost pitch ( Id rather call it timbre change ) you wanted to avoid -
    you need to be aware that these effects also happen with non-locked oscillators, just that usually the alignment is random, while here it is fixed, so you can cancel the timbre change

    how it works :

    the incoming basic phase ramps go from -0.5 to 0.5, running at the lowest common frequencies,
    then they are multiplied by the octave for the note, for instance
    2 octaves up its multiplied by 4, then its wrapped back (modulo) into the range -0.5 to 05,
    so the ramp is 4 now times as fast ( its wrapping 4 times in one base cycle )

    this is your prototype phase locked oscillator, the saw macro that follows just shapes this into the desired waveform, ( changing the transition in the case of the saw, there is an adder (=*2) in the original cause the phase range for the macro there is -1 to 1 )

    what happens when you add 0.5 before the multipication :
    the basic ramp then goes from 0 to 1, after the multiplication ( by 4 in our example ) it goes from 0 to 4,
    substracting 0.5 again afterwards it now goes from -0.5 to 3.5 ....
    so the cycle starts with -0.5 ( the lower edge ) in all octaves ( it still does after wrapping ) while in the first example, it started in the middle with 0 ( -2 wrapped )

    ( think of it like a strip of paper you fold in a zig-zag manner, you can either start folding from the center, or from the edges, or from a fixed distance from one edge )

    you can use any different offset for a different timbre, or add an input and change the offset over time (phasing).. even randomize it ...
    but this is bringing up the question why you would want to align the phase at all ...

    ....

    maybe you should add an xy skop to see what is going on : use a standard ramp oscillator controlled by mono midi pitch for the x and the waveform for the y input

    or use a sheet of paper and draw some ramps with doubled fq and figure out what happens when you add them, aligned or not
     
  5. omx

    omx Forum Member

    Messages:
    308
    Thx lxint
    These are great resources for study purposes!
    PS: sorry for my delay!
    M
     
  6. omx

    omx Forum Member

    Messages:
    308
    Hi lxint, sorry to bother.
    I'm still working on my pseudo VP330 and I gave a listen to the modded saw AA oscillator: sounds good and not duller than the original.
    I was wondering something while reading again at your explaination on the PL oscillator: would it be possible to "split" and/or layer different octaves of a single PL oscillator? Again I'm suffering from phase problems, i.e. if I couple two PL osc , modded in the way you showed to me, I seem I get different starting points from each waveform if I layer them on different octaves; this prevents me to do a work as faithful to the original as I can: I tried to compensate this flaw by passing the higher octave oscillator through an allpass but with poor results, tried to shift the pitch of the osc but it ends kinda sampling it and getting the pitch but in a dirty and glitched way, so I thought that I should get different sounds from a single oscillator in order to bypass this problem: what do you think about it and are there any tip you can give me?
    Thx very much!
    M
     
  7. lxint

    lxint NI Product Owner

    Messages:
    764
    I am not sure what you are asking, and what the problem is you want to avoid
    also I am not familiar with the VP330 so I dont know if there is anything special

    if you want 2 locked oscillators running per voice you can either just use two of these and they should stay in synch since they are always running at the same base frequencies from start (even in two different instruments)

    to save some cpu you can also reuse parts, that is just double the part from the P input to the out port in the 2nd core cell for a 2nd oscillator
    then again you could offset the phase of one of the oscillators by adding a constant and a wrap to the phase before it goes into the final saw macro if you want to
     
  8. omx

    omx Forum Member

    Messages:
    308
    Well
    I mean: if the oscillator calculates also higher octaves, could it be possible to take those octaves to an output and layer them to the lower octaves? Basically I'd like to take an upper register from the same oscillator; the VP330 doesn't differ from some of the most common string machines of the times: one single (trapezoid) oscillator was divided into the first 12 tones of the highest octave of the keyboard (2') ,then each tone is subdivided for each octave ( the keyboard was C1 to C5 ) then tone-divided (i.e. changed the wave into a sort of a sawtooth): then two registers are created, the pads go 8' or 4' . Basically it's the same oscillator making everything.
    With the actual modded phaselocked osc I get some phase cancellation, some "fixed" ones (!) between 2 identical oscillators. I'm attaching there a test for the VP330 choir, 2 oscillators , one for each register, no ensemble in order to make you focus on this thing.
    Thx for any suggestion or any hint on how to overcome this, even with different solutions!
     

    Attached Files:

  9. PeterW

    PeterW Forum Member

    Messages:
    182
    OMX,
    I do not know if this helps (as I am not sure quite what you are building) but for what its worth...

    Old string machines (i.e. hardware) did use one oscillator to derive all the tones for the instrument. The oscillator ran at between 1 and 2 MHz (Million hertz) and was divided by a "Top octave divider" (microchip) to produce the 12 semitones for the highest octave. The 12 frequencies produced by the "Top octave divider" were then divided by 2 to produce the frequencies for the next lower octave and so on for the remaining octaves.

    The wave form produced by the "Top octave divider", and all the following divide by 2 stages, was a square wave. Each square wave is then Highpass filtered and clamped to produce a spaced saw wave. __|\__|\__

    The "Top octave divider" used in the Solina string ensemble was an M087 device. More information about the divider in general and the M087 in particular can be found here -

    http://www.organservice.com/crm/topdividers.htm

    http://www.organservice.com/crm/topdividers.htm#Fig7

    In Fig 7 you can see that the master oscillator is divided by an integer amount which, I read somewhere, means that the semitone frequencies produced are not exact and that phasing will occur when more than one note is played - Good for a string machine :) I have not actually checked this out mathematically myself though.

    I hope this helps. If not, or if you already knew this then just ignore me. :)
     
    Last edited: Jan 3, 2008
  10. omx

    omx Forum Member

    Messages:
    308
    Thanks for the wonderful yet precise informations! What I didn't know was that the master VCO ran so high frequencies; that worries me since there is nothing there that can prevent aliasing nor I know if reaktor can be able to simulate this kind of a thing...

    by the way, Peter, do you remember how the keyboard was arranged in order to assign the right tone to the right key?
     
  11. PeterW

    PeterW Forum Member

    Messages:
    182
    Hi omx,

    The spaced saw wave output of each divider is routed to its own Gate circuit which acts like a VCA. Each Gate circuit (a TDA0470 chip) is controlled by a key on the keyboard (I.E each key has its own Gate circuit). There seems to be a simple sustain circuit shared by all the Gate circuits to enable the note to continue for a while after the key is released.

    In fact each key actually controls two Gate circuits, one for the 4’ tone and one for the 8’ tone.

    All of the 4’ tones are combined, after some more filtering, in a mixer and that is then used to produce the Violin output. A similar arrangement is used to produce the viola output from the 8’ mixer output.

    The 8’ signals are also processed with a Formant circuit to produce Trumpet and Horn sounds.

    The outputs from the lowest octave dividers are used to produce Cello and Contra bass. The keyboard and Gate circuits are different for these however.

    The hardware string machine does not suffer from aliasing because although it uses digital dividers to produce the note frequencies it is still essentially an analogue sound generator.

    I don’t think it would be a worthwhile exercise to try and copy the hardware method of tone generation within a Reaktor ensemble. I started to build a string machine oscillator in Reaktor and found the best way was to use two square wave oscillators, one for the 4’ signal and one for the 8’ signal. I just added 12 to the midi pitch before it is sent to the 4’ oscillator. I connected the output of each oscillator to a one pole HP filter (6db/oct) controlled by the midi pitch and with a knob to fine tune it. The output of the filter was then connected to a clipper with min input set to 0 (zero) and the max input set to something higher than the max level expected from the HP filter, I think I used a value of 2. This simulates the Clamp in the hardware which removes the lower part of the saw to produce a spaced saw. The saw produced in the string machine is not linear it is kind of a needle pulse shape, and also like a saw with a curved slope. The HP filter takes care of that.

    To simulate the inaccuracy of the “Top octave divider” I added a macro to make a small random pitch variation each time a new note is played.

    Then I just added some more filtering, an ADSR VCA and a string machine chorus unit to complete the ensemble. I did not upload it to the user library as it is a bit scruffy, it seems to work OK though.
     
  12. omx

    omx Forum Member

    Messages:
    308
    Peter
    I began using a similar arrangement, as I saw in an emulation of an ARP Omni somewhere into the UL, but I wasn't happy with the result: I want the phase to be fixed because the kind of chorus I designed, much like a Roland VP330 ( 4 delays with 4 different, counter-phased modulations) requires the source signal to be as clean as possible, unless the sound becomes a mess: being otherwise impossible to set an oscillator to MHz (the frequency can only go up to 88.2 KHz as the sample rate is set to 2F, that is 176.4 KHz) I could try and calculate what I can get out of an oscillator at a lower frequency, then dividing the result: that means I should use lower divisions to get a result; what scares me is that I shall configure one or two gate circuits for each key; then I should route all the signals to one set of filters ( the human voice)...and I use reaktor for six months with an excess!
     
  13. Chet Singer

    Chet Singer NI Product Owner

    Messages:
    723
    One possible method might be to use 73 separate fixed-pitch ramp oscillators, and sync the octaves together. I once made an organ called Cathedral Flutes that had 84 fixed-pitch oscillators, and used event logic to route the note-on and note-off signals to each oscillator's vca. It required a lot of cpu, but it worked.
     
  14. PeterW

    PeterW Forum Member

    Messages:
    182
    omx,
    No it is not possible to recreate a “MHz” oscillator and divide it down in Reaktor. The thing is you should not need to. The original hardware did it this way because it was the most cost effective way with the technology available. In Reaktor it should be much easier.

    In Reaktor two square wave oscillators (synced if necessary) should be fine. Pitch one 12 semitones up and sync it to the lower frequency oscillator. I am not sure why you want the oscillators in sync, after all a violin and a viola played together will never be in perfect sync (waveform wise). Also as soon as you play a chord there will be a lot of (lovely) phasing.

    If you require the source signal to be as clean as possible – When using the string oscillator macro I described earlier, I believe the level of aliasing is only dependent on the level of aliasing present in the primary square wave oscillator. I think that in any digital method of synthesis there will be some level of imperfection so you will have to choose the “Best” or “Cleanest” square wave oscillator you can find. The rest of the ensemble probably will not have much effect on the artifacts produced. I think the use of Phase lock loop oscillators is probably causing more problems if anything.

    There should be no need to build a Gate circuit (or 2) for each key in Reaktor. Just increase the ensemble’s polyphony.

    I have uploaded my simple string machine ensemble to the user library. Please let me know what you think...

    http://www.native-instruments.com/index.php?id=userlibrary&type=0&ulbr=1&plview=detail&patchid=6725
     
  15. lxint

    lxint NI Product Owner

    Messages:
    764
    clipping actually does introduce aliasing, no matter what the input is, but other than that I agree with most things you said
     
  16. PeterW

    PeterW Forum Member

    Messages:
    182
    Yes I generally agree - However in my application of the clipper I am using it to remove a -ve going pulse from a waveform that is already at zero by the time the -ve pulse arrives. So the clipper should have no effect on the signal level, so it should not cause any distortion of the zero level. It should also have no effect on the +ve pulse because I have set the Max input higher than the expected pulse amplitude.

    I am interested to know your thoughts on this application of the clipper in particular ?
     
    Last edited: Jan 4, 2008
  17. lxint

    lxint NI Product Owner

    Messages:
    764
    I think youre right, and it does not introduce extra aliasing here -
    I didnt really get it from the description, now I see ( had to plug in a skop for this ) - nice ensemble btw, maybe you should add an octave up knob ? since it sounds very nice for high strings I think
     
  18. lxint

    lxint NI Product Owner

    Messages:
    764
    so "no matter what the input is" was obviously bs - never trust what people claim on forums : )
     
  19. PeterW

    PeterW Forum Member

    Messages:
    182
    Thanks.

    No worries : ) I know I've added to the world wide web bs over the years : )
     
  20. PeterW

    PeterW Forum Member

    Messages:
    182
    Hmmm, I’ve been thinking about this and I noticed a similar fake note when playing octaves with my ensemble. I am not sure if the fake note is actually an octave above in my case, but there is definitely something there which is quite prominent. I am aware that the human mind can play tricks with ones senses, so I wonder if the note is real or created as part of the brain’s listening process. I wonder if it would be a good idea to replace the DSP square wave oscillators in the ensemble with samplers containing a square wave sample of a real analogue synth. I am thinking that the sample will be, kind of, band limited by the LP filter in the sound card during sampling. Have you tried that, it may be worth an experiment.
     
    Last edited: Jan 5, 2008
Thread Status:
Not open for further replies.

Share This Page