Ejemplo n.º 1
0
		public SoundOutRender(ISoundRender soundRender) : base(soundRender)
		{ 
			Initialize();
		}
Ejemplo n.º 2
0
		public new void Dispose()
   		{
			foreach (SoundItemLink sil in this.SoundItemLinks) this.SoundItemTree.Unlink(sil);
			this.soundItemTree.SoundItems.Remove(this);
			//Console.WriteLine("Disposing a SoundItem");
			if (soundBlock is IDisposable) {
				IDisposable sb = (IDisposable) soundBlock;
				//Console.WriteLine("Disposing a SoundBlock");
				sb.Dispose();
			}
			soundBlock = null;
			soundRender = null;
			midiRender = null;
			base.Dispose();
		}
Ejemplo n.º 3
0
		public SoundItem(SoundItemTree soundItemTree, SoundBlock soundOrMidiRender, int soundInputs, int soundOutputs, int midiInputs, int midiOutputs) : base() 
		{ 
			this.soundBlock = soundOrMidiRender;
			if (soundOrMidiRender is ISoundRender) 
				this.soundRender = (ISoundRender) soundOrMidiRender;
			if (soundOrMidiRender is IMidiRender) 
				this.midiRender = (IMidiRender) soundOrMidiRender;
			this.soundItemTree = soundItemTree;
			this.soundInputs = soundInputs;
			this.soundOutputs = soundOutputs;
			this.midiInputs = midiInputs;
			this.midiOutputs = midiOutputs;		
			this.Size = new System.Drawing.Size(64, 64);
			this.SetStyle(ControlStyles.AllPaintingInWmPaint |
			              ControlStyles.UserPaint |
			              ControlStyles.DoubleBuffer,true);
			this.unselectedBackground = ((System.Drawing.Image)(soundItemTree.Resources.GetObject("unsel-block")));
			this.selectedBackground = ((System.Drawing.Image)(soundItemTree.Resources.GetObject("sel-block")));
			this.nameFont = new System.Drawing.Font(new System.Drawing.FontFamily("Arial"),
			                                                   9,
			                                                   System.Drawing.FontStyle.Regular,
			                                                   System.Drawing.GraphicsUnit.Pixel);
			this.nameFontBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);
			
			ContextMenu BlockContextMenu = new ContextMenu();
			this.ContextMenu = BlockContextMenu;
			
			if ((this.soundRender != null) && (this.soundRender.Editable)) {
				MenuItem EditMenuItem = new MenuItem();
				EditMenuItem.Index = 0;
				EditMenuItem.Text = "Edit block";
				EditMenuItem.Click += new System.EventHandler(this.EditBlockClick);
				EditMenuItem.DefaultItem = true;
				BlockContextMenu.MenuItems.Add(EditMenuItem);
				this.DoubleClick += new EventHandler(EditBlockClick);
			}
			MenuItem DeleteMenuItem = new MenuItem();
			DeleteMenuItem.Index = 1;
			DeleteMenuItem.Text = "Delete block";
			DeleteMenuItem.Click += new System.EventHandler(this.DeleteBlockClick);
			BlockContextMenu.MenuItems.Add(DeleteMenuItem);		
			
			soundItemLinkSoundInput = new SoundItemLink[soundInputs];
			soundItemLinkSoundOutput = new SoundItemLink[soundOutputs];
			soundItemLinkMidiInput = new SoundItemLink[midiInputs];
			soundItemLinkMidiOutput = new SoundItemLink[midiOutputs];
			
			for (int i=0; i<soundInputs;i++) {
				soundItemLinkSoundInput[i] = new SoundItemLink(this,i,SoundItemLink.SoundItemLinkType.SoundInput);
				this.Controls.Add(soundItemLinkSoundInput[i]);
			}
			for (int i=0; i<soundOutputs;i++) {
				soundItemLinkSoundOutput[i] = new SoundItemLink(this,i,SoundItemLink.SoundItemLinkType.SoundOutput);
				this.Controls.Add(soundItemLinkSoundOutput[i]);
			}
			for (int i=0; i<midiInputs;i++) {
				soundItemLinkMidiInput[i] = new SoundItemLink(this,i,SoundItemLink.SoundItemLinkType.MidiInput);
				this.Controls.Add(soundItemLinkMidiInput[i]);
			}
			for (int i=0; i<midiOutputs;i++) {
				soundItemLinkMidiOutput[i] = new SoundItemLink(this,i,SoundItemLink.SoundItemLinkType.MidiOutput);
				this.Controls.Add(soundItemLinkMidiOutput[i]);
			}
		}
		public MultiplyOperatorSoundRender(ISoundRender soundRenderA,ISoundRender soundRenderB) : base(soundRenderA,soundRenderB)
		{ }
		public DelayEffectSoundRender(ISoundRender soundRender) : base(soundRender)
		{ 
			Initialize();
		}
Ejemplo n.º 6
0
		public AdsrSoundRender(ISoundRender soundRender) : base(soundRender)
		{ 
			Initialize();
		}
		protected OperatorSoundRender(ISoundRender soundRenderA,ISoundRender soundRenderB) : base(soundRenderA,soundRenderB)
		{ }
Ejemplo n.º 8
0
		protected SoundRender(ISoundRender soundRender,int numMidiInputs) : base(soundRender,numMidiInputs)
		{ }
		public AddOperatorSoundRender(ISoundRender soundRenderA,ISoundRender soundRenderB) : base(soundRenderA,soundRenderB)
		{ }
Ejemplo n.º 10
0
		protected SoundRender(ISoundRender soundRender) : base(soundRender)
		{ }
Ejemplo n.º 11
0
		protected SoundRender(ISoundRender soundRenderA,ISoundRender soundRenderB) : base(soundRenderA,soundRenderB)
		{ }
Ejemplo n.º 12
0
		public SoundBlock(ISoundRender soundRender, int numMidiInputs) : this(1,numMidiInputs)
		{
			soundInputs[0] = soundRender;
		}
Ejemplo n.º 13
0
		public SoundBlock(ISoundRender soundRenderA, ISoundRender soundRenderB) : this(2,0)
		{
			soundInputs[0] = soundRenderA;
			soundInputs[1] = soundRenderB;
		}
Ejemplo n.º 14
0
		public SoundBlock(ISoundRender soundRender) : this(1,0) 
		{
			soundInputs[0] = soundRender;
		}
Ejemplo n.º 15
0
		protected EffectSoundRender(ISoundRender soundRender) : base(soundRender)
		{ }
		public SubtractOperatorSoundRender(ISoundRender soundRenderA,ISoundRender soundRenderB) : base(soundRenderA,soundRenderB)
		{ }