Page 1 of 2
slider to adjust note velocity of any midi exiting Lemur?
Posted: 14 Jun 2015 20:41
by eross21
I have a drum kit template set up in lemur. I can finger drum Midi notes out of Lemur to drum apps, it works great. However, they are all at max velocity. I want to put a single fader all alongside of my drum pads in Lemur. All I want it to do is to adjust the velocity of and midi note coming out of Lemur. How can I do this?
eross21
Re: slider to adjust note velocity of any midi exiting Lemur
Posted: 16 Jun 2015 01:28
by ndivuyo
Hey you will need to do it with scripting because on the standard midi out the velocity is tied to the x values of the pads and then scaled to 127.
you will use the command noteout()
I can try and work out an example later and you can analyze it, it is not very complex.
There are other methods too, but noteout() works nice
In the meantime try searching for it in the manual and all, but I will post later
Re: slider to adjust note velocity of any midi exiting Lemur
Posted: 16 Jun 2015 02:41
by ndivuyo
Ok wow it was a little more of a handful than I thought to make because of getting the pitches to ascend correctly and not have stuck notes.
But yea, this is a pretty solid example. To see how it works go to the DrumPads object and look inside the script called "Press()"
If you are new to scripting, none it may make sense and if you want to figure it out you will have to learn some scripting. Otherwise if you have questions let me know!
Also don't change the lowest pitch knob if notes are still sustaining.
**(Moved file over to modules section)
Re: slider to adjust note velocity of any midi exiting Lemur
Posted: 16 Jun 2015 20:18
by eross21
awesome. I am going to try it out as soon as I get home from work. I can't wait!! As far as beginning to learn scripting, where can I go to learn? what kind should I learn? C, C+, Java? or is there a specific lemur scripting language. I'd like to learn to do very basic scripting. thanks again
Re: slider to adjust note velocity of any midi exiting Lemur
Posted: 17 Jun 2015 02:10
by eross21
Nicolas,
I saw your template you made for me on the forum. it works great! However, I am having getting the right pads were i want them on your grid. I really dont need the pitch wheel. I am attaching my ergonomic drum layout template i made up. Can you add or explain to me how to add just the velocity slider you had on your template, to mine? I tried copying and pasting, but it doesn't work. do i have to copy scripting over for velocity? were can i see the scripting. thanks again, your awesome.
Re: slider to adjust note velocity of any midi exiting Lemur
Posted: 17 Jun 2015 04:38
by ndivuyo
Ok for this you can do it in a few ways.
One way is to individually put in a script that sends a simplified noteout() expression.
Another way is to manage them all in one array.
and more
ok I will show you in a bit. And you can look at the script, maybe it will make more sense when it is individual like this.
Fun design! If you learn some scripting, in the future you could draw something like this in canvas, and then have the freedom to move it around and do whatever else. Just liked your design and thought I'd say that.
My name is Dillon by the way
Re: slider to adjust note velocity of any midi exiting Lemur
Posted: 17 Jun 2015 04:56
by ndivuyo
Ok here you go. I started the work for you, but I won't finish.
Super easy though.
-- So go to the pad called "kick" (in the scripting explorer on the bottom right section of the editor).
--it will have a script called "act()" and an expression called "pitch"
--copy and paste these two things into every Drum Pad object. (I think I did 4 of them for you)
--then change the "pitch" expression of each one to the pitch you want to send out.
--while you do this, uncheck the "x" variable (important!!) that will prevent it from being sent out and clashing with the noteout() command
that should do it! Let me know if you have questions
If you want to change the target or channel of them, use the "channel" and "target" expressions I made int he scripting menu
Re: slider to adjust note velocity of any midi exiting Lemur
Posted: 17 Jun 2015 05:02
by ndivuyo
I think you can figure out the scripting easier now that they are individual scripts.
It's pretty simple:
-It's a condition saying if the "x" variable equals one, then it will send a MIDI note with those 4 arguments (target,pitch,velocity,channel). In this case the velocity will be 127 (vel.x*127)
-and then "else" meaning if x doesn't equal one (x equals 0) it will send out a MIDI note but with the velocity at 0 (a note off).
and at the top of the script you will see it is executed o"n expression" "x"
-so the script happens whenever the "x" expression value changes (when you press the pad and release it)
You can also see how having all the drum pads on one object makes the scripting easier and cleaner (like the first thing I sent you)
-so if you drew al these squares o canvas, you could manage all the scripts in one place like before. Just saying lol
Re: slider to adjust note velocity of any midi exiting Lemur
Posted: 17 Jun 2015 12:09
by eross21
so I guess I am confused with scripting. were to I type the scripting ? does it get typed into each drum pads settings, or into the slider settings, or does scripting all go onto its own page? sorry, I have never done scripting, so I'm kind of confused as to how it gets laid out. Can the scripting be done on my iPad,or do I have to do all of this through the computer lemur designer? is there any way you could script the velocity slider to the last template I sent you, then I can see we're the scripting comes into play? thanks your awesome. I feel like I'm learning a lot from all your help.
Re: slider to adjust note velocity of any midi exiting Lemur
Posted: 17 Jun 2015 12:26
by eross21
sorry, I just your 2 post above. I will defiantly try the scripting, and let you know how it goes. thanks for the compliments on the design. I love that layout. I can drums very quick and precisely with that layout.