예제 #1
0
        public ProjectPage()
        {
            InitializeComponent();
            viewModel = MainViewModel.Instance;
            this.DataContext = viewModel;

            banksToPlay = new Dictionary<int, bool>();
        }
예제 #2
0
        public BankPage()
        {
            InitializeComponent();
            viewModel = MainViewModel.Instance;
            this.DataContext = viewModel;
            timerRunning = false;

            viewModel.AudioMan.GetPerf(); //DO NOT REMOVE
        }
예제 #3
0
        public TrackPage()
        {
            viewModel = MainViewModel.Instance;
            this.BankNumber = viewModel.SelectedBank.bankID;
            this.TrackNumber = viewModel.SelectedTrack.trackID;

            this.DataContext = viewModel;
            InitializeComponent();

            OffsetText.Text = viewModel.AudioMan.GetOffsetMS(this.BankNumber, this.TrackNumber).ToString();
            VolumeSlider.Value = viewModel.SelectedTrack.Volume;
        }
예제 #4
0
        /// <summary>
        /// Default constructor, does all initialization
        /// </summary>
        public AudioManager()
        {
            _recorder = new Recorder();
            _engine = new AudioEngine();
            _engine.SetCallback(this); //Do this before anything else!
            viewModel = MainViewModel.Instance;

            isPlaying = false;

            _engine.SetBPM(120);

            LoadClickWAVFile("Assets/clickTrack.wav");
        }
예제 #5
0
        public WAVConfigPage()
        {
            stream = new MemoryStream();
            viewModel = MainViewModel.Instance;
            SetData(viewModel.wavStream);
            //byteData = stream.ToArray();

            //shortData = new short[(int)(secondsPerMeasure*sampleRate)];
            //for (int i = 0; i < sampleRate; i++)
            //{
            //    shortData[i] = (short)(Math.Cos(440 * 2 * 3.14 * i / sampleRate)*short.MaxValue);
            //}
            //byteData = Helper.ConvertShortArrayToByteArray(shortData);

            InitializeComponent();
        }
예제 #6
0
        public ComposePage()
        {
            InitializeComponent();
            viewModel = MainViewModel.Instance;
            this.DataContext = viewModel;
            currentMeasure = 0;

            instructions = new bool[6][];
            for (int i = 0; i < 6; i++)
            {
                instructions[i] = new bool[60];
                for (int j = 0; j < 60; j++)
                {
                    instructions[i][j] = false;
                }
            }
        }
예제 #7
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            if (!settings.Contains("projects"))
            {
                settings["projects"] = new ObservableCollection<Project>();
            }

            viewModel = MainViewModel.Instance;
            this.DataContext = viewModel;

            //_manager = new AudioManager();
            //count = 0;

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
예제 #8
0
 public static async void UploadToSkydrive(string fileName, MainViewModel viewModel)
 {
     try
     {
         LiveOperationResult clientResult = await viewModel.Client.GetAsync("me/skydrive");
         dynamic res = clientResult.Result;
         string path = res.id;
         {
             await viewModel.Client.BackgroundUploadAsync(path, new Uri("/shared/transfers/" + fileName, UriKind.RelativeOrAbsolute), OverwriteOption.Overwrite);
         }
     }
     catch (System.Threading.Tasks.TaskCanceledException tce)
     {
     }
     catch (LiveConnectException ce)
     {
     }
     catch (Exception e)
     {
     }
 }
예제 #9
0
 public NewProjPage()
 {
     InitializeComponent();
     viewModel = MainViewModel.Instance;
 }
예제 #10
0
 public WavSelectPage()
 {
     InitializeComponent();
     viewModel = MainViewModel.Instance;
 }
예제 #11
0
 public SettingsPage()
 {
     InitializeComponent();
     viewModel = MainViewModel.Instance;
 }
예제 #12
0
 public ProjSelectPage()
 {
     InitializeComponent();
     viewModel = MainViewModel.Instance;
     this.DataContext = viewModel;
 }