public OrganyaPlayerContext(SampleProviderConfiguration config, Organya.OrganyaSong song, WavetableSampleLoader sampleLoader)
 {
     Config        = config;
     SampleLoader  = sampleLoader;
     StepMsec      = song.StepLengthMsec;
     LoopBeginStep = song.LoopStartPositionSteps;
     LoopEndStep   = song.LoopEndPositionSteps;
 }
        public OrganyaSongPlayer(SampleProviderConfiguration config, OrganyaSong song,
                                 WavetableSampleLoader sampleLoader)
        {
            _context      = new OrganyaPlayerContext(config, song, sampleLoader);
            _noteChannels = new List <NoteChannelController>();

            for (int i = 0; i < song.Tracks.Count; i++)
            {
                var  track   = song.Tracks[i];
                bool isDrum  = i >= 8;
                var  channel = new NoteChannelController(_context, track, isDrum);
                _noteChannels.Add(channel);
            }
        }