Csound Csound-dev Csound-tekno Search About

[Csnd] To oscili or not to poscil...

Date2008-08-11 16:42
FromMarco Stroppa
Subject[Csnd] To oscili or not to poscil...
Hello!

The two simple orchestras below use one oscili, the other poscil, which will have a better precision. Oddly enough, on my computer (PowerMac, OSX 10.5.4, running csound-intel 5.08), the former produces a nice bell-like sound, while the latter (with the same score) a click (only the amplitude envelope, no sound whatsoever).
Do you experience the same behaviour? Is it a problem of my computer, of this version of csound, or have I simply been working too... long?
Thanks for any advice.


Marco

; TEST OSCILI
sr= 96000
kr= 96000
ksmps= 1
nchnls= 1

0dbfs = 8388697 ; 24 bits

instr 1; --------------------------------------------------------------------

idur=  p3
idurosc= 1/idur
isin_amp= (p4 > 0.0 ? (p4*0dbfs) : (ampdbfs (p4)))
if0=  p5

iaudiofun=  1
islowenv=  2

; sine tone
         a1     oscili  isin_amp, idurosc, islowenv
         a1     oscili  a1, if0, iaudiofun

                out     a1
endin



; TEST POSCIL
sr= 96000
kr= 96000
ksmps= 1
nchnls= 1

0dbfs = 8388697 ; 24 bits

instr 1; --------------------------------------------------------------------

idur=  p3
idurosc= 1/idur
isin_amp= (p4 > 0.0 ? (p4*0dbfs) : (ampdbfs (p4)))
if0=  p5

iaudiofun=  1
islowenv=  2

; sine tone
         a1     oscili  isin_amp, idurosc, islowenv
         a1     poscil  a1, if0, iaudiofun

                out     a1
endin


;SCORE
; GEN functions **********************************************************
; waveform
f1  0  8193  9  10  1  0  16  1  0  22  1  0  23  1  0

; envelope
f2  0  513  5   256  512  1
;End of Instrument's Header

i1 0.0 5.0 -6.0 100.0


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com


Date2008-08-11 21:37
FromLou Cohen
Subject[Csnd] Re: To oscili or not to poscil...
Re: [Csnd] To oscili or not to poscil... I tried each case separately and got the same result: a chime and a click.

I then combined the two cases, but making the poscil instrument a different instrument. I added a 2nd score event so that instr 1 played first, then instr 2. I still got the same result, with this output:

.......
.........
0dBFS level = 8388697.0
orch now loaded
audio buffered in 128 sample-frame blocks
reading 512-byte blks of floats from adc (RAW)
writing 512-byte blks of floats to dac
SECTION 1:
ftable 1:
ftable 2:
new alloc for instr 1:
B  0.000 .. 10.000 T 10.000 TT 10.000 M:    -6.01
new alloc for instr 2:
B 10.000 .. 15.000 T 15.000 TT 15.000 M:    -6.00
inactive allocs returned to freespace
end of score.           overall amps:    -6.00
0 errors in performance
Elapsed time at end of performance: real: 32.674s, CPU: 6.300s
11250 512-byte soundblks of floats written to dac
-->CsoundLib Terminated...


My system is a PPC dual G5 running OS X 10.4.11. My version of csound is:

Csound version 5.08 (float samples) Feb  4 2008
libsndfile-1.0.16

-Lou


On 8/11/08 11:42, "    Marco Stroppa" <m_stroppa@yahoo.de> wrote:

Hello!

The two simple orchestras below use one oscili, the other poscil, which will have a better precision. Oddly enough, on my computer (PowerMac, OSX 10.5.4, running csound-intel 5.08), the former produces a nice bell-like sound, while the latter (with the same score) a click (only the amplitude envelope, no sound whatsoever).
Do you experience the same behaviour? Is it a problem of my computer, of this version of csound, or have I simply been working too... long?
Thanks for any advice.


Marco

; TEST OSCILI
sr= 96000
kr= 96000
ksmps= 1
nchnls= 1

0dbfs = 8388697 ; 24 bits

instr 1; --------------------------------------------------------------------

idur=  p3
idurosc= 1/idur
isin_amp= (p4 > 0.0 ? (p4*0dbfs) : (ampdbfs (p4)))
if0=  p5

iaudiofun=  1
islowenv=  2

; sine tone
         a1     oscili  isin_amp, idurosc, islowenv
         a1     oscili  a1, if0, iaudiofun

                out     a1
endin



; TEST POSCIL
sr= 96000
kr= 96000
ksmps= 1
nchnls= 1

0dbfs = 8388697 ; 24 bits

instr 1; --------------------------------------------------------------------

idur=  p3
idurosc= 1/idur
isin_amp= (p4 > 0.0 ? (p4*0dbfs) : (ampdbfs (p4)))
if0=  p5

iaudiofun=  1
islowenv=  2

; sine tone
         a1     oscili  isin_amp, idurosc, islowenv
         a1     poscil  a1, if0, iaudiofun

                out     a1
endin


;SCORE
; GEN functions **********************************************************
; waveform
f1  0  8193  9  10  1  0  16  1  0  22  1  0  23  1  0

; envelope
f2  0  513  5   256  512  1
;End of Instrument's Header

i1 0.0 5.0 -6.0 100.0


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


---------------------------
Permanent email:           loucohen@jolc.net
Music and video:            http://ruccas.org/wiki.pl/Lou_Cohen
More music and video:   http://www.youtube.com/loucohen
Astronomy:                    http://www.jolc.net
Open Sound:                 http://www.opensound.org
QFD:              
http://www.pearsonhighered.com/educator/academic/product/0,3110,0201633302,00.html
----------------------------


Date2008-08-12 15:21
Fromjoachim heintz
Subject[Csnd] Re: To oscili or not to poscil...
I don't know why, but the reason seems to be the same variable name  
(a1) for both the envelope and the audio signal. I tried it (MacBook  
10.4.11, Csound 5.08), and it was the same as you describe. But when  
writing
          a1	oscili  isin_amp, idurosc, islowenv
          a2	poscil  a1, if0, iaudiofun
		out a2
everything is ok.
Perhaps someone  can have a look in the source code of poscil. There  
seems to be a problem if an argument name is the same as the output  
variable.
Best -
	joachim



Am 11.08.2008 um 17:42 schrieb Marco Stroppa:

> Hello!
>
> The two simple orchestras below use one oscili, the other poscil,  
> which will have a better precision. Oddly enough, on my computer  
> (PowerMac, OSX 10.5.4, running csound-intel 5.08), the former  
> produces a nice bell-like sound, while the latter (with the same  
> score) a click (only the amplitude envelope, no sound whatsoever).
> Do you experience the same behaviour? Is it a problem of my  
> computer, of this version of csound, or have I simply been working  
> too... long?
> Thanks for any advice.
>
>
> Marco
>
> ; TEST OSCILI
> sr= 96000
> kr= 96000
> ksmps= 1
> nchnls= 1
>
> 0dbfs = 8388697 ; 24 bits
>
> instr 1;  
> --------------------------------------------------------------------
>
> idur=  p3
> idurosc= 1/idur
> isin_amp= (p4 > 0.0 ? (p4*0dbfs) : (ampdbfs (p4)))
> if0=  p5
>
> iaudiofun=  1
> islowenv=  2
>
> ; sine tone
>          a1     oscili  isin_amp, idurosc, islowenv
>          a1     oscili  a1, if0, iaudiofun
>
>                 out     a1
> endin
>
>
>
> ; TEST POSCIL
> sr= 96000
> kr= 96000
> ksmps= 1
> nchnls= 1
>
> 0dbfs = 8388697 ; 24 bits
>
> instr 1;  
> --------------------------------------------------------------------
>
> idur=  p3
> idurosc= 1/idur
> isin_amp= (p4 > 0.0 ? (p4*0dbfs) : (ampdbfs (p4)))
> if0=  p5
>
> iaudiofun=  1
> islowenv=  2
>
> ; sine tone
>          a1     oscili  isin_amp, idurosc, islowenv
>          a1     poscil  a1, if0, iaudiofun
>
>                 out     a1
> endin
>
>
> ;SCORE
> ; GEN functions  
> **********************************************************
> ; waveform
> f1  0  8193  9  10  1  0  16  1  0  22  1  0  23  1  0
>
> ; envelope
> f2  0  513  5   256  512  1
> ;End of Instrument's Header
>
> i1 0.0 5.0 -6.0 100.0
>
>
> __________________________________________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden  
> Schutz gegen Massenmails.
> http://mail.yahoo.com
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Date2008-08-12 16:45
Fromjpff
Subject[Csnd] Re: Re: To oscili or not to poscil...
If the same variable name makes any difference that is a bug.  But note 
it worked for me and for Lou
==John ff