Csound Csound-dev Csound-tekno Search About

A4 for midi -> freq conversion

Date2016-08-31 15:00
FromEduardo Moguillansky
SubjectA4 for midi -> freq conversion
Hi all,

I am finishing a csound patch to perform Stockhausen's Mantra for two pianos and ring-modulators (using a nice diode simulation udo posted here: http://kunstmusik.com/2013/09/07/julian-parker-ring-modulator/), and it would be nice to be able to set a global A4 to modify the behaviour of cpsmidinn and all other conversion opcodes. Of course it is easy to set one's own mtof udo (that's what I am doing) but this seems to be a very common problem at least here in germany where A4=442 or sometimes 443

Best regards,
Eduardo Moguillansky

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2016-08-31 15:23
FromVictor Lazzarini
SubjectRe: A4 for midi -> freq conversion
Sounds like a simple thing to do, affecting all cps translations. Can you file a feature request?
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 31 Aug 2016, at 15:00, Eduardo Moguillansky  wrote:
> 
> Hi all,
> 
> I am finishing a csound patch to perform Stockhausen's Mantra for two pianos and ring-modulators (using a nice diode simulation udo posted here: http://kunstmusik.com/2013/09/07/julian-parker-ring-modulator/), and it would be nice to be able to set a global A4 to modify the behaviour of cpsmidinn and all other conversion opcodes. Of course it is easy to set one's own mtof udo (that's what I am doing) but this seems to be a very common problem at least here in germany where A4=442 or sometimes 443
> 
> Best regards,
> Eduardo Moguillansky
> 
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-08-31 19:52
FromTarmo Johannes
SubjectRe: A4 for midi -> freq conversion
Hi,

I think you don't need an special UDO - you can just multiply all your 
frequencies with 442/440 (probably best to set as an global varable) ... if I 
am correct

something like

#define A4 #443#

giTuningCorrection =  $A4/440

instr something
	inote = p4
	ifreq  = cpsmidinn(inote) * giTuningCorrection
endin

tarmo

On Wednesday 31 August 2016 16:00:45 you wrote:
> Hi all,
> 
> I am finishing a csound patch to perform Stockhausen's Mantra for two
> pianos and ring-modulators (using a nice diode simulation udo posted here:
> http://kunstmusik.com/2013/09/07/julian-parker-ring-modulator/), and it
> would be nice to be able to set a global A4 to modify the behaviour of
> cpsmidinn and all other conversion opcodes. Of course it is easy to set
> one's own mtof udo (that's what I am doing) but this seems to be a very
> common problem at least here in germany where A4=442 or sometimes 443
> 
> Best regards,
> Eduardo Moguillansky
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-08-31 21:05
From"Vieira Damiani, Luis F"
SubjectRe: A4 for midi -> freq conversion
Tarmo is correct, just multiply by 442/440. The formula for converting between midi note numbers and frequencies in 12-TET is

frequency = 2^{(midinn - 9) / 12} * 13.75 ,

where 13.75 = 440 / 32.

Luis

> On Aug 31, 2016, at 2:52 PM, Tarmo Johannes  wrote:
> 
> Hi,
> 
> I think you don't need an special UDO - you can just multiply all your 
> frequencies with 442/440 (probably best to set as an global varable) ... if I 
> am correct
> 
> something like
> 
> #define A4 #443#
> 
> giTuningCorrection =  $A4/440
> 
> instr something
> 	inote = p4
> 	ifreq  = cpsmidinn(inote) * giTuningCorrection
> endin
> 
> tarmo
> 
> On Wednesday 31 August 2016 16:00:45 you wrote:
>> Hi all,
>> 
>> I am finishing a csound patch to perform Stockhausen's Mantra for two
>> pianos and ring-modulators (using a nice diode simulation udo posted here:
>> http://kunstmusik.com/2013/09/07/julian-parker-ring-modulator/), and it
>> would be nice to be able to set a global A4 to modify the behaviour of
>> cpsmidinn and all other conversion opcodes. Of course it is easy to set
>> one's own mtof udo (that's what I am doing) but this seems to be a very
>> common problem at least here in germany where A4=442 or sometimes 443
>> 
>> Best regards,
>> Eduardo Moguillansky
>> 
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-08-31 23:06
Fromluis jure
SubjectRe: A4 for midi -> freq conversion
el 2016-08-31 a las 21:52 Tarmo Johannes escribió:

> something like
> 
> #define A4 #443#
> 
> giTuningCorrection =  $A4/440
>
> [....]

of course you can do the calculation "by hand" in the orchestra code, but
i always thought that there should be an optional global variable in the
header, setting the value of A4 for all the pitch converters.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-09-01 06:46
FromVictor Lazzarini
SubjectRe: A4 for midi -> freq conversion
John's added one in now.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 31 Aug 2016, at 23:06, luis jure  wrote:
> 
>> el 2016-08-31 a las 21:52 Tarmo Johannes escribió:
>> 
>> something like
>> 
>> #define A4 #443#
>> 
>> giTuningCorrection =  $A4/440
>> 
>> [....]
> 
> of course you can do the calculation "by hand" in the orchestra code, but
> i always thought that there should be an optional global variable in the
> header, setting the value of A4 for all the pitch converters.
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-09-01 13:50
Fromluis jure
SubjectRe: A4 for midi -> freq conversion
el 2016-09-01 a las 06:46 Victor Lazzarini escribió:

> John's added one in now.

that's great! thanks!

could we have some more info? (name of the variable, and how to use it?)






-

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-09-01 14:04
FromJohn
SubjectRe: A4 for midi -> freq conversion

A4 = 443
in the header if not 440
Then a variable like 0dbfs

In git now

Sent from TypeApp

On 1 Sep 2016, at 13:49, luis jure <ljc@INTERNET.COM.UY> wrote:
el 2016-09-01 a las 06:46 Victor Lazzarini escribió:

John's added one in now.

that's great! thanks!

could we have some more info? (name of the variable, and how to use it?)






-

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-09-01 14:58
Fromluis jure
SubjectRe: A4 for midi -> freq conversion
el 2016-09-01 a las 14:04 John escribió:

> A4 = 443
> in the header if not 440

perfect, just as we all suspected!

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here