Csound Csound-dev Csound-tekno Search About

[Csnd] Trivial UDO questions

Date2009-11-19 17:22
Fromfrancibal
Subject[Csnd] Trivial UDO questions
Hi All,
i was trying udo, and i have some questions:

1- can i use an ftgen into an udo without problems?

2- why in this test (see below) i cannot use igoto, but i must use goto or
kgoto?

Many thanks,
ciao,

fran.

PS: why do not make a folder with all udo? It seems to me (if i am not
wrong) that i must
download one udo at times i.e. i'm not able to download all udo in a single
moment (!).

This is my trivial test:



-B4096 -odac



sr	= 48000
ksmps	= 1
nchnls	= 2
0dbfs	= 1.0

;	nome, 		out,	in
opcode	opcode_02,	aa,	kki

kcps, kpan, itipo		xin

gisine		ftgen	1, 0, 8192, 10, 1
gisaw		ftgen	2, 0, 8192,  7, 1, 8192, -1
gisquare		ftgen	3, 0, 8192,  7, 1, 4096, 1, 0, -1, 4096, -1

kenv		expseg	0.001, p3*0.1, 1, p3*0.7, 1, p3*.2, 0.001

if (itipo == 1)	goto	sinosc
if (itipo == 2)	goto	sawosc
if (itipo == 3)	goto	squareosc

sinosc:
aout		poscil	kenv, kcps, gisine, 0
goto end
sawosc:
aout		poscil	kenv, kcps, gisaw, 0
goto end
squareosc:
aout		poscil	kenv, kcps, gisquare, 0
;goto end
end:
al, ar		pan2	aout, kpan

		xout	al, ar
endop


instr 1

kcps	= 440
kpan	= 0.5
itipo	= p4

aL, aR	opcode_02	kcps, kpan, itipo

outs	aL, aR
endin



i1	0	1	1	; sine osc
i1	1	1	2	; saw osc
i1	2	1	3	; square osc
e


Date2009-11-19 17:41
FromSteven Yi
Subject[Csnd] Re: Trivial UDO questions
Hi Fran,

1- There should be no problem with using ftgen in a UDO

2- This is required because igoto only operates once at i-time, while
goto or kgoto will run at performance time.  igoto is only good if
your setting up variables, otherwise if any code you're interested in
doing is for performance then you need to use goto or kgoto.  I
describe it a little bit in
http://www.csounds.com/journal/2006spring/controlFlow.html and there
have been some long postings on this in the past and should be on the
archive.

Cheers!
steven

On Thu, Nov 19, 2009 at 12:22 PM, francibal  wrote:
>
> Hi All,
> i was trying udo, and i have some questions:
>
> 1- can i use an ftgen into an udo without problems?
>
> 2- why in this test (see below) i cannot use igoto, but i must use goto or
> kgoto?
>
> Many thanks,
> ciao,
>
> fran.
>
> PS: why do not make a folder with all udo? It seems to me (if i am not
> wrong) that i must
> download one udo at times i.e. i'm not able to download all udo in a single
> moment (!).
>
> This is my trivial test:
>
> 
> 
> -B4096 -odac
> 
> 
>
> sr      = 48000
> ksmps   = 1
> nchnls  = 2
> 0dbfs   = 1.0
>
> ;       nome,           out,    in
> opcode  opcode_02,      aa,     kki
>
> kcps, kpan, itipo               xin
>
> gisine          ftgen   1, 0, 8192, 10, 1
> gisaw           ftgen   2, 0, 8192,  7, 1, 8192, -1
> gisquare                ftgen   3, 0, 8192,  7, 1, 4096, 1, 0, -1, 4096, -1
>
> kenv            expseg  0.001, p3*0.1, 1, p3*0.7, 1, p3*.2, 0.001
>
> if (itipo == 1) goto    sinosc
> if (itipo == 2) goto    sawosc
> if (itipo == 3) goto    squareosc
>
> sinosc:
> aout            poscil  kenv, kcps, gisine, 0
> goto end
> sawosc:
> aout            poscil  kenv, kcps, gisaw, 0
> goto end
> squareosc:
> aout            poscil  kenv, kcps, gisquare, 0
> ;goto end
> end:
> al, ar          pan2    aout, kpan
>
>                xout    al, ar
> endop
>
>
> instr 1
>
> kcps    = 440
> kpan    = 0.5
> itipo   = p4
>
> aL, aR  opcode_02       kcps, kpan, itipo
>
> outs    aL, aR
> endin
>
> 
> 
> i1      0       1       1       ; sine osc
> i1      1       1       2       ; saw osc
> i1      2       1       3       ; square osc
> e
> 
> 
>
> --
> View this message in context: http://old.nabble.com/Trivial-UDO-questions-tp26421402p26421402.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


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

Date2009-11-19 17:57
Fromfrancibal
Subject[Csnd] Re: Re: Trivial UDO questions
Many thanks Mr. Steven,

i will study Your paper, thanks.
Only a request: i would like a single folder with all udo (one click  
download) at csound.com, and maybe adding this folder and documentations  
to csound distribution. Only a personal wish.

Again thanks,

ciao,
fran.


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

Date2009-11-19 18:08
FromMichael Gogins
Subject[Csnd] Re: Re: Trivial UDO questions

Use the new ftgenonce opcode.

Mkg

On Nov 19, 2009 12:41 PM, "Steven Yi" <stevenyi@gmail.com> wrote:

Hi Fran,

1- There should be no problem with using ftgen in a UDO

2- This is required because igoto only operates once at i-time, while
goto or kgoto will run at performance time.  igoto is only good if
your setting up variables, otherwise if any code you're interested in
doing is for performance then you need to use goto or kgoto.  I
describe it a little bit in
http://www.csounds.com/journal/2006spring/controlFlow.html and there
have been some long postings on this in the past and should be on the
archive.

Cheers!
steven

On Thu, Nov 19, 2009 at 12:22 PM, francibal <ilterzouomo@fastwebnet.it> wrote: > > Hi All, > i was ...


Date2009-11-19 19:51
Fromfrancibal
Subject[Csnd] Re: Re: Re: Trivial UDO questions
Hi Mr. Gogins,

i have tried ftgenonce and i have a question:

in this way:

ifn1		ftgenonce		0, 0, 8192,  7, 1, 8192, -1

resulting waveform is in range 0-1 only. Then i need to use this
(with last point declared) for have full amplitude range:

ifn2		ftgenonce		0, 0, 8192,  7, 1, 8192, -1, 0, 1

Is this the right behavior?

Because using ftgen in either way i have the same ('right')
result. Maybe because is ftgenonce like temporary gen?
Or i'm wrong?

Thanks,

ciao,
fran.



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

Date2009-11-19 20:11
FromMichael Gogins
Subject[Csnd] Re: Re: Re: Re: Trivial UDO questions
I'm not sure, but I do know ftgenonce will behave the same way in this
regard as ftgen or ftgentmp. The only difference is that ftgen creates
only one actual ftable no matter how many times it is called, as long
as the arguments are the same on each call.

Hope this helps,
Mike

On Thu, Nov 19, 2009 at 2:51 PM, francibal  wrote:
> Hi Mr. Gogins,
>
> i have tried ftgenonce and i have a question:
>
> in this way:
>
> ifn1            ftgenonce               0, 0, 8192,  7, 1, 8192, -1
>
> resulting waveform is in range 0-1 only. Then i need to use this
> (with last point declared) for have full amplitude range:
>
> ifn2            ftgenonce               0, 0, 8192,  7, 1, 8192, -1, 0, 1
>
> Is this the right behavior?
>
> Because using ftgen in either way i have the same ('right')
> result. Maybe because is ftgenonce like temporary gen?
> Or i'm wrong?
>
> Thanks,
>
> ciao,
> fran.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


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

Date2009-11-19 20:36
Fromfrancibal
Subject[Csnd] Re: Trivial UDO questions
Thanks Mr. Gogins,
but i do not understand. Here are my basic files (csd and wav). I have
different results using ftgen,
ftgentmp and ftgenonce. Nothing so important, only i don't understand what i
wrong!

http://old.nabble.com/file/p26421470/test.csd test.csd 
http://old.nabble.com/file/p26421470/test.wav test.wav 

thanks anyway,

ciao,
fran.

Date2009-11-22 22:21
From"Dr. Richard Boulanger"
Subject[Csnd] Re: Trivial UDO questions - Single Click to Download ALL udos
It would be nice to have all the UDOs zipped into a single .zip at  
cSounds.com - for one-click download.
Hopefully we can make this happen soon.

Dr. B.

Dr. Richard Boulanger  -  rboulanger@berklee.edu

On Nov 19, 2009, at 8:57 PM, francibal wrote:

> Many thanks Mr. Steven,
>
> i will study Your paper, thanks.
> Only a request: i would like a single folder with all udo (one click  
> download) at csound.com, and maybe adding this folder and  
> documentations to csound distribution. Only a personal wish.
>
> Again thanks,
>
> ciao,
> fran.



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

Date2009-11-23 02:30
FromSteven Yi
Subject[Csnd] Re: Trivial UDO questions - Single Click to Download ALL udos
I have a little free time tonight; haven't touched PHP in a while but
this shouldn't be very tricky to do as the UDO's are cached already.
I'll see if I can get this in tonight.

steven

On Sun, Nov 22, 2009 at 5:21 PM, Dr. Richard Boulanger
 wrote:
> It would be nice to have all the UDOs zipped into a single .zip at
> cSounds.com - for one-click download.
> Hopefully we can make this happen soon.
>
> Dr. B.
>
> Dr. Richard Boulanger  -  rboulanger@berklee.edu
>
> On Nov 19, 2009, at 8:57 PM, francibal wrote:
>
>> Many thanks Mr. Steven,
>>
>> i will study Your paper, thanks.
>> Only a request: i would like a single folder with all udo (one click
>> download) at csound.com, and maybe adding this folder and documentations to
>> csound distribution. Only a personal wish.
>>
>> Again thanks,
>>
>> ciao,
>> fran.
>
>


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

Date2009-11-23 04:09
FromSteven Yi
Subject[Csnd] Re: Trivial UDO questions - Single Click to Download ALL udos
Hi All,

I gave it a go but was unable to get ZipArchive working on
csounds.com.  Also tried getting pecl to install the zip package but
had issues with the version of pecl and pear, etc.  Anyways, I'm
giving up for the moment as I spent more time than I probably should
have. :P

I've manually made a zip that one can download at:

http://csounds.com/udo/udo_2009_11_22.zip

thanks,
steven

On Sun, Nov 22, 2009 at 9:30 PM, Steven Yi  wrote:
> I have a little free time tonight; haven't touched PHP in a while but
> this shouldn't be very tricky to do as the UDO's are cached already.
> I'll see if I can get this in tonight.
>
> steven
>
> On Sun, Nov 22, 2009 at 5:21 PM, Dr. Richard Boulanger
>  wrote:
>> It would be nice to have all the UDOs zipped into a single .zip at
>> cSounds.com - for one-click download.
>> Hopefully we can make this happen soon.
>>
>> Dr. B.
>>
>> Dr. Richard Boulanger  -  rboulanger@berklee.edu
>>
>> On Nov 19, 2009, at 8:57 PM, francibal wrote:
>>
>>> Many thanks Mr. Steven,
>>>
>>> i will study Your paper, thanks.
>>> Only a request: i would like a single folder with all udo (one click
>>> download) at csound.com, and maybe adding this folder and documentations to
>>> csound distribution. Only a personal wish.
>>>
>>> Again thanks,
>>>
>>> ciao,
>>> fran.
>>
>>
>


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