コード例 #1
0
ファイル: Expectations.cs プロジェクト: fargonauts/musicat
        public ExpectedMeasureLink MakeNewExpectedMeasureLink(int location1, int location2, int offset, float strength)
        {
            ExpectedMeasure em1 = workspace.expectations.GetExpectedMeasure(location1 + offset);
            ExpectedMeasure em2 = workspace.expectations.GetExpectedMeasure(location2 + offset);

            ExpectedMeasureLink expectedLink = new ExpectedMeasureLink(null, em1, em2, strength);

            links.Add(expectedLink);
            return(expectedLink);
        }
コード例 #2
0
ファイル: Expectations.cs プロジェクト: fargonauts/musicat
        public ExpectedMeasureLink MakeNewExpectedMeasureLink(MeasureLink sourceLink, int offset, float strength)
        {
            int location1 = sourceLink.m1.number;
            int location2 = sourceLink.m2.number;

            ExpectedMeasure em1 = workspace.expectations.GetExpectedMeasure(location1 + offset);
            ExpectedMeasure em2 = workspace.expectations.GetExpectedMeasure(location2 + offset);

            ExpectedMeasureLink expectedLink = new ExpectedMeasureLink(sourceLink, em1, em2, strength);

            links.Add(expectedLink);
            return(expectedLink);
        }
コード例 #3
0
 public ExpectedMeasureLink(MeasureLink sourceMeasureLink, ExpectedMeasure expectedMeasure1, ExpectedMeasure expectedMeasure2, float expectationStrength)
     : base(expectedMeasure1, expectedMeasure2, expectationStrength)
 {
     this.expectationStrength = expectationStrength;
 }
コード例 #4
0
ファイル: Expectations.cs プロジェクト: fargonauts/musicat
        private void GenerateExpectedMeasureBasedOn(Measure m, int offset, double strength)
        {
            ExpectedMeasure em = new ExpectedMeasure(m, m.Location + offset, (float)strength);                  //TODO: deal with any existing conflicts............???

            measures.Add(em);
        }