Old 12-04-2008, 10:27 AM   #1
markheath
Human being with feelings
 
Join Date: Oct 2006
Location: Southampton, England
Posts: 191
Default Trance Gate Effect

Hi, I have made a very basic JS trance gate effect. You can separately control the pattern for left and right, adjust the pulse width, and create different feels by adjusting the pattern steps per beat. There is a rudimentary graphical display to help demonstrate what the sliders are doing.

It currently re-triggers itself on every beat. I am trying to decide whether it should just do this on beat 0 instead. Any thoughts? (BTW Justin, did you realise that if you have the word "trigger" in a comment, it makes the trigger buttons appear even if you are not using the trigger variable?)

Updated:



Download v0.4 from REAPER stash.

Mark

Last edited by markheath; 05-15-2011 at 01:23 PM. Reason: fixed wrong link
markheath is offline   Reply With Quote
Old 12-05-2008, 12:39 AM   #2
markheath
Human being with feelings
 
Join Date: Oct 2006
Location: Southampton, England
Posts: 191
Default

I've made a slight update. There is an additional pattern length slider and the pattern slider bit order is reversed which should make it a bit more intuitive. I've also slightly adjusted the range of the sliders.

I have left it retriggering on every beat. I had originally assumed that beat_position went back to 0.0 at the start of every measure, but it constantly goes up, leaving no way that I know of to detect the start of a new measure. (that will teach me not to test my effect with a single measure looping!).

The download location is the same as before.
markheath is offline   Reply With Quote
Old 12-05-2008, 01:25 PM   #3
zappadave
Human being with feelings
 
zappadave's Avatar
 
Join Date: Jan 2008
Posts: 1,257
Default

Thanks Mark, this works like a charm.
Works better at slower speeds, nice and easy to adjust.
I'm at Bannister Park by the way.
__________________
Music is the best
เพลง ที่ดีที่สุดคือ
zappadave is offline   Reply With Quote
Old 12-07-2008, 10:41 AM   #4
RunBeerRun
Human being with feelings
 
Join Date: Jan 2007
Posts: 562
Default

Looks pretty cool, I'll check it out fully soon.
__________________
Free Synthedit/Synthmaker plugins that I made: runbeerrun dot blogspot dot com
RunBeerRun is offline   Reply With Quote
Old 12-07-2008, 11:49 AM   #5
ArdeII
Human being with feelings
 
ArdeII's Avatar
 
Join Date: Sep 2007
Location: Finland
Posts: 240
Default

Thanks Mark. It is very very cool.
It would be nice if one could create patterns with mouse by clicking the pattern view.
__________________
MIDI performer plugin
Kirnu - Cream
ArdeII is offline   Reply With Quote
Old 12-08-2008, 04:31 AM   #6
markheath
Human being with feelings
 
Join Date: Oct 2006
Location: Southampton, England
Posts: 191
Default

Quote:
Originally Posted by zappadave View Post
Thanks Mark, this works like a charm.
Works better at slower speeds, nice and easy to adjust.
I'm at Bannister Park by the way.
thanks zappadave, I'm in Bitterne. Yes, I have found the pulse width is only really worth using with pattern lengths of 4.

Quote:
Originally Posted by ArdeII
Thanks Mark. It is very very cool.
It would be nice if one could create patterns with mouse by clicking the pattern view.
Yes, I might see if I can add that when I get some free time. It shouldn't be too hard.
markheath is offline   Reply With Quote
Old 12-09-2008, 05:47 AM   #7
markheath
Human being with feelings
 
Join Date: Oct 2006
Location: Southampton, England
Posts: 191
Default

I've added mouse handling now, so it is much easier to set patterns. Download link is the same (see first post)

Mark
markheath is offline   Reply With Quote
Old 12-09-2008, 07:48 AM   #8
matey
Human being with feelings
 
matey's Avatar
 
Join Date: Apr 2008
Location: Civitavecchia (Italy)
Posts: 574
Default

thanx so much Markheat, great effort..
matey is offline   Reply With Quote
Old 12-11-2008, 07:59 PM   #9
RunBeerRun
Human being with feelings
 
Join Date: Jan 2007
Posts: 562
Default

The mouse draw stuff is nice, I also like the sliders for a more randomized result.
__________________
Free Synthedit/Synthmaker plugins that I made: runbeerrun dot blogspot dot com
RunBeerRun is offline   Reply With Quote
Old 12-11-2008, 08:47 PM   #10
drew
Mobile
 
drew's Avatar
 
Join Date: Jan 2006
Location: London & São Paulo. Hardcore commercial REAPERite
Posts: 1,669
Default

Superb contribution!

Respect from M27 near Junction 6 (jus' kiddin')

Nice work sir
__________________
Proudly using REAPER exclusively for...
* Media and event music composition & production, sound design + auto-processing at Qsonics.com
* Broadcast branding, promos, education & training and narration voice-overs at DrewWhite.com
drew is offline   Reply With Quote
Old 12-11-2008, 08:53 PM   #11
pipelineaudio
Mortal
 
pipelineaudio's Avatar
 
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
Default

Thank you thank you thank you thank you~!!!!!!!!!!!!!!!!!!!!

This song would have taken me HOURS less work with your plugin...

https://stash.reaper.fm/oldsb/92133/K...ggest-Fear.mp3

can you time travel back a bit so I can get the hours back?
pipelineaudio is offline   Reply With Quote
Old 12-12-2008, 12:13 AM   #12
pipelineaudio
Mortal
 
pipelineaudio's Avatar
 
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
Default

Could we get a time multiplier/divider knob defaulted at x1 that can be used to set the delay time in larger or smaller divisions of the tempo?

Also a wet/dry knob?

Thanks a billion either way! this is awesome
pipelineaudio is offline   Reply With Quote
Old 12-12-2008, 01:58 AM   #13
sceyefeye
Human being with feelings
 
sceyefeye's Avatar
 
Join Date: May 2007
Location: Cape Town
Posts: 327
Default

thanks for this Mark

just downloaded to try it out. I am sure this is going to be really useful
sceyefeye is offline   Reply With Quote
Old 12-17-2008, 12:32 AM   #14
bfloyd6969
Human being with feelings
 
bfloyd6969's Avatar
 
Join Date: Jun 2008
Location: Ohio
Posts: 861
Default

Please help, where do I download this into Reaper? Thanks.
bfloyd6969 is offline   Reply With Quote
Old 12-17-2008, 12:53 AM   #15
markheath
Human being with feelings
 
Join Date: Oct 2006
Location: Southampton, England
Posts: 191
Default

JS Effects live in the Effects folder under your REAPER installation. For example:
C:\Program Files\REAPER\Effects

Create a subfolder under Effects, (I called mine MarkHeath) and copy the downloaded text file into it. Then get rid of the .txt extension. Then reload REAPER and it should be available to select in the effect dialog.

Mark
markheath is offline   Reply With Quote
Old 12-17-2008, 12:55 AM   #16
markheath
Human being with feelings
 
Join Date: Oct 2006
Location: Southampton, England
Posts: 191
Default

Quote:
Originally Posted by pipelineaudio View Post
Could we get a time multiplier/divider knob defaulted at x1 that can be used to set the delay time in larger or smaller divisions of the tempo?

Also a wet/dry knob?

Thanks a billion either way! this is awesome
Glad you found it useful. The wet/dry knob is a good idea. The time multiplier might be a bit more tricky because of the way resync is done. I suppose I could do a version that was free-running after it had synced for the first time, which would probably be fine for 99% of projects which don't have tempo changes in them.

Next time I'm in the mood for editing it, I'll see if I can put your ideas in.

Mark
markheath is offline   Reply With Quote
Old 12-17-2008, 01:09 AM   #17
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

THIS IS AWESOME !!!!

thank you !!!!

can we have a longer graphical display showing more beats?

this is perfect@@@@@!!!
Jae.Thomas is offline   Reply With Quote
Old 12-17-2008, 03:14 AM   #18
liteon
Human being with feelings
 
liteon's Avatar
 
Join Date: Apr 2008
Posts: 510
Default

Good stuff sir!
liteon is offline   Reply With Quote
Old 05-15-2011, 10:38 AM   #19
markheath
Human being with feelings
 
Join Date: Oct 2006
Location: Southampton, England
Posts: 191
Default

OK, so I've finally got round to updating this. You can now have many more steps (up to 64). Beat markers make it a little more obvious what is going on. There is also a wet/dry slider as requested by pipelineaudio (two years ago - sorry!). It uses the @serialize feature to save state. I haven't currently worked out how get it to flag that non-slider state needs to be changed so you won't see [modified] in the REAPER title bar after changing the pattern. Fortunately, if you click save the state is serialized regardless.



Download v0.4 from REAPER stash.
__________________
YouTube | Blog

Last edited by markheath; 05-15-2011 at 01:23 PM. Reason: wrong link
markheath is offline   Reply With Quote
Old 05-15-2011, 10:41 AM   #20
beatbybit
Human being with feelings
 
beatbybit's Avatar
 
Join Date: Jul 2006
Location: Hungary
Posts: 3,129
Default

do you know LOSER's EQ Ducker?

that can be used as a 'tranceGate', (GATE mode) it needs a MIDI item to trigger.
so it can have swing, diff note/gate lenghts, velocity/volume.

patterns/MIDI items can be multitaked, so switching or modify the gate pattern is easy.
__________________
panda in the desert
beatbybit is offline   Reply With Quote
Old 05-15-2011, 11:30 AM   #21
markheath
Human being with feelings
 
Join Date: Oct 2006
Location: Southampton, England
Posts: 191
Default

Quote:
Originally Posted by beatbybit View Post
do you know LOSER's EQ Ducker?
Looks a very impressive effect. Mine is less ambitious, and just lets you define a simple left and right pattern (slice volumes and swing may come in a later version if I ever have need of them). You can automate the pulse width though, which can give some nice results and would be a little harder to do with midi clips controlling the gate.
__________________
YouTube | Blog
markheath is offline   Reply With Quote
Old 05-15-2011, 12:12 PM   #22
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

I missed this one, going to give it a try.

Quote:
I have left it retriggering on every beat. I had originally assumed that beat_position went back to 0.0 at the start of every measure, but it constantly goes up, leaving no way that I know of to detect the start of a new measure.
Did you see that they added vars ts_num and ts_denom so you can find the time signature? I don't think they've been added to the documentation. To check for the start of a measure just do this...

Code:
beat_position % ts_num == 0 ?
(
    // retrig!
);
edit: btw, the download link is wrong. It should be https://stash.reaper.fm/v/8619/trance_0_4.txt
IXix is offline   Reply With Quote
Old 05-15-2011, 12:27 PM   #23
markheath
Human being with feelings
 
Join Date: Oct 2006
Location: Southampton, England
Posts: 191
Default

Quote:
Originally Posted by IXix View Post
Did you see that they added vars ts_num and ts_denom so you can find the time signature? I don't think they've been added to the documentation. To check for the start of a measure just do this...
No, didn't know about that one, although I now retrigger after the specified number of beats have elapsed, so just set pattern beats to ts_num yourself, or to a different value if you want interesting changes of rhythmic structure through your song.

Quote:
edit: btw, the download link is wrong. It should be https://stash.reaper.fm/v/8619/trance_0_4.txt
Yeah that's the direct link. But would be nice for more people to vote and comment on stuff on the reaper stash. Its quite hard to work out what is worth downloading at the moment.
__________________
YouTube | Blog
markheath is offline   Reply With Quote
Old 05-15-2011, 01:20 PM   #24
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Quote:
Originally Posted by markheath View Post
No, didn't know about that one, although I now retrigger after the specified number of beats have elapsed, so just set pattern beats to ts_num yourself, or to a different value if you want interesting changes of rhythmic structure through your song.
Yeah that's probably better anyway.

Quote:
Yeah that's the direct link. But would be nice for more people to vote and comment on stuff on the reaper stash. Its quite hard to work out what is worth downloading at the moment.
No, the link you posted above (https://stash.reaper.fm/manage_file/8619/trance_0_4.txt) is to manage the file, so when I click it I get taken to the stash index page because I don't have permissions to manage the file. The link I posted takes you to the file's page where you can leave comments and stuff.

Edit: No, I'm wrong. You can't leave comments on that page.

Edit again: Oh no, I'm wrong again. You have to log in to leave a comment
IXix is offline   Reply With Quote
Old 05-15-2011, 01:23 PM   #25
markheath
Human being with feelings
 
Join Date: Oct 2006
Location: Southampton, England
Posts: 191
Default

Quote:
Originally Posted by IXix View Post
Yeah that's probably better anyway.


No, the link you posted above (https://stash.reaper.fm/manage_file/8619/trance_0_4.txt) is to manage the file, so when I click it I get taken to the stash index page because I don't have permissions to manage the file. The link I posted takes you to the file's page where you can leave comments and stuff.

Edit: No, I'm wrong. You can't leave comments on that page.
OK I see now, I should have linked to https://stash.reaper.fm/v/8619/trance_0_4.txt. I'll update my posts. thanks
__________________
YouTube | Blog
markheath is offline   Reply With Quote
Old 05-15-2011, 01:24 PM   #26
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Cool effect btw
IXix is offline   Reply With Quote
Old 05-15-2011, 01:24 PM   #27
SiKo
Human being with feelings
 
SiKo's Avatar
 
Join Date: Aug 2008
Location: dusty hot place
Posts: 1,492
Default

Very nice basic trance gate.

About finding it a bit late: I guess some threads need to be resurrected once in a while.
__________________
... yOu aNd mE are ...
SiKo is offline   Reply With Quote
Old 11-30-2013, 02:07 AM   #28
adeser
Human being with feelings
 
Join Date: Feb 2008
Location: Romania
Posts: 9
Default

I know this thread is old. I just came across this plugin looking for a fast way to do the "sidechain" effect. This plug works but I don't want to gate all the signal, so I found useful the dry/wet slider.
The problem is that I think there is a bug that causes the dry audio is only on the left channel.
How can we fix that ?
Right now I'm trying to troubleshoot it myself editing the code.
adeser is offline   Reply With Quote
Old 11-30-2013, 02:23 AM   #29
witti
Human being with feelings
 
witti's Avatar
 
Join Date: May 2012
Posts: 1,216
Default

This might work:
(also added ext_noinit = 1; as i thought it was needed)

Code:
slider1:4<1,8,1>pattern steps per beat
slider2:0.9<0,1,0.01>pulse width
slider3:2<1,8,1>pattern beats
slider4:100<0,100,1>wet/dry mix

@init
ext_noinit = 1;
secondspersample = 1/srate;
// buffer locations
pattern_left = 0;
pattern_right = 128;
freembuf(257);
(loaded == 0) ?
(
// set up the default pattern
pattern_left[0] = 1;
pattern_left[2] = 1;
pattern_left[3] = 1;
pattern_left[6] = 1;
pattern_left[8] = 1;
pattern_left[10] = 1;
pattern_left[12] = 1;
pattern_left[14] = 1;   
pattern_right[0] = 1;
pattern_right[2] = 1;
pattern_right[3] = 1;
pattern_right[5] = 1;
pattern_right[8] = 1;
pattern_right[10] = 1;
pattern_right[13] = 1;
pattern_right[15] = 1;
);

@slider
pattern_steps_per_beat=slider1;
pulsewidth=slider2;
slew_rate = 1; // in ms, used to be a slider
delta = secondspersample / (slew_rate / 1000);
pattern_beats = slider3;
pattern_length = pattern_beats * pattern_steps_per_beat;
mix = slider4/100;

@block
samplesperbeat = srate/(tempo/60);
samplesperslice = samplesperbeat / pattern_steps_per_beat;

@sample
inL=spl0;
inR=spl1;

current_slice = (beat_position * pattern_steps_per_beat)|0;
current_slice = current_slice % pattern_length;
(current_slice != last_slice) ? current_pos = 0; // retrigger
last_slice = current_slice;
slice_vol_left = pattern_left[current_slice];
slice_vol_right = pattern_right[current_slice];

// truncate the pulses if pulsewidth < 0
(slice_vol_left) ? (current_pos % samplesperslice) > (samplesperslice * pulsewidth) ? slice_vol_left = 0;
(slice_vol_right) ? (current_pos % samplesperslice) > (samplesperslice * pulsewidth) ? slice_vol_right = 0;

(multiplier_left < slice_vol_left) ? multiplier_left = min(1,multiplier_left+delta):
(multiplier_left > slice_vol_left) ? multiplier_left = max(0,multiplier_left-delta);

(multiplier_right < slice_vol_right) ? multiplier_right = min(1,multiplier_right+delta):
(multiplier_right > slice_vol_right) ? multiplier_right = max(0,multiplier_right-delta);

spl0 = inL * multiplier_left * mix;
spl1 = inR * multiplier_right * mix;
spl0 += inL * (1-mix);
spl1 += inR * (1-mix);

current_pos += 1;

@serialize
// dump out entire left and right volume arrays
amt=file_mem(handle,pattern_left,128);
amt=file_mem(handle,pattern_right,128);
((file_avail(0) >= 0) & (amt > 0)) ?
(
loaded = 1;
);

@gfx 320 60
gslice = 0;
gspace = 10;
gstartx = gspace;
gheight = 15;
gwidthmax = (120 * pattern_beats) / pattern_length; //30;
gleft_y = gspace + gheight;
gcurrent_y = gspace * 2 + gleft_y;
gright_y = gspace + gcurrent_y + gheight;

// has the left mouse button been pressed or released?
(mouse_cap != leftbutton_down) ? 
(
leftbutton_down = (mouse_cap == 1) ? 1 : 0;
(leftbutton_down) ? 
(
(mouse_x >= gstartx && mouse_x < gstartx + pattern_length * gwidthmax) ?
(
mouse_slice = ((mouse_x - gstartx) / gwidthmax)|0;
(mouse_y >= gleft_y - gheight && mouse_y < gleft_y) ? 
(
pattern_left[mouse_slice] = pattern_left[mouse_slice] ? 0 : 1;
// slider5 += 1; sliderchange(slider5); // attempt to prompt js that state needs to be saved
);
(mouse_y >= gright_y - gheight && mouse_y < gright_y) ? 
(
pattern_right[mouse_slice] = pattern_right[mouse_slice] ? 0 : 1;
// slider5 += 1; sliderchange(slider5); // attempt to prompt js that state needs to be saved
);
);
);
);

// draw the pattern
gfx_a = 1;
gslice = 0;
loop (pattern_length,
gtestbit = pow(2,7-gslice)|0;
gslice_vol_left = pattern_left[gslice];
gslice_vol_right = pattern_right[gslice];
gwidth = gwidthmax * pulsewidth;

gfx_r = 0.0; // 1
gfx_b = 0.0; // 0.33
gfx_g = 0.33; // 1

gfx_x = gstartX + gslice * gwidthmax;
gfx_y = gleft_y;
gslice_vol_left ? gfx_rectto(gfx_x + gwidth, gfx_y - gheight) : gfx_lineto(gfx_x + gwidth, gfx_y, 0);

gfx_x = gstartX + gslice * gwidthmax;
gfx_y = gright_y;
gslice_vol_right ? gfx_rectto(gfx_x + gwidth, gfx_y - gheight) : gfx_lineto(gfx_x + gwidth, gfx_y, 0);

// draw the current slice marker
(current_slice == gslice) ? 
(
gfx_r = 0.33;
gfx_b = 1;
gfx_g = 0.33;

gfx_x = gstartX + gslice * gwidthmax;
gfx_y = gcurrent_y;
gfx_rectto(gfx_x + gwidth, gfx_y - gspace);
);

gslice +=1;
);

gslice = 0;
loop (pattern_beats + 1,
// draw beat markers
gfx_r = 0.5;
gfx_b = 0.5;
gfx_g = 0.5;

gfx_x = gstartX - 2 + gslice * gwidthmax * pattern_steps_per_beat;
gfx_y = gleft_y + 5;
gfx_lineto(gfx_x, gright_y - gheight - 5, 0);

gslice += 1;
);
witti 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:14 AM.


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