public async Task <string> GetState(int outlet)
 {
     if (outlet >= Channels.Count())
     {
         return(null);
     }
     return(await Channels[outlet].GetState());
 }
        public GuitarChordConfig(int[] frets, int[] channels,
                                 bool isSlide, bool isSlideReverse,
                                 bool isHammeron,
                                 ChordStrum strumMode,
                                 GuitarChordRootNoteConfig rootNoteConfig)
            : this()
        {
            this.RootNoteConfig = rootNoteConfig;
            if (frets != null)
            {
                Frets = frets.ToArray();
            }

            if (channels != null)
            {
                Channels = channels.ToArray();

                if (Frets != null)
                {
                    for (int x = 0; x < Frets.Count(); x++)
                    {
                        if (Frets[x].IsNotNull() && Channels[x].IsNull())
                        {
                            Channels[x] = Utility.ChannelDefault;
                        }
                        else if (Frets[x].IsNull() && Channels[x].IsNotNull())
                        {
                            Channels[x] = Int32.MinValue;
                        }
                    }
                }

                if (Channels.Any(x => x == Utility.ChannelX))
                {
                    for (int x = 0; x < Channels.Count(); x++)
                    {
                        if (Channels[x].IsNotNull())
                        {
                            Channels[x] = Utility.ChannelX;
                        }
                    }
                }
            }
            IsSlide        = isSlide | isSlideReverse;
            IsSlideReverse = isSlideReverse;
            IsHammeron     = isHammeron;
            StrumMode      = strumMode;
        }