Csound Csound-dev Csound-tekno Search About

[Cs-dev] Problems CsoundEventScore

Date2009-03-03 06:33
Fromdavistro
Subject[Cs-dev] Problems CsoundEventScore
my problem is this, what do i have to do to write more than one line on the
score?? 
this is because in the down program i try to write two diferent instruments,
the first one is the only one which is listening but the second one happen
nothing.  the only way to listen both of them is starting at the same time
in the init 0

if i dont have any instrument on the score, functions csoundScoreEvent dont
have any effect so at the end heard nothing.

how can i fix those problems? is there other way to agree new events to the
score?

int main(int argc, char *argv[]){
	CSOUND *csound = csoundCreate(0);
	csoundInitialize(&argc,&argv,0);
	
	MYFLT userInput[5],tabla[5];
	userInput[0]=2;
	userInput[1]=0;
	userInput[2]=2;
	userInput[3]=10000;
	userInput[4]=800;

	tabla[0] = 1;
	tabla[1] = 3;
	tabla[2] = 2;
	tabla[3] = 10000;
	tabla[4] = 500;
	
	int result = csoundCompile(csound,argc,argv);
	
	if(!result){
		csoundScoreEvent(csound,'i',userInput, 5);
		csoundScoreEvent(csound,'i',tabla, 5);
		while(csoundPerformKsmps(csound)==0){
			
		}	
	}
	csoundDestroy(csound);
	return result;

}




	-o dac ;-+rtaudio=alsa



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

;onda cuadrada
	instr 1
		a1 oscil	p4, p5, 1
		out a1
	endin

;onda triangular
	instr 2
		a2	oscil	p4, p5, 2
		out	a2
	endin

;onda senoidal
	instr 3
		a3	oscil	p4, p5, 3
		out	a3
	endin





;onda cuadrada
f1 0 512   7 1 17  1 0   0 495                        ;pulse for S&H clk osc

;onda triangular
f2 0 1024  7 .5 256 1 256 .5 256 0 256 .5
;onda senoidal
f3 0 512 10 1

;reproduccion todos los instrumentos
i1 0 1 0 800 





-- 
View this message in context: http://www.nabble.com/Problems-CsoundEventScore-tp22303218p22303218.html
Sent from the Csound - Dev mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-03 11:21
FromRory Walsh
SubjectRe: [Cs-dev] Problems CsoundEventScore
> if i dont have any instrument on the score, functions csoundScoreEvent dont
> have any effect so at the end heard nothing.

You can put in a dummy instrument that doesn't do anything but plays
continuously. This means that the score will keep running even if you
haven't sent any score events from your program. Is that what you
mean?

Rory.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-05 15:44
Fromdavistro
SubjectRe: [Cs-dev] Problems CsoundEventScore
	
Yes i'm doing to play, put an instrument with amplitude 0.
And my question is how do I add multiple lines of different instruments such
as

i2 0 2 10000 800
i3 2 2 10000 600 

but starting at different times, because if I do the top of the instrument
is played only i2, and I have to put all the instruments in time 0 start to
listen. There is some method to send call for some form of reset or other
way continuously be adding instrument score


rory walsh wrote:
> 
>> if i dont have any instrument on the score, functions csoundScoreEvent
>> dont
>> have any effect so at the end heard nothing.
> 
> You can put in a dummy instrument that doesn't do anything but plays
> continuously. This means that the score will keep running even if you
> haven't sent any score events from your program. Is that what you
> mean?
> 
> Rory.
> 
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 

-- 
View this message in context: http://www.nabble.com/Problems-CsoundEventScore-tp22303218p22354189.html
Sent from the Csound - Dev mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-05 16:04
FromRory Walsh
SubjectRe: [Cs-dev] Problems CsoundEventScore
> Yes i'm doing to play, put an instrument with amplitude 0.
> And my question is how do I add multiple lines of different instruments such

Yes but you're only telling it to play for one second. Set the
'silent' instrument to play for as long as you want your score to run
for and then it will work fine, I've tested it here.

Rory.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-08 00:41
Fromdavistro
SubjectRe: [Cs-dev] Problems CsoundEventScore
Thank you very much, the problem was that the instrument did not make it
longer but with you help i'm fixed de problem


davistro wrote:
> 
> 	
> Yes i'm doing to play, put an instrument with amplitude 0.
> And my question is how do I add multiple lines of different instruments
> such as
> 
> i2 0 2 10000 800
> i3 2 2 10000 600 
> 
> but starting at different times, because if I do the top of the instrument
> is played only i2, and I have to put all the instruments in time 0 start
> to listen. There is some method to send call for some form of reset or
> other way continuously be adding instrument score
> 
> 
> rory walsh wrote:
>> 
>>> if i dont have any instrument on the score, functions csoundScoreEvent
>>> dont
>>> have any effect so at the end heard nothing.
>> 
>> You can put in a dummy instrument that doesn't do anything but plays
>> continuously. This means that the score will keep running even if you
>> haven't sent any score events from your program. Is that what you
>> mean?
>> 
>> Rory.
>> 
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
>> CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source
>> participation
>> -Receive a $600 discount off the registration fee with the source code:
>> SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problems-CsoundEventScore-tp22303218p22393640.html
Sent from the Csound - Dev mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-08 03:00
FromRory Walsh
SubjectRe: [Cs-dev] Problems CsoundEventScore
No problem. Good luck with your project.

Rory.


2009/3/8 davistro :
>
> Thank you very much, the problem was that the instrument did not make it
> longer but with you help i'm fixed de problem
>
>
> davistro wrote:
>>
>>
>> Yes i'm doing to play, put an instrument with amplitude 0.
>> And my question is how do I add multiple lines of different instruments
>> such as
>>
>> i2 0 2 10000 800
>> i3 2 2 10000 600
>>
>> but starting at different times, because if I do the top of the instrument
>> is played only i2, and I have to put all the instruments in time 0 start
>> to listen. There is some method to send call for some form of reset or
>> other way continuously be adding instrument score
>>
>>
>> rory walsh wrote:
>>>
>>>> if i dont have any instrument on the score, functions csoundScoreEvent
>>>> dont
>>>> have any effect so at the end heard nothing.
>>>
>>> You can put in a dummy instrument that doesn't do anything but plays
>>> continuously. This means that the score will keep running even if you
>>> haven't sent any score events from your program. Is that what you
>>> mean?
>>>
>>> Rory.
>>>
>>> ------------------------------------------------------------------------------
>>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
>>> CA
>>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>>> Enterprise
>>> -Strategies to boost innovation and cut costs with open source
>>> participation
>>> -Receive a $600 discount off the registration fee with the source code:
>>> SFAD
>>> http://p.sf.net/sfu/XcvMzF8H
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Problems-CsoundEventScore-tp22303218p22393640.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net