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())); } }
public void Setup(InfoObject infoObject) { //throw new NotImplementedException(); }
/// <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; }
public void Setup(InfoObject infoObject)// Ignore for now { }
/// <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; }
public void Setup(InfoObject infoObject) { }
internal Channel GetWorkingChannel(InfoObject info, Instrument instrument, bool single) { if (_channels == Channel.Channel16) throw new OutOfChannelsException(); lock (_syncRoot) { _outputDevice.SendProgramChange(_channels, instrument); } return _channels++; }
/// <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); }