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

Use of A/E module in ring modulator

Discussion in 'REAKTOR' started by AaronK, Sep 5, 2006.

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

    AaronK NI Product Owner

    Messages:
    15
    I'm putting the finishing touches on creating a synth with ring modulation. One aspect of the design puzzles me. My ring modulator is a simple one -- the outputs of two oscillators are multiplied using an "X" module, and the result is output. This is essentially the same as the ring modulator included in the "Classic Macros" in R5.

    Here's what puzzles me: In order for the ring modulator to work (both in my design and the "Classic Macro" one), one of the two oscillator audio outputs needs to go through an A/E module first. In other words, multiplying two audio outputs doesn't produce ring modulation, but multiplying one audio output with an audio-converted-to-event output does. I don't understand why this is so. (Multiplying two audio outputs produces an output that sounds basically the same as the two outputs played together, as if through a mixer.)

    [I should define my terms: by "produce ring modulation", I mean "produce a sound that sounds to me like the ring modulation patch from analog synths."]

    The ring modulator in Carbon 2.0 appears to be multiplying pairs or trios of audio outputs; I don't see any A/E conversion happening. However, from my limited efforts playing Carbon, I'm not convinced its ring modulator actually works -- turning it on and off seldom has any audible effect.

    Any help explaining this or pointing me to an explanation (other than the manual, which didn't help me answer this question) will be appreciated!
     
  2. sowari

    sowari Moderator Moderator

    Messages:
    27,759
    OK i am confused. the structure of the classic macro (see picture) does
    not seem to have an A/E conversion.

    the AM input is an audio modulator (try a styatic Sine Wave and MIDI note 60) and the in is the carrier (try a Sine Wave that respondes to pitch changes).

    Make sure the Modulation Depth is on 1 to hear it.

    sowari
     

    Attached Files:

  3. AaronK

    AaronK NI Product Owner

    Messages:
    15
    Thanks, sowari. You are right, the Classic Macros doesn't include an A/E converter, but I was having to insert one in front of the AM input in order to achieve a "ring modulator" effect. (I've made sure to have the Modulation Depth at 1.) I'll try your specific configuration (sine wave set at 60) tonight when I get home. My own synth doesn't set the modulating signal at a fixed pitch or frequency, but rather is based on the idea of choosing a harmonic of the carrier as the modulating signal.

    I think I correctly understand what the A/E module does, from the manual and several helpful postings on other threads. If I got it right, the A/E module basically samples an audio output at specfic regular intervals in order to reduce CPU load. I would expect multiplying two audio outputs to impose more load on the CPU than multiplying an audio output with an event output generated with the A/E module. What I didn't expect, and don't understand, is why the aural results of these two methods would be so drastically different.

    As a result, my new synth "works in practice, but not in theory." Running the modulating signal through an A/E module definitely creates pleasant results. I'm going to try using the A/E (Perm) in front of my modulating signal to hear what effect, if any, increasing the F setting has on audio output.
     
  4. sowari

    sowari Moderator Moderator

    Messages:
    27,759
    btw, my idea of the static Pitch is just a simple example, try different pitches to experiment and non-static ones.

    maybe you should try using a harmonic of a different wave to the carrier one.

    also for me A/Es are used when using oscillators as LFOs. if you are using an oscillator at a fast rate (so you hear a pitch) you shouldn't us an A/E.

    and have you tried the frequency shift effect?

    sowari
     
  5. kuniklo

    kuniklo NI Product Owner

    Messages:
    265
    Ring modulation of two signals of similar frequences often doesn't sound much different than the original sources. You usually have to pitch one of them up or down a bit to get some interesting results.

    Maybe the A/E is effectively dropping the frequency of one of the sources and moving it into a more interesting frequency range?
     
  6. AaronK

    AaronK NI Product Owner

    Messages:
    15
    sowari: I understood that I can use pitches other than midi note 60. Running some experiments with the modulator at a fixed pitch rather than a pitch relative to the carrier will be important. (This should have been obvious, but my original idea involved modulating the carrier with a second oscillator whose frequency would be a given harmonic of the carrier.) Although you say I shouldn't use an A/E in this sort of situation, I'm actually getting very nice sounds this way, without setting anything on fire. So maybe I've actually managed to come up with something new!

    What is the "frequency shift" effect?

    miles: your suggestion sounds quite plausible and should be easy enough for me to test. I've tried patches with the sine wave modulator at various intervals from the carrier (which is typically a different wave such as a triangle or sawtooth) and still not noticed much effect. However, it hadn't occurred to me to simply run a single oscillator's output through the A/E module and listen to how that module affects just the one oscillator, as opposed to the multiplication of that oscillator with a second one. Once I get home and run that simple test I suspect I'll understand what's happening. In particular, I now suspect the modulator (when it hits the "X" module) isn't operating at a natural harmonic frequency of the carrier, as I had intended. However, my unintended results may be more sonically interesting.
     
  7. sowari

    sowari Moderator Moderator

    Messages:
    27,759

    if you are getting good results then carry on :)

    the Frequency Shifter effect can be found in your "Building Blocks" macros in the effects section. it is an interesting effect as it shifts the harmonic content of a sound. it can sound a bit like ring modulation but also quite different.

    sowari
     
  8. AaronK

    AaronK NI Product Owner

    Messages:
    15
    Once I got home to test it, it was easy to hear that routing the output of an oscillator through an A/E module produces quite significant distortion at low sampling frequencies, but doesn't simply lower the frequency. This immediately explains why a ring modulator will sound completely different if the modulating signal goes through the A/E module, than if it doesn't!

    So, this was for me a very productive visit to the forum. The A/E (Perm) module lets me control the amount of distortion of the modulating signal from none to a lot, which has opened up a whole new slew of patch possibilities.

    Thanks!
     
  9. kuniklo

    kuniklo NI Product Owner

    Messages:
    265
    I love happy accidents.
     
  10. PeterW

    PeterW NI Product Owner

    Messages:
    182
    I think that the event rate clock (default 400Hz) added to one of the inputs by the A/E is just making the sound produced more interesting.

    Does the bare multiplier with pulse wave inputs sound as interesting ?

    Some analogue synths used an "Exclusive Nor" gate for ring modulation in place of the traditional ring modulator. This would produce a more harmonicaly rich output compared with a standard ring mod. Maybe your analogue synth uses this method so you are more accustomed to that sound.

    In the past I have built various hardware Ring Modulators some based on transformers and diodes and some based on 4 quadrant multiplier ICs, although there are subtle differences in the sound output, the bare Reaktor multiplier ring mod sounds pretty much the same (to me anyway).

    BTW, another way to produce ring modulation is to feed the modulation signal directly into the carrier oscillators 'A' input. Same as using a multiplier nut without the extra multiplier.
     
  11. AaronK

    AaronK NI Product Owner

    Messages:
    15
    Thanks, Peter. I'm comparing my current Reaktor synth mostly with my memories of room-sized university music school synths from 25 years ago. Maybe I was more easily amused back then!

    In any event, it turns out that sending one of two audio inputs to a multiplier through an A/E module IS a worthwhile thing to do. This seems to simultaneously preserve some of the advantages of modulating with simple rather than complex waveforms, while nevertheless adding some complexity.

    I'm hoping to be able to post my new synth to the User Lib without embarassment, once I finish it. It's designed to do all sorts of RM, from a basic modulation of one sine wave with a second at a fixed pitch (yawn, I realize), up to combinations and multiplications of multiple inputs using various types of oscillators, plus various additional modulation and manipulation possibilities, which taken together make the instrument somewhat unique (I hope).
     
  12. kid_sputnik

    kid_sputnik NI Product Owner

    Messages:
    3,552
    the reason it is happening is because the A to E is severely downsampling the sound-source. as i pointed out in another recent thead, setting the A to E conversion to high rates (like, 800 hz or more) is a bad idea (the reaktor engine doesnt handle events that fast very well, the CPU goes thru the roof), if you want downsampling at high and low rates, try using a sample and hold clocked by a sawtooth. of course, if the A to E doesnt give you any problems, dont change anything, just thought id point it out.
     
  13. AaronK

    AaronK NI Product Owner

    Messages:
    15
    Good tip!

    My new synth uses two A/E (Perm) modules to distort each of two possible modulating inputs. Even with everything going full bore, at 8 voices the CPU usage has only seemed to be around 10% (and this includes 3 eye-candy scopes). I've designed plenty of presets for it that have the A/E (Perm) set at 44.1, without seeing any CPU overload, but now I'm eager to get home and see the specific CPU usage those patches require.

    Does this mean Reaktor processes audio outputs at 44.1k more efficiently than event outputs at 44.1k? Isn't the output from an A/E (Perm) module at 44.1k exactly the same as the output from an audio output at 44.1k, or if not, isn't it just as much a burden to process? (Aren't 44,100 numbers a second the same amount of data whether called "audio" or "event" output?)

    At any event, the CPU load question lends itself to easy testing this evening once I get home. I like the sound of my distortion macro and it's not stressing my CPU, so it'll be easy enough to simply build in a switch to disable A/E (Perm) and output straight audio if that makes a helpful difference in CPU usage.
     
  14. kid_sputnik

    kid_sputnik NI Product Owner

    Messages:
    3,552
    basically, reaktor events are a differant type of data than audio. i dont know the specifics.
     
  15. AaronK

    AaronK NI Product Owner

    Messages:
    15
    Here's what I learned from my experiments last evening:

    Often, sending audio output uses essentially the same CPU as running the audio through an A/E (Perm) at 44.1k. E.g., in a simple multiplication of inputs with a ring modulator I didn't detect any difference between processing audio data and processing the output of the A/E (Perm) at 44.1k. There was also no audible difference.

    By contrast, event data at 44.1k uses lots more CPU than audio data if subjected to much additional manipulation, and this effect is especially marked as the number of voices is increased.

    In one experiment the results baffled me. My original synth design had a switchable input for the F (sampling frequency) input of the A/E (Perm) module. One switch led upstream to a knob for controlling F. The other switch led to a constant at 44.1k. This module alone had a CPU load of around 7%, consistent with kid sputnik's warning.

    I modified this design to put the switch AFTER the A/E (Perm) module. The F input is controlled solely by a knob. The A/E module outputs to one switch position. The other switch position receives the unmodified audio signal. CPU load dropped to around 1% or less. Exactly as kid sputnik predicted.

    Here's the baffling part: CPU load in this second set-up was around 1% EVEN WHEN the A/E module was switched on AND SET TO 44.1k with the knob!

    In other words, the only difference between the two designs was that, in the first, the sampling rate could be set at 44.1k via a constant. In the second, it could be set at 44.1k via a knob. CPU load for the first configuration was around 7%, for the second around 1%.
     
  16. AaronK

    AaronK NI Product Owner

    Messages:
    15
    For anyone interested, I've posted my ring modulating synth as "Kuru Instrument" in the UL, edited as suggested above to lower CPU usage. On my machine it tops out around 10% at 8 voices, and doesn't climb too radically with added voices. (The nature of the instrument is such that "unison" is unlikely to ever be set at anything other than 1.)

    Thanks again to everyone who took the time to chime in (pun intended) with technical explanations and suggestions.
     
Thread Status:
Not open for further replies.