Old 01-21-2017, 08:31 PM   #1
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default JSFX: MIDI Strum

https://stash.reaper.fm/29593/MIDI%20Strummer.txt

This JSFX creates a strum effect by delaying each note by a certain length of time (can be adjusted by a slider). The user then has the option to either create a downward strum (lower pitches played before higher pitches) or an upward strum (higher pitches are played before lower pitches).

The downward strum and upward strum are triggered by two different MIDI notes which can be defined by the user.

Users can assign the chords (notes to be strummed) in either the same or separate MIDI channel from the strumming notes. Obviously, if users choose the same channel for both, the strum keys should not be in the same playing range as the chords.

Similar to my MIDI "Vocode" effect, the user also can choose between the strumming note velocities, the chord velocities, or some mixture of the two.

There is also a slider that allows users to increase or decrease the velocity through the strum. For example, a value of -5 will decrease the velocity the second note of a chord by 5, the third note by 10, and so forth. A positive value would increase the velocity.

Finally, CC 64 (sustain pedal) can be used to sustain notes between strums.

EDIT: Notes played while holding either of the strum keys will play. This can be used to simulate hammer-ons and pull-offs.

Last edited by pcartwright; 01-23-2017 at 06:45 PM. Reason: new version
pcartwright is offline   Reply With Quote
Old 01-21-2017, 10:08 PM   #2
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

A couple of use tips.

When playing live, make sure you play the chord before you play the strum keys (just as you would a guitar). This might sound obvious, but it can be slightly tricky on chord changes.

I suggest using parameter modulation to create variety on the time between each strum. An LFO goes a long way in creating subtleties.

Experiment with the velocity increase/decrease slider. I find I get a more natural sounding strum if I set this value to around -3 or so. Of course, you could put this on a LFO as well for even more variation.

Last edited by pcartwright; 04-14-2018 at 03:38 PM.
pcartwright is offline   Reply With Quote
Old 01-22-2017, 01:32 AM   #3
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,595
Default

Quote:
Originally Posted by pcartwright View Post
https://stash.reaper.fm/29593/MIDI%20Strummer.txt

This JSFX creates a strum effect by delaying each note by a certain length of time (can be adjusted by a slider). The user then has the option to either create a downward strum (lower pitches played before higher pitches) or an upward strum (higher pitches are played before lower pitches).

The downward strum and upward strum are triggered by two different MIDI notes which can be defined by the user.

Users can assign the chords (notes to be strummed) in either the same or separate MIDI channel from the strumming notes. Obviously, if users choose the same channel for both, the strum keys should not be in the same playing range as the chords.

Similar to my MIDI "Vocode" effect, the user also can choose between the strumming note velocities, the chord velocities, or some mixture of the two.

There is also a slider that allows users to increase or decrease the velocity through the strum. For example, a value of -5 will decrease the velocity the second note of a chord by 5, the third note by 10, and so forth. A positive value would increase the velocity.

Finally, CC 64 (sustain pedal) can be used to sustain notes between strums.
AWESOME !!
vanhaze is offline   Reply With Quote
Old 01-22-2017, 01:55 AM   #4
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,595
Default

Quote:
Originally Posted by pcartwright View Post
https://stash.reaper.fm/29593/MIDI%20Strummer.txt

This JSFX creates a strum effect by delaying each note by a certain length of time (can be adjusted by a slider). The user then has the option to either create a downward strum (lower pitches played before higher pitches) or an upward strum (higher pitches are played before lower pitches).

The downward strum and upward strum are triggered by two different MIDI notes which can be defined by the user.

Users can assign the chords (notes to be strummed) in either the same or separate MIDI channel from the strumming notes. Obviously, if users choose the same channel for both, the strum keys should not be in the same playing range as the chords.

Similar to my MIDI "Vocode" effect, the user also can choose between the strumming note velocities, the chord velocities, or some mixture of the two.

There is also a slider that allows users to increase or decrease the velocity through the strum. For example, a value of -5 will decrease the velocity the second note of a chord by 5, the third note by 10, and so forth. A positive value would increase the velocity.

Finally, CC 64 (sustain pedal) can be used to sustain notes between strums.
Hey pcartwright,

I just tested it and it works great !!
One strange thing though:

In strummer plugin ,C3 and D3 are set as being the strummer trigger notes.
But in MIDI Editor, when i insert these 2 notes, the strummer will not work.
I have to transpose C3 and D3 down to C1 and D1 in MIDI Editor , then these 2 notes DO work as being the strum triggers ..
vanhaze is offline   Reply With Quote
Old 01-22-2017, 02:56 AM   #5
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,537
Default

Nice thanks!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 01-22-2017, 05:59 AM   #6
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

Quote:
Originally Posted by vanhaze View Post
Hey pcartwright,

I just tested it and it works great !!
One strange thing though:

In strummer plugin ,C3 and D3 are set as being the strummer trigger notes.
But in MIDI Editor, when i insert these 2 notes, the strummer will not work.
I have to transpose C3 and D3 down to C1 and D1 in MIDI Editor , then these 2 notes DO work as being the strum triggers ..
C5 is middle C in the plugin. What is middle C labeled in your MIDI Editor?

Also, do you have a transposing effect inserted? Maybe transposed notation view?

Last edited by pcartwright; 01-22-2017 at 03:00 PM.
pcartwright is offline   Reply With Quote
Old 01-22-2017, 02:33 PM   #7
germano
Human being with feelings
 
germano's Avatar
 
Join Date: Sep 2012
Location: Living in Portugal but Born in France
Posts: 51
Default

Superb.

In one week i found two strumming possibilities. This one and the "Reaper MIDI Editor: The Arpeggio/Strumming Tool" from Rob van Hees:
https://www.youtube.com/watch?v=UkdrS5J_CD4&t=52s

Very good week for reaper fans.

Thanks Cartwright. Very good job.
germano is offline   Reply With Quote
Old 01-22-2017, 08:01 PM   #8
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

Would it make sense to allow notes to be played after a strum key is pressed (but before the strum key is released) to help simulate hammer-on and pull-offs?

It might also make it easier to use the strummer live (i.e. you don't have to be as precise with your keyboard playing).

Thoughts?
pcartwright is offline   Reply With Quote
Old 01-22-2017, 09:14 PM   #9
Sju
Human being with feelings
 
Join Date: Jun 2015
Posts: 579
Default

Haha this is really awesome really enjoying it in combination with AAS String Studio. Thanks!

PS. support for ho&po would be very nice

PPS. option for some kind of velocity to -time between notes modulation perhaps? louder -> faster strum

Last edited by Sju; 01-22-2017 at 09:24 PM.
Sju is offline   Reply With Quote
Old 01-23-2017, 08:56 AM   #10
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

I'll have an update in the next day or two that will allow users to play a note while one of the strum keys is pressed.
pcartwright is offline   Reply With Quote
Old 01-23-2017, 06:51 PM   #11
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default Update Available

Quote:
Originally Posted by Sju View Post
PS. support for ho&po would be very nice
Done. There's an update in the stash. See link in OP.

Quote:
Originally Posted by Sju View Post
PPS. option for some kind of velocity to -time between notes modulation perhaps? louder -> faster strum
I probably won't do this simply because the strum time is so subjective. Whatever translation I use between velocity and time is bound to be problematic somewhere.

You can use parameter modulation to automate strum speed from a CC or LFO. I might try making a velocity meter plugin. This would allow you to use velocity as a parameter modulation source.

Let me think on it.
pcartwright is offline   Reply With Quote
Old 01-24-2017, 12:16 AM   #12
Sju
Human being with feelings
 
Join Date: Jun 2015
Posts: 579
Default

Thanks! I think there already exists a MIDI metering plugin that has a slider for velocity... I could maybe just link from that for the second FR.
Sju is offline   Reply With Quote
Old 01-24-2017, 05:34 AM   #13
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

Quote:
Originally Posted by Sju View Post
Thanks! I think there already exists a MIDI metering plugin that has a slider for velocity... I could maybe just link from that for the second FR.
Let me know the name of it as I couldn't find a velocity metering plugin in my effects.
pcartwright is offline   Reply With Quote
Old 01-24-2017, 07:21 AM   #14
Sju
Human being with feelings
 
Join Date: Jun 2015
Posts: 579
Default

Hmm can't find it either... Might be that I recall wrong, but somehow I have this memory of a JSFX that monitors the input MIDI notes and displays data as slider values.

EDIT:

Now I found two

JS: MIDI Velocity Ranger
JS: MIDI-triggered velocity-sensitive audio/CC flexible DADSR envelope

I'm not sure if the first one is included in default reaper (the second one is definitely not), but you should be able to find them with google.

Last edited by Sju; 01-24-2017 at 08:07 AM.
Sju is offline   Reply With Quote
Old 01-25-2017, 06:29 AM   #15
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

I also uploaded a MIDI velocity meter to the stash if anyone is interested.

http://forum.cockos.com/showthread.p...44#post1791344
pcartwright is offline   Reply With Quote
Old 01-25-2017, 08:42 AM   #16
Sju
Human being with feelings
 
Join Date: Jun 2015
Posts: 579
Default

Oh you made one too cool, thanks!
Sju is offline   Reply With Quote
Old 02-04-2017, 08:11 AM   #17
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

Does anyone have any feedback on this plugin? Bugs? Feature requests?
pcartwright is offline   Reply With Quote
Old 04-13-2018, 07:22 PM   #18
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

Thanks working good now ! It only took an hour to get it working as the keyswitch was down an octave than what it was set to.
I don't know if it's possible to have strum pattern presets to choose from in the JS rather than having to create them up ? or be able to insert them in the track at the cursor position with a presetable bar length creating the notes to the currently set keyswitches.
Maybe some way to have a muted strum, like have another keyswitch that can be set to your instrument's mute keyswitch or being able to set a velocity level that will trigger's the mute in you instrument.
Thanks again.

EDIT: Another keyswitch option would be to just strum the bass note of the chord.

Last edited by MusoBob; 04-13-2018 at 11:47 PM.
MusoBob is offline   Reply With Quote
Old 04-14-2018, 09:12 AM   #19
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

Quote:
Originally Posted by MusoBob View Post
Thanks working good now ! It only took an hour to get it working as the keyswitch was down an octave than what it was set to.
Yeah, I use an octave number system that is more consistent with MIDI note conventions than typical keyboard numbering.

Quote:
I don't know if it's possible to have strum pattern presets to choose from in the JS rather than having to create them up ? or be able to insert them in the track at the cursor position with a presetable bar length creating the notes to the currently set keyswitches.
The purpose of the JSFX is to create the strum pattern. You can draw out the pattern on the MIDI editor using the up and down keys as desired.

Quote:
Maybe some way to have a muted strum, like have another keyswitch that can be set to your instrument's mute keyswitch or being able to set a velocity level that will trigger's the mute in you instrument.

[...]

EDIT: Another keyswitch option would be to just strum the bass note of the chord.
Interesting ideas. Do you have a guitar library in particular that I could reference regarding keswitching to/from muted strings?

Also, how do you envision the bass strum working? Would it only strum one note, or would playing the bass note strum the entire chord?
pcartwright is offline   Reply With Quote
Old 04-14-2018, 12:01 PM   #20
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

Quote:
You can draw out the pattern on the MIDI editor using the up and down keys as desired.
Just looking for a quick way without spending a lot of time drawing the notes for each type of strum, premade patterns would be good.
Most Virtual Instruments mute the note by low velocity or a keyswitch, so when it inserts the pattern it will either add a keyswitch note of your choosing to the strum up/down note or set the velocity of the up/down keyswitch to the velocity amount you set to play a mute.

Yes, strum only the root note.

I haven't looked into JS to see what it can do, I have just been using Lua, I know I could make a GUI with Lokasenns's GUI to insert the strum patterns.

EDIT: here's some I made from Flame Studios gig Library and converted to SFZ, the originals may of had velocity mutes.
http://www.flamestudios.org/free/GigaSamples

*** open the link in a new window as it may add some ad tabs.

FS_Fender_Telecaster_Both_Pickups_DI
http://www.mediafire.com/file/388yym...Pickups_DI.rar

FS_Fender_Jaguar_Both_Pickups_DI
http://www.mediafire.com/file/u68wo5...Pickups_DI.rar

FS_Gibson_Les_Paul_Both_Pickups_DI
http://www.mediafire.com/file/o2vwnn...Pickups_DI.rar

FS_Ibanez_Acoustic
http://www.mediafire.com/file/apm0yi...z_Acoustic.rar

EDIT: added some bass as it might be possible to make something to play a bass pattern to the chord and chosen scale.
FS_Yamaha_Electric_Bass_Direct_In
http://www.mediafire.com/file/z0vyd0..._Direct_In.rar

FS_Washburn_Acoustic_Bass_Direct_In
http://www.mediafire.com/file/3kthz4..._Direct_In.rar

https://www.plogue.com/products/sforzando/


sw_label=C#1 Slide Up

sw_label=D1 Slide Down

sw_label=D#1 Hammer On

sw_label=E1 Pull Off

sw_label=F1 Full Bend

sw_label=F#1 Pre Bend

sw_label=G1 Vibrato 1 (Use Mod/Vibrato Adjust in Controls)

sw_label=G#1 Vibrato 2 (Use Mod/Vibrato Adjust in Controls)

sw_label=A1 Muted

Last edited by MusoBob; 04-14-2018 at 01:17 PM.
MusoBob is offline   Reply With Quote
Old 04-14-2018, 02:26 PM   #21
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

I might add a key switch function; that should be fairly straightforward.

I don't think I'll add any sort of predefined strum patterns, though. The effect was never intended for that kind of thing.

I'll have to give some thought as to when/how I would strum a single note. A use-case would be helpful.

You might try Lunker's script for adding rhythmic strumming. It might be closer to what you want.
https://forum.cockos.com/showthread.php?t=192481
pcartwright is offline   Reply With Quote
Old 04-14-2018, 02:40 PM   #22
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

Lunker's Midi Guitar Tool is a labor intensive way also.
I will have a look at the JS I should be able to mod it, will upload it when done.
MusoBob is offline   Reply With Quote
Old 04-14-2018, 03:47 PM   #23
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

Quote:
Originally Posted by MusoBob View Post
Lunker's Midi Guitar Tool is a labor intensive way also.
I will have a look at the JS I should be able to mod it, will upload it when done.
Go for it. An alternative might be to use a rhythm or arp generator in front of the strummer and map the rhythm/arp output to the strummer. That way you could experiment with different rhythms in the arp without dealing with a bunch of text files or JSFX code.

My own opinion: there is such a huge variety of rhythms available/conceivable that I would constantly be updating or bug fixing the effect more than actually using the effect.
pcartwright is offline   Reply With Quote
Old 04-15-2018, 12:12 AM   #24
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

I'm trying to find JS vertical sliders and checkboxes ! might have to look for a JS GUI Library ?

I was thinking to have it work from keyswitches or a pattern editor that can save the patterns to presets.
The mute would either work by velocity off/down or send the mute keyswitch.
You could have a half/normal/double strum speed for the pattern editor.

I started the keyswitches @ C-2 to G8

I thought about the arp or rhythm ones, will look more into that.

EDIT: Maybe get it to write the pattern to track then you can multiply it, add another pattern, glue, humanize.


Last edited by MusoBob; 04-15-2018 at 01:35 AM.
MusoBob is offline   Reply With Quote
Old 04-15-2018, 01:04 AM   #25
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,595
Default

Wow, seems really great !
vanhaze is offline   Reply With Quote
Old 04-15-2018, 05:39 AM   #26
ChristopherT
Human being with feelings
 
Join Date: Apr 2017
Location: South
Posts: 298
Default

This is great.

Last edited by ChristopherT; 04-15-2018 at 05:48 AM.
ChristopherT is offline   Reply With Quote
Old 04-15-2018, 07:20 AM   #27
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

Quote:
Originally Posted by MusoBob View Post
I'm trying to find JS vertical sliders and checkboxes ! might have to look for a JS GUI Library ?
As far as I know, these types of GUI features will require a third party GUI library used in the @gfx section of the code. There are a couple of GUI libraries out there, but I have no experience with them.
pcartwright is offline   Reply With Quote
Old 04-15-2018, 05:48 PM   #28
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

Quote:
Originally Posted by pcartwright View Post
........I'll have to give some thought as to when/how I would strum a single note. A use-case would be helpful.
If you download a MusicLab Guitar trial you will see the Bass&Chord patterns, in the pic below the brown is the root pick, the green is down strum then up strum. It works the same way as JS Midi Strum, by reading the chord track.
If you look in the Loops folder you will find the midi patterns, these will work with your JS Midi Strum to give you an idea how it could be improved.
You just need the keyswitches: mute, root and slow strum. (the mute should be easy enough, root ? there must be some way to mute the notes higher than > the lowest/root ?, the slow should just use the time between each note ms delay.
If you get the root pick worked out you could then have picking patterns that pick the different notes of a chord.

I'm just looking now at doing the pattern generator in a Lua GUI to insert the pattern notes/switches similar to the MusicLab patterns that can be played through JS Midi Strum, just got to work out the save to Preset part.


Last edited by MusoBob; 04-15-2018 at 06:15 PM.
MusoBob is offline   Reply With Quote
Old 04-18-2018, 01:24 AM   #29
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

I've been creating the Pattern maker in Lua GUI, working out the presets save/load.
I found MegaBaby Drum Sequencer, just got to work out how to extend the note lengths longer than 1 step to be able to use it. You can save any pattern to a preset.



MusoBob is offline   Reply With Quote
Old 04-18-2018, 03:53 AM   #30
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

Quote:
Originally Posted by vanhaze View Post
1) Leftmouse click to insert a Note.
2) Now hold ALT key and leftmouse drag on that Note, to the right, to extend the Note's length.

Helpful ?
Works good now, just select the section of track > Insert > New MIDI item
> Apply track FX to items as new take (MIDI output)

Create a text map and place in Roaming\REAPER\Data\seqbaby_data
move the green keys to the keyswitch octave.
example:
Code:
21    SlowDown
20    MutedUp
19    MutedDown
18    FullUp
17    FullDown
16    FullDown1
15    FullDown2
14    FullDown3 
13    1st Str
12    2nd Str
11    3rd Str
10    4th Str
09    BassI
08    BassII
07    MutedTopUp
06    MutedTopDo
05    TopUp
04    TopDown
03    TopDown1
02    TopDown2
01    TopDown3
MusoBob is offline   Reply With Quote
Old 04-19-2018, 08:13 PM   #31
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

Would something like this be helpful?

Options so far are keyswitch or CC message.



You could have several of these in a row that mapped different down/up strum keys to different effects. The settings I have above would map to muted down and up strums in your example above.
pcartwright is offline   Reply With Quote
Old 04-20-2018, 01:43 AM   #32
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

I have just been trying it with these settings, I can get it to do a slow strum with a keyswitch but the ks note needs to proceed the strum note and that won't work in Megababy unless I put it one step before the strum note (so I got to work out how to advance the ks from Megababy). The mute in Magababy woks fine. Just got to work out the bass pick.
So all the switching will be in Megababy and all Midi Strum will need to do is a slow strum on a ks from Megababy and a root pick on a keyswitch from Megababy.
I have the automatic slow strum disabled at the moment to try the ks slow strum.

Thanks for the demo but just a bit overloaded at the moment to think of yours, will look later or in the morning, just not sure how you got it working (sorry just a bit brain numb, need a good sleep).

Here's a video of how it's working:

https://www.dropbox.com/s/1b4ah3b3w8...rum-3.mp4?dl=0

MusoBob is offline   Reply With Quote
Old 04-20-2018, 04:00 AM   #33
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

I will leave this before I go to bed, I'm not familiar with JS so I did the best I could with it at the moment.
If anyone could work out how to get just the lowest chord note only to play on the Root Strum ks and how to advance the ks so their timing is just before the strum note.

Thanks, Good night/morning or wherever you all are.

Code:
// This effect Copyright (C) 2017 and later by Phillip Cartwright
// License: GPL - http://www.gnu.org/licenses/gpl.html



desc: MIDI Strummer
slider1:1<1,16,1>MIDI Chord Channel
slider2:1<1,16,1>MIDI Strum Channel
slider3:.5<0,1,.01>Vel. Ratio (0 = 100% Chord, 1 = 100% Strum)
//slider4:15<0,200,.01>Time between each note (ms)
slider5:36<0,127,1{0: C-2,1: C#-2,2: D-2,3: Eb-2,4: E-2,5: F-2,6: F#-2,7: G-2,8: G#-2,9: A-2,1-2: Bb-2,11: B-2,12: C-1,13: C#-1,14: D-1,15: Eb-1,16: E-1,17: F-1,18: F#-1,19: G-1,2-2: G#1,21: A-1,22: Bb-1,23: B-1,24: C0,25: C#0,26: D0,27: Eb0,28: E0,29: F0,30: F#2,31: G0,32: G#0,33: A0,34: Bb0,35: B0,36: C1,37: C#1,38: D1,39: Eb1,40: E1,41: F1,42: F#1,43: G1,44: G#1,45: A1,46: Bb1,47: B1,48: C4,49: C#2,50: D2,51: Eb2,52: E2,53: F2,54: F#2,55: G2,56: G#2,57: A2,58: Bb2,59: B2,60: C3,61: C#3,62: D3,63: Eb3,64: E3,65: F3,66: F#3,67: G3,68: G#3,69: A3,70: Bb3,71: B3,72: C4,73: C#4,74: D4,75: Eb4,76: E4,77: F4,78: F#4,79: G4,80: G#4,81: A4,82: Bb4,83: B4,84: C5,85: C#5,86: D5,87: Eb5,88: E5,89: F5,90: F#5,91: G5,92: G#5,93: A5,94: Bb5,95: B5,96: C6,97: C#6,98: D6,99: Eb6,100: E6,101: F6,102: F#6,103: G6,104: G#6,105: A6,106: Bb6,107: B6,108: C7,109: C#7,110: D7,111: Eb7,112: E7,113: F7,114: F#7,115: G7,116: G#7,117: A7,118: Bb7,119: B7,120: C8,121: C#8,122: D8,123: Eb8,124: E8,125: F8,126: F#8,127: G8}>Down strum
slider6:38<0,127,1{0: C-2,1: C#-2,2: D-2,3: Eb-2,4: E-2,5: F-2,6: F#-2,7: G-2,8: G#-2,9: A-2,1-2: Bb-2,11: B-2,12: C-1,13: C#-1,14: D-1,15: Eb-1,16: E-1,17: F-1,18: F#-1,19: G-1,2-2: G#1,21: A-1,22: Bb-1,23: B-1,24: C0,25: C#0,26: D0,27: Eb0,28: E0,29: F0,30: F#2,31: G0,32: G#0,33: A0,34: Bb0,35: B0,36: C1,37: C#1,38: D1,39: Eb1,40: E1,41: F1,42: F#1,43: G1,44: G#1,45: A1,46: Bb1,47: B1,48: C4,49: C#2,50: D2,51: Eb2,52: E2,53: F2,54: F#2,55: G2,56: G#2,57: A2,58: Bb2,59: B2,60: C3,61: C#3,62: D3,63: Eb3,64: E3,65: F3,66: F#3,67: G3,68: G#3,69: A3,70: Bb3,71: B3,72: C4,73: C#4,74: D4,75: Eb4,76: E4,77: F4,78: F#4,79: G4,80: G#4,81: A4,82: Bb4,83: B4,84: C5,85: C#5,86: D5,87: Eb5,88: E5,89: F5,90: F#5,91: G5,92: G#5,93: A5,94: Bb5,95: B5,96: C6,97: C#6,98: D6,99: Eb6,100: E6,101: F6,102: F#6,103: G6,104: G#6,105: A6,106: Bb6,107: B6,108: C7,109: C#7,110: D7,111: Eb7,112: E7,113: F7,114: F#7,115: G7,116: G#7,117: A7,118: Bb7,119: B7,120: C8,121: C#8,122: D8,123: Eb8,124: E8,125: F8,126: F#8,127: G8}>Up Strum
slider7:36<0,127,1{0: C-2,1: C#-2,2: D-2,3: Eb-2,4: E-2,5: F-2,6: F#-2,7: G-2,8: G#-2,9: A-2,1-2: Bb-2,11: B-2,12: C-1,13: C#-1,14: D-1,15: Eb-1,16: E-1,17: F-1,18: F#-1,19: G-1,2-2: G#1,21: A-1,22: Bb-1,23: B-1,24: C0,25: C#0,26: D0,27: Eb0,28: E0,29: F0,30: F#2,31: G0,32: G#0,33: A0,34: Bb0,35: B0,36: C1,37: C#1,38: D1,39: Eb1,40: E1,41: F1,42: F#1,43: G1,44: G#1,45: A1,46: Bb1,47: B1,48: C4,49: C#2,50: D2,51: Eb2,52: E2,53: F2,54: F#2,55: G2,56: G#2,57: A2,58: Bb2,59: B2,60: C3,61: C#3,62: D3,63: Eb3,64: E3,65: F3,66: F#3,67: G3,68: G#3,69: A3,70: Bb3,71: B3,72: C4,73: C#4,74: D4,75: Eb4,76: E4,77: F4,78: F#4,79: G4,80: G#4,81: A4,82: Bb4,83: B4,84: C5,85: C#5,86: D5,87: Eb5,88: E5,89: F5,90: F#5,91: G5,92: G#5,93: A5,94: Bb5,95: B5,96: C6,97: C#6,98: D6,99: Eb6,100: E6,101: F6,102: F#6,103: G6,104: G#6,105: A6,106: Bb6,107: B6,108: C7,109: C#7,110: D7,111: Eb7,112: E7,113: F7,114: F#7,115: G7,116: G#7,117: A7,118: Bb7,119: B7,120: C8,121: C#8,122: D8,123: Eb8,124: E8,125: F8,126: F#8,127: G8}>Slow strum
slider8:36<0,127,1{0: C-2,1: C#-2,2: D-2,3: Eb-2,4: E-2,5: F-2,6: F#-2,7: G-2,8: G#-2,9: A-2,1-2: Bb-2,11: B-2,12: C-1,13: C#-1,14: D-1,15: Eb-1,16: E-1,17: F-1,18: F#-1,19: G-1,2-2: G#1,21: A-1,22: Bb-1,23: B-1,24: C0,25: C#0,26: D0,27: Eb0,28: E0,29: F0,30: F#2,31: G0,32: G#0,33: A0,34: Bb0,35: B0,36: C1,37: C#1,38: D1,39: Eb1,40: E1,41: F1,42: F#1,43: G1,44: G#1,45: A1,46: Bb1,47: B1,48: C4,49: C#2,50: D2,51: Eb2,52: E2,53: F2,54: F#2,55: G2,56: G#2,57: A2,58: Bb2,59: B2,60: C3,61: C#3,62: D3,63: Eb3,64: E3,65: F3,66: F#3,67: G3,68: G#3,69: A3,70: Bb3,71: B3,72: C4,73: C#4,74: D4,75: Eb4,76: E4,77: F4,78: F#4,79: G4,80: G#4,81: A4,82: Bb4,83: B4,84: C5,85: C#5,86: D5,87: Eb5,88: E5,89: F5,90: F#5,91: G5,92: G#5,93: A5,94: Bb5,95: B5,96: C6,97: C#6,98: D6,99: Eb6,100: E6,101: F6,102: F#6,103: G6,104: G#6,105: A6,106: Bb6,107: B6,108: C7,109: C#7,110: D7,111: Eb7,112: E7,113: F7,114: F#7,115: G7,116: G#7,117: A7,118: Bb7,119: B7,120: C8,121: C#8,122: D8,123: Eb8,124: E8,125: F8,126: F#8,127: G8}>Root strum
slider9:1<0,1,1{No,Yes}>Send note-off before re-strum?
slider10:0<-15,15,1>Decrease or Increase Velocity
slider11:15<0,200,.01>Slow Strum Speed

@init


k = 0;
tmp = -1;
activeNotes = 1000;
activeVel = 2000;
activeNotes[-1] = -1;
activeVel[-1] = -1;
countNotes = 0;
buf = 5000;



i = 0;
loop(128,
    activeNotes[i] = -1;
    activeVel[i] = -1;
    i += 1;
);

@slider 

cChan = slider1 - 1;
mChan = slider2 - 1;
cVel = 1 - slider3;
mVel = slider3;
//strm = srate*slider4*.001;
dnst = slider5;
upst = slider6;
slst = slider7;
rtst = slider8;
noteOffStrum = slider9;
newVel = slider10;
slwstrsp = srate*slider11*.001;

 
@block

function ResetArray() local (i)
(
    tmp = -1;
    i = 0;
    loop(128,
     activeNotes[i] = -1;
     i += 1;
    );
);

function SortNotes() local (i j)
(
    swap = 0;
    i = 0;
    while (i <= countNotes)(
     activeNotes[i] < activeNotes[i+1] ? (
      tmp = activeNotes[i];
      activeNotes[i] = activeNotes[i+1];
      activeNotes[i+1] = tmp;
      tmp = activeVel[i];
      activeVel[i] = activeVel[i+1];
      activeVel[i+1] = tmp;
      i = 0;
      swap = 1;
     );
     swap == 0 ? i += 1;
     swap = 0;
    );
);

function AddNote(msg2, msg3) local (i j)
(
  i = 0;
  j = 0;
  while ((j == 0) && (i < 128)) (
    activeNotes[i] == -1 ? (
      j = 1;
      activeNotes[i] = msg2;
      activeVel[i] = msg3;               
    ): i += 1;
  );
);

function RemoveNote(msg2) local (i j)
(
    i = 0;
    loop(128,
     activeNotes[i] == msg2 ? (
      activeNotes[i] = -1;
      activeVel[i] = -1;
     );
     i += 1;
    );
);



function IsStrumDown()
(
  ((msg1 == (0x90 + mChan)) && (msg2 == dnst) && (msg3 > 0)) ? (1) : 0;

);
(

  ((msg2 == slst))  ? slwstr = slwstrsp;    
 
 
);  



function IsStrumUp()
(
  ((msg1 == (0x90 + mChan)) && (msg2 == upst) && (msg3 > 0)) ? (1) : 0;
  
);
(

  ((msg2 == slst))  ? slwstrsp = slwstr ;    
 
 
); 

function IsStrumDownEnd()
(
  ((msg1 == (0x90 + mChan)) && (msg2 == dnst) && (msg3 == 0)) ||
  ((msg1 == (0x80 + mChan)) && (msg2 == dnst)) ? (1) : 0;     
);

function IsStrumUpEnd()
(
  ((msg1 == (0x90 + mChan)) && (msg2 == upst) && (msg3 == 0)) ||
  ((msg1 == (0x80 + mChan)) && (msg2 == upst)) ? (1) : 0;
  
);

function sendNoteOff()
(
  i = 0;
  j = activeNotes[i];
  // send all active chord note off
  while((i < countNotes) && (j != -1)) (
    midisend(os, 0x80 + cChan, activeNotes[i], activeVel[i]);
    i += 1;
    j = activeNotes[i];
    slwstr = 0
  );
);

while (midirecv(os,msg1,msg2,msg3)) (
  // if CC 64
  (msg1 == (0xB0 + mChan)) && (msg2 == 64) && (msg3 >= 64) ? (
    latch = 1;
    latchTgl = 0;
    midisend(os, msg1, msg2, msg3);
  ) : (msg1 == (0xB0 + mChan)) && (msg2 == 64) && (msg3 < 64) ? (
    latch = 0;
    midisend(os, msg1, msg2, msg3);
  // if note-on and if carrier channel AND not mod and note
  ) : (msg1 == (0x90 + cChan)) && (msg3 > 0) && !(IsStrumUp() || IsStrumDown()) ? (
    countNotes += 1;
    AddNote(msg2, msg3);
    SortNotes();
    (strumUp + strumDown > 0) ? (
      midisend(os, msg1, msg2, msg3);
    );
  // else if note off and carrier channel and not mod and note
  ) : (((msg1 == (0x90 + cChan)) && (msg3 == 0)) || (msg1 == (0x80 + cChan)) && !(IsStrumUpEnd() || IsStrumDownEnd())) ? (
    countNotes -= 1;
    RemoveNote(msg2);
    SortNotes();
    // send note off (prevents stuck MIDI notes)
    midisend(os, msg1, msg2, msg3);
  ) : IsStrumUp() ? (
    (((strumUp + strumDown + latch > 0)) && (noteOffStrum == 1)) ? (
      sendNoteOff();
    );
    i = 0;
    j = activeNotes[i];
    n = 0;
    // add all chord notes to buffer
    while(i < countNotes) (
      j != -1 ? (
        buf[k + 0] = os +  (n*slwstr) ;  //(n*strm);
        buf[k + 1] = 0x90 + cChan;
        buf[k + 2] = activeNotes[i];
        buf[k + 3] = max(min(127,((cVel * activeVel[i]) + (mVel * msg3)))+(n*newVel),1);
        k += 4;
        n += 1;
      );
      i += 1;
      j = activeNotes[i];     
    );
    strumUp = 1;  
  ) : IsStrumDown() ? (
    (((strumUp + strumDown + latch > 0)) && (noteOffStrum == 1)) ? (
      sendNoteOff();
    );
    i = countNotes;
    j = activeNotes[i];
    n = 0;
    // add all chord notes to buffer
    while(i >= 0) (
      j != -1 ? (
        buf[k + 0] = os + (n*slwstr);  //(n*strm);
        buf[k + 1] = 0x90 + cChan;
        buf[k + 2] = activeNotes[i];
        buf[k + 3] = max(min(127,((cVel * activeVel[i]) + (mVel * msg3)))+(n*newVel),1);
        k += 4;
        n += 1;
      );
      i -= 1;
      j = activeNotes[i];
    );
    strumDown = 1;   
  ) : IsStrumDownEnd() ? (
    ((strumUp * strumDown) == 0) && (latch == 0) ? (
      sendNoteOff();
    );
    strumDown = 0;
  ) :  IsStrumUpEnd() ? (
    ((strumUp * strumDown) == 0) && (latch == 0) ? (
      sendNoteOff();
    );
    strumUp = 0;
  ) :  midisend(os, msg1, msg2, msg3);
  
  ((latch == 0) && (strumUp + strumDown == 0) && (latchTgl == 0)) ? (
    sendNoteOff();
    latchTgl = 1;
  );
);

i = 0;
while (i < k)  (
    os = buf[i + 0];
    os < samplesblock ? (
     midisend(os, buf[i + 1], buf[i + 2], buf[i + 3]);
     memcpy(buf + i, buf + i + 4, k - i);
     k -= 4;
    ) : (
     buf[i + 0] -= samplesblock;
     i += 4;
    );
);
MusoBob is offline   Reply With Quote
Old 05-26-2018, 04:34 AM   #34
mduque
Human being with feelings
 
Join Date: Sep 2015
Posts: 23
Default It does not play unless I press one of the Strum Keys

Why it does not play? Only when I press the strum key. It's uncomfortable for live play. Is there a way to avoid this?
mduque is offline   Reply With Quote
Old 05-26-2018, 06:39 AM   #35
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

@mduque

By design, the chord won't sound until one of the strum keys is pressed (one key for downstrum, one key for upstrum).

What kind of behavior would you expect and/or want?
pcartwright is offline   Reply With Quote
Old 05-28-2018, 11:16 AM   #36
mduque
Human being with feelings
 
Join Date: Sep 2015
Posts: 23
Default

Quote:
Originally Posted by pcartwright View Post
@mduque

By design, the chord won't sound until one of the strum keys is pressed (one key for downstrum, one key for upstrum).

What kind of behavior would you expect and/or want?
Hi. Just the same behavior than other guitar libraries. Free playing and repeat strumming when I press one of the keys

The plugin is excellent by the way.
mduque is offline   Reply With Quote
Old 05-28-2018, 02:44 PM   #37
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

If you use JS MegaBaby to store your strum patterns, set Reaper to loop/play
then when you send the chord from your keyboard it will strum that chord
to the pattern chosen in MegaBaby.
MusoBob is offline   Reply With Quote
Old 09-01-2018, 04:02 PM   #38
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

Quote:
Originally Posted by pcartwright View Post
Would something like this be helpful?

Options so far are keyswitch or CC message.



You could have several of these in a row that mapped different down/up strum keys to different effects. The settings I have above would map to muted down and up strums in your example above.

Sorry have been doing other things, just getting back to this now.
Have you got something like this I could try ?
MusoBob is offline   Reply With Quote
Old 09-01-2018, 05:55 PM   #39
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 908
Default

Yes and no, I ran into an issue. Mainly, how do I filter and pass relevant MIDI information down a chain of these effects.

Instead of combining it into one effect, I created a second effect called "MIDI Strummer Mapper." The idea is that you could have several of these mapper plugins running in a series. Each instance would allow you to trigger a different CC event or keyswitch depending on which key is used as a "strum down" or "strum up."

I haven't given it a lot of time, so it's probably a bit buggy. Let me know if you're interested in testing and I'll send you the effect, but I can't guarantee timely fixes or any sort of feature request at this point.
pcartwright is offline   Reply With Quote
Old 09-01-2018, 09:25 PM   #40
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 295
Default

Thanks, I can try the beta version.
MusoBob 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 03:48 AM.


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