示例#1
0
        /// <inheritdoc />
        public DiscreteSignal CreateEnvelope(NoteSegment segment)
        {
            var adsrParameters = MelodicAdsrParameters;

            if (segment is PercussionNoteSegment percussionNoteSegment)
            {
                adsrParameters = GetPercussionAdsrParameters(percussionNoteSegment.PercussionType);
            }

            return(SignalHelper.GetAdsrEnvelope(adsrParameters, segment.DurationSamples));
        }