Old 10-13-2014, 11:30 AM   #1
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default Shepard tone synthesizer

Some long time ago, i played with paradoxical sounds aka Shepard tones and Risset glissandi (i have some examples on my youtube).

Here is a little Shepard tone synth i've made last week end. It's not optimized yet, but is good enough to play with.

I added some feedback on the oscillators and an envelop to add dynamics.
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...

Last edited by Smashed Transistors; 10-15-2014 at 01:55 PM. Reason: wrong url
Smashed Transistors is offline   Reply With Quote
Old 10-13-2014, 01:00 PM   #2
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Cool. Keep 'em coming!
IXix is offline   Reply With Quote
Old 10-14-2014, 02:13 PM   #3
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default

I haven't coded plugins for the last 6 years... got a lot of ideas but not enough time to code full VSTis.

So JSFX with its imports and namespaces - even if not optimal - is the good option for me:
- very fast dev cycle
- no gui to develop (most of the time the sliders are enough for me)

BTW, I just updated the Shepard tone synth:
- added pitch bend (+- one "octave") .
- vibrato depth is controlled by the modulation wheel
- Spectral center slider
- optimizations (tables instead of sines)


You can obtain richer sounds with a fuzz/dist effect (such as the Camel Crusher) in combination with the detune and spectral center.
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...
Smashed Transistors is offline   Reply With Quote
Old 10-14-2014, 04:06 PM   #4
witti
Human being with feelings
 
witti's Avatar
 
Join Date: May 2012
Posts: 1,216
Default

Your link is not working because it refers to your stash 'manage' site

https://stash.reaper.fm/manage_file/2...P_synth_00.zip

Where it should be:

https://stash.reaper.fm/22090/TiaR_SHP_synth_00.zip

Thanks for your great synths ! Now only polyphony is missing...
witti is offline   Reply With Quote
Old 10-15-2014, 01:54 PM   #5
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default

Quote:
Originally Posted by witti View Post
Your link is not working because it refers to your stash 'manage' site

https://stash.reaper.fm/manage_file/2...P_synth_00.zip

Where it should be:

https://stash.reaper.fm/22090/TiaR_SHP_synth_00.zip

Thanks for your great synths ! Now only polyphony is missing...
Oops! just corrected it.

I will implement polyphony by MIDI stack on a next version.
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...
Smashed Transistors is offline   Reply With Quote
Old 10-20-2014, 10:53 PM   #6
DutchDoctor
Human being with feelings
 
Join Date: Aug 2011
Location: Melbourne, Australia
Posts: 43
Default

Quote:
Originally Posted by Smashed Transistors View Post
Some long time ago, i played with paradoxical sounds aka Shepard tones and Risset glissandi (i have some examples on my youtube).

Here is a little Shepard tone synth i've made last week end. It's not optimized yet, but is good enough to play with.

I added some feedback on the oscillators and an envelop to add dynamics.
Hi there, forgive my ignorance but what directory do I put this plugin in for Reaper to detect it? Thanks.
DutchDoctor is offline   Reply With Quote
Old 10-21-2014, 10:33 AM   #7
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default

Hi DutchDoctor,

On a Win7 machine the JSFX folder is something like
C:\Users\User\AppData\Roaming\REAPER\Effects
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...
Smashed Transistors is offline   Reply With Quote
Old 10-23-2014, 09:43 PM   #8
DutchDoctor
Human being with feelings
 
Join Date: Aug 2011
Location: Melbourne, Australia
Posts: 43
Default

Got it working, I have a portable Reaper install so it needed to place it in the "\Reaper\Effects" directory.

I've loaded up your plugin... It doesn't seem like it's set up to create a Shepard Tone? It seems like a standard synthesiser with modulation to me?
DutchDoctor is offline   Reply With Quote
Old 10-25-2014, 02:39 PM   #9
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default

Hello DutchDoctor,

It's not a Risset glissando generator.

It is a synth based on a Shepard scale generator.
If you play C D E F G A B C, the last C will sound exactly the same as the first one.
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...
Smashed Transistors is offline   Reply With Quote
Old 10-26-2014, 06:09 AM   #10
DutchDoctor
Human being with feelings
 
Join Date: Aug 2011
Location: Melbourne, Australia
Posts: 43
Default

Quote:
Originally Posted by Smashed Transistors View Post
Hello DutchDoctor,

It's not a Risset glissando generator.

It is a synth based on a Shepard scale generator.
If you play C D E F G A B C, the last C will sound exactly the same as the first one.
Ah I get it now. Cool plugin!
Thanks for sharing.
DutchDoctor is offline   Reply With Quote
Old 10-28-2014, 12:52 PM   #11
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default

Hi,
just updated it to rev01:
- colourful GUI
- fine settings for both ADSRs
- overdrive (sounds nice with a little detune)
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...
Smashed Transistors is offline   Reply With Quote
Old 10-29-2014, 01:09 PM   #12
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Thanks!
IXix is offline   Reply With Quote
Old 10-30-2014, 01:09 PM   #13
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default

Updated 30/10/14
added a 12dB/oct Low Pass filter with resonance and a dedicated envelope.
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...
Smashed Transistors is offline   Reply With Quote
Old 11-17-2014, 03:23 PM   #14
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default

Quote:
Originally Posted by DutchDoctor View Post
Ah I get it now. Cool plugin!
Thanks for sharing.
Hi DutchDoctor,

here is a Risset Glide generator, i think that's what you expected.
In fact it is a set of 3 Risset Glide generators... for stereo and dirty/experimental phase modulation.

Notes:
- the generator generates sound continuously, consider volume automation if you want to use it in a track.
- use negative rates for descending effects
- set Index B and Index C to zero for the classical effect

the code can be optimized (i should replace sin() by look up tables) and distortion / formant filters / delay / feedback should be experimented...
Code:
desc:Stereo Paradoxical PM Glide generator
/*
  A, B and C are Risset Glide generators
  with adjustable rate, direction and max pitch
  
  PM modulation / stereo
  
      IndexB 
       /-->--> B --> Left
  A --|
       \-->--> C --> Right
      IndexC
  T.Rochebois 2009 rev 2014    
*/
slider1:0.48<-1,1>Rate A
slider2:0.5<-1,1>Rate B
slider3:0.51<-1,1>Rate C
slider4:0.8<0,2>Index B
slider5:0.8<0,2>Index C
slider6:129<80,140>pMax A
slider7:139<80,140>pMax B
slider8:134<80,140>pMax C
//______________________________________________________________________
@init
ad = 1;
nbOscs = 10;
a.tP  = ad; ad += nbOscs;
b.tP  = ad; ad += nbOscs;
c.tP  = ad; ad += nbOscs;
//______________________________________________________________________
@slider
  a.rate = slider1 / (nbOscs * 8 * srate);
  a.p1 = slider6;  a.p0 = a.p1 - 12 * nbOscs;
  
  b.rate = slider2 / (nbOscs * 8 * srate);
  b.p1 = slider7;  b.p0 = b.p1 - 12 * nbOscs;
  b.index = slider4;
 
  c.rate = slider3 / (nbOscs * 8 * srate);
  c.p1 = slider8;  c.p0 = c.p1 - 12 * nbOscs;
  c.index = slider5;
//______________________________________________________________________
@sample
function calcMasterRamp()
local()
instance(ramp rate rampi) (
  ramp += rate;  ramp > 1 ? ramp -= 1 : ramp < 0 ? ramp += 1;
  rampi = ramp;
);
function calc(i)
local(rampi)
instance(env ramp pitch p0 p1 dp tP) (
  rampi = ramp + i * (1 / nbOscs);
  rampi > 1 ? rampi -= 1;

  env = 0.5 - 0.5 * cos(2*$pi * rampi);   
  pitch = p0 + rampi * (p1 - p0);
  dp = (440.0 * 2*$pi/srate) * 2 ^ ((pitch - 69) * (1/12));
  tP[i] += dp;
  tP[i] > 2*$pi ? tP[i] -= 2*$pi;
);
// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  
a.calcMasterRamp();
b.calcMasterRamp();
c.calcMasterRamp();
// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  
a.acc = 0;
i = 0;
loop(nbOscs,
  a.calc(i);
  a.acc += a.env * sin(a.tP[i]);
  i += 1;
);  
// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  
b.acc = 0;
c.acc = 0;
i = 0;
loop(nbOscs,
  b.calc(i);
  c.calc(i);    
  b.acc += b.env * sin(b.tP[i] + a.acc * b.index);
  c.acc += c.env * sin(c.tP[i] + a.acc * c.index);
  i += 1;
);
 
// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  
spl0 = 0.2 * b.acc;
spl1 = 0.2 * c.acc;
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...

Last edited by Smashed Transistors; 11-17-2014 at 03:46 PM.
Smashed Transistors is offline   Reply With Quote
Old 12-03-2014, 01:03 PM   #15
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default

I'm experimenting with the concept of using a MIDI JSFX to send multiple octave related notes on to obtain Shepard scales...

Here is one of the attempts for a Shepard piano sound.

Salsa on a Shepard Scale
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...
Smashed Transistors is offline   Reply With Quote
Old 01-20-2015, 02:43 PM   #16
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default

This is the MIDI "Shepardizer".
When it receives a note on, it sends octave related notes on with different velocities to obtain the Shepard effect... So you'll need a poly synth.

It works pretty well with my Yami Motif ES...

Code:
desc:TiaR MIDI Shepardizer
slider1:62<40,80>Center
slider2:36<24,48>Width

//______________________________________________________________________
@init

// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
function vel(note)
local(a) (
  a = (note - center) / width;
  a = min(1, max(-1, a));
  (126 * (0.5 + 0.499 * cos($pi * a)))|0;
);

// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
function noteOn(note vel)
(
  note > 0 && note < 128 && vel > 0 ? (
    vel = min(127, vel)|0;
    note |= 0;
    midisend(ofs, 9 * 16 + ch, note + 256 * vel);
  );
);
// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
function noteOff(note)
(
  note > 0 && note < 128 ? (
    midisend(ofs, 8 * 16 + ch, note|0);
  );
);
// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
function notesOn(note inVel)
local(i vel) (
  i = note % 12;
  loop(11,
    vel = vel(i);
    vel != 0 ? noteOn(i, (vel * inVel / 127) | 0);
    i += 12;
  );
);
// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
function notesOff(note)
local(i vel) (
  i = note % 12;
  loop(11,
    noteOff(i);
    i += 12;
  );
);

//______________________________________________________________________
@slider
center = slider1;
width = slider2;

//______________________________________________________________________
@block
while (
  midirecv(ofs, msg1, msg23) ? (
    status = msg1 & 240;
    ch = msg1 & 15;
    dataL = msg23 & 127;
    dataH = (msg23/256)|0;
// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
//                                                           Note on/off
    (status === 9 * 16 || status === 8 * 16) ? (      
      status === 8 * 16 ? 
        vel = 0 
      : vel = dataH;
          
      vel !== 0 ?
        notesOn(dataL, vel)
      : notesOff(dataL);   
    )
// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    : midisend(ofs, msg1, msg23);
    1;
  ):0; // midirecv
); // while
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...
Smashed Transistors is offline   Reply With Quote
Old 01-20-2015, 03:23 PM   #17
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

What is the Shepard effect if i may ask ?
vanhaze is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.