Spaces:
Running

1176-compressor / index.html
Maxweller's picture
Add 2 files
30d01fe verified
Raw History Blame Contribute Delete
29.4 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1176 FET Compressor</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
body {
font-family: 'Roboto', sans-serif;
background-color: #222;
color: #e0e0e0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
}
.plugin-container {
width: 700px;
background:
linear-gradient(rgba(80, 80, 80, 0.7), rgba(50, 50, 50, 0.7)),
url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%23333" stroke-width="2"/></svg>');
background-size: 20px 20px;
border-radius: 12px;
box-shadow:
0 10px 30px rgba(0, 0, 0, 0.8),
inset 0 0 20px rgba(0, 0, 0, 0.5),
0 0 0 4px #555,
0 0 0 8px #333;
overflow: hidden;
margin: 20px;
border: 1px solid #666;
position: relative;
}
.plugin-container::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(
135deg,
rgba(255,255,255,0.03) 0%,
rgba(255,255,255,0) 20%,
rgba(255,255,255,0) 80%,
rgba(255,255,255,0.03) 100%
);
pointer-events: none;
}
.big-knob {
width: 90px;
height: 90px;
border-radius: 50%;
background: linear-gradient(145deg, #4a4a4a, #2a2a2a);
box-shadow:
5px 5px 15px rgba(0, 0, 0, 0.5),
-5px -5px 15px rgba(120, 120, 120, 0.1),
inset 0 0 10px rgba(0, 0, 0, 0.3),
0 0 0 4px #555,
0 0 0 8px #333;
position: relative;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
transition: transform 0.2s;
}
.big-knob:hover {
transform: scale(1.05);
}
.big-knob-inner {
width: 70px;
height: 70px;
border-radius: 50%;
background: linear-gradient(145deg, #3a3a3a, #1a1a1a);
display: flex;
justify-content: center;
align-items: center;
position: relative;
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}
.big-knob-indicator {
position: absolute;
width: 6px;
height: 30px;
background-color: #5d8aa8;
top: -12px;
left: 50%;
transform-origin: bottom center;
transform: translateX(-50%) rotate(0deg);
border-radius: 3px;
box-shadow: 0 0 5px rgba(93, 138, 168, 0.7);
}
.knob {
width: 70px;
height: 70px;
border-radius: 50%;
background: linear-gradient(145deg, #4a4a4a, #2a2a2a);
box-shadow:
5px 5px 15px rgba(0, 0, 0, 0.5),
-5px -5px 15px rgba(120, 120, 120, 0.1),
inset 0 0 10px rgba(0, 0, 0, 0.3),
0 0 0 3px #555;
position: relative;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
transition: transform 0.2s;
}
.knob:hover {
transform: scale(1.05);
}
.knob-inner {
width: 55px;
height: 55px;
border-radius: 50%;
background: linear-gradient(145deg, #3a3a3a, #1a1a1a);
display: flex;
justify-content: center;
align-items: center;
position: relative;
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}
.knob-indicator {
position: absolute;
width: 5px;
height: 25px;
background-color: #5d8aa8;
top: -10px;
left: 50%;
transform-origin: bottom center;
transform: translateX(-50%) rotate(0deg);
border-radius: 3px;
box-shadow: 0 0 5px rgba(93, 138, 168, 0.7);
}
.button {
width: 50px;
height: 50px;
border-radius: 8px;
background: linear-gradient(145deg, #4a4a4a, #2a2a2a);
box-shadow:
3px 3px 8px rgba(0, 0, 0, 0.5),
-3px -3px 8px rgba(120, 120, 120, 0.1),
inset 0 0 5px rgba(0, 0, 0, 0.3),
0 0 0 2px #555;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
transition: all 0.2s;
margin: 5px 0;
color: #5d8aa8;
font-weight: bold;
font-size: 18px;
}
.button:hover {
transform: scale(1.05);
}
.button.active {
background: linear-gradient(145deg, #5a5a5a, #3a3a3a);
box-shadow:
inset 3px 3px 8px rgba(0, 0, 0, 0.5),
inset -3px -3px 8px rgba(120, 120, 120, 0.1),
0 0 0 2px #666;
color: #7da7c9;
}
.ratio-button {
width: 60px;
height: 40px;
border-radius: 6px;
background: linear-gradient(145deg, #4a4a4a, #2a2a2a);
box-shadow:
3px 3px 8px rgba(0, 0, 0, 0.5),
-3px -3px 8px rgba(120, 120, 120, 0.1),
inset 0 0 5px rgba(0, 0, 0, 0.3),
0 0 0 2px #555;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
transition: all 0.2s;
margin: 5px;
color: #5d8aa8;
font-weight: bold;
font-size: 16px;
}
.ratio-button:hover {
transform: scale(1.05);
}
.ratio-button.active {
background: linear-gradient(145deg, #5a5a5a, #3a3a3a);
box-shadow:
inset 3px 3px 8px rgba(0, 0, 0, 0.5),
inset -3px -3px 8px rgba(120, 120, 120, 0.1),
0 0 0 2px #666;
color: #7da7c9;
}
.vumeter {
height: 200px;
width: 30px;
background: linear-gradient(to top, #1a1a1a, #2a2a2a);
border-radius: 4px;
overflow: hidden;
position: relative;
box-shadow:
inset 0 0 10px rgba(0, 0, 0, 0.5),
0 0 0 2px #555;
margin: 0 auto;
}
.vumeter-level {
position: absolute;
bottom: 0;
width: 100%;
background: linear-gradient(to top, #5d8aa8, #7da7c9);
transition: height 0.05s;
}
.gr-meter {
height: 200px;
width: 30px;
background: linear-gradient(to top, #1a1a1a, #2a2a2a);
border-radius: 4px;
overflow: hidden;
position: relative;
box-shadow:
inset 0 0 10px rgba(0, 0, 0, 0.5),
0 0 0 2px #555;
margin: 0 auto;
}
.gr-meter-level {
position: absolute;
bottom: 0;
width: 100%;
background: linear-gradient(to top, #a85d5d, #c97d7d);
transition: height 0.05s;
}
.bypass-button {
background: linear-gradient(145deg, #4a4a4a, #2a2a2a);
box-shadow:
5px 5px 15px rgba(0, 0, 0, 0.5),
-5px -5px 15px rgba(120, 120, 120, 0.1),
inset 0 0 10px rgba(0, 0, 0, 0.3),
0 0 0 3px #555;
border-radius: 8px;
padding: 12px 25px;
cursor: pointer;
transition: all 0.2s;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
color: #5d8aa8;
font-size: 16px;
}
.bypass-button:hover {
transform: scale(1.05);
}
.bypass-button.active {
background: linear-gradient(145deg, #5a5a5a, #3a3a3a);
box-shadow:
inset 5px 5px 15px rgba(0, 0, 0, 0.5),
inset -5px -5px 15px rgba(120, 120, 120, 0.1),
0 0 0 3px #666;
color: #7da7c9;
}
.meter-label {
position: absolute;
width: 100%;
text-align: center;
font-size: 12px;
font-weight: bold;
color: #7da7c9;
bottom: -20px;
}
.meter-scale {
position: absolute;
left: -25px;
height: 100%;
width: 20px;
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 10px;
color: #aaa;
}
.meter-scale span {
transform: rotate(-90deg);
transform-origin: left center;
white-space: nowrap;
}
.gr-scale {
position: absolute;
right: -25px;
height: 100%;
width: 20px;
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 10px;
color: #aaa;
}
.gr-scale span {
transform: rotate(90deg);
transform-origin: right center;
white-space: nowrap;
}
.logo {
font-family: 'Roboto', sans-serif;
font-weight: 700;
font-size: 28px;
color: #5d8aa8;
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
letter-spacing: 1px;
}
.model-number {
font-family: 'Roboto', sans-serif;
font-weight: 300;
font-size: 18px;
color: #aaa;
letter-spacing: 3px;
}
.serial-number {
position: absolute;
right: 20px;
bottom: 10px;
font-size: 10px;
color: #666;
font-style: italic;
}
</style>
</head>
<body>
<div class="plugin-container">
<!-- Header -->
<div class="bg-black py-5 px-8 flex justify-between items-center border-b border-gray-800 relative">
<div class="flex items-center">
<i class="fas fa-compress-alt text-blue-400 text-3xl mr-4"></i>
<div>
<div class="logo">UREI</div>
<div class="model-number">1176LN</div>
</div>
</div>
<div class="text-sm text-gray-400 uppercase tracking-wider">FET Limiting Amplifier</div>
<div class="serial-number">Serial: #A-1258</div>
</div>
<!-- Main Content -->
<div class="p-8">
<div class="flex justify-between">
<!-- Input Section -->
<div class="w-1/4 flex flex-col items-center">
<div class="text-center mb-6">
<div class="text-sm text-gray-400 mb-2 uppercase tracking-wider">Input</div>
<div class="big-knob" id="inputKnob">
<div class="big-knob-inner">
<div class="big-knob-indicator" id="inputIndicator"></div>
</div>
</div>
<div class="text-sm mt-3 font-bold" id="inputValue">0dB</div>
</div>
<div class="vumeter mt-6 relative">
<div class="meter-scale">
<span>+10</span>
<span>0</span>
<span>-10</span>
<span>-20</span>
<span>-30</span>
</div>
<div class="vumeter-level" id="inputMeter"></div>
<div class="meter-label">Input</div>
</div>
</div>
<!-- Compression Controls -->
<div class="w-2/4 flex flex-col items-center">
<!-- Ratio Buttons -->
<div class="flex mb-6">
<div class="ratio-button" id="ratio4">4:1</div>
<div class="ratio-button" id="ratio8">8:1</div>
<div class="ratio-button" id="ratio12">12:1</div>
<div class="ratio-button active" id="ratio20">20:1</div>
</div>
<!-- Attack/Release Knobs -->
<div class="flex justify-around w-full mb-6">
<div class="text-center">
<div class="text-sm text-gray-400 mb-2 uppercase tracking-wider">Attack</div>
<div class="knob" id="attackKnob">
<div class="knob-inner">
<div class="knob-indicator" id="attackIndicator"></div>
</div>
</div>
<div class="text-sm mt-3 font-bold" id="attackValue">7</div>
</div>
<div class="text-center">
<div class="text-sm text-gray-400 mb-2 uppercase tracking-wider">Release</div>
<div class="knob" id="releaseKnob">
<div class="knob-inner">
<div class="knob-indicator" id="releaseIndicator"></div>
</div>
</div>
<div class="text-sm mt-3 font-bold" id="releaseValue">7</div>
</div>
</div>
<!-- GR Meter -->
<div class="gr-meter relative">
<div class="gr-scale">
<span>0</span>
<span>-5</span>
<span>-10</span>
<span>-15</span>
<span>-20</span>
</div>
<div class="gr-meter-level" id="grMeter"></div>
<div class="meter-label">GR</div>
</div>
</div>
<!-- Output Section -->
<div class="w-1/4 flex flex-col items-center">
<div class="text-center mb-6">
<div class="text-sm text-gray-400 mb-2 uppercase tracking-wider">Output</div>
<div class="big-knob" id="outputKnob">
<div class="big-knob-inner">
<div class="big-knob-indicator" id="outputIndicator"></div>
</div>
</div>
<div class="text-sm mt-3 font-bold" id="outputValue">0dB</div>
</div>
<div class="vumeter mt-6 relative">
<div class="meter-scale">
<span>+10</span>
<span>0</span>
<span>-10</span>
<span>-20</span>
<span>-30</span>
</div>
<div class="vumeter-level" id="outputMeter"></div>
<div class="meter-label">Output</div>
</div>
</div>
</div>
<!-- Bypass Button -->
<div class="flex justify-center mt-10">
<div class="bypass-button" id="bypassButton">Bypass</div>
</div>
</div>
<!-- Footer -->
<div class="bg-black py-3 px-6 text-center text-xs text-gray-400 border-t border-gray-800">
<div>FET Limiting Amplifier • All Buttons In Mode</div>
<div class="mt-1">© 2023 Vintage Audio Emulations</div>
</div>
</div>
<script>
// Knob rotation functionality
function setupKnob(knobId, indicatorId, valueId, options) {
const knob = document.getElementById(knobId);
const indicator = document.getElementById(indicatorId);
const valueDisplay = document.getElementById(valueId);
let currentValue = options.defaultValue || 0;
let currentRotation = options.defaultRotation || 0;
let minRotation = options.minRotation || -135;
let maxRotation = options.maxRotation || 135;
let step = options.step || 1;
// Set initial position
indicator.style.transform = `translateX(-50%) rotate(${currentRotation}deg)`;
valueDisplay.textContent = options.defaultText || currentValue;
// Handle knob dragging
let isDragging = false;
let startY = 0;
let startRotation = 0;
knob.addEventListener('mousedown', (e) => {
isDragging = true;
startY = e.clientY;
startRotation = currentRotation;
document.body.style.cursor = 'grabbing';
e.preventDefault();
});
document.addEventListener('mousemove', (e) => {
if (!isDragging) return;
const deltaY = startY - e.clientY;
let newRotation = startRotation + deltaY;
// Limit rotation
newRotation = Math.max(minRotation, Math.min(maxRotation, newRotation));
// Update display
currentRotation = newRotation;
indicator.style.transform = `translateX(-50%) rotate(${newRotation}deg)`;
// Calculate value based on rotation
const range = maxRotation - minRotation;
const valueRange = options.maxValue - options.minValue;
const normalized = (newRotation - minRotation) / range;
currentValue = options.minValue + (normalized * valueRange);
// Apply step
currentValue = Math.round(currentValue / step) * step;
// Update display
if (options.suffix) {
valueDisplay.textContent = `${currentValue}${options.suffix}`;
} else if (options.valueMap) {
// Find the closest mapped value
const mappedValues = Object.keys(options.valueMap);
let closestValue = mappedValues[0];
let smallestDiff = Math.abs(currentValue - options.valueMap[closestValue]);
for (const key of mappedValues) {
const diff = Math.abs(currentValue - options.valueMap[key]);
if (diff < smallestDiff) {
smallestDiff = diff;
closestValue = key;
}
}
currentValue = options.valueMap[closestValue];
valueDisplay.textContent = closestValue;
} else {
valueDisplay.textContent = currentValue;
}
});
document.addEventListener('mouseup', () => {
isDragging = false;
document.body.style.cursor = '';
});
return {
getValue: () => currentValue,
setValue: (value) => {
const range = maxRotation - minRotation;
const valueRange = options.maxValue - options.minValue;
const normalized = (value - options.minValue) / valueRange;
currentRotation = minRotation + (normalized * range);
currentValue = value;
indicator.style.transform = `translateX(-50%) rotate(${currentRotation}deg)`;
if (options.suffix) {
valueDisplay.textContent = `${currentValue}${options.suffix}`;
} else if (options.valueMap) {
// Find the closest mapped value
const mappedValues = Object.keys(options.valueMap);
let closestValue = mappedValues[0];
let smallestDiff = Math.abs(currentValue - options.valueMap[closestValue]);
for (const key of mappedValues) {
const diff = Math.abs(currentValue - options.valueMap[key]);
if (diff < smallestDiff) {
smallestDiff = diff;
closestValue = key;
}
}
valueDisplay.textContent = closestValue;
} else {
valueDisplay.textContent = currentValue;
}
}
};
}
// Setup knobs
const inputKnob = setupKnob('inputKnob', 'inputIndicator', 'inputValue', {
minValue: -30,
maxValue: 30,
defaultValue: 0,
defaultText: '0dB',
minRotation: -135,
maxRotation: 135,
step: 1,
suffix: 'dB'
});
const outputKnob = setupKnob('outputKnob', 'outputIndicator', 'outputValue', {
minValue: -30,
maxValue: 30,
defaultValue: 0,
defaultText: '0dB',
minRotation: -135,
maxRotation: 135,
step: 1,
suffix: 'dB'
});
const attackKnob = setupKnob('attackKnob', 'attackIndicator', 'attackValue', {
minValue: 1,
maxValue: 7,
defaultValue: 7,
defaultText: '7',
minRotation: -135,
maxRotation: 135,
step: 0.5
});
const releaseKnob = setupKnob('releaseKnob', 'releaseIndicator', 'releaseValue', {
minValue: 1,
maxValue: 7,
defaultValue: 7,
defaultText: '7',
minRotation: -135,
maxRotation: 135,
step: 0.5
});
// Button functionality
function setupButton(buttonId, activeClass = 'active') {
const button = document.getElementById(buttonId);
let isActive = button.classList.contains(activeClass);
button.addEventListener('click', () => {
isActive = !isActive;
if (isActive) {
button.classList.add(activeClass);
} else {
button.classList.remove(activeClass);
}
});
return {
isActive: () => isActive,
setActive: (active) => {
isActive = active;
if (active) {
button.classList.add(activeClass);
} else {
button.classList.remove(activeClass);
}
}
};
}
// Setup ratio buttons (only one can be active at a time)
const ratio4 = setupButton('ratio4');
const ratio8 = setupButton('ratio8');
const ratio12 = setupButton('ratio12');
const ratio20 = setupButton('ratio20');
// Make ratio buttons mutually exclusive
[ratio4, ratio8, ratio12, ratio20].forEach(button => {
button._setActive = button.setActive;
button.setActive = (active) => {
if (active) {
// Deactivate all other ratio buttons
[ratio4, ratio8, ratio12, ratio20].forEach(b => {
if (b !== button) b._setActive(false);
});
}
button._setActive(active);
};
});
// Activate 20:1 by default
ratio20.setActive(true);
const bypassButton = setupButton('bypassButton');
// VU meter animation
function animateVUMeter(meterId, min = 0, max = 100) {
const meter = document.getElementById(meterId);
let currentLevel = min;
// Random fluctuations to simulate audio
setInterval(() => {
// Random change between -5 and +5
const change = (Math.random() * 10) - 5;
currentLevel = Math.max(min, Math.min(max, currentLevel + change));
meter.style.height = `${currentLevel}%`;
}, 100);
return {
setLevel: (level) => {
currentLevel = Math.max(min, Math.min(max, level));
meter.style.height = `${currentLevel}%`;
}
};
}
// GR meter animation (more aggressive)
function animateGRMeter(meterId, min = 0, max = 100) {
const meter = document.getElementById(meterId);
let currentLevel = min;
let targetLevel = min;
let isCompressing = false;
// Random compression events
setInterval(() => {
// Occasionally trigger heavy compression
if (Math.random() > 0.7) {
isCompressing = true;
targetLevel = 20 + Math.random() * 80;
} else {
isCompressing = false;
targetLevel = Math.random() * 20;
}
}, 500);
// Smooth movement toward target
setInterval(() => {
if (isCompressing) {
// Fast attack
currentLevel += (targetLevel - currentLevel) * 0.3;
} else {
// Slow release
currentLevel += (targetLevel - currentLevel) * 0.05;
}
currentLevel = Math.max(min, Math.min(max, currentLevel));
meter.style.height = `${currentLevel}%`;
}, 50);
return {
setLevel: (level) => {
targetLevel = Math.max(min, Math.min(max, level));
}
};
}
// Setup meters
const inputMeter = animateVUMeter('inputMeter');
const outputMeter = animateVUMeter('outputMeter');
const grMeter = animateGRMeter('grMeter');
// Simulate some interaction
setTimeout(() => {
inputKnob.setValue(15);
outputKnob.setValue(-5);
attackKnob.setValue(5);
releaseKnob.setValue(4);
ratio8.setActive(true);
}, 1000);
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Maxweller/1176-compressor" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>