public void Initialize(BassPlayer bassPlayer, SampleLibrary sampleLibrary, Library library)
        {
            BassPlayer = bassPlayer;
            SampleLibrary = sampleLibrary;
            Library = library;
            ModulePlayer = new ModulePlayer();
            ModulePlayer.CreateModule();

            samplesControl.BassPlayer = BassPlayer;
            samplesControl.SampleLibrary = SampleLibrary;
            samplesControl.Library = Library;
            samplesControl.ModulePlayer = ModulePlayer;

            songControl.BassPlayer = BassPlayer;
            songControl.SampleLibrary = SampleLibrary;
            songControl.Library = Library;
            songControl.ModulePlayer = ModulePlayer;

            patternsControl.BassPlayer = BassPlayer;
            patternsControl.SampleLibrary = SampleLibrary;
            patternsControl.Library = Library;
            patternsControl.ModulePlayer = ModulePlayer;

            samplesControl.Initialize();
            songControl.Initialize();
            patternsControl.Initialize();

            bassPlayer.SpeakerOutput.AddInputChannel(ModulePlayer.Output);

            SetVisibleControls();
        }
Ejemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            DebugHelper.DebugMode = false;

            const string libraryFolder = @"D:\Music\Library";

            _bassPlayer = new BassPlayer(Handle);
            ExtenedAttributesHelper.ExtendedAttributeFolder = @"D:\Music\ShufflerAudioDatabase";

            _library = new Library(_bassPlayer) { LibraryFolder = libraryFolder };


            _library.LoadFromDatabase();
            _sampleLibrary = new SampleLibrary(_bassPlayer, _library);

            _player = new ModulePlayer(libraryFolder);
            _bassPlayer.SpeakerOutput.AddInputChannel(_player.Output);

             //const string module = @"C:\Users\jason\Brooklyn2Birkenhead My Files\Music\Modules\Viva.json";
            const string module = @"D:\Brooklyn2Birkenhead My Files\Music\Modules\Viva.json";
            _player.LoadModule(module);

            _player.PlayModule();
            //_player.PlayPattern("StartMainLoop");
            //_player.PlayPatternChannel("StartMainLoop", "Drums");
            //_player.PlayPattern("DrumsOnly");

            //PluginHelper.VstPluginsFolder = @"D:\Music\VstPlugins";
        }
 internal void Initialize(AE.BassPlayer bassPlayer, SampleLibrary sampleLibrary, ISampleRecipient sampleRecipient = null)
 {
     sampleLibraryControl.BassPlayer = bassPlayer;
     sampleLibraryControl.SampleLibrary = sampleLibrary;
     sampleLibraryControl.SampleRecipient = sampleRecipient;
     sampleLibraryControl.Initialize();
 }
Ejemplo n.º 4
0
        /// <summary>
        ///     Initializes a new instance of the frmMain class.
        /// </summary>
        public FrmMain()
        {
            InitializeComponent();

            mnuPlugins.Click += mnuPlugins_Click;
            mnuAbout.Click += mnuAbout_Click;
            mnuSettings.Click += mnuSettings_Click;
            mnuExit.Click += mnuExit_Click;
            mnuExportPlaylistTracks.Click += mnuExportPlaylistTracks_Click;
            mnuConservativeFadeOut.Click += mnuConservativeFadeOut_Click;

            mnuWinampDSPConfig.Click += mnuWinampDSPConfig_Click;
            mnuVSTPluginConfig.Click += mnuVSTPluginConfig_Click;
            mnuSamplerVSTPluginConfig.Click += mnuSamplerVSTPluginConfig_Click;
            mnuTrackVSTPluginConfig.Click += mnuTrackVSTPluginConfig_Click;
            mnuSamplerVSTPluginConfig2.Click += mnuSamplerVSTPluginConfig2_Click;
            mnuTrackFXVSTPluginConfig.Click += mnuTrackFXVSTPluginConfig_Click;
            mnuTrackFXVSTPluginConfig2.Click += mnuTrackFXVSTPluginConfig2_Click;

            mnuViewLibrary.Click += mnuViewLibrary_Click;
            mnuViewMixer.Click += mnuViewMixer_Click;
            mnuViewPlaylist.Click += mnuViewPlaylist_Click;

            notificationContextMenu.Opening += notificationContextMenu_Opening;
            mnuPlayPause.Click += mnuPlayPause_Click;
            mnuPause.Click += mnuPause_Click;
            mnuNext.Click += mnuNext_Click;
            mnuPrevious.Click += mnuPrevious_Click;
            mnuSkipToEnd.Click += mnuSkipToEnd_Click;
            NotifyIcon.ContextMenuStrip = notificationContextMenu;

            BassPlayer = new AE.BassPlayer(Handle);
            Library = new Library(BassPlayer);

            BassPlayer.OnTrackChange += BassPlayer_OnTrackChange;
            BassPlayer.OnTrackQueued += BassPlayer_OnTrackQueued;

            LoadSettings();

            MixLibrary = new MixLibrary(Library.ShufflerFolder);

            SampleLibrary = new SampleLibrary(BassPlayer, Library);

            playlistControl.Library = Library;
            playlistControl.MixLibrary = MixLibrary;
            playlistControl.BassPlayer = BassPlayer;
            playlistControl.ToolStripLabel = lblPlaylistStatus;

            playerDetails.Library = Library;
            playerDetails.BassPlayer = BassPlayer;
            playerDetails.PlaylistControl = playlistControl;
            playerDetails.SetSelectedView(PlayerDetails.SelectedView.Playlist);
            playerDetails.SelectedViewChanged += playerDetails_SelectedViewChanged;

            playerDetails.MixLibrary = MixLibrary;
            playlistControl.MixLibrary = MixLibrary;

            trackLibraryControl.Library = Library;
            trackLibraryControl.BassPlayer = BassPlayer;
            trackLibraryControl.PlaylistControl = playlistControl;
            trackLibraryControl.MixLibrary = MixLibrary;
            trackLibraryControl.ToolStripLabel = lblLibraryStatus;
            trackLibraryControl.SamplerControl = mixerControl.SamplerControl;
            trackLibraryControl.SampleLibrary = SampleLibrary;

            mixerControl.Library = Library;
            mixerControl.BassPlayer = BassPlayer;
            mixerControl.PlaylistControl = playlistControl;

            Library.LoadFromDatabase();

            if (Library.GetTracks().Count > 0)
                Library.LoadPlaylists();

            trackLibraryControl.Initalize();

            SampleLibrary.LoadFromCache();

            mixerControl.Initialize();
            playerDetails.Initialize();
            playlistControl.Initalize(trackLibraryControl);

            shufflerController.PlaylistControl = playlistControl;
            shufflerController.LibraryControl = trackLibraryControl;
            shufflerController.BassPlayer = BassPlayer;
            shufflerController.Initalize();

            MixLibrary.AvailableTracks = Library.GetTracks();
            MixLibrary.LoadAllMixDetails();
            //var devices = AE.BassHelper.GetWaveOutDevices();

            SetView(PlayerDetails.SelectedView.Library);
        }