Old 12-22-2018, 10:13 PM   #1
arthurtabbal
Human being with feelings
 
Join Date: Mar 2018
Posts: 10
Default Leslie simulator in JSFX

Hi folks ! I just finished my DIY plugin project.. It's a Rotary Speaker simulator, Leslie style - with horn and bass rotors -, with no overdrive and no speaker impulse response, just the rotary effect.. with the ramp thing when switching speeds

Started with c++ and Juce, but quickly went to JSFX for prototyping, and I guess i'm gonna stick to this language for a while.. Tell me what do you think ! Can I drop music and be a developer for a living after all? LOL


UPDATE:
Well, i've updated the "True Leslie" plugin.

Features added:

- Master Volume
- Overall sound has improved
- Early Reflections from the cabinet
- Mic Distance control
- Room Response control - use with caution !
- Horn/Bass speakers balance
- Stereo Spread control
- Control of fast/slow with MIDI using CC#64 , your sustain pedal, but the CC# can be changed in the apropriate slider
- A bunch of controls that were hidden or non-existant now are free to be tweaked

And the Yamaha RA 200 simulation is ready too, with the exactly same features. It's called the Thin Ice Rotator, because we all love that swirly flangery The Wall distorted guitar tone. Thanks, Mr. Gilmour !

So, hope you all enjoy it as much as I do and make good use of it ! I would be glad to hear some of your recordings with it

Just install the CookDSP library, put the .txt files below in your Reaper > Effects folder and you're ready to go !
Attached Files
File Type: txt True_Leslie_Sim_V2_By_ArthurTabbal.txt (10.1 KB, 257 views)
File Type: txt Thin_Ice_Rotator_By_ArthurTabbal.txt (11.1 KB, 216 views)

Last edited by arthurtabbal; 01-10-2019 at 09:00 PM. Reason: Easy for the users
arthurtabbal is offline   Reply With Quote
Old 12-22-2018, 10:16 PM   #2
arthurtabbal
Human being with feelings
 
Join Date: Mar 2018
Posts: 10
Default

ooohh I guess you gotta have CookDSP library for it to work.. just in case you didn't know !
arthurtabbal is offline   Reply With Quote
Old 12-24-2018, 11:12 AM   #3
arthurtabbal
Human being with feelings
 
Join Date: Mar 2018
Posts: 10
Default

People, i've made some improvements and created a modified version for simulating the Yamaha RA 200 used by David Gilmour.. let me know if you're interested !
arthurtabbal is offline   Reply With Quote
Old 12-24-2018, 12:03 PM   #4
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by arthurtabbal View Post
ooohh I guess you gotta have CookDSP library for it to work.. just in case you didn't know !
FWIW, I get this error as soon as its loaded,

REAPER v5.965_x64
Edgemeal is offline   Reply With Quote
Old 12-24-2018, 03:05 PM   #5
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,978
Default

Quote:
Originally Posted by Edgemeal View Post
FWIW, I get this error as soon as its loaded,

REAPER v5.965_x64
Hi Edgemeal, I found there is some formatting issue in original post.
Just remove spaces in words "Ph ase" at these lines (I think the first error line is 129):

HornPhase0.apass_set_freq(slider16+slider17*HornPh aseLFO0.sine_do());
HornPhase1.apass_set_freq(slider16+slider17*HornPh aseLFO1.sine_do());

HornPhasedSignal0 = HornPhase0.apass_do(spl0);
HornPhasedSignal1 = HornPhase1.apass_do(spl1);

BassPhase2.apass_set_freq(slider18+slider19*BassPh aseLFO2.sine_do());
BassPhase3.apass_set_freq(slider18+slider19*BassPh aseLFO3.sine_do());
akademie is offline   Reply With Quote
Old 12-24-2018, 03:13 PM   #6
vdubreeze
Human being with feelings
 
vdubreeze's Avatar
 
Join Date: Jul 2011
Location: Brooklyn
Posts: 2,613
Default

I'm in!!! I'm leslie crazy! Been waiting for a good JS one. Thank you, arthurtabbal!
__________________
The reason rain dances work is because they don't stop dancing until it rains.
vdubreeze is offline   Reply With Quote
Old 12-24-2018, 03:58 PM   #7
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by akademie View Post
Hi Edgemeal, I found there is some formatting issue in original post.
Just remove spaces in words "Ph ase" at these lines (I think the first error line is 129):
Yep, it loads without error now. THANKS!
Edgemeal is offline   Reply With Quote
Old 12-24-2018, 04:39 PM   #8
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,978
Default

Quote:
Originally Posted by Edgemeal View Post
Yep, it loads without error now. THANKS!
No problem Edgemeal, you are welcome.

Anyway, it is a nice sounding leslie sim.
So thank you, arthurtabbal ;-)
akademie is offline   Reply With Quote
Old 12-24-2018, 06:10 PM   #9
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Really great sounding JSFX. And of course do we want your Yamaha simulation too.
Eliseat is offline   Reply With Quote
Old 12-24-2018, 06:48 PM   #10
Paul99
Human being with feelings
 
Join Date: Aug 2014
Location: Netherlands
Posts: 882
Default

I would love to try it, but I keep keep getting an error:
import: 'cookdsp.jskx-inc' has no @init or other code

I have both your (corrected) coded and the cookdsp.jsfx-inc in
C:\Users\<username>\AppData\Roaming\REAPER\Effects

What could be wrong?
Paul99 is offline   Reply With Quote
Old 12-24-2018, 07:35 PM   #11
citizenkeith
Human being with feelings
 
Join Date: Jun 2014
Location: Ohio
Posts: 978
Default

Thank you! Installed and working great.
citizenkeith is offline   Reply With Quote
Old 12-25-2018, 02:54 AM   #12
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Quote:
Originally Posted by Paul99 View Post
I would love to try it, but I keep keep getting an error:
import: 'cookdsp.jskx-inc' has no @init or other code

I have both your (corrected) coded and the cookdsp.jsfx-inc in
C:\Users\<username>\AppData\Roaming\REAPER\Effects

What could be wrong?
The safest way is:

Add an FX to your track, in the Add FX window go to menu->FX->Create new JSFX->a default FX window appears. Click on edit, delete everything, insert the following code in the FX code window.
Code:
// written with JSFX and CookDSP library
// True Leslie aka Tabbal Rotary Speaker
// (c) Arthur Tabbal - dec 2018 - arthurtabbal@gmail.com

desc: Leslie Speaker Sim .. Move Slow/Fast

slider1:1.1<1,10>- Delay Time L
slider2:1.2<1,10>- Delay Time R
slider3:0<-1,1>- Feedback
slider4:1.3<0,3> Horn Slow Speed
slider5:8<4,10> Horn Fast Speed
slider6:0.9<0,3> Bass Slow Speed
slider7:7<4,10> Bass Fast Speed
slider8:5<1,10> Horn Ramp Time
slider9:5<1,10> Bass Ramp Time
slider10:0<0,1>- Dry Mix
slider11:1<0,1>Horn Wet Mix
slider12:1<0,1>Bass Wet Mix
slider13:40<0,80>- Doppler Shift
slider14:0.2<0,1>- Horn Tremolo
slider15:0.2<0,1>- Bass Tremolo
slider16:2500<0,10000>- Horn Phase Freq
slider17:1300<0,10000>- Horn Phase Amplitude
slider18:1500<0,20000>- Bass Phase Freq
slider19:1500<0,20000>- Bass Phase Amplitude
slider20:1<1,2,1> Slow / Fast
slider21:800<0,5000> Crossover Frequency

import cookdsp.jsfx-inc

@init

Speed = slider20;
HornRampTime = slider8 * 0.00002 * srate;
BassRampTime = slider9 * 0.0001 * srate;
HornRamp.delay(srate*2);
BassRamp.delay(srate*2);

(Speed == 1) ? (HornLFOfreq = slider4);
(Speed == 2) ? (HornLFOfreq = slider5);

d0.delay(srate);
d1.delay(srate);
Horn0.sine(HornLFOfreq,0);
Horn1.sine(HornLFOfreq,0.5);
HornTremolo0.sine(HornLFOfreq,0.0);
HornTremolo1.sine(HornLFOfreq,0.25);
HighPass.hip(slider21);
HornPhase0.apass(slider16,2000,0);
HornPhase1.apass(slider16,2000,0);
HornPhaseLFO0.sine(HornLFOfreq,0);
HornPhaseLFO1.sine(HornLFOfreq,0.2);

(Speed == 1) ? (BassLFOfreq = slider6);
(Speed == 2) ? (BassLFOfreq = slider7);

d2.delay(srate);
d3.delay(srate);
Bass2.sine(BassLFOfreq,0);
Bass3.sine(BassLFOfreq,0.3);
BassTremolo2.sine(BassLFOfreq,0);
BassTremolo3.sine(BassLFOfreq,0.25);
LowPass.lop(slider21);
BassPhase2.apass(slider18,2000,0);
BassPhase3.apass(slider18,2000,0);
BassPhaseLFO2.sine(BassLFOfreq,0);
BassPhaseLFO3.sine(BassLFOfreq,0.3);

@slider

HighPass.hip_set_freq(slider21);
LowPass.lop_set_freq(slider21);

Speed = slider20;
HornRampTime = slider8 * 0.00002 * srate;
BassRampTime = slider9 * 0.0001 * srate;

drymix = slider10;
hornwetmix = slider11;
basswetmix = slider12;

dopplershift = slider13 / 100000 ;
samps0 = slider1 * 0.0001 * srate;
samps1 = slider2 * 0.0001 * srate;

HornPhase0.apass_set_freq(slider16);
HornPhase1.apass_set_freq(slider16);
BassPhase2.apass_set_freq(slider18);
BassPhase3.apass_set_freq(slider18);

@sample

(Speed == 1) ? (NewHornLFOfreq = slider4);
(Speed == 2) ? (NewHornLFOfreq = slider5);

HornLFOfreq = HornRamp.delay_read(HornRampTime);

HornLFOfreq > NewHornLFOfreq ?
HornRamp.delay_write(HornLFOfreq-0.001);

HornLFOfreq < NewHornLFOfreq ?
HornRamp.delay_write(HornLFOfreq+0.001);

Horn0.sine_set_freq(HornLFOfreq);
Horn1.sine_set_freq(HornLFOfreq);
HornTremolo0.sine_set_freq(HornLFOfreq);
HornTremolo1.sine_set_freq(HornLFOfreq);
HornPhaseLFO0.sine_set_freq(HornLFOfreq);
HornPhaseLFO1.sine_set_freq(HornLFOfreq);

(Speed == 1) ? (NewBassLFOfreq = slider6);
(Speed == 2) ? (NewBassLFOfreq = slider7);

BassLFOfreq = BassRamp.delay_read(BassRampTime);

BassLFOfreq > NewBassLFOfreq ?
BassRamp.delay_write(BassLFOfreq-0.001);

BassLFOfreq < NewBassLFOfreq ?
BassRamp.delay_write(BassLFOfreq+0.001);

Bass2.sine_set_freq(BassLFOfreq);
Bass3.sine_set_freq(BassLFOfreq);
BassTremolo2.sine_set_freq(BassLFOfreq);
BassTremolo3.sine_set_freq(BassLFOfreq);
BassPhaseLFO2.sine_set_freq(BassLFOfreq);
BassPhaseLFO3.sine_set_freq(BassLFOfreq);

HornPhase0.apass_set_freq(slider16+slider17*HornPhaseLFO0.sine_do());
HornPhase1.apass_set_freq(slider16+slider17*HornPhaseLFO1.sine_do());

HornPhasedSignal0 = HornPhase0.apass_do(spl0);
HornPhasedSignal1 = HornPhase1.apass_do(spl1);

BassPhase2.apass_set_freq(slider18+slider19*BassPhaseLFO2.sine_do());
BassPhase3.apass_set_freq(slider18+slider19*BassPhaseLFO3.sine_do());

BassPhasedSignal2 = BassPhase2.apass_do(spl0);
BassPhasedSignal3 = BassPhase3.apass_do(spl1);

horn0 = HighPass.hip_do(spl0+HornPhasedSignal0) * ( 1 + slider14 * HornTremolo0.sine_do() );
horn1 = HighPass.hip_do(spl1+HornPhasedSignal1) * ( 1 + slider14 * HornTremolo1.sine_do() );

bass0 = LowPass.lop_do(spl0+BassPhasedSignal2) * ( 1 + slider15 * BassTremolo2.sine_do() );
bass1 = LowPass.lop_do(spl1+BassPhasedSignal3) * ( 1 + slider15 * BassTremolo3.sine_do() );

increment0 = dopplershift*srate*(Horn0.sine_do()+1);
increment1 = dopplershift*srate*(Horn1.sine_do()+1.3);

increment2 = dopplershift*srate*(Bass2.sine_do()+1);
increment3 = dopplershift*srate*(Bass3.sine_do()+1.1);

val0 = d0.delay_read2(samps0+increment0);
val1 = d1.delay_read2(samps1+increment1);

val2 = d2.delay_read2(samps0+increment2);
val3 = d3.delay_read2(samps1+increment3);

d0.delay_write(horn0 + val0 * slider3);
d1.delay_write(horn1 + val1 * slider3);

d2.delay_write(bass0 + val2 * slider3);
d3.delay_write(bass1 + val3 * slider3);

// sum and output
spl0 = (spl0*drymix + val0*hornwetmix + val2*basswetmix) * 0.5;
spl1 = (spl1*drymix + val1*hornwetmix + val3*basswetmix) * 0.5;
Press ctrl+s.
Eliseat is offline   Reply With Quote
Old 12-25-2018, 05:56 AM   #13
Paul99
Human being with feelings
 
Join Date: Aug 2014
Location: Netherlands
Posts: 882
Default

Thanks Eliseat, but after saving the effect I see immediately this error:
import: çookdsp.jsfx-inc' has no @init or other code

Do I have to do something more with the file cookdsp.jsfx-inc? Or is placing it in the Effect directory enough?
Paul99 is offline   Reply With Quote
Old 12-25-2018, 07:54 AM   #14
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

There is something missing. And I'm not sure why you don't have it as I don't remember if I ever installed it separately.

Download the library here: http://ajaxsoundstudio.com/cookdspdo...2017-03-13.zip

Go to Reaper menu: Options/"Open Reaper resource path ..."-> go to effects folder and unzip the downloaded library there (or unzip it elsewhere and put the cookdsp.jsfx-inc and the corresponding folder cookdsp inside the effects main folder.)

It then should work as expected.

Here the link: http://ajaxsoundstudio.com/cookdspdoc/ for some reading.
Eliseat is offline   Reply With Quote
Old 12-25-2018, 08:13 AM   #15
Paul99
Human being with feelings
 
Join Date: Aug 2014
Location: Netherlands
Posts: 882
Default


Thanks for your great help Elseat!
Problem: I had the wrong cookdsk file. I downloaded it from github as a one file only. The link you posted had one file and a directory.
Now it works. Thanks!
Paul99 is offline   Reply With Quote
Old 12-26-2018, 08:47 AM   #16
arthurtabbal
Human being with feelings
 
Join Date: Mar 2018
Posts: 10
Default

Hey, thanks for all the replies and compliments ! Now i've been trying to replicate the Neo Ventilator effect with this code, but man that's tough ! I guess those guys did a pretty good job with that nice *expensive* pedal.. Here in Brazil there's no way I can get one of those.. I have a Boss RT 20, but this code I wrote sounds sadly better, since I don't care about speaker frequency response. Can't get rid of those silly mids on the Boss, you know..

I will post the Yamaha simulation here, soon! Some questions..

1) How do I ctrl+v this code the way Eliseat did? So i don't get formatting errors.

2) Is there an easy way to use JS effects live, without using a laptop, interface and all that garbage? I've been researching, and I found some programmable pedals Arduino style, which seems like a nice option.... anyone have a better idea?
arthurtabbal is offline   Reply With Quote
Old 12-26-2018, 08:50 AM   #17
arthurtabbal
Human being with feelings
 
Join Date: Mar 2018
Posts: 10
Default

Oh... one thing missing in this code is Midi control over the fast/speed setting.. kind of useless for recording the way it is now.. If i implement that, i'll post it here.. if anyone could do that to, I would be glad
arthurtabbal is offline   Reply With Quote
Old 12-26-2018, 12:01 PM   #18
citizenkeith
Human being with feelings
 
Join Date: Jun 2014
Location: Ohio
Posts: 978
Default

Quote:
Originally Posted by arthurtabbal View Post
How do I ctrl+v this code the way Eliseat did? So i don't get formatting errors.
You just need to use the CODE tag in bbCode:
https://forum.cockos.com/misc.php?do=bbcode
citizenkeith is offline   Reply With Quote
Old 12-26-2018, 01:11 PM   #19
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

arthurtabbal, many thanks for your plugin. I really like it. Not only for guitars or organs it also sound cool with cold electronic sounds.

So I'm looking forward for whats coming up.

And as citizenkeith mentioned, you can use bbcode for posting code without formatting errors.
Eliseat is offline   Reply With Quote
Old 01-08-2019, 05:59 AM   #20
arthurtabbal
Human being with feelings
 
Join Date: Mar 2018
Posts: 10
Default New Version and Yamaha Simulation

Edited: moved to first post

Last edited by arthurtabbal; 01-08-2019 at 12:55 PM. Reason: update in the first post
arthurtabbal is offline   Reply With Quote
Old 01-08-2019, 06:00 AM   #21
arthurtabbal
Human being with feelings
 
Join Date: Mar 2018
Posts: 10
Default

Just put the .txt file in your Reaper > Effects directory and you're ready to go
arthurtabbal is offline   Reply With Quote
Old 01-08-2019, 10:12 AM   #22
vdubreeze
Human being with feelings
 
vdubreeze's Avatar
 
Join Date: Jul 2011
Location: Brooklyn
Posts: 2,613
Default

Quote:
Originally Posted by arthurtabbal View Post
Hi there, folks ! Well, i've updated the "True Leslie" plugin.
Awesome Thank you, Arthur!

One thing is that you should probably put new versions in the first post (updated), the way theme makers do it, so someone seeing it for the first time will just get the most recent version.
__________________
The reason rain dances work is because they don't stop dancing until it rains.
vdubreeze is offline   Reply With Quote
Old 01-08-2019, 12:50 PM   #23
arthurtabbal
Human being with feelings
 
Join Date: Mar 2018
Posts: 10
Default

thanks for the tip, vdubreeze!! you mean editing the first post in this thread, right?
arthurtabbal is offline   Reply With Quote
Old 01-08-2019, 12:55 PM   #24
vdubreeze
Human being with feelings
 
vdubreeze's Avatar
 
Join Date: Jul 2011
Location: Brooklyn
Posts: 2,613
Default

Quote:
Originally Posted by arthurtabbal View Post
thanks for the tip, vdubreeze!! you mean editing the first post in this thread, right?
Yup
__________________
The reason rain dances work is because they don't stop dancing until it rains.
vdubreeze is offline   Reply With Quote
Old 01-10-2019, 07:46 AM   #25
arthurtabbal
Human being with feelings
 
Join Date: Mar 2018
Posts: 10
Default

People, I noticed some glitches and clicks now and then using these plugins in my setup, which is kind of messed up already.. so any feedback from you would be amazingly wellcome and aprecciated. This includes audio developers who can give me a clue of what to do. Sonically i'm very satisfied with the result, but it must funcion proplerly in order to be used for recording professionally, as you all sure know

Thanks in advance !
arthurtabbal is offline   Reply With Quote
Old 01-10-2019, 03:02 PM   #26
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Never noticed anything. I used it for testing purposes but didn't do lots of changes. It just kept smooth sounding without crackles or something disturbing.
¯\_(ツ)_/¯
Eliseat is offline   Reply With Quote
Old 01-10-2019, 05:57 PM   #27
vdubreeze
Human being with feelings
 
vdubreeze's Avatar
 
Join Date: Jul 2011
Location: Brooklyn
Posts: 2,613
Default

The ramp time was too abrupt for my taste so I fiddled with the ramp adjustment for horn and bass. Don't think they're having any effect : )
__________________
The reason rain dances work is because they don't stop dancing until it rains.
vdubreeze is offline   Reply With Quote
Old 01-10-2019, 09:03 PM   #28
arthurtabbal
Human being with feelings
 
Join Date: Mar 2018
Posts: 10
Default

That's great! Thanks, Eliseat!

vdubreeze, fixed it in the first post .txt ! More control over the ramp now, and it's longer overall
arthurtabbal 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 12:47 AM.


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