Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] [ csound-Bugs-3469331 ] GENsone issues

Date2012-01-04 15:36
From"Art Hunkins"
SubjectRe: [Cs-dev] [ csound-Bugs-3469331 ] GENsone issues
IIUC, the example is wrong and is not an appropriate application of GENsone.

The example scales overall amplitude (kamp) based on the frequency of the 
tone. This is properly the use of the Fletcher-Munson curve.

The sone curve is for achieving equal (perceived) *loudness* increments for 
a single tone, regardless of frequency. Hence, in the example, it should be 
applied to kenv.

Art Hunkins

----- Original Message ----- 
From: "SourceForge.net" 
To: "SourceForge.net" 
Sent: Wednesday, January 04, 2012 4:03 AM
Subject: [Cs-dev] [ csound-Bugs-3469331 ] GENsone issues


> Bugs item #3469331, was opened at 2012-01-04 01:03
> Message generated for change (Tracker Item Submitted) made by menno0
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3469331&group_id=81968
>
> Please note that this message will contain a full copy of the comment 
> thread,
> including the initial issue submission, for this request,
> not just the latest update.
> Category: None
> Group: None
> Status: Open
> Resolution: None
> Priority: 5
> Private: No
> Submitted By: Menno (menno0)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: GENsone issues
>
> Initial Comment:
> this is a reminder of possible issues with the GENsone routine.
> Like shown in the example shown below, it works more or less, but still i 
> think that the bass tones and treble tones are not good divided. It is 
> uclear if the shown exaple is the way ti use GENsone.
>
> 
> 
> ; Select audio/midi flags here according to platform
> -odac      ;;;realtime audio out
> ;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
> ; For Non-realtime ouput leave only the line below:
> ; -o gensone.wav -W ;;; for file output any platform
> 
> 
>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
>
>
> instr 1 ; Instrument #1 Simple oscillator with loudness correction.
>
> kcps = cpspch(p4) ; p4 = frequency in pitch-class notation.
> kenv linseg 0, p3*0.25, .00025, p3*0.75, 0 ; Create an amplitude envelope.
> kamp tablei kcps/22050, 2, 1
> a1 oscil 1/kamp, kcps, 1
>  outs a1*kenv, a1*kenv
>
> endin
> 
> 
> f 1 0 16384 10 1 ; sine wave
> f 2 0 16384 "sone" 1 22050 22050 0
>
> i 1 0 0.9 6.00
> i 1 1 0.9 7.01
> i 1 2 0.9 8.02
> i 1 3 0.9 10.03
> i 1 4 0.9 11.03
> e
> 
> 
>
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3469331&group_id=81968
>
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual
> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-01-04 16:19
FromVictor Lazzarini
SubjectRe: [Cs-dev] [ csound-Bugs-3469331 ] GENsone issues
Well, this was probably my fault as I suggested to Menno that the original example was wrong.

Victor
On 4 Jan 2012, at 15:36, Art Hunkins wrote:

> IIUC, the example is wrong and is not an appropriate application of GENsone.
> 
> The example scales overall amplitude (kamp) based on the frequency of the 
> tone. This is properly the use of the Fletcher-Munson curve.
> 
> The sone curve is for achieving equal (perceived) *loudness* increments for 
> a single tone, regardless of frequency. Hence, in the example, it should be 
> applied to kenv.
> 
> Art Hunkins
> 
> ----- Original Message ----- 
> From: "SourceForge.net" 
> To: "SourceForge.net" 
> Sent: Wednesday, January 04, 2012 4:03 AM
> Subject: [Cs-dev] [ csound-Bugs-3469331 ] GENsone issues
> 
> 
>> Bugs item #3469331, was opened at 2012-01-04 01:03
>> Message generated for change (Tracker Item Submitted) made by menno0
>> You can respond by visiting:
>> https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3469331&group_id=81968
>> 
>> Please note that this message will contain a full copy of the comment 
>> thread,
>> including the initial issue submission, for this request,
>> not just the latest update.
>> Category: None
>> Group: None
>> Status: Open
>> Resolution: None
>> Priority: 5
>> Private: No
>> Submitted By: Menno (menno0)
>> Assigned to: Nobody/Anonymous (nobody)
>> Summary: GENsone issues
>> 
>> Initial Comment:
>> this is a reminder of possible issues with the GENsone routine.
>> Like shown in the example shown below, it works more or less, but still i 
>> think that the bass tones and treble tones are not good divided. It is 
>> uclear if the shown exaple is the way ti use GENsone.
>> 
>> 
>> 
>> ; Select audio/midi flags here according to platform
>> -odac      ;;;realtime audio out
>> ;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
>> ; For Non-realtime ouput leave only the line below:
>> ; -o gensone.wav -W ;;; for file output any platform
>> 
>> 
>> 
>> sr = 44100
>> ksmps = 32
>> nchnls = 2
>> 0dbfs  = 1
>> 
>> 
>> instr 1 ; Instrument #1 Simple oscillator with loudness correction.
>> 
>> kcps = cpspch(p4) ; p4 = frequency in pitch-class notation.
>> kenv linseg 0, p3*0.25, .00025, p3*0.75, 0 ; Create an amplitude envelope.
>> kamp tablei kcps/22050, 2, 1
>> a1 oscil 1/kamp, kcps, 1
>> outs a1*kenv, a1*kenv
>> 
>> endin
>> 
>> 
>> f 1 0 16384 10 1 ; sine wave
>> f 2 0 16384 "sone" 1 22050 22050 0
>> 
>> i 1 0 0.9 6.00
>> i 1 1 0.9 7.01
>> i 1 2 0.9 8.02
>> i 1 3 0.9 10.03
>> i 1 4 0.9 11.03
>> e
>> 
>> 
>> 
>> 
>> ----------------------------------------------------------------------
>> 
>> You can respond by visiting:
>> https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3469331&group_id=81968
>> 
>> ------------------------------------------------------------------------------
>> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
>> infrastructure or vast IT resources to deliver seamless, secure access to
>> virtual desktops. With this all-in-one solution, easily deploy virtual
>> desktops for less than the cost of PCs and save 60% on VDI infrastructure
>> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel 
> 
> 
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual 
> desktops for less than the cost of PCs and save 60% on VDI infrastructure 
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-01-04 17:38
Frommenno
SubjectRe: [Cs-dev] [ csound-Bugs-3469331 ] GENsone issues
thanks Art, for explaining.
I was reading in Wikipedia: "At frequencies other than 1 kHz, the loudness
level in phons is calibrated according to the frequency response of human
hearing, via a set of equal-loudness contours, and then the loudness level
in phons is mapped to loudness in sones via the same power law."
Somehow by accident this made me confuse it with the Fletcher-Munson curve
and so i took the wrong direction.

Menno

--
View this message in context: http://csound.1045644.n5.nabble.com/csound-Bugs-3469331-GENsone-issues-tp5119216p5120327.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-01-08 15:58
Frommenno
SubjectRe: [Cs-dev] [ csound-Bugs-3469331 ] GENsone issues
Hi mr. Art Hunkins, everyone

i have made an example that in instr 1 uses the sone function and instr 2
does not. It should be easy to hear the difference and the effect of sone,
but i hear no difference. Possibly i make a mistake..
Can anyone (mr. Art Hunkins?) clarify this?

bye,
Menno



; Select audio/midi flags here according to platform
; Audio out   Audio in   
-odac           -iadc         ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o linseg.wav -W ;;; for file output any platform



; Initialize the global variables.
sr = 44100
kr = 4410
ksmps = 10
nchnls = 2

; Instrument #1 Simple oscillator with loudness correction.
instr 1
  ; p4 = frequency in pitch-class notation.
  kcps = cpspch(p4)

  ; Create an amplitude envelope.
  kenv linseg 0, p3*0.25, 1, p3*0.75, 0
  kamp tablei 16383*kenv, 2

  a1 oscil 30000*kamp, kcps, 1
  outs a1, a1
endin

instr 2
  ; p4 = frequency in pitch-class notation.
  kcps = cpspch(p4)

  ; Create an amplitude envelope.
  kenv linseg 0, p3*0.25, 1, p3*0.75, 0
;  kamp tablei 16383*kenv, 2

  a1 oscil 30000*kenv, kcps, 1
  outs a1, a1
endin




; Table #1, a sine wave.
f 1 0 16384 10 1
f 2 0 16384 "sone" 1 32000 32000 0
s
; Play Instrument #1 for a half-second, p4=8.00
i 1 0 2 8.00
; Play Instrument #1 for a half-second, p4=8.01
i 1 + . 8.01
; Play Instrument #1 for a half-second, p4=8.02
i 1 + . 8.02
; Play Instrument #1 for a half-second, p4=8.03
i 1 + . 8.03
s
; Play Instrument #1 for a half-second, p4=8.00
i 2 0 2 8.00
; Play Instrument #1 for a half-second, p4=8.01
i 2 + . 8.01
; Play Instrument #1 for a half-second, p4=8.02
i 2 + . 8.02
; Play Instrument #1 for a half-second, p4=8.03
i 2 + . 8.03
e




--
View this message in context: http://csound.1045644.n5.nabble.com/csound-Bugs-3469331-GENsone-issues-tp5119216p5129476.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net