Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
GFX names
  • Loading branch information
X-Raym committed Apr 19, 2018
1 parent 557c033 commit bbc1d8a
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 49 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Create take pitch envelope (normal distr. random points)
// NOTE: replaces all existing take pitch envelopes in selected items (active takes)
// EEL script by spk77 23.11.2014
// Version: 0.2014.11.23
// Version: 0.2018.04.19

@import ../../Functions/spk_slider_class.eel

// init
function init()
(
gfx_init("",420,200);
gfx_init("Create randomized take pitch envelope",420,200);
gfx_setfont(1, "Arial", 14);
lmb_click_outside_window = 1;
buf = 10000;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Pan active takes randomly (normal distr.) -> create take pan envelopes
// NOTE: replaces all existing take pan envelopes in selected items (active takes)
// EEL script by spk77 23.11.2014
// Version: 0.2014.11.23
// Version: 0.2018.04.19

@import ../../Functions/spk_slider_class.eel

Expand Down Expand Up @@ -247,7 +247,7 @@ function run() local (s_w, s_h, hue, sat, lum, v)
// init
function init()
(
gfx_init("",420,200);
gfx_init("Pan active takes randomly - One Seed",420,200);
gfx_setfont(1, "Arial", 14);
lmb_click_outside_window = 1;
buf = 10000;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Pan active takes randomly (normal distr.) -> create take pan envelopes
// NOTE: replaces all existing take pan envelopes in selected items (active takes)
// EEL script by spk77 23.11.2014
// Version: 0.2014.11.23
// Version: 0.2018.04.19

@import ../../Functions/spk_slider_class.eel

// init
function init()
(
gfx_init("",420,200);
gfx_init("Pan active takes randomly",420,200);
gfx_setfont(1, "Arial", 14);
lmb_click_outside_window = 1;
buf = 10000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// Source URI : https://github.com/X-Raym/REAPER-EEL-Scripts
// Licence : GPL v3
// Release Date : 2014-12-17
// Version : 1.0.2
// Version Date : 2016-06-05
// Version : 1.0.3
// Version Date : 2018-04-19

// Based on : Create take pitch envelope (random points - with GUI) by spk77

Expand All @@ -15,12 +15,12 @@
// init
function init()
(
gfx_init("",440,200);
gfx_init("Nudge active takes volume randomly",440,200);
gfx_setfont(1, "Arial", 14);
lmb_click_outside_window = 1;
buf = 10000;
gfx_measurestr("Randomize", s_w, s_h);

refresh_on_slider_change = 1;
m.val = 0; // mean slider initial value
s.val = 10; // standard_dev initial value
Expand Down Expand Up @@ -49,7 +49,7 @@ function rand_vol(mean, standard_dev) local (i)

R < -1 ? R += abs(R - mean);
R > 1 ? R -= (R - mean);

buf[i] = R*12;
buflen += 1;
);
Expand Down Expand Up @@ -95,11 +95,11 @@ function set_vol() local (i)
NewVol=OldVolDB+NudgeAmount;

NewVol >= 24 ? (
NewVol = 24
NewVol = 24
) : (
NewVol = NewVol;
);

NewVolGain=exp(NewVol*0.115129254);

SetMediaItemTakeInfo_Value(take, "D_VOL", NewVolGain);
Expand All @@ -112,7 +112,7 @@ function set_vol() local (i)
);

function randomize_btn(x, y, s_w, s_h, r, mean, standard_dev)
(
(
gfx_x = x; gfx_y = y;
set_default_colors();
mouse_x >= x && mouse_x <= x + s_w && mouse_y >= y && mouse_y <= y + gfx_texth/* && lmb_click_outside_window == 0/* && max_point_drag_started == 0 && min_point_drag_started* == 0*/ ? (
Expand All @@ -121,7 +121,7 @@ function randomize_btn(x, y, s_w, s_h, r, mean, standard_dev)
gfx_g += 0.1;
gfx_b += 0.1;
mouse_cap == 1 && lmb_down == 0 ? (

lmb_down = 1;
rand_vol(mean, standard_dev);
);
Expand All @@ -130,7 +130,7 @@ function randomize_btn(x, y, s_w, s_h, r, mean, standard_dev)
);

function apply_btn(x, y, s_w, s_h, r)
(
(
gfx_x = x; gfx_y = y;
set_default_colors();
mouse_x >= x && mouse_x <= x + s_w && mouse_y >= y && mouse_y <= y + gfx_texth/* && lmb_click_outside_window == 0/* && max_point_drag_started == 0 && min_point_drag_started* == 0*/ ? (
Expand All @@ -139,7 +139,7 @@ function apply_btn(x, y, s_w, s_h, r)
gfx_g += 0.1;
gfx_b += 0.1;
mouse_cap == 1 && lmb_down == 0 ? (

lmb_down = 1;
set_vol();
);
Expand All @@ -158,10 +158,10 @@ function run() local (s_w, s_h, hue, sat, lum, v)
//draw_end_y = gfx_h - 80;
gfx_x = 20;
gfx_y = 20;

//center_x = floor(draw_start_x + (draw_end_x - draw_start_x) / 2 + 0.5);
//center_y = floor(draw_start_y + (draw_end_y - draw_start_y) / 2 + 0.5);

//gfx_a = 0.4;
//gfx_line(center_x, 20, center_x, gfx_h - 20);

Expand All @@ -172,36 +172,36 @@ function run() local (s_w, s_h, hue, sat, lum, v)
) : mouse_cap == 0 ? (
lmb_click_outside_window = 0;
);

mouse_cap == 0 ? (
max_point_drag_started = 0; min_point_drag_started = 0; lmb_down = 0;
);


mean = (m.slider(20, 20, 6, m.val, -12, 12, gfx_w - 30, 0));
standard_dev = s.slider(20, 20+30, 6, s.val, 0, 40, gfx_w - 30, 1);

randomize_btn(10, 150, 50, s_h, 6, mean, standard_dev);
apply_btn(10, 170, 50, s_h, 6);

refresh_on_slider_change && (mean != last_mean || standard_dev != last_standard_dev) ? rand_vol(mean, standard_dev);

mouse_cap == 5 && last_slider_id == 0 ? ( // ctrl+lmb to reset to center
m.val = 0;
//rand_vol(mean, standard_dev) // update the preview window
);

char = gfx_getchar();
// ctrl+lmb to Undo

char == 114 ? ( // "r" pressed -> run function "rand_vol"
rand_vol(mean, standard_dev);
);

char == 26 ? (
Main_OnCommand(40029, 0); // undo
);

// Esc to exit
char == 27 ? (
undo_block == 1 ? (
Expand All @@ -212,7 +212,7 @@ function run() local (s_w, s_h, hue, sat, lum, v)
char >= 0 ? (
defer("run();");
);

i = 0;
gfx_a = 1;
loop(buflen,
Expand All @@ -231,4 +231,4 @@ function run() local (s_w, s_h, hue, sat, lum, v)
);

init();
run();
run();
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Create take pitch envelope (normal distr. random points)
// NOTE: replaces all existing take pitch envelopes in selected items (active takes)
// EEL script by spk77 23.11.2014
// Version: 0.2014.11.23
// Version: 0.2018.19.04

// mod from X-Raym_Create take pitch envelope (random points - with GUI)
// 2015-05-16
Expand All @@ -11,12 +11,12 @@
// init
function init()
(
gfx_init("",420,200);
gfx_init("Randomize take pitch",420,200);
gfx_setfont(1, "Arial", 14);
lmb_click_outside_window = 1;
buf = 10000;
gfx_measurestr("Randomize", s_w, s_h);

refresh_on_slider_change = 1;
m.val = 0; // mean slider initial value
s.val = 10; // standard_dev initial value
Expand Down Expand Up @@ -73,7 +73,7 @@ function set_pan() local (i)
);

function randomize_btn(x, y, s_w, s_h, r, mean, standard_dev)
(
(
gfx_x = x; gfx_y = y;
set_default_colors();
mouse_x >= x && mouse_x <= x + s_w && mouse_y >= y && mouse_y <= y + gfx_texth/* && lmb_click_outside_window == 0/* && max_point_drag_started == 0 && min_point_drag_started* == 0*/ ? (
Expand All @@ -82,7 +82,7 @@ function randomize_btn(x, y, s_w, s_h, r, mean, standard_dev)
gfx_g += 0.1;
gfx_b += 0.1;
mouse_cap == 1 && lmb_down == 0 ? (

lmb_down = 1;
rand_pan(mean, standard_dev);
);
Expand All @@ -91,7 +91,7 @@ function randomize_btn(x, y, s_w, s_h, r, mean, standard_dev)
);

function apply_btn(x, y, s_w, s_h, r)
(
(
gfx_x = x; gfx_y = y;
set_default_colors();
mouse_x >= x && mouse_x <= x + s_w && mouse_y >= y && mouse_y <= y + gfx_texth/* && lmb_click_outside_window == 0/* && max_point_drag_started == 0 && min_point_drag_started* == 0*/ ? (
Expand All @@ -100,7 +100,7 @@ function apply_btn(x, y, s_w, s_h, r)
gfx_g += 0.1;
gfx_b += 0.1;
mouse_cap == 1 && lmb_down == 0 ? (

lmb_down = 1;
set_pan();
);
Expand All @@ -120,10 +120,10 @@ function run() local (s_w, s_h, hue, sat, lum, v)
//draw_end_y = gfx_h - 80;
gfx_x = 20;
gfx_y = 20;

//center_x = floor(draw_start_x + (draw_end_x - draw_start_x) / 2 + 0.5);
//center_y = floor(draw_start_y + (draw_end_y - draw_start_y) / 2 + 0.5);

//gfx_a = 0.4;
//gfx_line(center_x, 20, center_x, gfx_h - 20);

Expand All @@ -134,36 +134,36 @@ function run() local (s_w, s_h, hue, sat, lum, v)
) : mouse_cap == 0 ? (
lmb_click_outside_window = 0;
);

mouse_cap == 0 ? (
max_point_drag_started = 0; min_point_drag_started = 0; lmb_down = 0;
);


mean = (m.slider(20, 20, 6, m.val, -12, 12, gfx_w - 30, 0));
standard_dev = s.slider(20, 20+30, 6, s.val, 0, 40, gfx_w - 30, 1);

randomize_btn(10, 150, 50, s_h, 6, mean, standard_dev);
apply_btn(10, 170, 50, s_h, 6);

refresh_on_slider_change && (mean != last_mean || standard_dev != last_standard_dev) ? rand_pan(mean, standard_dev);

mouse_cap == 5 && last_slider_id == 0 ? ( // ctrl+lmb to reset to center
m.val = 0;
//rand_pan(mean, standard_dev) // update the preview window
);

char = gfx_getchar();
// ctrl+lmb to Undo

char == 114 ? ( // "r" pressed -> run function "rand_pan"
rand_pan(mean, standard_dev);
);

char == 26 ? (
Main_OnCommand(40029, 0); // undo
);

// Esc to exit
char == 27 ? (
undo_block == 1 ? (
Expand All @@ -174,7 +174,7 @@ function run() local (s_w, s_h, hue, sat, lum, v)
char >= 0 ? (
defer("run();");
);

i = 0;
gfx_a = 1;
loop(buflen,
Expand Down

0 comments on commit bbc1d8a

Please sign in to comment.