bell notificationshomepageloginNewPostedit profiledmBox

Hoots : How to make a Shepard tone, shape frequency amplitude response in Reaktor Here's a video demonstrating combining a Pitch LFO and an Amplitude LFO in Reaktor's Form ensemble to create "infinitely upward" glissando in Reaktor. - freshhoot.com

10% popularity   0 Reactions

How to make a Shepard tone, shape frequency amplitude response in Reaktor
Here's a video demonstrating combining a Pitch LFO and an Amplitude LFO in Reaktor's Form ensemble to create "infinitely upward" glissando in Reaktor.

I'd like to be able to play a scale or melodic passage of Shepard tones that does this and am envisioning that one way of doing it is to run the Osc output through a filter or EQ which would attenuate frequencies above and below a central bandwidth according to a specific or specified curve.

I have tried using a Peak EQ as well as a couple of the Shaper BP Modules, but am pretty lost in the woods.

Am I even on the right track? Frequently, when I'm playing with the control knobs on the EQ or Shaper, the Synth makes a click sound and needs to be restarted to even generate a tone again.

Will include the panel here, which may give some sense of the value ranges provided by the auto-generated controls:

UPDATE:

Realized last night that my initial approach is completely wrong. EQ or Filtering affects the entire frequency spectrum and will largely just remove upper partials. We need to insert some logic that affects the Amplitude input of the Oscillator.

I imagine that this will be some math between the Pitch input and the Constant (1) seen below.

UPDATE 2

My idea now is to develop some kind of algorithm by which all pitches above and below a specified octave's midpoint–the tritone–(for example F#-66 for the C-60 octave) are exponentially (or perhaps logarithmically) attenuated.
My first step along this line of thinking is simply to hard-code a different Amplitude level for all pitches below 66:

So what I want is that note 66 (for example) will be Amplitude 1, 65 will be 0.9 (maybe), 64 will be 0.8, etc... and the same where 67, 68 will be 0.9, 0.8 and so on. But I imagine I'd ultimately like to be able to control that Amplitude curve with a knob or two, as desired curves might change based on the timbre of the sound.

I'm also wondering if it would make sense to autogenerate the High and Low octaves and only need to play the Middle octave of the scale (or melodic equivalent.)

UPDATE 3

It's quite possibly that I'm misunderstanding how "Shepard Tones" are supposed to work. I am still working on implementing a version of @YourUncleBob 's answer.

It seems that "his" approach is to send the sound through a Filter that creates the octave-equivalency-based illusion that support the "infinitely ascending or descending" illusion.

What I had been thinking to do, again, is to create an amplitude attenuation curve which attenuates the volume of each "note" (keyboard input) further as it gets further away from a central tone.

Then as long as the "melody" is played in multiple octaves in parallel, the illusion should work.

I am making some progress. What I have done so far is:

Subtract pitch input from Central Tone
Run the Remainder through a Rectifier (math) so that negative values are positive.
Compare the Rectified Remainder to 0 and if it's 0, send a 1 to the Amplitude, otherwise, make a fraction out of it since Amplitude is looking for a number from 0 to 1. So larger numbers become smaller amounts (ie. 2 => 1/2, 3 => 1/3, etc)
I'm hacking the curve a bit by multiplying the divisor (pitch minus central tone remainder) by 2 so that the fractions are smaller, and also by using 0.8 instead of 1 for the Central Tone.

I'm displaying some of the numbers:

Then I go through this elaborate process of creating the content in the DAW:

It's kind of cool with a lot to still work out:

Notes are "clicking" intermittently at the onset
I'd like to be able to have a logarithmic attenuation curve where it attenuates faster the further it is from the central pitch
The higher pitches need to attenuate more aggressively than the low ones
Do I have to actually play or program all of these parallel octaves? Seem like the instrument should be able to generate the full spectrum by default.

In the meantime the process is being enjoyable.


Load Full (2)

Login to follow hoots

2 Comments

Sorted by latest first Latest Oldest Best

10% popularity   0 Reactions

If you want to be able to play a melody while using Shepard Tones, the easiest way is probably to use a simple synth sound with a lot of harmonics, like an unfiltered sawtooth wave, and run it through a band-pass filter bank with constantly shifting frequencies.

Here's an instrument that uses a variable number of band-pass filters tuned an octave apart. The instrument's polyphony sets the number of filters. Each filter's frequency is slowly shifted upwards, and its output level follows a sine wave, so that the different filters fade in and out.

The ramp oscillator controls the filter frequency, and a sine wave based on its output controls the voice's volume. Set the oscillator's mode to standard, so that it jumps back from its maximum value to zero without any anti-aliasing (which would create glitches in the sine wave). In each voice a phase offset is added to the monophonic ramp oscillator output, and thus also to the sine wave, so that the filters are tuned octaves apart, and their volumes fade in and out in turn.

The panel controls have theses ranges:

Rate knob: -127 to -0, in 127 steps
Frequency: 0 to 127 in 127 steps
Resonance: 0.872 to 0.999 in 127 steps of 0.001
Depth: 24 to 87.5 in 127 steps of 0.5
Level: -24 to 39.5 in 127 steps of 0.5
Voices lamp: 1 to 128 in 127 steps, continuous mode, value visible, image not visible
11kHz lamp: 127 to 1000, continuous mode disabled

The settings in the image above give a good idea of what it can do. It's similar to a vowel filter or phaser, but with a continuous upward motion. The frequency knob sets the lowest frequency of the filter sweeps, the number of filters (i.e. the polyphony) decides how high the filter sweeps go, adding one octave per voice.

I found that the frequency of the PeakEQ and band pass filters in Reaktor 4 is limited to note number 127, which is around 11kHz. As you increase the polyphony or the frequency knob, the 11kHz lamp warns you if the upper range of the filter sweeps reaches 11kHz. You can use higher settings, but the sound may have a permanent boost around 11kHz.

This is the basic synth I use as a sound source. It's a separate instrument, and you can set the polyphony independently. You can of course run the output of any Reaktor instrument through the Shepard Filter. Low chords played with bright synth sounds will work best.


10% popularity   0 Reactions

The most flexible way to have a parameter whose value is different depending on which note you play, is to use an event table. That way, you can set a specific value for every MIDI note (e.g. for volume or filter key follow, or to create alternative tunings). Here's a simple example:

By creating a one-dimensional table of length 128, which holds values from 0 to 1, you can set the volume of every key separately. If you make the table visible in the panel (in the "view" panel), and set it to drawing mode (strl-click/right-click on the table in the panel), you can use the mouse to draw in values.

By adding an Event Voice Combiner, you can get the last note played to set the write position, and also use the Value slider to set its value. Once all values have been set, you can make the table invisible again. Its values can be saved and loaded automatically with the instrument.

You can of course use a smaller table, and e.g. have a value per octave, or interpolate between adjacent values.

If you don't need the detail of the solution with tables, you can just rescale the MIDI note input to the range 0 ~ 1 and then send it through a Control Shaper and set the output values for input 0, 0.25, 0.5, 0.75 and 1 to create the desired curve.

You can also use the Control Shaper for a solution with a variable center point and width. The center point knob sets the note number (0 ~ 127) for which the output value will be 1, and the width knob sets the distance (1 ~ 127) from the center note to the note where the output value will be 0. The output value will be linearly interpolated between value 1 and 0 for notes within the range, and be 0 for notes ouside the range.

You can change the interpolation of the output values from linear to a curve with a wider or narrower peak around the center point, e.g. by using the square of the values, or its inverse (this works because the range is 0 ~ 1). The three options are sent to a Selector module (in linear interpolation mode) so that a knob with values 0 ~ 2 can select the desired curve.


Back to top Use Dark theme