Csound Csound-dev Csound-tekno Search About

[Csnd] freq input in place to transposition ratio

Date2013-04-10 10:08
FromStéphane_Boussuge
Subject[Csnd] freq input in place to transposition ratio
hi,

i 'm not very good in math and i can't figure how to do a small piece of csound code (UDO?) who help me to give frequency in place of a transposition ratio to a mincer opcode (and in general for all the opcode who need transposition ratio).

It will be useful for me for many things, tuning, Blue tuning parameter processing, algorithmic generation etc ....



thanks


stf
 

Date2013-04-10 15:05
FromJustin Smith
SubjectRe: [Csnd] freq input in place to transposition ratio
frequency / base = transposition
alternately:

base * transposition = frequency

ibase = 440 ; recording of a 440 hz note
itranpos = 1000 / ibase ; the transposition factor to make a 1khz output

I guess you could do a udo

opcode trapspos i,ii
ihz, ibase xin
               xout ihz/ibase
endop

this only makes sense when the input sound is pitched and you know the pitch, obviously


On Wed, Apr 10, 2013 at 2:08 AM, Stéphane_Boussuge <stfboussuge@gmail.com> wrote:

hi,

i 'm not very good in math and i can't figure how to do a small piece of csound code (UDO?) who help me to give frequency in place of a transposition ratio to a mincer opcode (and in general for all the opcode who need transposition ratio).

It will be useful for me for many things, tuning, Blue tuning parameter processing, algorithmic generation etc ....



thanks


stf


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-04-10 15:17
FromStéphane_Boussuge
SubjectRe: [Csnd] freq input in place to transposition ratio
Thank you Justin, 
i will explore that ASAP.


best


stf

Le 10 avr. 2013 à 16:05, Justin Smith <noisesmith@gmail.com> a écrit :

frequency / base = transposition
alternately:

base * transposition = frequency

ibase = 440 ; recording of a 440 hz note
itranpos = 1000 / ibase ; the transposition factor to make a 1khz output

I guess you could do a udo

opcode trapspos i,ii
ihz, ibase xin
               xout ihz/ibase
endop

this only makes sense when the input sound is pitched and you know the pitch, obviously


On Wed, Apr 10, 2013 at 2:08 AM, Stéphane_Boussuge <stfboussuge@gmail.com> wrote:

hi,

i 'm not very good in math and i can't figure how to do a small piece of csound code (UDO?) who help me to give frequency in place of a transposition ratio to a mincer opcode (and in general for all the opcode who need transposition ratio).

It will be useful for me for many things, tuning, Blue tuning parameter processing, algorithmic generation etc ....



thanks


stf


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2013-04-10 15:21
FromStéphane_Boussuge
SubjectRe: [Csnd] freq input in place to transposition ratio
also, i imagined it is something with root 12th of 2 .......

stf

Le 10 avr. 2013 à 16:17, Stéphane_Boussuge <stfboussuge@gmail.com> a écrit :

Thank you Justin, 
i will explore that ASAP.


best


stf

Le 10 avr. 2013 à 16:05, Justin Smith <noisesmith@gmail.com> a écrit :

frequency / base = transposition
alternately:

base * transposition = frequency

ibase = 440 ; recording of a 440 hz note
itranpos = 1000 / ibase ; the transposition factor to make a 1khz output

I guess you could do a udo

opcode trapspos i,ii
ihz, ibase xin
               xout ihz/ibase
endop

this only makes sense when the input sound is pitched and you know the pitch, obviously


On Wed, Apr 10, 2013 at 2:08 AM, Stéphane_Boussuge <stfboussuge@gmail.com> wrote:

hi,

i 'm not very good in math and i can't figure how to do a small piece of csound code (UDO?) who help me to give frequency in place of a transposition ratio to a mincer opcode (and in general for all the opcode who need transposition ratio).

It will be useful for me for many things, tuning, Blue tuning parameter processing, algorithmic generation etc ....



thanks


stf


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





Date2013-04-10 15:32
FromStéphane_Boussuge
SubjectRe: [Csnd] freq input in place to transposition ratio
It Work perfectly Justin !!!

Sincerely, a big thank you for your help.
This is very useful for me !!
thanks


stf

Le 10 avr. 2013 à 16:21, Stéphane_Boussuge <stfboussuge@gmail.com> a écrit :

also, i imagined it is something with root 12th of 2 .......

stf

Le 10 avr. 2013 à 16:17, Stéphane_Boussuge <stfboussuge@gmail.com> a écrit :

Thank you Justin, 
i will explore that ASAP.


best


stf

Le 10 avr. 2013 à 16:05, Justin Smith <noisesmith@gmail.com> a écrit :

frequency / base = transposition
alternately:

base * transposition = frequency

ibase = 440 ; recording of a 440 hz note
itranpos = 1000 / ibase ; the transposition factor to make a 1khz output

I guess you could do a udo

opcode trapspos i,ii
ihz, ibase xin
               xout ihz/ibase
endop

this only makes sense when the input sound is pitched and you know the pitch, obviously


On Wed, Apr 10, 2013 at 2:08 AM, Stéphane_Boussuge <stfboussuge@gmail.com> wrote:

hi,

i 'm not very good in math and i can't figure how to do a small piece of csound code (UDO?) who help me to give frequency in place of a transposition ratio to a mincer opcode (and in general for all the opcode who need transposition ratio).

It will be useful for me for many things, tuning, Blue tuning parameter processing, algorithmic generation etc ....



thanks


stf


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"






Date2013-04-10 15:32
FromJustin Smith
SubjectRe: [Csnd] freq input in place to transposition ratio
oh, did you want semitones of transposition and not transposition to a particular hz?

(2^(1/12))^semitones translates from a number of semitones to a transposition

(ie. (2^(1/12))^7 is the transposition factor to go up an equal tempered fifth, (2^(1/12))^-7 down a fifth etc.)

I would usually just define isemi=2^(1/12) and then calculate isemi^semitones to get the transposition needed



On Wed, Apr 10, 2013 at 7:21 AM, Stéphane_Boussuge <stfboussuge@gmail.com> wrote:
also, i imagined it is something with root 12th of 2 .......

stf

Le 10 avr. 2013 à 16:17, Stéphane_Boussuge <stfboussuge@gmail.com> a écrit :

Thank you Justin, 
i will explore that ASAP.


best


stf

Le 10 avr. 2013 à 16:05, Justin Smith <noisesmith@gmail.com> a écrit :

frequency / base = transposition
alternately:

base * transposition = frequency

ibase = 440 ; recording of a 440 hz note
itranpos = 1000 / ibase ; the transposition factor to make a 1khz output

I guess you could do a udo

opcode trapspos i,ii
ihz, ibase xin
               xout ihz/ibase
endop

this only makes sense when the input sound is pitched and you know the pitch, obviously


On Wed, Apr 10, 2013 at 2:08 AM, Stéphane_Boussuge <stfboussuge@gmail.com> wrote:

hi,

i 'm not very good in math and i can't figure how to do a small piece of csound code (UDO?) who help me to give frequency in place of a transposition ratio to a mincer opcode (and in general for all the opcode who need transposition ratio).

It will be useful for me for many things, tuning, Blue tuning parameter processing, algorithmic generation etc ....



thanks


stf


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"






Date2013-04-10 15:35
FromStéphane_Boussuge
SubjectRe: [Csnd] freq input in place to transposition ratio
Thank you Justin, i've now all i need for tweaking between transpo, hz and semitone !
very useful !!


stf

Le 10 avr. 2013 à 16:32, Justin Smith <noisesmith@gmail.com> a écrit :

oh, did you want semitones of transposition and not transposition to a particular hz?

(2^(1/12))^semitones translates from a number of semitones to a transposition

(ie. (2^(1/12))^7 is the transposition factor to go up an equal tempered fifth, (2^(1/12))^-7 down a fifth etc.)

I would usually just define isemi=2^(1/12) and then calculate isemi^semitones to get the transposition needed



On Wed, Apr 10, 2013 at 7:21 AM, Stéphane_Boussuge <stfboussuge@gmail.com> wrote:
also, i imagined it is something with root 12th of 2 .......

stf

Le 10 avr. 2013 à 16:17, Stéphane_Boussuge <stfboussuge@gmail.com> a écrit :

Thank you Justin, 
i will explore that ASAP.


best


stf

Le 10 avr. 2013 à 16:05, Justin Smith <noisesmith@gmail.com> a écrit :

frequency / base = transposition
alternately:

base * transposition = frequency

ibase = 440 ; recording of a 440 hz note
itranpos = 1000 / ibase ; the transposition factor to make a 1khz output

I guess you could do a udo

opcode trapspos i,ii
ihz, ibase xin
               xout ihz/ibase
endop

this only makes sense when the input sound is pitched and you know the pitch, obviously


On Wed, Apr 10, 2013 at 2:08 AM, Stéphane_Boussuge <stfboussuge@gmail.com> wrote:

hi,

i 'm not very good in math and i can't figure how to do a small piece of csound code (UDO?) who help me to give frequency in place of a transposition ratio to a mincer opcode (and in general for all the opcode who need transposition ratio).

It will be useful for me for many things, tuning, Blue tuning parameter processing, algorithmic generation etc ....



thanks


stf


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"







Date2013-04-10 16:27
FromRichard Dobson
SubjectRe: [Csnd] freq input in place to transposition ratio
On 10/04/2013 15:32, Justin Smith wrote:
> oh, did you want semitones of transposition and not transposition to a
> particular hz?
>
> (2^(1/12))^semitones translates from a number of semitones to a
> transposition
>
> (ie. (2^(1/12))^7 is the transposition factor to go up an equal tempered
> fifth, (2^(1/12))^-7 down a fifth etc.)
>
> I would usually just define isemi=2^(1/12) and then calculate
> isemi^semitones to get the transposition needed
>
>

That's a number well worth memorizing for musicians, just as 
mathematicians know the first digits of Pi or e. So in this case: 
1.059463094. Something to impress/bore people with at parties, when all 
else fails!

Richard Dobson



Date2013-04-10 16:31
FromRory Walsh
SubjectRe: [Csnd] freq input in place to transposition ratio
Darn you Richard, I've just spent the last 5 minutes trying to memorise these!


On 10 April 2013 16:27, Richard Dobson  wrote:
> On 10/04/2013 15:32, Justin Smith wrote:
>>
>> oh, did you want semitones of transposition and not transposition to a
>> particular hz?
>>
>> (2^(1/12))^semitones translates from a number of semitones to a
>> transposition
>>
>> (ie. (2^(1/12))^7 is the transposition factor to go up an equal tempered
>> fifth, (2^(1/12))^-7 down a fifth etc.)
>>
>> I would usually just define isemi=2^(1/12) and then calculate
>> isemi^semitones to get the transposition needed
>>
>>
>
> That's a number well worth memorizing for musicians, just as mathematicians
> know the first digits of Pi or e. So in this case: 1.059463094. Something to
> impress/bore people with at parties, when all else fails!
>
> Richard Dobson
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>

Date2013-04-10 16:35
FromDave Seidel
SubjectRe: [Csnd] freq input in place to transposition ratio
This is why I love just intonation. Whole-number ratios, baby!

- Dave


On Wed, Apr 10, 2013 at 11:31 AM, Rory Walsh <rorywalsh@ear.ie> wrote:
Darn you Richard, I've just spent the last 5 minutes trying to memorise these!


On 10 April 2013 16:27, Richard Dobson <richarddobson@blueyonder.co.uk> wrote:
> On 10/04/2013 15:32, Justin Smith wrote:
>>
>> oh, did you want semitones of transposition and not transposition to a
>> particular hz?
>>
>> (2^(1/12))^semitones translates from a number of semitones to a
>> transposition
>>
>> (ie. (2^(1/12))^7 is the transposition factor to go up an equal tempered
>> fifth, (2^(1/12))^-7 down a fifth etc.)
>>
>> I would usually just define isemi=2^(1/12) and then calculate
>> isemi^semitones to get the transposition needed
>>
>>
>
> That's a number well worth memorizing for musicians, just as mathematicians
> know the first digits of Pi or e. So in this case: 1.059463094. Something to
> impress/bore people with at parties, when all else fails!
>
> Richard Dobson
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-04-10 16:40
FromMark Brophy
SubjectRe: [Csnd] freq input in place to transposition ratio
Albert Einstein couldn't remember his 7 digit phone number so it might be prudent for musicians to memorize only the first 6 digits of the twelfth root of two or to download an open source spreadsheet like LibreOffice.


On Wed, Apr 10, 2013 at 10:31 AM, Rory Walsh <rorywalsh@ear.ie> wrote:
Darn you Richard, I've just spent the last 5 minutes trying to memorise these!


On 10 April 2013 16:27, Richard Dobson <richarddobson@blueyonder.co.uk> wrote:
> On 10/04/2013 15:32, Justin Smith wrote:
>>
>> oh, did you want semitones of transposition and not transposition to a
>> particular hz?
>>
>> (2^(1/12))^semitones translates from a number of semitones to a
>> transposition
>>
>> (ie. (2^(1/12))^7 is the transposition factor to go up an equal tempered
>> fifth, (2^(1/12))^-7 down a fifth etc.)
>>
>> I would usually just define isemi=2^(1/12) and then calculate
>> isemi^semitones to get the transposition needed
>>
>>
>
> That's a number well worth memorizing for musicians, just as mathematicians
> know the first digits of Pi or e. So in this case: 1.059463094. Something to
> impress/bore people with at parties, when all else fails!
>
> Richard Dobson
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-04-10 17:30
Fromluis jure
SubjectRe: [Csnd] freq input in place to transposition ratio
on 2013-04-10 at 16:27 Richard Dobson wrote:

> 1.059463094. Something to impress/bore people with at parties, when all 
> else fails!

like wow... i can hardly remember the 1.059 part. any idea if it is good
for picking up girls?

Date2013-04-10 17:34
FromOeyvind Brandtsegg
SubjectRe: [Csnd] freq input in place to transposition ratio

The part after 1.059 is better for that. Most of them think the first few numbers are rather lame...

Den 10. apr. 2013 18:31 skrev "luis jure" <ljc@internet.com.uy> følgende:

on 2013-04-10 at 16:27 Richard Dobson wrote:

> 1.059463094. Something to impress/bore people with at parties, when all
> else fails!

like wow... i can hardly remember the 1.059 part. any idea if it is good
for picking up girls?


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2013-04-10 17:55
Fromluis jure
SubjectRe: [Csnd] freq input in place to transposition ratio
on 2013-04-10 at 18:34 Oeyvind Brandtsegg wrote:

> The part after 1.059 is better for that. Most of them think the first few
> numbers are rather lame...

yeah, i guess that's why they always give me the cold shower...

perhaps that's also why i always sing my intervals a bit off.


Date2013-04-10 18:08
FromDave Seidel
SubjectRe: [Csnd] freq input in place to transposition ratio
I'm telling you guys, chicks dig rational numbers.

- Dave


On Wed, Apr 10, 2013 at 12:55 PM, luis jure <ljc@internet.com.uy> wrote:

on 2013-04-10 at 18:34 Oeyvind Brandtsegg wrote:

> The part after 1.059 is better for that. Most of them think the first few
> numbers are rather lame...

yeah, i guess that's why they always give me the cold shower...

perhaps that's also why i always sing my intervals a bit off.



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-04-10 18:19
FromRichard Dobson
SubjectRe: [Csnd] freq input in place to transposition ratio
On 10/04/2013 16:40, Mark Brophy wrote:
> Albert Einstein couldn't remember his 7 digit phone number so it might
> be prudent for musicians to memorize only the first 6 digits of the
> twelfth root of two or to download an open source spreadsheet like
> LibreOffice.
>
>

If you make it just 1.0594631, it gives quite a nice pattern on a 
numeric keypad...


Richard Dobson


Date2013-04-10 21:49
FromOeyvind Brandtsegg
SubjectRe: [Csnd] freq input in place to transposition ratio
Now *that*'s what will get the girls


2013/4/10 Richard Dobson <richarddobson@blueyonder.co.uk>
On 10/04/2013 16:40, Mark Brophy wrote:
Albert Einstein couldn't remember his 7 digit phone number so it might
be prudent for musicians to memorize only the first 6 digits of the
twelfth root of two or to download an open source spreadsheet like
LibreOffice.



If you make it just 1.0594631, it gives quite a nice pattern on a numeric keypad...



Richard Dobson



Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://flyndresang.no/
http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://soundcloud.com/t-emp

Date2013-04-11 05:56
FromRobert or Gretchen Foose
SubjectRe: Re: [Csnd] freq input in place to transposition ratio
Although it's slightly inaccurate,  remember it as 1.059464. 
Why?  Because 0+5+9 = 14, and 4+6+4 = 14, and 1+4 = 5, which of 
course, is the first non-zero digit in the decimal portion of 
the number.  (Shades of Numerology!!)
Bob

On 13:59, luis jure wrote:
>
> on 2013-04-10 at 16:27 Richard Dobson wrote:
>
>> 1.059463094. Something to impress/bore people with at parties, when all
>> else fails!
>
> like wow... i can hardly remember the 1.059 part. any idea if it is good
> for picking up girls?
>

Date2013-04-11 12:55
Fromluis jure
SubjectRe: [Csnd] freq input in place to transposition ratio
on 2013-04-10 at 23:56 Robert or Gretchen Foose wrote:

> Although it's slightly inaccurate,  remember it as 1.059464. 
> Why?  Because 0+5+9 = 14, and 4+6+4 = 14, and 1+4 = 5, which of 
> course, is the first non-zero digit in the decimal portion of 
> the number.  (Shades of Numerology!!)


well, *now* we're talking! if that doesn't get you chicks, i don't know
what will!


(ok, that was my last stupid joke, i promise. it's the result of weeks of
lilypond and that hideous scheme code...)