IMPROVE: hướng dẫn AI tạo nhạc đầy đủ số bars và tracks theo yêu cầu
This commit is contained in:
+8
-16
@@ -826,21 +826,6 @@ const MasterStripConsole = ({ masterVolume, setMasterVolume, showMasteringModal,
|
||||
levelR = peakR;
|
||||
}
|
||||
|
||||
if (!isMuted && (isTestPlaying || isPlaying)) {
|
||||
const db = masterVolume;
|
||||
const linearGain = db <= -60 ? 0 : Math.pow(10, db / 20);
|
||||
const baseSignal = 0.5 * linearGain;
|
||||
if (baseSignal > 0) {
|
||||
levelL = Math.min(1.0, Math.max(0, baseSignal * (0.9 + Math.random() * 0.18)));
|
||||
levelR = Math.min(1.0, Math.max(0, baseSignal * (0.88 + Math.random() * 0.22)));
|
||||
if (isMono) {
|
||||
const mono = (levelL + levelR) / 2;
|
||||
levelL = mono;
|
||||
levelR = mono;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const padding = 4;
|
||||
const gap = 4;
|
||||
const barW = Math.max(4, (w - padding * 2 - gap) / 2);
|
||||
@@ -864,7 +849,7 @@ const MasterStripConsole = ({ masterVolume, setMasterVolume, showMasteringModal,
|
||||
return () => {
|
||||
if (animFrameRef.current) cancelAnimationFrame(animFrameRef.current);
|
||||
};
|
||||
}, [isPlaying, masterVolume, isMuted, isMono]);
|
||||
}, [masterVolume, isMuted, isMono]);
|
||||
|
||||
return React.createElement("div", {
|
||||
className: "flex flex-col items-stretch w-[300px] shrink-0 strip-bg rounded-lg p-2 text-slate-300 select-none shadow-2xl relative overflow-hidden"
|
||||
@@ -16318,6 +16303,13 @@ const App = () => {
|
||||
});
|
||||
|
||||
let matchedInstruction = '';
|
||||
if (aiPromptMgrRef.current) {
|
||||
const matchResult = aiPromptMgrRef.current.matchPreset(prompt);
|
||||
if (matchResult && matchResult.preset) {
|
||||
matchedInstruction = matchResult.preset.system_instruction_template;
|
||||
setAiActionLog(prev => [...prev, { type: 'info', text: ` Khớp với preset: "${matchResult.preset.name}"`, time: Date.now() }]);
|
||||
}
|
||||
}
|
||||
|
||||
const result = await window.AIGateway.executeAIPrompt({
|
||||
prompt: prompt,
|
||||
|
||||
Reference in New Issue
Block a user