Old 04-27-2014, 02:45 PM   #521
mehmethan
Human being with feelings
 
mehmethan's Avatar
 
Join Date: Jun 2011
Posts: 610
Default

Spk77 thanks for your help You spent your time for these actions. I hope one day I can do a favour for you.These actions are really important in my workflow I will try them when I get back to studio
mehmethan is offline   Reply With Quote
Old 04-27-2014, 03:29 PM   #522
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

when is extstate removed? when project is closed? or is extstate saved within the reaper project?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 04-27-2014, 03:30 PM   #523
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Quote:
Originally Posted by Viente View Post
Is it possible with Reascript to set envelope point to minimum/maximum value?
anyone?
Viente is offline   Reply With Quote
Old 04-28-2014, 03:00 AM   #524
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by mehmethan View Post
Spk77 thanks for your help You spent your time for these actions. I hope one day I can do a favour for you.These actions are really important in my workflow I will try them when I get back to studio
You are welcome I edited the "Copy items and store positions.eel" - please copy it again. There was a "rounding error" - now it should be accurate. (20 digits after decimal point for item position)
spk77 is offline   Reply With Quote
Old 04-28-2014, 07:18 AM   #525
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
Default

Hey spk77, hope you don't mind me digging up an older post from you.
I wondered what happened to this:

http://forum.cockos.com/showpost.php...20&postcount=3

Since I saw it the first time I thought this could be quite useful and I'd love checking it out.

Did you work further on it or any plans to do so ?
nofish is offline   Reply With Quote
Old 04-28-2014, 07:42 AM   #526
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by nofish View Post
Hey spk77, hope you don't mind me digging up an older post from you.
I wondered what happened to this:

http://forum.cockos.com/showpost.php...20&postcount=3

Since I saw it the first time I thought this could be quite useful and I'd love checking it out.

Did you work further on it or any plans to do so ?


Hi,
Can't get values from those boxes anymore - they were separate controls (edit boxes) before.
spk77 is offline   Reply With Quote
Old 04-28-2014, 07:50 AM   #527
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Argitoth View Post
when is extstate removed? when project is closed? or is extstate saved within the reaper project?
Code:
EEL: SetExtState("section", "key", "value", bool persist)

Set the extended state value for a specific section and key. persist=true means the value should be stored and reloaded the next time REAPER is opened

SetExtState("section", "key", "value", 0)
(Extstate is removed when project is closed)

SetExtState("section", "key", "value", 1)
("reaper-extstate.ini" -file is saved to "\REAPER" folder)

spk77 is offline   Reply With Quote
Old 04-28-2014, 08:14 AM   #528
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
Default

Quote:
Originally Posted by spk77 View Post


Hi,
Can't get values from those boxes anymore - they were separate controls (edit boxes) before.
Pitty, thanks for the reply.
nofish is offline   Reply With Quote
Old 05-06-2014, 05:16 AM   #529
mehmethan
Human being with feelings
 
mehmethan's Avatar
 
Join Date: Jun 2011
Posts: 610
Default

Hi Spk77'

Your "Copy-paste items and store positions.eel " script behaves anormal when I want to copy-paste selected area of an item. Is it possible to fix this ?
mehmethan is offline   Reply With Quote
Old 05-08-2014, 04:10 AM   #530
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,185
Default Toggle mute in one direction meaningfully with many or one item

Hi

I'd like a mute script that toggle multiple selected items but all in the same direction. I'd like to be able to use it meaningfully on either multiple selected or just single items. ie: the way mute works in PT or Logic.

At the moment in reaper the default is to toggle the mute state to the opposite of whatever the current state is for the individual item.

I also have a python script that will select all the muted in a selection (it's above here in this thread). Neither of these will build a macro to get what I need.

So the closest I have at present is a cycle action that goes: Item properties: mute, step, item properties: unmute

This works for multiple files but is only 50% reliable on individual items as it does the next toggle it's due to do no matter what the state of the item is.

Can anyone help? Cheers
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com

Last edited by Triode; 05-08-2014 at 08:52 AM.
Triode is offline   Reply With Quote
Old 05-08-2014, 12:36 PM   #531
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by mehmethan View Post
Hi Spk77'

Your "Copy-paste items and store positions.eel " script behaves anormal when I want to copy-paste selected area of an item. Is it possible to fix this ?
Hi,
It might be possible - I'll test it.

Quote:
Originally Posted by Triode View Post
Hi

I'd like a mute script that toggle multiple selected items but all in the same direction. I'd like to be able to use it meaningfully on either multiple selected or just single items. ie: the way mute works in PT or Logic.

At the moment in reaper the default is to toggle the mute state to the opposite of whatever the current state is for the individual item.

I also have a python script that will select all the muted in a selection (it's above here in this thread). Neither of these will build a macro to get what I need.

So the closest I have at present is a cycle action that goes: Item properties: mute, step, item properties: unmute

This works for multiple files but is only 50% reliable on individual items as it does the next toggle it's due to do no matter what the state of the item is.

Can anyone help? Cheers
Hi,
Do you mean this ? (I'm using "item mute buttons" in the gif):


Here's a "Toggle item mute state" (EEL) script if you don't want to use the "item mute buttons":

Code:
// Toggle item mute
function toggle_mute() local(item, muted_state)
(
  HasExtState("mute", "mutedstate") ? (
    GetExtState(#mutedstate, "mute", "mutedstate");
    match("%d", #mutedstate, muted_state);
  ) : (
    muted_state = 0;
  );

  i = 0;
  loop(CountSelectedMediaItems(0),
    (item = GetSelectedMediaItem(0, i)) ? (
      SetMediaItemInfo_Value(item, "B_MUTE", muted_state);
    );
    i += 1;
  );
  muted_state = !muted_state;
  #mutedstate = sprintf(#, "%d", muted_state);
  SetExtState("mute", "mutedstate", #mutedstate, 0);
  UpdateArrange();
);

toggle_mute();

Last edited by spk77; 05-08-2014 at 01:01 PM.
spk77 is offline   Reply With Quote
Old 05-08-2014, 12:55 PM   #532
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,185
Default

Thanks spk77

I've tried putting the script exactly from your code into a doc (using Coda on mac) and changed the extension to .py but I'm getting an error so far when I import it into reaper via the action list. Is this the correct process?

Maybe I'm doing something wrong here. I really don't know any coding at all although I have some python scripts that work.
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com
Triode is offline   Reply With Quote
Old 05-08-2014, 01:00 PM   #533
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Triode View Post
Thanks spk77

I've tried putting the script exactly from your code into a doc (using Coda on mac) and changed the extension to .py but I'm getting an error so far when I import it into reaper via the action list. Is this the correct process?

Maybe I'm doing something wrong here. I really don't know any coding at all although I have some python scripts that work.
Forgot to mention that it's an EEL script. It should work if you save it with .eel extension. (Save as somename.eel -> from the Action List, select ReaScript: New/load... )
spk77 is offline   Reply With Quote
Old 05-08-2014, 02:03 PM   #534
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,185
Default

Hi spk77

Ok. I now have the script working.

The same problem occurs when working with single items or items that are all in the opposite state to that which the toggle was last used.

This means that if I unmute one item and then subsequently try to unmute another the action sets it to "muted" even though it's already muted.

The effect is that it feels like the mute command sometimes "doesn't work"

Do you get me??
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com
Triode is offline   Reply With Quote
Old 05-09-2014, 12:29 AM   #535
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Triode View Post
Hi spk77

Ok. I now have the script working.

The same problem occurs when working with single items or items that are all in the opposite state to that which the toggle was last used.

This means that if I unmute one item and then subsequently try to unmute another the action sets it to "muted" even though it's already muted.

The effect is that it feels like the mute command sometimes "doesn't work"

Do you get me??
Ok, hopefully smarter logic added :

Toggle item "mute state" (selected items, EEL script)
  • save as scriptname.eel -> select "ReaScript: New/load..." from the Action list
  • if all selected items are muted -> unmute
  • if all selected items are not muted -> mute
  • if one item is selected -> toggle mute
  • else: item mute state == value from the stored "muted_state" variable (1 or 0, toggles every time the script is run)

Code:
// Toggle mute (EEL script)
// save as scriptname.eel -> select "ReaScript: New/load..." from the Action list
// if all selected items are muted -> unmute
// if all selected items are not muted -> mute
// if one item is selected -> toggle mute
// else: item mute state == value from the stored "muted_state" variable (1 or 0, toggles every time the script is run)

function toggle_mute() local(all_state, i, item, muted_state)
(
  (sel_item_count = CountSelectedMediaItems(0)) ? (
    all_state = 0;
    i = 0;
    loop(sel_item_count,
      (item = GetSelectedMediaItem(0, i)) ? (
        all_state += GetMediaItemInfo_Value(item, "B_MUTE");
      );
      i += 1;
    );
    
    floor(all_state + 0.5) == sel_item_count ? (  // all items are muted
      Main_OnCommand(40720, 0); // unmute items
    ) : floor(all_state + 0.5) == 0 ? ( // all items are not muted
      Main_OnCommand(40719, 0); // mute items
    ) : (
      HasExtState("mute", "mutedstate") ? (
        GetExtState(#mutedstate, "mute", "mutedstate");
        match("%d", #mutedstate, muted_state);
      ) : (
        muted_state = 0;
      );

      i = 0;
      loop(sel_item_count,
        (item = GetSelectedMediaItem(0, i)) ? (
          SetMediaItemInfo_Value(item, "B_MUTE", muted_state);
        );
        i += 1;
      );
    );
    muted_state = !muted_state;
    #mutedstate = sprintf(#, "%d", muted_state);
    SetExtState("mute", "mutedstate", #mutedstate, 0);
    UpdateArrange();
  );
);

toggle_mute();

Last edited by spk77; 05-09-2014 at 02:18 AM.
spk77 is offline   Reply With Quote
Old 05-09-2014, 12:49 AM   #536
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,185
Default

Fantastic thank you! I'll give it a try.
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com
Triode is offline   Reply With Quote
Old 05-09-2014, 05:10 AM   #537
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,185
Default

That works. Lovely thank you.
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com
Triode is offline   Reply With Quote
Old 05-09-2014, 09:52 AM   #538
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

this script doesn't do anything :'(
Code:
i=0;
loop(30,
	SetRegionRenderMatrix(0, i, 1, 1);
	i+=1;
)
I'm just trying to set the first 30 regions to render on track 1.
Edit: ooo, I think it does work, but the region render matrix does not visually update.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 05-09-2014 at 10:02 AM.
Argitoth is offline   Reply With Quote
Old 05-09-2014, 10:01 AM   #539
timlloyd
Human being with feelings
 
Join Date: Mar 2010
Posts: 4,713
Default

The 3rd argument for SetRegionRenderMatrix expects a MediaTrack* (pointer) not an integer track index.

Get the MediaTrack* for track 1 with GetTrack(0, 0)
timlloyd is offline   Reply With Quote
Old 05-09-2014, 10:02 AM   #540
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

Quote:
Originally Posted by timlloyd View Post
Get the MediaTrack* for track 1 with GetTrack(0, 0)
how do you get master track?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 05-09-2014, 10:05 AM   #541
timlloyd
Human being with feelings
 
Join Date: Mar 2010
Posts: 4,713
Default

I don't know, try -1
timlloyd is offline   Reply With Quote
Old 05-09-2014, 10:10 AM   #542
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

doesn't work, but this does!
SetRegionRenderMatrix(0, i, GetMasterTrack(0), 1);
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 05-09-2014, 10:32 AM   #543
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

cool

Code:
//see below
this could be expanded to render regions of selected tracks within time selection and then posted in the eel script thread for public consumption. i might do that.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 05-10-2014 at 11:16 AM.
Argitoth is offline   Reply With Quote
Old 05-09-2014, 10:48 AM   #544
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

edit: this seems to be working now.
Code:
GetSet_LoopTimeRange(0, 0, timeStart, timeEnd, 0);
idx=0;
while(EnumProjectMarkers(idx, isrgn, pos, rgnend, #nameOut, numOut)) (
	pos >= timeStart && rgnend < timeEnd ? (
		SetRegionRenderMatrix(0, numOut, GetMasterTrack(0), 1);
	):( 
		SetRegionRenderMatrix(0, numOut, GetMasterTrack(0), -1);
	);
	idx+=1;
)
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 05-10-2014 at 11:15 AM.
Argitoth is offline   Reply With Quote
Old 05-09-2014, 05:28 PM   #545
timlloyd
Human being with feelings
 
Join Date: Mar 2010
Posts: 4,713
Default

Quote:
Originally Posted by Argitoth View Post
doesn't work, but this does!
SetRegionRenderMatrix(0, i, GetMasterTrack(0), 1);
Ah, of course!
timlloyd is offline   Reply With Quote
Old 05-14-2014, 04:02 PM   #546
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,269
Default

Hello
Have a bunch of selected midi items with pooled midi data.
Is there a way to unselect all except one of them?
I have actions that run on all selected items, but need to skip pooled midi items or the action would do it several times on them, one for each pooled copy. This is for the transposition scripts on this thread http://forum.cockos.com/showthread.php?t=137372
Thanks!
heda is offline   Reply With Quote
Old 05-15-2014, 12:57 PM   #547
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,069
Default

Anyone know how to use GetSet_ArrangeView2 ?

I was wondering if this will or could save the current arrange view, and set it as an action to restore the view when you open a project back up.

Thanks
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is online now   Reply With Quote
Old 05-15-2014, 02:38 PM   #548
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,458
Default

Does anyone have a script that selects all items with the same item colour or the same active take colour?

Is this possible?
amagalma is offline   Reply With Quote
Old 05-15-2014, 03:43 PM   #549
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,069
Default

Quote:
Originally Posted by amagalma View Post
Does anyone have a script that selects all items with the same item colour or the same active take colour?

Is this possible?
There is one on the first page of this thread, but it solos the ones with the same colors, but it could be modified to leave the solo part out.
Check this post: http://forum.cockos.com/showpost.php...53&postcount=4

Hope this helps.
Regards
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is online now   Reply With Quote
Old 05-15-2014, 03:58 PM   #550
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,458
Default

Thank you very much!

I want to manually select one item and then run the script and automatically select all other items in the track with the same item/active take colour.

The script you pointed me at helps a lot, but it will require heavy modification to do what I want... and I am too newbie to do it myself!.. could someone of the more knowledgeable guys give it a try? If it is not too cumbersome!
amagalma is offline   Reply With Quote
Old 05-15-2014, 06:01 PM   #551
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,069
Default

I'm really behind on reascript stuff myself. I'm sure someone will chime in on this. Perhaps even an eel script would even be better.

Meanwhile, I took out the solo part. Hope VIENTE doesn't mind.

Select one of your colored items, and it should select the rest.

Code:
# ------------------------------------------
# Select all items with same color
# Author : VIENTE
# ------------------------------------------

### Define variables and functions #####################################################################

selitem = RPR_GetSelectedMediaItem(0,0) # Get pointer of selected item
color = RPR_GetDisplayedMediaItemColor(selitem) # Get color value from selected item
itemcount = RPR_CountSelectedMediaItems(0) # Count selected media items



### Calling actions & functions #######################################################################

if itemcount == 1: # Check if only one item is currently selected

	RPR_PreventUIRefresh(1) # Prevent UI refresh

	RPR_Main_OnCommand(40182,0) # Select all items in project

	num_items = RPR_CountSelectedMediaItems(0) # Count all items
	i = 0 # Start counting from zero

	for j in range(0, num_items): # Start of the iterator loop
		item = RPR_GetSelectedMediaItem(0, i) # Get pointer of every item in loop
		color2 = RPR_GetDisplayedMediaItemColor(item) # Get color of every item in loop

		if color2 == color: # Check if color of item from loop match with color of selected item
			RPR_SetMediaItemInfo_Value(item, "B_UISEL", 1) # If colors match, select this item
			i += 1 # continue to search
		else:
			RPR_SetMediaItemInfo_Value(item, "B_UISEL", 0)



	RPR_PreventUIRefresh(-1) # Refresh UI
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is online now   Reply With Quote
Old 05-16-2014, 05:35 AM   #552
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,458
Default

Wow! You are both awesome! Thanks a lot!

It was very simple to make it choose only items of one track instead of all items in project:
I just changed this line:
RPR_Main_OnCommand(40182,0) # Select all items in project
to
RPR_Main_OnCommand(40421,0) # Select all items in track

What a great community! Thank you!
amagalma is offline   Reply With Quote
Old 05-17-2014, 12:11 AM   #553
sfzgeek
Human being with feelings
 
sfzgeek's Avatar
 
Join Date: Feb 2009
Location: Dunedin, New Zealand
Posts: 205
Default ReaScript/EEL

Quote:
Originally Posted by amagalma View Post
I want to manually select one item and then run the script and automatically select all other items in the track with the same item/active take colour.
For my own edification (and forum Karma building) I also gave this a go but used EEL instead:

Code:
// Select items with the same color on the same track as the selected item

Verbose = 1;

Selection_Count = CountSelectedMediaItems(0);
!Selection_Count ? (
	Verbose ? MB("No item selected. Select an item.", "Error", 0);
) : (
	Selection_Count > 1 ? (
		Verbose ? MB("Multiple items selected. Select a single item only.", "Error", 0);
	) : (
		Selected_Item_ID = GetSelectedMediaItem(0, 0);
		Color1 = GetMediaItemInfo_Value(Selected_Item_ID, "I_CUSTOMCOLOR");
		Track_ID = GetMediaItem_Track(Selected_Item_ID);
		Track_Item_Count = GetTrackNumMediaItems(Track_ID);
		Matching_Count = 0;
		i = 0;
		loop(Track_Item_Count,
			Item_ID = GetTrackMediaItem(Track_ID, i);
			Item_ID != Selected_Item_ID ? (
				Color2 = GetMediaItemInfo_Value(Item_ID, "I_CUSTOMCOLOR");
				Color1 === Color2 ? (
					Matching_Count += 1;
					SetMediaItemSelected(Item_ID, 1);
				);
			);
			i += 1;
		);
		Matching_Count ? UpdateArrange();
		Verbose ? (
			!Matching_Count ? (
				MB("No items with a matching color found.", "Error", 0);
			) : (
				Matching_Count == 1 ? (
					MB(sprintf(#, "Selected %i item with matching color.", Matching_Count);, "Success", 0);
				) : (
					MB(sprintf(#, "Selected %i items with matching colors.", Matching_Count);, "Success", 0);
				);
			);
		);
	);
);
__________________
My rawk band: The Hidden Venture.
sfzgeek is offline   Reply With Quote
Old 05-18-2014, 02:44 AM   #554
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,458
Default

Wow! Thank you very much sfzgeek!! I am going to try it!

*Edit: I 've tried it and it works very well but only for same item colours. Not for the same active take colour. The .py script works for the same colour, no matter if it is item colour or active take colour

Last edited by amagalma; 05-18-2014 at 02:54 AM.
amagalma is offline   Reply With Quote
Old 05-18-2014, 09:24 AM   #555
suleiman
Human being with feelings
 
suleiman's Avatar
 
Join Date: Mar 2010
Location: Melbourne
Posts: 5,646
Default

Dear powers that be ,

A small request, which i cannot find in the existing JS plugs.

If current midi velocity = previous midi velocity, then output midi velocity = current midi velocity + X

Where X can be adjusted by a slider ( 1 to 127 ? )

Includes midi channel = all , 1-16

Includes midi note start and midi note end range as seperate sliders (0 to 127)

Includes drop down option = plus X OR minus X OR toggle between the two

Reaper's own JS Anti-machinegun

If this exists , kindly point me to it please.
__________________
-------------------------

Salamat

Last edited by suleiman; 05-18-2014 at 09:29 AM.
suleiman is offline   Reply With Quote
Old 05-18-2014, 03:08 PM   #556
mwe
Human being with feelings
 
mwe's Avatar
 
Join Date: Mar 2012
Location: Kentucky, USA
Posts: 254
Default

This is in the vein of what you're looking for I think. It has two modes. The Randomize everything mode does exactly that, ignores the incoming velocity and generates a new random velocity within the set range. The Anti machine gun mode compares the incoming velocity with the last note and if they match, and they're within the set range, generates a new random velocity within the range. It's not exactly like you described but it wouldn't be hard to modify it to suit your needs.
Attached Files
File Type: zip MIDI Velocity Randomizer.zip (935 Bytes, 220 views)

Last edited by mwe; 05-18-2014 at 03:44 PM.
mwe is offline   Reply With Quote
Old 05-18-2014, 10:04 PM   #557
suleiman
Human being with feelings
 
suleiman's Avatar
 
Join Date: Mar 2010
Location: Melbourne
Posts: 5,646
Default

Quote:
Originally Posted by mwe View Post
This is in the vein of what you're looking for I think. It has two modes. The Randomize everything mode does exactly that, ignores the incoming velocity and generates a new random velocity within the set range. The Anti machine gun mode compares the incoming velocity with the last note and if they match, and they're within the set range, generates a new random velocity within the range. It's not exactly like you described but it wouldn't be hard to modify it to suit your needs.
Thank you very much !

This works great .

I'll try my hand at coding in some changes...like the X amount slider instead of the velocity range sliders.
__________________
-------------------------

Salamat
suleiman is offline   Reply With Quote
Old 05-19-2014, 01:13 AM   #558
suleiman
Human being with feelings
 
suleiman's Avatar
 
Join Date: Mar 2010
Location: Melbourne
Posts: 5,646
Default

My first tentative JS step :

https://stash.reaper.fm/20695/MIDI%20...Randomizer%202

This is working for me , but am not sure how well. It adds a rand(Amount) + 0.5 to the original velocity value, when in AMG mode.

Any and all improvements will be most welcome.


If it could toggle between adding and subtracting just the ‘Amount’ from the velocity value , that would nail it.

I tried the addition only (no toggle, which I suspect will cause me a nosebleed) . But when I tried vel_rand = velocity + (Amount) , it just changed all velocity values after the first note to the new amount.
__________________
-------------------------

Salamat
suleiman is offline   Reply With Quote
Old 05-19-2014, 08:14 AM   #559
mwe
Human being with feelings
 
mwe's Avatar
 
Join Date: Mar 2012
Location: Kentucky, USA
Posts: 254
Default

Try this one. You've hit upon an aspect of your original description that I didn't quite understand. Say you have an initial velocity of 100 and an X of 5.

Add mode = 100, 105, 105, 105, 105..... just a louder machine gun.

Toggle mode = 100, 105, 95, 105, 95..... tick-tock

I'm not sure a random velocity is the answer but a fixed variation may not be either. Maybe a percentage of the original velocity? I have some code in another JS that does something like that if you want to give it a try.
Attached Files
File Type: zip MIDI Velocity Randomizer 2.zip (996 Bytes, 177 views)

Last edited by mwe; 05-19-2014 at 10:24 AM.
mwe is offline   Reply With Quote
Old 05-19-2014, 10:05 AM   #560
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Didn't look at the code yet, but I think you're looking for this, suleiman?

Add mode = (series of velocity = 100 -->) 100, 105, 110, 115, 120, 125, 127, 127, 127, ..... just a increasingly louder machine gun, up to a (maximum) point.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned 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 04:03 PM.


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