Csound Csound-dev Csound-tekno Search About

[Csnd] hrtfstat noise

Date2010-05-19 19:51
Frommenno
Subject[Csnd] hrtfstat noise
hi,

just a small issue, but when i play this slightly changed example from the
manual i hear a beep after pluck has stopped.
Can someone try this out please?


  
    ; Select flags here
    ; realtime audio out
    -o dac
    ; For Non-realtime ouput leave only the line below:
   ; -o hrtf.wav
  
  

    sr = 44100
    kr = 4410
    ksmps = 10
    nchnls = 2

    gasrc init 0

    instr 1		;a plucked string

    kamp = p4
    kcps = cpspch(p5)
    icps = cpspch(p5)

    a1 pluck kamp, kcps, icps, 0, 1

    gasrc = a1

    endin

    instr 10	;uses output from instr1 as source

    aleft,aright hrtfstat gasrc, 90, 0,
"hrtf-44100-left.dat","hrtf-44100-right.dat"

    outs	aleft, aright

    endin

  
  

    ; Play Instrument 1: a plucked string
    i1 0 5 20000 8.00

    ; Play Instrument 10 for 2 seconds.
    i10 0 15

  



thanks
Menno


Date2010-05-19 20:05
FromVictor Lazzarini
Subject[Csnd] Re: hrtfstat noise
That's because the variable gasrc is not cleared, not the best practice.

This is fixed by adding

gasrc = 0  at the last line of instr 10.

But the best practice is to also use

gasrc = a1 + gasrc

in instr 1

Victor


On 19 May 2010, at 19:51, menno wrote:

>
> hi,
>
> just a small issue, but when i play this slightly changed example  
> from the
> manual i hear a beep after pluck has stopped.
> Can someone try this out please?
>
> 
>  
>    ; Select flags here
>    ; realtime audio out
>    -o dac
>    ; For Non-realtime ouput leave only the line below:
>   ; -o hrtf.wav
>  
>  
>
>    sr = 44100
>    kr = 4410
>    ksmps = 10
>    nchnls = 2
>
>    gasrc init 0
>
>    instr 1		;a plucked string
>
>    kamp = p4
>    kcps = cpspch(p5)
>    icps = cpspch(p5)
>
>    a1 pluck kamp, kcps, icps, 0, 1
>
>    gasrc = a1
>
>    endin
>
>    instr 10	;uses output from instr1 as source
>
>    aleft,aright hrtfstat gasrc, 90, 0,
> "hrtf-44100-left.dat","hrtf-44100-right.dat"
>
>    outs	aleft, aright
>
>    endin
>
>  
>  
>
>    ; Play Instrument 1: a plucked string
>    i1 0 5 20000 8.00
>
>    ; Play Instrument 10 for 2 seconds.
>    i10 0 15
>
>  
> 
>
>
> thanks
> Menno
>
>
>
> -- 
> View this message in context: http://old.nabble.com/hrtfstat-noise-tp28612571p28612571.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"