Csound Csound-dev Csound-tekno Search About

[Csnd] grain issue

Date2011-02-03 19:00
Frommenno
Subject[Csnd] grain issue
Hi, can someone explain why this csd with this incredible low amplitude could
make such a loud noise?
It is a small variation from the example from the manual.
Could there be something wrong with xamp in grain?

greetings
menno




; 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 grain.wav -W ;;; for file output any platform



sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1
    insnd = 10
    ibasfrq = 44100 / ftlen(insnd)   ; Use original sample rate of insnd
file

 ;   kamp   expseg 0.1, p3/2, .2, p3/2, 0.1
    kpitch line ibasfrq, p3, ibasfrq * .8
    kdens  line 600, p3, 200
    kaoff  line 0, p3, 5000
    kpoff  line 0, p3, ibasfrq * .5
    kgdur  line .4, p3, .1
    imaxgdur =  .5

    asig  grain .0000000000000000000000000000000000000000000000001, kpitch,
kdens, kaoff, kpoff, kgdur, insnd, 5, imaxgdur, 0.0
    outs asig, asig
endin




;sine wave.
;f 1 0 16384 10 1
f5  0 512  20 2 ; Hanning window
f10 0 16384 1  "beats.wav" 0 0 0

i1 0 10
e




Date2011-02-03 19:46
FromRene Jopi
SubjectRe: [Csnd] grain issue
Hi,

0dbfs = 1 is the reason, grain do not scale correctly.

René






2011/2/3 menno <nabob_cd@yahoo.com>

Hi, can someone explain why this csd with this incredible low amplitude could
make such a loud noise?
It is a small variation from the example from the manual.
Could there be something wrong with xamp in grain?

greetings
menno


<CsoundSynthesizer>
<CsOptions>
; 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 grain.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1
   insnd = 10
   ibasfrq = 44100 / ftlen(insnd)   ; Use original sample rate of insnd
file

 ;   kamp   expseg 0.1, p3/2, .2, p3/2, 0.1
   kpitch line ibasfrq, p3, ibasfrq * .8
   kdens  line 600, p3, 200
   kaoff  line 0, p3, 5000
   kpoff  line 0, p3, ibasfrq * .5
   kgdur  line .4, p3, .1
   imaxgdur =  .5

   asig  grain .0000000000000000000000000000000000000000000000001, kpitch,
kdens, kaoff, kpoff, kgdur, insnd, 5, imaxgdur, 0.0
   outs asig, asig
endin


</CsInstruments>
<CsScore>
;sine wave.
;f 1 0 16384 10 1
f5  0 512  20 2 ; Hanning window
f10 0 16384 1  "beats.wav" 0 0 0

i1 0 10
e


</CsScore>
</CsoundSynthesizer>

--
View this message in context: http://csound.1045644.n5.nabble.com/grain-issue-tp3369809p3369809.html
Sent from the Csound - General mailing list archive at Nabble.com.


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"



Date2011-02-03 20:01
FromJoel Ross
SubjectRe: [Csnd] grain issue
This is not the whole story, it should be possible to set iamp /
1/32767 for 16 bit
and have that behave with 0dbfs = 1 (scaling the output of grain this
way works fine).
Yet grain treats amplitude values in a completely mysterious way. -ve
values reduce
the amplitude up to a point and scaling by a large magnitude only
effects it a little.

- Joel

On 3 February 2011 20:46, Rene Jopi  wrote:
> Hi,
> 0dbfs = 1 is the reason, grain do not scale correctly.
> René
>
>
>
>
>
> 2011/2/3 menno 
>>
>> Hi, can someone explain why this csd with this incredible low amplitude
>> could
>> make such a loud noise?
>> It is a small variation from the example from the manual.
>> Could there be something wrong with xamp in grain?
>>
>> greetings
>> menno
>>
>>
>> 
>> 
>> ; 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 grain.wav -W ;;; for file output any platform
>> 
>> 
>>
>> sr = 44100
>> ksmps = 32
>> nchnls = 2
>> 0dbfs  = 1
>>
>> instr 1
>>    insnd = 10
>>    ibasfrq = 44100 / ftlen(insnd)   ; Use original sample rate of insnd
>> file
>>
>>  ;   kamp   expseg 0.1, p3/2, .2, p3/2, 0.1
>>    kpitch line ibasfrq, p3, ibasfrq * .8
>>    kdens  line 600, p3, 200
>>    kaoff  line 0, p3, 5000
>>    kpoff  line 0, p3, ibasfrq * .5
>>    kgdur  line .4, p3, .1
>>    imaxgdur =  .5
>>
>>    asig  grain .0000000000000000000000000000000000000000000000001, kpitch,
>> kdens, kaoff, kpoff, kgdur, insnd, 5, imaxgdur, 0.0
>>    outs asig, asig
>> endin
>>
>>
>> 
>> 
>> ;sine wave.
>> ;f 1 0 16384 10 1
>> f5  0 512  20 2 ; Hanning window
>> f10 0 16384 1  "beats.wav" 0 0 0
>>
>> i1 0 10
>> e
>>
>>
>> 
>> 
>>
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/grain-issue-tp3369809p3369809.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>> 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"


Date2011-02-03 21:00
FromRene Jopi
SubjectRe: [Csnd] grain issue
Hi,

Thanks Joel
May be the story is:   

With 0dbfs = 1
Y have to scale the end value of "kaoff  line 0, p3, 5000"

0.1 instead of 5000 and using kamp/10 give correct output amp.

René




2011/2/3 Joel Ross <joel.binarybrain@gmail.com>
This is not the whole story, it should be possible to set iamp /
1/32767 for 16 bit
and have that behave with 0dbfs = 1 (scaling the output of grain this
way works fine).
Yet grain treats amplitude values in a completely mysterious way. -ve
values reduce
the amplitude up to a point and scaling by a large magnitude only
effects it a little.

- Joel

On 3 February 2011 20:46, Rene Jopi <rene.jopi@gmail.com> wrote:
> Hi,
> 0dbfs = 1 is the reason, grain do not scale correctly.
> René
>
>
>
>
>
> 2011/2/3 menno <nabob_cd@yahoo.com>
>>
>> Hi, can someone explain why this csd with this incredible low amplitude
>> could
>> make such a loud noise?
>> It is a small variation from the example from the manual.
>> Could there be something wrong with xamp in grain?
>>
>> greetings
>> menno
>>
>>
>> <CsoundSynthesizer>
>> <CsOptions>
>> ; 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 grain.wav -W ;;; for file output any platform
>> </CsOptions>
>> <CsInstruments>
>>
>> sr = 44100
>> ksmps = 32
>> nchnls = 2
>> 0dbfs  = 1
>>
>> instr 1
>>    insnd = 10
>>    ibasfrq = 44100 / ftlen(insnd)   ; Use original sample rate of insnd
>> file
>>
>>  ;   kamp   expseg 0.1, p3/2, .2, p3/2, 0.1
>>    kpitch line ibasfrq, p3, ibasfrq * .8
>>    kdens  line 600, p3, 200
>>    kaoff  line 0, p3, 5000
>>    kpoff  line 0, p3, ibasfrq * .5
>>    kgdur  line .4, p3, .1
>>    imaxgdur =  .5
>>
>>    asig  grain .0000000000000000000000000000000000000000000000001, kpitch,
>> kdens, kaoff, kpoff, kgdur, insnd, 5, imaxgdur, 0.0
>>    outs asig, asig
>> endin
>>
>>
>> </CsInstruments>
>> <CsScore>
>> ;sine wave.
>> ;f 1 0 16384 10 1
>> f5  0 512  20 2 ; Hanning window
>> f10 0 16384 1  "beats.wav" 0 0 0
>>
>> i1 0 10
>> e
>>
>>
>> </CsScore>
>> </CsoundSynthesizer>
>>
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/grain-issue-tp3369809p3369809.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>> 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"