[PD] Note name to frequency

Frank Barknecht fbar at footils.org
Wed Sep 26 22:30:35 CEST 2007


Hallo,
Sam Clayton hat gesagt: // Sam Clayton wrote:

> Is there an external or abstraction that can take a symbol from a
> message such as "Ab4" and output a frequency message, such as
> "207.65234879"? It would be something like mtof, but for text rather
> than midi note numbers.
> 
> Are there any externals dealing with turning text representations of
> chords such as "Cma7" (or some other format) and sending the
> appropriate frequencies to a collection of oscillators?
> 
> If not, could someone point me in the right direction to write an
> abstraction or external to do this?

I think, the pdmtl collection has some objects for this. But it's not
hard to make your own and maybe it's a good excercise. One basic idea
could be to use [select] or [route] to route symbols accordingly. For
example

 [select C C# D ...]
 |     |    |
 [60(  [61( [62( ...

It's a bit tedious to patch this for all notes, but make an
abstraction out of it and you only need to do it once and then can
reuse that abstraction your whole Pd life.

Hint: Don't make a [select] with 128 arguments, instead use several [select]s
and connect the last and first inlets like:

 [select a b c d ... i j ]/[select k l m ... o] ...

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__




More information about the Pd-list mailing list