Re: [PD] closest frequency in scale

2012-05-24 Thread William Brent
For other scales, you can store all the notes in an array.  When each
of your random numbers appears, do a quick search for the closest note
in the scale.



On Wed, May 23, 2012 at 4:21 AM, Matthias Kronlachner
m.kronlach...@student.tugraz.at wrote:
 if you mean as specific scale the equal tempered you can use [ftom] to
 convert from frequency to midi note numbers.
 then you round this number to integer and with [mtof] back to have a
 frequency value.

 matthias

 Am 23.05.12 10:29, schrieb flad chester:

 Hi list, im new with pd, i was thinking about which should be the best way
 to implement this idea or maybe somebody has done something like this
 before:
 Im controlling the frequencies of my grains with a random number generator,
 but instead of controlling the frequencies directly i would like to select
 the closest frequency in a specific scale for each random value.

 how can i do this in pd?


 thanks in advance

 Flad







 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list



 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list




-- 
William Brent
www.williambrent.com

“Great minds flock together”
Conflations: conversational idiom for the 21st century

www.conflations.com

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] closest frequency in scale

2012-05-23 Thread Pierre Massat
Hi,

I'm not sure I got your question right, but one thing you can do is map the
output of your random number generator.
Say you get a random number ranging from 0 to 1and you want the frequency
to be between 200 Hz and 10KHz :
- multiply the random number by 1 - 200 = 9800,
- then add 200.

You can change the two boundaries between two random numbers.

Pierre.

2012/5/23 flad chester flad.ches...@gmail.com

 Hi list, im new with pd, i was thinking about which should be the best way
 to implement this idea or maybe somebody has done something like this
 before:
 Im controlling the frequencies of my grains with a random number
 generator, but instead of controlling the frequencies directly i would like
 to select the closest frequency in a specific scale for each random value.

 how can i do this in pd?


 thanks in advance

 Flad






 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] closest frequency in scale

2012-05-23 Thread Matthias Kronlachner
if you mean as specific scale the equal tempered you can use [ftom] to 
convert from frequency to midi note numbers.
then you round this number to integer and with [mtof] back to have a 
frequency value.


matthias

Am 23.05.12 10:29, schrieb flad chester:
Hi list, im new with pd, i was thinking about which should be the best 
way to implement this idea or maybe somebody has done something like 
this before:
Im controlling the frequencies of my grains with a random number 
generator, but instead of controlling the frequencies directly i would 
like to select the closest frequency in a specific scale for each 
random value.


how can i do this in pd?


thanks in advance

Flad







___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -  
http://lists.puredata.info/listinfo/pd-list


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list