Exemplo n.º 1
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()));
     }
 }
Exemplo n.º 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()));
     }
 }
Exemplo n.º 3
0
 public void Setup(InfoObject infoObject)
 {
     //throw new NotImplementedException();
 }
Exemplo n.º 4
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)
        {
            Pitches = Second.Keys.ToArray();

            info = infoObject;
        }
Exemplo n.º 5
0
 public void Setup(InfoObject infoObject)// Ignore for now
 {
 }
Exemplo n.º 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;
		}
Exemplo n.º 7
0
        public void Setup(InfoObject infoObject)
        {

        }
Exemplo n.º 8
0
		internal Channel GetWorkingChannel(InfoObject info, Instrument instrument, bool single)
		{
			if (_channels == Channel.Channel16) throw new OutOfChannelsException();

			lock (_syncRoot)
			{
				_outputDevice.SendProgramChange(_channels, instrument);
			}
			
			return _channels++;
		}
Exemplo n.º 9
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;
			_channel = _info.GetWorkingChannel(Instrument.SynthDrum);
		}