コード例 #1
0
ファイル: GeneratorFramework.cs プロジェクト: Rumu11/AAU-P2
 public void Add(IMusicGenerator generator)
 {
     lock (_syncRoot)
     {
         InfoObject info = new InfoObject(this, _outputDevice, _clock);
         generator.Setup(info);
         _generators.Add(Tuple.Create(generator, info, new PrivateInfoObject()));
     }
 }
コード例 #2
0
 public void Add(IMusicGenerator generator)
 {
     lock (_syncRoot)
     {
         InfoObject info = new InfoObject(this, _outputDevice, _clock);
         generator.Setup(info);
         _generators.Add(Tuple.Create(generator, info, new PrivateInfoObject()));
     }
 }
コード例 #3
0
 public void Setup(InfoObject infoObject)
 {
     //throw new NotImplementedException();
 }
コード例 #4
0
ファイル: BrotherGenerator.cs プロジェクト: Rumu11/AAU-P2
        /// <summary>
        /// Setup method called by framework while also passing needed info in an object.
        /// 
        /// If Setup gets called multiple times it is an error and the IMusicGenerator may 
        /// throw an Exception or fail to function correctly
        /// </summary>
        /// <param name="infoObject">An object to interact with the framework</param>
        public void Setup(InfoObject infoObject)
        {
            Pitches = Second.Keys.ToArray();

            info = infoObject;
        }
コード例 #5
0
ファイル: ChordTesting.cs プロジェクト: joha4270/AAU-P2
 public void Setup(InfoObject infoObject)// Ignore for now
 {
 }
コード例 #6
0
		/// <summary>
		/// Setup method called by framework while also passing needed info in an object.
		/// 
		/// If Setup gets called multiple times it is an error and the IMusicGenerator may 
		/// throw an Exception or fail to function correctly
		/// </summary>
		/// <param name="infoObject">An object to interact with the framework</param>
		public void Setup(InfoObject infoObject)
		{
			info = infoObject;
		}
コード例 #7
0
        public void Setup(InfoObject infoObject)
        {

        }
コード例 #8
0
ファイル: GeneratorFramework.cs プロジェクト: joha4270/AAU-P2
		internal Channel GetWorkingChannel(InfoObject info, Instrument instrument, bool single)
		{
			if (_channels == Channel.Channel16) throw new OutOfChannelsException();

			lock (_syncRoot)
			{
				_outputDevice.SendProgramChange(_channels, instrument);
			}
			
			return _channels++;
		}
コード例 #9
0
ファイル: DrumBeatGenerator.cs プロジェクト: joha4270/AAU-P2
		/// <summary>
		/// Setup method called by framework while also passing needed info in an object.
		/// 
		/// If Setup gets called multiple times it is an error and the IMusicGenerator may 
		/// throw an Exception or fail to function correctly
		/// </summary>
		/// <param name="infoObject">An object to interact with the framework</param>
		public void Setup(InfoObject infoObject)
		{
			_info = infoObject;
			_channel = _info.GetWorkingChannel(Instrument.SynthDrum);
		}