Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

key follow formula

For general discussion related FlowStone

key follow formula

Postby Logado » Wed Jun 10, 2015 12:45 pm

Can somebody tell formula.
I thought that there just pitch multiplied by the coefficient. But I began to compare realized that there a little more complex.
Logado
 
Posts: 62
Joined: Tue Jan 06, 2015 5:42 pm

Re: key follow formula

Postby tulamide » Wed Jun 10, 2015 2:23 pm

Key follow means, that, for example, a filter will adjust its cutoff according to the octave steps from the reference note.
Mostly the reference note is middle C, so if a note plays 1 octave higher (and key follow is at 100%) the filter will open up to double the cutoff frequency.

reference is C3, note played is C4, lowpass is set to 1 kHz, follow key is at 100% --> the filter will open up to 2kHz
reference is C3, note played is C2, lowpass is set to 1 kHz, follow key is at 100% --> the filter will open up to 500 Hz
reference is C3, note played is F#2, lowpass is set to 1 kHz, follow key is at 100% --> the filter will open up to 1.5 kHz

That said, and if pitch is the midi note number, it should work with

cutoff + ((pitch - 60) / 12 * cutoff * fkdepth)

where fkdepth is a percentage value in the range [0, 1], for the strength of the follow key function
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: key follow formula

Postby Logado » Wed Jun 10, 2015 2:31 pm

thank you, understood
Logado
 
Posts: 62
Joined: Tue Jan 06, 2015 5:42 pm

Re: key follow formula

Postby tulamide » Sun Jun 14, 2015 1:52 pm

Hey Logado,

I made a big mistake (that also nobody else seem to have noticed). It leads to the change being made absolute rather than relative!

Here is the corrected, relative version:
Code: Select all
cutoff = 1000      #a cutoff frequency like from a filter
reference = 60.0   #To what midi note does the function refer to (middle c = 60)
pitch = 60.0      #The current pitch as midi note
fkdepth = 1.0      #The strength of the follow-key-function

f = 0.0
oct = (pitch / 12.0) - (reference / 12)

if oct < 0
   f = 1 / (oct.abs * 2)
elsif oct == 0
   f = 1.0
else
   f = oct.abs * 2
end

result = cutoff * (f * fkdepth)
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: key follow formula

Postby Logado » Sun Jun 14, 2015 4:24 pm

I think it works well now. But if keyfollow set to zero filter is always closed. I need to add сlassic dry/wet mix?
Attachments
keyfollow.fsm
(221.72 KiB) Downloaded 868 times
Logado
 
Posts: 62
Joined: Tue Jan 06, 2015 5:42 pm

Re: key follow formula

Postby Nubeat7 » Sun Jun 14, 2015 6:11 pm

yes if depth is 0% , cutoff knob should set the the filter

why not do all the calculation in the pitch range

so it would be cutoff(pitch) = (pitch - reference)*depth+cutoff(pitch)

and then convert the range from pitch to 0..1

its like in the stock module just that you also subtract the reference octave from the pitch
Attachments
keyfollow.fsm
(739.03 KiB) Downloaded 816 times
Last edited by Nubeat7 on Sun Jun 14, 2015 10:22 pm, edited 1 time in total.
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: key follow formula

Postby Logado » Sun Jun 14, 2015 6:41 pm

I'm happy :D
Logado
 
Posts: 62
Joined: Tue Jan 06, 2015 5:42 pm

Re: key follow formula

Postby tulamide » Sun Jun 14, 2015 8:22 pm

Yes, that was a second absolute-relative error I made. Thanks Nubeat, for correcting it :)

I never saw a key follow funtion in the stock modules. So It was all from my head. Maybe that is an excuse? :oops:
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: key follow formula

Postby Logado » Sun Jun 14, 2015 9:21 pm

tulamide wrote:Yes, that was a second absolute-relative error I made. Thanks Nubeat, for correcting it :)

I never saw a key follow funtion in the stock modules. So It was all from my head. Maybe that is an excuse? :oops:

Do not worry, you guided me on the right path. :)
Logado
 
Posts: 62
Joined: Tue Jan 06, 2015 5:42 pm

Re: key follow formula

Postby Nubeat7 » Sun Jun 14, 2015 10:25 pm

don't mind tulamide, its an interesting thread, i never invested that much thoughts and your explanation makes it very clear i think its also a good thing to do it with a reference octave!
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna


Return to General

Who is online

Users browsing this forum: No registered users and 78 guests

cron