コード例 #1
0
ファイル: Stave.cs プロジェクト: tentativafc/alphaTab
 public Stave(string staveId, BarRendererFactory factory, FastDictionary <string, object> settings)
 {
     BarRenderers  = new FastList <BarRendererBase>();
     StaveId       = staveId;
     _factory      = factory;
     _settings     = settings;
     TopSpacing    = 10;
     BottomSpacing = 10;
     StaveTop      = 0;
     StaveBottom   = 0;
 }
コード例 #2
0
 public Staff(int trackIndex, Model.Staff staff, BarRendererFactory factory)
 {
     BarRenderers  = new FastList <BarRendererBase>();
     TrackIndex    = trackIndex;
     ModelStaff    = staff;
     _factory      = factory;
     TopSpacing    = 15;
     BottomSpacing = 5;
     StaveTop      = 0;
     StaveBottom   = 0;
 }
コード例 #3
0
ファイル: Staff.cs プロジェクト: weinyzhou/alphaTab
 public Staff(int trackIndex, Model.Staff staff, BarRendererFactory factory, FastDictionary <string, object> settings)
 {
     BarRenderers  = new FastList <BarRendererBase>();
     TrackIndex    = trackIndex;
     ModelStaff    = staff;
     _factory      = factory;
     _settings     = settings;
     TopSpacing    = 15;
     BottomSpacing = 5;
     StaveTop      = 0;
     StaveBottom   = 0;
 }
コード例 #4
0
ファイル: Staff.cs プロジェクト: zwdesigns/alphaTab
 public Staff(int trackIndex, Model.Staff staff, BarRendererFactory factory)
 {
     BarRenderers      = new FastList <BarRendererBase>();
     TrackIndex        = trackIndex;
     ModelStaff        = staff;
     _factory          = factory;
     TopSpacing        = 20;
     BottomSpacing     = 5;
     StaveTop          = 0;
     StaveBottom       = 0;
     _sharedLayoutData = new FastDictionary <string, object>();
 }
コード例 #5
0
 public Staff(Model.Staff staff, string staveId, BarRendererFactory factory, FastDictionary <string, object> settings)
 {
     BarRenderers       = new FastList <BarRendererBase>();
     _barRendererLookup = new FastDictionary <int, BarRendererBase>();
     ModelStaff         = staff;
     StaveId            = staveId;
     _factory           = factory;
     _settings          = settings;
     TopSpacing         = 10;
     BottomSpacing      = 10;
     StaveTop           = 0;
     StaveBottom        = 0;
 }
コード例 #6
0
        static Environment()
        {
            RenderEngines = new FastDictionary <string, Func <ICanvas> >();
            FileLoaders   = new FastDictionary <string, Func <IFileLoader> >();
            LayoutEngines = new FastDictionary <string, Func <ScoreRenderer, ScoreLayout> >();
            StaveProfiles = new FastDictionary <string, BarRendererFactory[]>();

            PlatformInit();

            // default layout engines
            LayoutEngines["default"]    = r => new PageViewLayout(r);
            LayoutEngines["page"]       = r => new PageViewLayout(r);
            LayoutEngines["horizontal"] = r => new HorizontalScreenLayout(r);

            // default combinations of stave textprofiles
            StaveProfiles["default"] = StaveProfiles["score-tab"] = new BarRendererFactory[]
            {
                new EffectBarRendererFactory("score-effects", new IEffectBarRendererInfo[] {
                    new TempoEffectInfo(),
                    new TripletFeelEffectInfo(),
                    new MarkerEffectInfo(),
                    new TextEffectInfo(),
                    new ChordsEffectInfo(),
                    new TrillEffectInfo(),
                    new BeatVibratoEffectInfo(),
                    new NoteVibratoEffectInfo(),
                    new AlternateEndingsEffectInfo(),
                }),
                new ScoreBarRendererFactory(),
                new EffectBarRendererFactory("tab-effects", new IEffectBarRendererInfo[] {
                    new CrescendoEffectInfo(),
                    new DynamicsEffectInfo(),
                    new TrillEffectInfo(),
                    new BeatVibratoEffectInfo(),
                    new NoteVibratoEffectInfo(),
                    new TapEffectInfo(),
                    new FadeInEffectInfo(),
                    new HarmonicsEffectInfo(),
                    new LetRingEffectInfo(),
                    new CapoEffectInfo(),
                    new PalmMuteEffectInfo(),
                    new PickStrokeEffectInfo(),
                }),
                new TabBarRendererFactory()
            };

            StaveProfiles["score"] = new BarRendererFactory[]
            {
                new EffectBarRendererFactory("score-effects", new IEffectBarRendererInfo[] {
                    new TempoEffectInfo(),
                    new TripletFeelEffectInfo(),
                    new MarkerEffectInfo(),
                    new TextEffectInfo(),
                    new ChordsEffectInfo(),
                    new TrillEffectInfo(),
                    new BeatVibratoEffectInfo(),
                    new NoteVibratoEffectInfo(),
                    new FadeInEffectInfo(),
                    new LetRingEffectInfo(),
                    new PalmMuteEffectInfo(),
                    new PickStrokeEffectInfo(),
                    new AlternateEndingsEffectInfo(),
                }),
                new ScoreBarRendererFactory(),
                new EffectBarRendererFactory("score-bottom-effects", new IEffectBarRendererInfo[] {
                    new CrescendoEffectInfo(),
                    new DynamicsEffectInfo(),
                }),
            };

            StaveProfiles["tab"] = new BarRendererFactory[]
            {
                new EffectBarRendererFactory("tab-effects", new IEffectBarRendererInfo[] {
                    new TempoEffectInfo(),
                    new TripletFeelEffectInfo(),
                    new MarkerEffectInfo(),
                    new TextEffectInfo(),
                    new ChordsEffectInfo(),
                    new TripletFeelEffectInfo(),
                    new TrillEffectInfo(),
                    new BeatVibratoEffectInfo(),
                    new NoteVibratoEffectInfo(),
                    new TapEffectInfo(),
                    new FadeInEffectInfo(),
                    new HarmonicsEffectInfo(),
                    new LetRingEffectInfo(),
                    new CapoEffectInfo(),
                    new PalmMuteEffectInfo(),
                    new PickStrokeEffectInfo(),
                    new AlternateEndingsEffectInfo()
                }),
                new TabBarRendererFactory()
            };
        }
コード例 #7
0
ファイル: Environment.cs プロジェクト: zwdesigns/alphaTab
        public static void Init()
        {
            RenderEngines = new FastDictionary <string, Func <ICanvas> >();
            LayoutEngines = new FastDictionary <string, Func <ScoreRenderer, ScoreLayout> >();
            StaveProfiles = new FastDictionary <string, BarRendererFactory[]>();

            PlatformInit();

            // default layout engines
            LayoutEngines["default"]    = r => new PageViewLayout(r);
            LayoutEngines["page"]       = r => new PageViewLayout(r);
            LayoutEngines["horizontal"] = r => new HorizontalScreenLayout(r);

            // default combinations of stave textprofiles
            StaveProfiles["default"] = StaveProfiles[StaveProfileScoreTab] = new BarRendererFactory[]
            {
                new EffectBarRendererFactory("score-effects", new IEffectBarRendererInfo[] {
                    new TempoEffectInfo(),
                    new TripletFeelEffectInfo(),
                    new MarkerEffectInfo(),
                    new TextEffectInfo(),
                    new ChordsEffectInfo(),
                    new FermataEffectInfo(),
                    new WhammyBarEffectInfo(),
                    new TrillEffectInfo(),
                    new OttaviaEffectInfo(true),
                    new WideBeatVibratoEffectInfo(),
                    new SlightBeatVibratoEffectInfo(),
                    new WideNoteVibratoEffectInfo(),
                    new SlightNoteVibratoEffectInfo(),
                    new AlternateEndingsEffectInfo(),
                }),
                new ScoreBarRendererFactory(),
                new EffectBarRendererFactory("tab-effects", new IEffectBarRendererInfo[] {
                    new CrescendoEffectInfo(),
                    new OttaviaEffectInfo(false),
                    new DynamicsEffectInfo(),
                    new LyricsEffectInfo(),
                    new TrillEffectInfo(),
                    new WideBeatVibratoEffectInfo(),
                    new SlightBeatVibratoEffectInfo(),
                    new WideNoteVibratoEffectInfo(),
                    new SlightNoteVibratoEffectInfo(),
                    new TapEffectInfo(),
                    new FadeInEffectInfo(),
                    new HarmonicsEffectInfo(HarmonicType.Natural),
                    new HarmonicsEffectInfo(HarmonicType.Artificial),
                    new HarmonicsEffectInfo(HarmonicType.Pinch),
                    new HarmonicsEffectInfo(HarmonicType.Tap),
                    new HarmonicsEffectInfo(HarmonicType.Semi),
                    new HarmonicsEffectInfo(HarmonicType.Feedback),
                    new LetRingEffectInfo(),
                    new CapoEffectInfo(),
                    new FingeringEffectInfo(),
                    new PalmMuteEffectInfo(),
                    new PickStrokeEffectInfo(),
                    new PickSlideEffectInfo()
                }),
                new TabBarRendererFactory(false, false, false)
            };

            StaveProfiles[StaveProfileScore] = new BarRendererFactory[]
            {
                new EffectBarRendererFactory("score-effects", new IEffectBarRendererInfo[] {
                    new TempoEffectInfo(),
                    new TripletFeelEffectInfo(),
                    new MarkerEffectInfo(),
                    new TextEffectInfo(),
                    new ChordsEffectInfo(),
                    new FermataEffectInfo(),
                    new WhammyBarEffectInfo(),
                    new TrillEffectInfo(),
                    new OttaviaEffectInfo(true),
                    new WideBeatVibratoEffectInfo(),
                    new SlightBeatVibratoEffectInfo(),
                    new WideNoteVibratoEffectInfo(),
                    new SlightNoteVibratoEffectInfo(),
                    new FadeInEffectInfo(),
                    new LetRingEffectInfo(),
                    new PalmMuteEffectInfo(),
                    new PickStrokeEffectInfo(),
                    new PickSlideEffectInfo(),
                    new AlternateEndingsEffectInfo(),
                }),
                new ScoreBarRendererFactory(),
                new EffectBarRendererFactory("score-bottom-effects", new IEffectBarRendererInfo[] {
                    new CrescendoEffectInfo(),
                    new OttaviaEffectInfo(false),
                    new DynamicsEffectInfo(),
                    new LyricsEffectInfo(),
                }),
            };

            StaveProfiles[StaveProfileTab] = new BarRendererFactory[]
            {
                new EffectBarRendererFactory("tab-effects", new IEffectBarRendererInfo[] {
                    new TempoEffectInfo(),
                    new TripletFeelEffectInfo(),
                    new MarkerEffectInfo(),
                    new TextEffectInfo(),
                    new ChordsEffectInfo(),
                    new TripletFeelEffectInfo(),
                    new FermataEffectInfo(),
                    new TrillEffectInfo(),
                    new WideBeatVibratoEffectInfo(),
                    new SlightBeatVibratoEffectInfo(),
                    new WideNoteVibratoEffectInfo(),
                    new SlightNoteVibratoEffectInfo(),
                    new TapEffectInfo(),
                    new FadeInEffectInfo(),
                    new HarmonicsEffectInfo(HarmonicType.Artificial),
                    new HarmonicsEffectInfo(HarmonicType.Pinch),
                    new HarmonicsEffectInfo(HarmonicType.Tap),
                    new HarmonicsEffectInfo(HarmonicType.Semi),
                    new HarmonicsEffectInfo(HarmonicType.Feedback),
                    new LetRingEffectInfo(),
                    new CapoEffectInfo(),
                    new FingeringEffectInfo(),
                    new PalmMuteEffectInfo(),
                    new PickStrokeEffectInfo(),
                    new PickSlideEffectInfo(),
                    new AlternateEndingsEffectInfo()
                }),
                new TabBarRendererFactory(true, true, true),
                new EffectBarRendererFactory("tab-bottom-effects", new IEffectBarRendererInfo[] {
                    new LyricsEffectInfo(),
                }),
            };

            StaveProfiles[StaveProfileTabMixed] = new BarRendererFactory[]
            {
                new EffectBarRendererFactory("tab-effects", new IEffectBarRendererInfo[] {
                    new TempoEffectInfo(),
                    new TripletFeelEffectInfo(),
                    new MarkerEffectInfo(),
                    new TextEffectInfo(),
                    new ChordsEffectInfo(),
                    new TripletFeelEffectInfo(),
                    new TrillEffectInfo(),
                    new WideBeatVibratoEffectInfo(),
                    new SlightBeatVibratoEffectInfo(),
                    new WideNoteVibratoEffectInfo(),
                    new SlightNoteVibratoEffectInfo(),
                    new TapEffectInfo(),
                    new FadeInEffectInfo(),
                    new HarmonicsEffectInfo(HarmonicType.Artificial),
                    new HarmonicsEffectInfo(HarmonicType.Pinch),
                    new HarmonicsEffectInfo(HarmonicType.Tap),
                    new HarmonicsEffectInfo(HarmonicType.Semi),
                    new HarmonicsEffectInfo(HarmonicType.Feedback),
                    new LetRingEffectInfo(),
                    new CapoEffectInfo(),
                    new PalmMuteEffectInfo(),
                    new PickStrokeEffectInfo(),
                    new PickSlideEffectInfo(),
                    new AlternateEndingsEffectInfo()
                }),
                new TabBarRendererFactory(false, false, false),
                new EffectBarRendererFactory("tab-bottom-effects", new IEffectBarRendererInfo[] {
                    new LyricsEffectInfo(),
                }),
            };
        }