Exemplo n.º 1
0
        private void CreateEmptyInputStaves(List<List<VoiceDef>> barDefsInOneSystem)
        {
            int nPrintedOutputStaves = _pageFormat.VisibleOutputVoiceIndicesPerStaff.Count;
            int nPrintedInputStaves = _pageFormat.VisibleInputVoiceIndicesPerStaff.Count;
            int nStaffNames = _pageFormat.ShortStaffNames.Count;

            for(int i = 0; i < Systems.Count; i++)
            {
                SvgSystem system = Systems[i];
                List<VoiceDef> barDef = barDefsInOneSystem[i];

                for(int staffIndex = 0; staffIndex < nPrintedInputStaves; staffIndex++)
                {
                    int staffNameIndex = nPrintedOutputStaves + staffIndex;
                    string staffname = StaffName(i, staffNameIndex);

                    float gap = _pageFormat.Gap * _pageFormat.InputStavesSizeFactor;
                    float stafflineStemStrokeWidth = _pageFormat.StafflineStemStrokeWidth * _pageFormat.InputStavesSizeFactor;
                    InputStaff inputStaff = new InputStaff(system, staffname, _pageFormat.StafflinesPerStaff[staffIndex], gap, stafflineStemStrokeWidth);

                    List<byte> inputVoiceIndices = _pageFormat.VisibleInputVoiceIndicesPerStaff[staffIndex];
                    for(int ivIndex = 0; ivIndex < inputVoiceIndices.Count; ++ivIndex)
                    {
                        InputVoiceDef inputVoiceDef = barDef[inputVoiceIndices[ivIndex] + _algorithm.MidiChannelIndexPerOutputVoice.Count] as InputVoiceDef;
                        Debug.Assert(inputVoiceDef != null);
                        InputVoice inputVoice = new InputVoice(inputStaff);
                        inputVoice.VoiceDef = inputVoiceDef;
                        inputStaff.Voices.Add(inputVoice);
                    }
                    SetStemDirections(inputStaff);
                    system.Staves.Add(inputStaff);
                }
            }
        }
Exemplo n.º 2
0
 public InputVoice(InputStaff inputStaff)
     : base(inputStaff)
 {
     _midiChannel = byte.MaxValue;
 }
Exemplo n.º 3
0
 public InputVoice(InputStaff inputStaff)
     : base(inputStaff)
 {
     _midiChannel = byte.MaxValue;
 }
Exemplo n.º 4
0
 public InputVoice(InputStaff inputStaff)
     : base(inputStaff)
 {
 }