Csound Csound-dev Csound-tekno Search About

[Cs-dev] Mute instrument

Date2009-03-15 18:34
Fromdavistro
Subject[Cs-dev] Mute instrument
I have a question:

I wan to create a simple signals mixes, each one on a different instrument.
I want to create the mix in other instrument where to use the output values
of the instrument to global variables.

The trouble is that y don't know when the user will play each instrument and
do variable modification of his parameters. The instruments cut be
independent between them or a mix, therefore all instruments are always
loaded in the osc file and i set the amplitude to zero until the user
indicates and other way. But if the user needs do to create a mix of
instruments i can't stopped or mute it, and it that case the mix failed
because if i set the amplitude to zero the global value also changes to the
mix instrument.

I would like to know it there's a way to mute the output signal without
change the global output value. I checked the mute opcode but i got troubles
using it, i'm use the manual's example but throws a mistake.

Here's mi example's code if helps.

Thank's, David GG 





	-o dac -+rtaudio=alsa 




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

	gaaux1 init 0
	gaaux2 init 0

	instr 1
		kamp	chnget	"ampcuad"
		kfrec	chnget	"frecuad"
		gaaux1	oscil	kamp, kfrec, 1
		out gaaux1
	endin

	instr 2
		kamp	chnget	"amptri"
		kfrec	chnget	"fretri"
		gaaux2	oscil	kamp, kfrec, 2
		out	gaaux2
	endin


;mix +
	instr 10
		out gaaux1 + gaaux2
	endin






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

;f2
f2 0 1024  7 .5 256 1 256 .5 256 0 256 .5


i1 		0	30		 	
i2		0	30  
i10		0	30	


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


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-15 18:43
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Mute instrument
Not sure I understand.  Does the mute opcode help?  In a control instrment?

>
> I have a question:
>
> I wan to create a simple signals mixes, each one on a different
> instrument.
> I want to create the mix in other instrument where to use the output
> values
> of the instrument to global variables.
>




------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-15 20:06
Fromdavistro
SubjectRe: [Cs-dev] Mute instrument
The opcode mute doesn't works, my code is below


	sr = 44100
	kr = 4410
	ksmps = 10
	nchnls = 1
	
	; Mute Instrument #2.
		
	mute 2
	
...

In compilation 

PortMIDI real time MIDI plugin for Csound
virtual_keyboard real time MIDI plugin for Csound
PortAudio real-time audio module for Csound
0dBFS level = 32768.0
Csound version 5.08 (double samples) Apr 16 2008
libsndfile-1.0.17
UnifiedCSD:  mute.csd
STARTING FILE
Creating options
Creating orchestra
Creating score
orchname:  /tmp/filelOLsmV.orc
scorename: /tmp/fileDV5P12.sco
rtaudio: ALSA module enabled
rtmidi: PortMIDI module enabled
orch compiler:
21 lines read
error:  input arg '2' of type const not allowed when expecting S, line 16:
        mute 2
        instr   1
        instr   2
1 syntax errors in orchestra.  compilation invalid


Really that i want to do is to pause a sound, so i used the opcode mute for
test and i don't know if exist any opcode to pause the signal or just can't
do it with mute.


jpff-2 wrote:
> 
> Not sure I understand.  Does the mute opcode help?  In a control
> instrment?
> 
>>
>> I have a question:
>>
>> I wan to create a simple signals mixes, each one on a different
>> instrument.
>> I want to create the mix in other instrument where to use the output
>> values
>> of the instrument to global variables.
>>
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> 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/Mute-instrument-tp22526439p22527409.html
Sent from the Csound - Dev mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-16 06:22
FromAnthony Kozar
SubjectRe: [Cs-dev] Mute instrument
I'm confused about why you want to mute the output of an instrument when
creating a mix of the instruments.

Are you only playing one instance (one note) for each instrument or are
there potentially multiple instances of each instrument?

Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/

davistro wrote on 3/15/09 2:34 PM:

> But if the user needs do to create a mix of
> instruments i can't stopped or mute it, and it that case the mix failed
> because if i set the amplitude to zero the global value also changes to the
> mix instrument.
> 
> I would like to know it there's a way to mute the output signal without
> change the global output value. I checked the mute opcode but i got troubles
> using it, i'm use the manual's example but throws a mistake.


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-16 06:42
Fromdavistro
SubjectRe: [Cs-dev] Mute instrument
I need to silence it because the user determinate when a instrument stop's to
play an other sound. And in this case i can't set the amplitude to zero
because it generate mixing troubles.

I'm developing GUI for use the csound functions.


Anthony Kozar-2 wrote:
> 
> I'm confused about why you want to mute the output of an instrument when
> creating a mix of the instruments.
> 
> Are you only playing one instance (one note) for each instrument or are
> there potentially multiple instances of each instrument?
> 
> Anthony Kozar
> mailing-lists-1001 AT anthonykozar DOT net
> http://anthonykozar.net/
> 
> davistro wrote on 3/15/09 2:34 PM:
> 
>> But if the user needs do to create a mix of
>> instruments i can't stopped or mute it, and it that case the mix failed
>> because if i set the amplitude to zero the global value also changes to
>> the
>> mix instrument.
>> 
>> I would like to know it there's a way to mute the output signal without
>> change the global output value. I checked the mute opcode but i got
>> troubles
>> using it, i'm use the manual's example but throws a mistake.
> 
> 
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> 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/Mute-instrument-tp22526439p22532604.html
Sent from the Csound - Dev mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-16 07:11
Fromjpff
SubjectRe: [Cs-dev] Mute instrument
mute opcode is not allowed in instrument 0.  As I said, use a
controlling instrument.
==John ffitch

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-16 07:22
Fromdavistro
SubjectRe: [Cs-dev] Mute instrument
pero existe alguna forma de silenciar un instrumento antes de que termine el
tiempo de ejecucion definido 

but there a way to stop an instrument in execution time?, Like

i2 0 30 ; i need to stop of the instrument on 10th time  


jpff wrote:
> 
> mute opcode is not allowed in instrument 0.  As I said, use a
> controlling instrument.
> ==John ffitch
> 
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> 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/Mute-instrument-tp22526439p22532935.html
Sent from the Csound - Dev mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-16 08:21
Fromroot
SubjectRe: [Cs-dev] Mute instrument
Look at turnoff2
Or use global variables to make an instrument set p3
==John ff



------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net