Exemple #1
0
        public void Playback(string args)
        {
            wavmod.WavMod wvmd = new wavmod.WavMod();
            Renderer      rnd  = new Renderer(noteSheet);

            if (rndset && vbset)
            {
                // Show render console if specified
                if (showRender)
                {
                    rnd.ShowRenderWindow = true;
                }

                // Begin render
                Console.Out.Write("Rendering... ");
                rnd.Render();

                Console.Out.WriteLine("Done. ");

                // TODO: generate render time message

                // Play back render
                try { wvmd.PlaybackTemp(rnd.TemporaryDir, noteSheet); }
                catch (Exception) { Console.Out.WriteLine("Playback failed. "); return; }
            }
            else
            {
                Console.Out.WriteLine("e: Sample bank and/or renderer not specified.");
            }
        }
        public NoteRoll() {
            InitializeComponent();

            ImageBrush brush = new ImageBrush();
            brush.ImageSource = new BitmapImage(new Uri(System.AppDomain.CurrentDomain.BaseDirectory + "\\res\\01.PNG"));
            brush.TileMode = TileMode.Tile;
            brush.ViewportUnits = BrushMappingMode.Absolute;
            brush.Viewport = new Rect(0, 0, brush.ImageSource.Width, brush.ImageSource.Height);
            brush.Stretch = Stretch.None;
            bkgCanvas.Background = brush;

            otoRead = new OtoReader();
            wavMod = new wavmod.WavMod();

            setDefaultColors();
            PaintPianoKeys();

            scroller.ScrollToVerticalOffset(560);

            NoteSnapping = Snapping.Sixteenth;
            RollSnapping = Snapping.Sixteenth;
        }
Exemple #3
0
        public void Playback(string args) {
            wavmod.WavMod wvmd = new wavmod.WavMod();
            Renderer rnd = new Renderer(noteSheet);

            if (rndset && vbset) {
                // Show render console if specified
                if (showRender) rnd.ShowRenderWindow = true;

                // Begin render
                Console.Out.Write("Rendering... ");
                rnd.Render();

                Console.Out.WriteLine("Done. ");

                // TODO: generate render time message

                // Play back render
                try { wvmd.PlaybackTemp(rnd.TemporaryDir, noteSheet); }
                catch (Exception) { Console.Out.WriteLine("Playback failed. "); return; }
            }
            else {
                Console.Out.WriteLine("e: Sample bank and/or renderer not specified.");
            }
        }