I made comments if (speak.Contains(",")) { MusicGenQuality.Text = "15";…
- User
I made comments
if (speak.Contains(",")) { MusicGenQuality.Text = "15"; MusicGenDuration.Text = "22"; speak = System.Text.RegularExpressions.Regex.Replace(speak, @",\s*", Environment.NewLine); string mixLine = "[verse]" + Environment.NewLine + speak; GenSongLazy(speak); } else { MusicGenQuality.Text = "11"; // if speak string is at a certain length lets say the length of this example 'hello team how is everyone tonight' make it 17 if it's any higher than that then add 2 per word MusicGenDuration.Text = "5"; // if speak string is at a certain length lets say the length of this example 'hello team how is everyone tonight' make it 8 if it's any higher than that then add 1 per word string mixLine = "[verse]" + Environment.NewLine + speak; GenSongLazy(speak); }
- Assistant
It looks like you want to adjust the
MusicGenQuality.TextandMusicGenDuration.Textvalues dynamically based on the length of thespeakstring when it does not contain a comma. Specifically, your rule is:-
For
MusicGenQuality.Text:- If the length of is ≤ length of (which is 35 including spaces), set to 17.
-