CV to Hertz module?

sdv
Posts: 58
Joined: Fri Mar 27, 2020 7:21 pm

CV to Hertz module?

Post by sdv » Tue May 26, 2020 3:54 am

I'm wondering if any of the devs have created a CV to Hertz module? I've looked through, I think, all of the modules but have 't seen one so far.
I'd like to use such a module to aid in 'tuning' my sequencers & oscillators in a non-quantized manner.

andro
Posts: 125
Joined: Mon Apr 06, 2020 4:45 am

Re: CV to Hertz module?

Post by andro » Tue May 26, 2020 5:17 am

You mean convert the pitch 1V/octave CV to frequency, based on A= 440 Hz?

I don't think there is one currently in the store, is there?

I have started module development - this is a very easy module to write. Let me have a go at it for us. I currently have a six output frequency reference oscillator module that the knob lets you set a reference frequency output in Hertz. Is this of any use to you?

sdv
Posts: 58
Joined: Fri Mar 27, 2020 7:21 pm

Re: CV to Hertz module?

Post by sdv » Tue May 26, 2020 1:06 pm

andro wrote:
Tue May 26, 2020 5:17 am
You mean convert the pitch 1V/octave CV to frequency, based on A= 440 Hz?

I don't think there is one currently in the store, is there?

I have started module development - this is a very easy module to write. Let me have a go at it for us. I currently have a six output frequency reference oscillator module that the knob lets you set a reference frequency output in Hertz. Is this of any use to you?
What I'm looking for is a display module, not necessarily a generator module. I'd like to know what the actual Hertz value is for a particular Voltage. For example Andrew Macaulay has a CV Note Display module so it's easy to tell what note is being generated by a particular voltage. I'd like something similar which could tell me the Hertz value frequency of a particular voltage.
I haven't thought about what the base reference should be (i.e. A = 440hz) as I'd like like to decouple the idea of a 'note' from the voltage, if that makes sense. So, I know that's an issue as there must be some kind of factor which needs to be part of the equation to "convert" voltage to frequency.

andro
Posts: 125
Joined: Mon Apr 06, 2020 4:45 am

Re: CV to Hertz module?

Post by andro » Tue May 26, 2020 1:43 pm

I have nearly finished it. It has a tunable A reference, naturally.

Interestingly, there is are some subtle exponential equations to solve for this, and they are sensitive to about 9 decimal places (such is exp()). My background is mathematics so this is right up my alley.

cheerio!

User avatar
honki-bobo
Posts: 88
Joined: Sat Nov 09, 2019 1:18 pm

Re: CV to Hertz module?

Post by honki-bobo » Tue May 26, 2020 2:27 pm

Given that you are using a 440Hz base tuning, this formula converts Volts to Hz:
Screenshot (219).jpg
Screenshot (219).jpg (70.74 KiB) Viewed 1027 times
You can replace the 55.0 in the formula by (base tuning / 8) if you want to change your base tuning.
Image
Monkey Business Audio
Modules - Forum

sdv
Posts: 58
Joined: Fri Mar 27, 2020 7:21 pm

Re: CV to Hertz module?

Post by sdv » Tue May 26, 2020 2:44 pm

honki-bobo wrote:
Tue May 26, 2020 2:27 pm
Given that you are using a 440Hz base tuning, this formula converts Volts to Hz:
55.0*2^(x+0.25)
You can replace the 55.0 in the formula by (base tuning / 8) if you want to change your base tuning.
Ohhh, that's *very* handy! Thanks for the help!

sdv
Posts: 58
Joined: Fri Mar 27, 2020 7:21 pm

Re: CV to Hertz module?

Post by sdv » Tue May 26, 2020 2:50 pm

andro wrote:
Tue May 26, 2020 1:43 pm
I have nearly finished it. It has a tunable A reference, naturally.

Interestingly, there is are some subtle exponential equations to solve for this, and they are sensitive to about 9 decimal places (such is exp()). My background is mathematics so this is right up my alley.

cheerio!
That's great! Looking forward to seeing what you come up with. Can never have too many utility modules!

terrymcg
Posts: 51
Joined: Mon Apr 08, 2019 12:35 am

Re: CV to Hertz module?

Post by terrymcg » Wed May 27, 2020 12:36 am

andro wrote:
Tue May 26, 2020 1:43 pm
Interestingly, there is are some subtle exponential equations to solve for this, and they are sensitive to about 9 decimal places (such is exp()). My background is mathematics so this is right up my alley.
BigDecimal is your friend. ;)

andro
Posts: 125
Joined: Mon Apr 06, 2020 4:45 am

Re: CV to Hertz module?

Post by andro » Wed May 27, 2020 1:41 am

@honki-bobo, having myself just written a volt meter, I am surprised to see yours. I can't find it on the store. That's worth releasing (in competition with my upcoming one).

andro
Posts: 125
Joined: Mon Apr 06, 2020 4:45 am

Re: CV to Hertz module?

Post by andro » Wed May 27, 2020 4:59 am

Hi @honki-bobo, your equation for volts to Hertz is not only correct, of course, but brilliant. It's deeply insightful. I just figured out the exponential from the zero volts value and 2.75 volts for A400 but I used

y = ab^x

instead of the x shifted form

y = ab^(x+c)

So I end up with y = 65.406398*2^x whereas you have the vastly more elegant y = 55*2^(x + 0.25). The 0.25 is of course the negative voltage offset at 55 Hz based on A440, the voltage for 55Hz being -0.25V.

Hat off to you. Sometimes I wonder why I am so dumb! Did you derive that yourself or is it well known and I am just ignorant of basic things?

Post Reply