public oneBeep(beepTone tone, beepDuration __duration = beepDuration.half)
        {
            frequency = tone.toFrequency();
            duration  = __duration;

            // __duration.toMilisecond(tempo);
        }
Exemple #2
0
        public static Int32 toMilisecond(this beepDuration note, Int32 bpm)
        {
            Int32 fullNote = 60000 / bpm;

            switch (note)
            {
            default:
            case beepDuration.full:
                return(fullNote);

                break;

            case beepDuration.half:
                return(fullNote / 2);

                break;

            case beepDuration.oneThird:
                return(fullNote / 4);

                break;

            case beepDuration.threeThirds:
                return(3 * fullNote / 4);
            }
        }