Beispiel #1
0
        private void SaveSongInfo()
        {
            centiseconds     = SequenceFunctions.ms2cs(audioData.Duration);
            seq.Centiseconds = centiseconds;
            seq.SequenceType = SequenceType.Musical;
            //seq.Tracks[0].Centiseconds = 0;
            seq.info.music.Album = audioData.Album;
            string artst = audioData.Artist;

            if (artst.Length < 1)
            {
                artst = audioData.AlbumArtist;
            }
            seq.info.music.Artist = artst;
            seq.info.music.File   = audioData.Filename;
            seq.info.music.Title  = audioData.Title;
            theSong   = audioData.Title;
            songTitle = audioData.Title;
            if (audioData.Artist.Length > 1)
            {
                theSong   += BY + audioData.Artist;
                songArtist = audioData.Artist;
            }
            else
            {
                if (audioData.AlbumArtist.Length > 1)
                {
                    theSong   += BY + audioData.AlbumArtist;
                    songArtist = audioData.AlbumArtist;
                }
            }
        }
Beispiel #2
0
        private void SaveInExistingSequence()
        {
            string filt    = "Musical Sequences *.lms|*lms";
            string idir    = utils.DefaultSequencesPath;
            string ifl     = txtSeqName.Text.Trim();
            string theFile = "";

            if (utils.ValidFilename(ifl, true, false))
            {
                idir = Path.GetDirectoryName(ifl);
                if (utils.ValidFilename(ifl, true, true))
                {
                    if (Path.GetExtension(ifl.ToLower()) == "lms")
                    {
                        theFile = Path.GetFileName(ifl);
                    }
                }
            }
            else
            {
                // Keep default sequence path
            }


            dlgOpenFile.Filter           = filt;
            dlgOpenFile.FilterIndex      = 2;           //! Temporary?  Set back to 1 and/or change filter string?
            dlgOpenFile.InitialDirectory = idir;
            //dlgOpenFile.FileName = Properties.Settings.Default.fileSeqLast;

            DialogResult dr = dlgOpenFile.ShowDialog(this);

            if (dr == DialogResult.OK)
            {
                fileCurrent     = dlgOpenFile.FileName;
                txtSeqName.Text = Path.GetFileName(fileCurrent);
                string ex = Path.GetExtension(fileCurrent).ToLower();
                // If they picked an existing musical sequence
                if (ex == ".lms")
                {
                    seq.ReadSequenceFile(fileCurrent);
                    //fileAudioOriginal = seq.info.music.File;
                    //txtFileAudio.Text = Path.GetFileNameWithoutExtension(fileAudioOriginal);
                    grpAudio.Text       = " Original Audio File ";
                    btnBrowseAudio.Text = "Analyze";
                    //fileSeqCur = fileCurrent;
                    //fileChanCfg = "";
                    // Add to Sequences MRU

                    centiseconds = SequenceFunctions.ms2cs(audioData.Duration);

                    //! ImportVampsToSequence();
                    SaveSequence(fileCurrent);
                }
                //grpGrids.Enabled = true;
                //grpTracks.Enabled = true;
                //grpAudio.Enabled = true;
                //btnBrowseAudio.Focus();
            }
        }