Page 1 of 1

Set scale to fader and have a fader trigger a note

Posted: 26 Dec 2015 21:07
by Stelvio
Hello everyone,

I am building my very first Lemur Template, quite a simple one hopefully.

In this template I have 2 faders,
In Sylenth, I mapped the 1st Lemur fader to an envelope (I use sustain) which modulates Pitch A (Sylenth part1 = 2 oscillators).
In Sylenth, I mapped the 2nd Lemur fader to another envelope which modulates Pitch B (Sylenth part2 = 2 oscillators).
So now I can fine tune the tuning of each note individually within the same synth. A cool way to get a chord morphing into a different chord with nice smooth pitch slopes and without notes steps (unfortunately only 2 notes).

Now I'm wondering,

Can I make a fader trigger a note? So that when I touch a fader it will trigger Sylenth.

More tricky, can I set a scale to the fader's values ? Or if scale is not an option maybe a set of values ranges ?
So when I pitch down or up, I fall on more "musical" values

Thank you for any help :))

Re: Set scale to fader and have a fader trigger a note

Posted: 27 Dec 2015 00:38
by ndivuyo
Yea all this is possible.
You can handle it through a custom MIDI expression, or in scripting with the [noteout()] message (as far as the note triggering is concerned).

If you want to send a note every time you touch and release the fader, you will use the change in the 'z' value as the trigger.
If in scripting:
- Make a script that executes on Expression 'z' of the desired fader.
- You can make a condition:
if (z == 1)
noteout(your note on arguments);
else
noteout(your note off arguments);

There are also different ways to do this of course, but if z is equal to '1', then you are touching the fader.
You can also do it with a custom MIDI expression.


For making a scale, is doable, need to do it in scripting. Instead of sending your CC values through the normal way, you will have to disable that and instead send them through a [ctlout()] function or another custom MIDI expression.

ctlout() sends a CC MIDI message with arguments (target, controlNumber, value, channel)

There are really so many ways to set this up, some more efficient than others, knowledge in scripting is very helpful.
You need to find out the equivalent pitch values from the 0-127 CC values (I would assume they are note the same as MIDI note values?)
You need to use an array with either the various pitch notes of a key like 'C' and a variable that adds to or subtracts from them to change the key. A better way to me would be to have array with the step values between each note (like in a major scale for note MIDI data it would be like: {2,2,1,2,2,2,1} maybe) but the problem is that it could be hard to find them for the tuning CC data. But anyway if you could figure it out, then you could have a base note value and add those different values (you need to learn how to work with arrays in lemur).
Anyway, kind of hard to explain, especially cuz so many methods, but you would send the value through the ctlout() function instead of the regular x expression. Try searching and playing around with i and ask questions when you got some.

Hope that helps