Csound Csound-dev Csound-tekno Search About

Newbie an I mean Newbie .........

Date2015-09-04 20:03
Frommats claesson
SubjectNewbie an I mean Newbie .........
Hi
I’m new to C sound it’s a bit confusing at the moment but could you please
help me with this?

I would expect that the programming below would give me :
-a sine wave (it does) that has 
-a fade in time of two seconds (it has)
-a sustain of one second and  (it may have)
-a fadeout of 3 sec. (it dosent have)

So the problem is that it hasent any fade out..............






-odac ; activates real time sound output



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



  instr 1

k1       linen    0.5, 2, 1, 3       ; amplitude envelope
aSig     poscil   k1, p4              ; audio oscillator
         out      aSig                  ; audio sent to output

  endin



i1 0 6 400  

e






--
View this message in context: http://csound.1045644.n5.nabble.com/Newbie-an-I-mean-Newbie-tp5743418.html
Sent from the Csound - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-09-04 23:24
FromRory Walsh
SubjectRe: Newbie an I mean Newbie .........
AttachmentsNone  None  

linen take total duration. Not sustain time. Your face in and out are to long. Change the 1 to 6 and it will be fine. It look at the adsr opcode.

On 4 Sep 2015 22:57, "mats claesson" <mats@nmh.no> wrote:
Hi
I’m new to C sound it’s a bit confusing at the moment but could you please
help me with this?

I would expect that the programming below would give me :
-a sine wave (it does) that has
-a fade in time of two seconds (it has)
-a sustain of one second and  (it may have)
-a fadeout of 3 sec. (it dosent have)

So the problem is that it hasent any fade out..............



<CsoundSynthesizer>

<CsOptions>
-odac ; activates real time sound output
</CsOptions>

<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 1
0dbfs = 1



  instr 1

k1       linen    0.5, 2, 1, 3       ; amplitude envelope
aSig     poscil   k1, p4              ; audio oscillator
         out      aSig                  ; audio sent to output

  endin

</CsInstruments>
<CsScore>
i1 0 6 400

e
</CsScore>
</CsoundSynthesizer>




--
View this message in context: http://csound.1045644.n5.nabble.com/Newbie-an-I-mean-Newbie-tp5743418.html
Sent from the Csound - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-09-04 23:25
Fromluis jure
SubjectRe: Newbie an I mean Newbie .........
el 2015-09-04 a las 12:03 mats claesson escribió:

> I’m new to C sound it’s a bit confusing at the moment but could you
> please help me with this?
> 
> I would expect that the programming below would give me :
> -a sine wave (it does) that has 
> -a fade in time of two seconds (it has)
> -a sustain of one second and  (it may have)
> -a fadeout of 3 sec. (it dosent have)
> 
> So the problem is that it hasent any fade out..............

well, i think the problem is actually that you seem to have misunderstood
the meaning of the parameters of the linen opcode. 

the third parameter is the *total duration*, not the sustain phase. 
so, the solution is very simple, your envelope should be:

k1       linen    0.5, 2, p3, 3

try it, and let us know if this is what you wanted.

best,

lj

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-09-05 10:05
Frommatsc
SubjectRe: Newbie an I mean Newbie .........
Thanks, just what I wanted.......so easy and logical. 



--
View this message in context: http://csound.1045644.n5.nabble.com/Newbie-an-I-mean-Newbie-tp5743418p5743429.html
Sent from the Csound - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-09-05 13:09
Fromluis jure
SubjectRe: Newbie an I mean Newbie .........
el 2015-09-05 a las 02:05 matsc escribió:

> so easy and logical. 

a perfect definition of csound. (mostly...)


------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here