Csound Csound-dev Csound-tekno Search About

[Csnd] nan

Date2011-01-28 15:58
Fromkelly hirai
Subject[Csnd] nan
how do you test for nan?

kelly


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-01-29 13:19
Fromkelly hirai
SubjectRe: [Csnd] nan
i was able to put the math.h function isnan() in my source by modeling 
off the sqrt() function. seems like a useful thing. any way to get it in 
the tree? isinf() and the rest of the fpclassify() family are also 
probably useful too. isinf() is C99, the rest seem to be part of glibc 
2.01 acording the the 2004.10.31 man page. its been a while since i've 
made any commits in cvs, but i willing to help out.

kelly

On Fri, 28 Jan 2011, kelly  hirai wrote:

> how do you test for nan?
>
> kelly
>
>
> 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-01 21:20
FromIain McCurdy
Subject[Csnd] GEN16
I just realised that GEN 16 can create multiple segment functions (in a manner similar to transeg). The manual entry implies that only one segment is possible. I suspect it was changed at some point but the manual entry was not updated. Perhaps the manual entry could be changed to reflect this; something like this?
Iain.


GEN16

GEN16 — Creates functions made up of an arbitrary number of segments, each of user definable curvature.

Description

Creates functions made up of an arbitrary number of segments, each of user definable curvature.

Syntax

f # time size 16 val1 dur1 type1 val2 dur2 type2 val3 ...

Initialization

size -- number of points in the table. Must be a power of 2 or a power-of-2 plus 1 (see f statement). The normal value is power-of-2 plus 1.
val1, val2, val3 etc. -- ordinate values (table definition must always end with a value)

dur1, dur2 etc. -- length of segment (no. of storage locations) 
type1, type2 etc -- if 0, a straight line is produced. If non-zero, then GEN16 creates the following curve for that segment:


beg + (end - beg) * (1 - exp( i*type/(dur-1) )) / (1 - exp(type))


Date2011-02-01 22:34
FromOeyvind Brandtsegg
SubjectRe: [Csnd] GEN16
Wow. nice. Thanks for bringing it to attention, I had actually been
wondering about this too (but never tried it as the manual implied
that it was not possible).
Oeyvind

2011/2/1 Iain McCurdy :
> I just realised that GEN 16 can create multiple segment functions (in a
> manner similar to transeg). The manual entry implies that only one segment
> is possible. I suspect it was changed at some point but the manual entry was
> not updated. Perhaps the manual entry could be changed to reflect this;
> something like this?
> Iain.
>
>
> GEN16
>
> GEN16 — Creates functions made up of an arbitrary number of segments, each
> of user definable curvature.
>
> Description
>
> Creates functions made up of an arbitrary number of segments, each of user
> definable curvature.
>
> Syntax
>
> f # time size 16 val1 dur1 type1 val2 dur2 type2 val3 ...
>
> Initialization
>
> size -- number of points in the table. Must be a power of 2 or a power-of-2
> plus 1 (see f statement). The normal value is power-of-2 plus 1.
> val1, val2, val3 etc. -- ordinate values (table definition must always end
> with a value)
>
> dur1, dur2 etc. -- length of segment (no. of storage locations)
> type1, type2 etc -- if 0, a straight line is produced. If non-zero, then
> GEN16 creates the following curve for that segment:
>
>
> beg + (end - beg) * (1 - exp( i*type/(dur-1) )) / (1 - exp(type))
>
>


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-02 09:53
Fromjoachim heintz
SubjectRe: [Csnd] GEN16
AttachmentsGEN16.csd  
and i think we can add that gen16 also works for non-powof2 tables. a
simple example with 7 for table length:


-nd


instr 1; values between p4 and p5 depending of itype=p6
ift		ftgen		0, 0, -7, -16, p4, 6, p6, p5
indx		=		0
Sin		sprintf	"itype = %d:", p6
print:
ival		tab_i		indx, ift
Sout		sprintf	"%s %.3f", Sin, ival
Sin		=		Sout
    		loop_lt	indx, 1, ftlen(ift), print
    		puts		Sout, 1
endin


i 1 0 0 0 1 0; linear rise
i 1 0 0 0 1 1; slow rise
i 1 0 0 0 1 10; very slow rise
i 1 0 0 0 1 -1; fast rise
i 1 0 0 0 1 -10; very fast rise
i 1 0 0 1 0 0; linear decay
i 1 0 0 1 0 1; slow decay
i 1 0 0 1 0 10; very slow decay
i 1 0 0 1 0 -1; fast decay
i 1 0 0 1 0 -10; very fast decay
e



	joachim

Am 01.02.2011 22:20, schrieb Iain McCurdy:
> I just realised that GEN 16 can create multiple segment functions (in a
> manner similar to transeg). The manual entry implies that only one
> segment is possible. I suspect it was changed at some point but the
> manual entry was not updated. Perhaps the manual entry could be changed
> to reflect this; something like this?
> Iain.
> 
> 
>     GEN16
> 
> GEN16 — Creates functions made up of an arbitrary number of segments,
> each of user definable curvature.
> 
> 
>     Description
> 
> Creates functions made up of an arbitrary number of segments, each of
> user definable curvature.
> 
> 
>     Syntax
> 
> *f* # time size 16 val1 dur1 type1 val2 dur2 type2 val3 ...
> 
> 
>     Initialization
> 
> /size/ -- number of points in the table. Must be a power of 2 or a
> power-of-2 plus 1 (see /f statement/). The normal value is power-of-2
> plus 1.
> /val1, val2, val3 //etc./ -- ordinate values (table definition must
> always end with a value)
> 
> /dur1, dur2 etc./ -- length of segment (no. of storage locations) 
> /type1, type2 etc/ -- if 0, a straight line is produced. If non-zero,
> then /GEN16/ creates the following curve for that segment:
> 
> 
> beg + (end - beg) * (1 - exp( i*type/(dur-1) )) / (1 - exp(type))
> //

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"