Esempio n. 1
0
        public NoteProperties(NoteTreeNode n, GuiCommandExecutor ex, NodeClick c)
            : base(c, ex)
        {
            note = n.getNote();

            String = note.String.ToString();
            Fret   = note.Fret.ToString();

            NoteTreeNode prev_note = ref_click.PartNode?.getPreviousNote(n) ?? null;
            NoteTreeNode next_note = ref_click.PartNode?.getNextNote(n) ?? null;

            IntoEffectProperties   = new EffectProperties(executor, ref_click, note.getEffectAtPosition(EffectPosition.Into), EffectPosition.Into, prev_note, n);
            StrikeEffectProperties = new EffectProperties(executor, ref_click, note.getEffectAtPosition(EffectPosition.Strike), EffectPosition.Strike, null, null);
            AfterEffectProperties  = new EffectProperties(executor, ref_click, note.getEffectAtPosition(EffectPosition.After), EffectPosition.After, n, next_note);
        }
Esempio n. 2
0
        public NodeClick createCombinedClick(NodeClick select_click)
        {
            NoteTreeNode init   = initial_click.NoteNodes.First();
            NoteTreeNode select = select_click.NoteNodes.First();

            if (init.getNote().Position.occursBefore(select.getNote().Position))
            {
                initial_click.NoteNodes.Add(select);
                return(initial_click);
            }
            else
            {
                select_click.NoteNodes.Add(init);
                return(select_click);
            }
        }
        private TreeNode buildEffectNode(IEffect effect, NoteTreeNode parent)
        {
            if (parent is null)
            {
                return(null);
            }
            Note    note   = parent.getNote();
            IBounds bounds = parent.Bounds;

            if (effect is PalmMute)
            {
                return(buildPalmMute((PalmMute)effect, note, bounds));
            }
            if (effect is Bend)
            {
                return(buildBend((Bend)effect, note, bounds));
            }
            if (effect is PinchHarmonic)
            {
                return(buildPinchHarmonic((PinchHarmonic)effect, note, bounds));
            }
            if (effect is Vibrato)
            {
                return(buildVibrato((Vibrato)effect, note, bounds));
            }
            if (effect is Slide)
            {
                return(buildSlide((Slide)effect, note, bounds));
            }
            if (effect is HOPO)
            {
                return(buildHOPO((HOPO)effect, note, bounds));
            }
            if (effect is Tie)
            {
                return(buildTie((Tie)effect, note, bounds));
            }
            return(null);
        }