< Back to IRCAM Forum

A4 = 442hz as a general setting

Hi,

Is there a way to set my A4 to 442 hz instead of 440 hz?
I’ve found it buried inside the lisp code for the f->mc but is there an easier way to change it in general, than going in and changing the source of the functions? Also to make sure that it’s done allover and not just the places where I’ve found it.

Best,
Anders

Hi Anders.

It’s the global variable *diapason-freq*, by default 440.0, which is used in the various conversion functions. Setting this to something else in lisp, ie: (setf *diapason-freq* 442), would be one way.

-anders

Hi both Anders, @bresson

How about a simple box call : tune, or something you can put in a patch… For doomies like me… ???

I think I’d rather make it an option in the preferences.

Of course, it’s what I thought but I was wondering if you can change the “preferences” for each patch…

Cheers

Jerome

In this case I think you’d better set a single value box and use it as optional input dfor mc->f &Co.

mc->f doesn’t allow any optional input…

I guess what you mean but can you send a little example, please ?

Many THX in advance

optional input dfor mc->f

Guess this would be generally useful. I’ll add optional inputs for mc->f, as well as f->mc, to get coherent input/output through the conversions.

You’ll find updated versions here:

https://github.com/openmusic-project/om7/blob/master/om/src/packages/score/functions/conversions.lisp

Thanks anders. I don’t think one should try to load that new file in existing OM builds though, as the change in the number of arguments will probably produce errors.
Better wait for the next beta. I’ll also add the “diapason-freq” in the preferences.

1 Like

change in the number of arguments will probably produce errors

Right.

If you need this right away then, you can pack it into a function like this:

(defun my-mc->f (mcs &optional (concert-pitch 440.0))
  (let ((*diapason-freq* concert-pitch))
    (mc->f mcs)))

Thank you for all the different suggestions. It’s really helpful!
I’ve got it working for now, and learned a few lisp-tricks for open music along the way.
looking forward as well to the implementation in the next beta.

1 Like