<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: PAPA B NGACK</title>
    <description>The latest articles on DEV Community by PAPA B NGACK (@papalayecutengack08).</description>
    <link>https://dev.to/papalayecutengack08</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3863125%2F50c7f3cc-e2b9-46be-ac62-40ec2fb8760e.png</url>
      <title>DEV Community: PAPA B NGACK</title>
      <link>https://dev.to/papalayecutengack08</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/papalayecutengack08"/>
    <language>en</language>
    <item>
      <title>DecComputerBox! [The DialFax and ChatBox Computer] 🖥️😊</title>
      <dc:creator>PAPA B NGACK</dc:creator>
      <pubDate>Mon, 06 Apr 2026 04:50:14 +0000</pubDate>
      <link>https://dev.to/papalayecutengack08/deccomputerbox-the-dialfax-and-chatbox-computer-c48</link>
      <guid>https://dev.to/papalayecutengack08/deccomputerbox-the-dialfax-and-chatbox-computer-c48</guid>
      <description>&lt;p&gt;I've really done good on developing this Computer! &lt;/p&gt;

&lt;p&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Computer Dialing Sound Chat Box
&lt;br&gt;
  &amp;lt;br&amp;gt;
    * {&amp;lt;br&amp;gt;
      box-sizing: border-box;&amp;lt;br&amp;gt;
    }&amp;lt;/p&amp;gt;
&amp;lt;div class="highlight"&amp;gt;&amp;lt;pre class="highlight plaintext"&amp;gt;&amp;lt;code&amp;gt;body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #19324a, #08131f 65%);
  font-family: Arial, Helvetica, sans-serif;
  color: white;
}

.computer {
  width: 900px;
  max-width: 95vw;
  background: linear-gradient(180deg, #c7cdd3, #9098a2);
  border-radius: 24px;
  padding: 20px;
  box-shadow:
    0 20px 50px rgba(0,0,0,0.5),
    inset 0 3px 8px rgba(255,255,255,0.25);
  border: 3px solid #6f7880;
}

.monitor {
  background: #111;
  border-radius: 18px;
  padding: 18px;
  border: 10px solid #4b535b;
  box-shadow: inset 0 0 25px rgba(0,255,255,0.08);
}

.screen {
  min-height: 480px;
  border-radius: 12px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(0,255,180,0.06), rgba(0,160,255,0.05)),
    #021118;
  border: 2px solid #1f6f7e;
  box-shadow:
    inset 0 0 30px rgba(0,255,200,0.08),
    0 0 18px rgba(0,255,200,0.08);
}

.title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #1f9dff, #00d0ff);
  color: #021118;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
  margin-bottom: 16px;
}

.status-light {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #68ff7f;
  box-shadow: 0 0 12px #68ff7f;
}

.chat-area {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
}

.chat-panel,
.sound-panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,255,255,0.15);
  border-radius: 14px;
  padding: 14px;
  backdrop-filter: blur(3px);
}

.messages {
  height: 250px;
  overflow-y: auto;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid rgba(0,255,255,0.12);
}

.msg {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  line-height: 1.4;
  word-wrap: break-word;
}

.msg.user {
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.25);
}

.msg.system {
  background: rgba(60, 255, 130, 0.1);
  border: 1px solid rgba(60, 255, 130, 0.2);
  color: #aaffc5;
}

.typing-box {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.typing-box input {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  border: 2px solid #1a7c8f;
  background: #061c25;
  color: white;
  font-size: 16px;
  outline: none;
}

.typing-box input:focus {
  border-color: #43dfff;
  box-shadow: 0 0 10px rgba(67,223,255,0.3);
}

.typing-box button,
.control-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #42d8ff, #1395d1);
  color: #04131a;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.typing-box button:hover,
.control-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.typing-box button:active,
.control-btn:active {
  transform: translateY(1px);
}

.sound-panel h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #7eefff;
}

.meter {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin: 10px 0 16px;
  border: 1px solid rgba(255,255,255,0.08);
}

.meter-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #47eaff, #8aff94);
  transition: width 0.08s linear;
}

.mini-text {
  font-size: 14px;
  color: #b7d9e3;
  line-height: 1.5;
}

.number-pad {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pad-btn {
  padding: 14px 0;
  text-align: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(0,255,255,0.12);
  cursor: pointer;
  user-select: none;
  font-weight: bold;
}

.pad-btn:hover {
  background: rgba(0,255,255,0.12);
}

.footer-note {
  margin-top: 16px;
  font-size: 13px;
  color: #99b6bf;
}
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
  &lt;br&gt;
    &lt;br&gt;
      &lt;br&gt;
        &lt;br&gt;
          &lt;span&gt;Retro Computer Chat Box — Dial / Fax / Beep Typing Sounds&lt;/span&gt;&lt;br&gt;
          &lt;br&gt;
        
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;div class="chat-area"&amp;gt;
      &amp;lt;div class="chat-panel"&amp;gt;
        &amp;lt;div class="messages" id="messages"&amp;gt;
          &amp;lt;div class="msg system"&amp;gt;Computer ready. Start typing to hear dialing, beeps, and odd fax-machine sounds.&amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;

        &amp;lt;div class="typing-box"&amp;gt;
          &amp;lt;input
            id="chatInput"
            type="text"
            placeholder="Type random words, numbers, or messages..."
            autocomplete="off"
          /&amp;gt;
          &amp;lt;button id="sendBtn"&amp;gt;Send&amp;lt;/button&amp;gt;
        &amp;lt;/div&amp;gt;

        &amp;lt;button class="control-btn" id="clearBtn"&amp;gt;Clear Chat&amp;lt;/button&amp;gt;
      &amp;lt;/div&amp;gt;

      &amp;lt;div class="sound-panel"&amp;gt;
        &amp;lt;h3&amp;gt;Sound Activity&amp;lt;/h3&amp;gt;
        &amp;lt;div class="mini-text" id="soundLabel"&amp;gt;Idle...&amp;lt;/div&amp;gt;
        &amp;lt;div class="meter"&amp;gt;
          &amp;lt;div class="meter-fill" id="meterFill"&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;

        &amp;lt;div class="mini-text"&amp;gt;
          Letters trigger computer beeps.&amp;lt;br&amp;gt;
          Numbers trigger phone-dial tones.&amp;lt;br&amp;gt;
          Spaces and symbols can trigger strange fax-style sounds.
        &amp;lt;/div&amp;gt;

        &amp;lt;div class="number-pad"&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;1&amp;lt;/div&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;2&amp;lt;/div&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;3&amp;lt;/div&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;4&amp;lt;/div&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;5&amp;lt;/div&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;6&amp;lt;/div&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;7&amp;lt;/div&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;8&amp;lt;/div&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;9&amp;lt;/div&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;*&amp;lt;/div&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;0&amp;lt;/div&amp;gt;
          &amp;lt;div class="pad-btn"&amp;gt;#&amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;

        &amp;lt;div class="footer-note"&amp;gt;
          Click inside the page first, then type for sound.
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&amp;lt;br&amp;gt;
    const input = document.getElementById(&amp;amp;quot;chatInput&amp;amp;quot;);&amp;lt;br&amp;gt;
    const sendBtn = document.getElementById(&amp;amp;quot;sendBtn&amp;amp;quot;);&amp;lt;br&amp;gt;
    const clearBtn = document.getElementById(&amp;amp;quot;clearBtn&amp;amp;quot;);&amp;lt;br&amp;gt;
    const messages = document.getElementById(&amp;amp;quot;messages&amp;amp;quot;);&amp;lt;br&amp;gt;
    const soundLabel = document.getElementById(&amp;amp;quot;soundLabel&amp;amp;quot;);&amp;lt;br&amp;gt;
    const meterFill = document.getElementById(&amp;amp;quot;meterFill&amp;amp;quot;);&amp;lt;br&amp;gt;
    const padButtons = document.querySelectorAll(&amp;amp;quot;.pad-btn&amp;amp;quot;);&amp;lt;/p&amp;gt;
&amp;lt;div class="highlight"&amp;gt;&amp;lt;pre class="highlight plaintext"&amp;gt;&amp;lt;code&amp;gt;let audioCtx;
let isAudioUnlocked = false;

function initAudio() {
  if (!audioCtx) {
    audioCtx = new (window.AudioContext || window.webkitAudioContext)();
  }
  if (audioCtx.state === "suspended") {
    audioCtx.resume();
  }
  isAudioUnlocked = true;
}

document.addEventListener("click", initAudio, { once: false });
document.addEventListener("keydown", initAudio, { once: false });

function updateMeter(level, label) {
  meterFill.style.width = Math.max(0, Math.min(100, level)) + "%";
  soundLabel.textContent = label;
  clearTimeout(updateMeter._timer);
  updateMeter._timer = setTimeout(() =&amp;amp;gt; {
    meterFill.style.width = "0%";
    soundLabel.textContent = "Idle...";
  }, 120);
}

function makeOscillator(freq, type = "sine", volume = 0.04, duration = 0.08) {
  if (!audioCtx) return;
  const osc = audioCtx.createOscillator();
  const gain = audioCtx.createGain();

  osc.type = type;
  osc.frequency.setValueAtTime(freq, audioCtx.currentTime);

  gain.gain.setValueAtTime(0.0001, audioCtx.currentTime);
  gain.gain.exponentialRampToValueAtTime(volume, audioCtx.currentTime + 0.01);
  gain.gain.exponentialRampToValueAtTime(0.0001, audioCtx.currentTime + duration);

  osc.connect(gain);
  gain.connect(audioCtx.destination);

  osc.start();
  osc.stop(audioCtx.currentTime + duration + 0.02);
}

function makeNoise(duration = 0.06, volume = 0.025) {
  if (!audioCtx) return;

  const bufferSize = audioCtx.sampleRate * duration;
  const buffer = audioCtx.createBuffer(1, bufferSize, audioCtx.sampleRate);
  const data = buffer.getChannelData(0);

  for (let i = 0; i &amp;amp;lt; bufferSize; i++) {
    data[i] = (Math.random() * 2 - 1) * (1 - i / bufferSize);
  }

  const noise = audioCtx.createBufferSource();
  const gain = audioCtx.createGain();
  const filter = audioCtx.createBiquadFilter();

  noise.buffer = buffer;
  filter.type = "bandpass";
  filter.frequency.value = 1800 + Math.random() * 1200;
  filter.Q.value = 3;

  gain.gain.value = volume;

  noise.connect(filter);
  filter.connect(gain);
  gain.connect(audioCtx.destination);

  noise.start();
}

const dtmfMap = {
  "1": [697, 1209],
  "2": [697, 1336],
  "3": [697, 1477],
  "4": [770, 1209],
  "5": [770, 1336],
  "6": [770, 1477],
  "7": [852, 1209],
  "8": [852, 1336],
  "9": [852, 1477],
  "*": [941, 1209],
  "0": [941, 1336],
  "#": [941, 1477]
};

function playDTMF(key) {
  if (!audioCtx || !dtmfMap[key]) return;
  const [f1, f2] = dtmfMap[key];
  makeOscillator(f1, "sine", 0.03, 0.11);
  makeOscillator(f2, "sine", 0.03, 0.11);
  updateMeter(85, `Dial tone: ${key}`);
}

function playBeep(char) {
  const base = 650 + (char.charCodeAt(0) % 12) * 35;
  makeOscillator(base, "square", 0.02, 0.05);
  updateMeter(55, `Computer beep: ${char}`);
}

function playFaxNoise() {
  makeNoise(0.07, 0.03);
  makeOscillator(1400 + Math.random() * 900, "sawtooth", 0.012, 0.06);
  updateMeter(70, "Odd fax noise");
}

function playSpaceNoise() {
  makeOscillator(420, "triangle", 0.012, 0.03);
  updateMeter(35, "Soft system tick");
}

function handleTypedChar(char) {
  if (!isAudioUnlocked) return;

  if (/[0-9]/.test(char)) {
    playDTMF(char);
  } else if (/[*#]/.test(char)) {
    playDTMF(char);
  } else if (/[a-zA-Z]/.test(char)) {
    playBeep(char);
  } else if (char === " ") {
    playSpaceNoise();
  } else {
    playFaxNoise();
  }
}

input.addEventListener("keydown", (e) =&amp;amp;gt; {
  if (e.key.length === 1) {
    handleTypedChar(e.key);
  } else if (e.key === "Backspace") {
    makeOscillator(230, "triangle", 0.02, 0.04);
    updateMeter(45, "Delete beep");
  } else if (e.key === "Enter") {
    e.preventDefault();
    sendMessage();
  }
});

function addMessage(text, type = "user") {
  const div = document.createElement("div");
  div.className = `msg ${type}`;
  div.textContent = text;
  messages.appendChild(div);
  messages.scrollTop = messages.scrollHeight;
}

function sendMessage() {
  const text = input.value.trim();
  if (!text) return;

  addMessage(text, "user");
  input.value = "";

  setTimeout(() =&amp;amp;gt; {
    addMessage("Computer received your message.", "system");
  }, 220);

  if (isAudioUnlocked) {
    makeOscillator(880, "square", 0.02, 0.05);
    setTimeout(() =&amp;amp;gt; makeOscillator(1180, "square", 0.02, 0.05), 60);
    updateMeter(90, "Message sent");
  }
}

sendBtn.addEventListener("click", () =&amp;amp;gt; {
  initAudio();
  sendMessage();
});

clearBtn.addEventListener("click", () =&amp;amp;gt; {
  messages.innerHTML = '&amp;amp;lt;div class="msg system"&amp;amp;gt;Chat cleared. Start typing again.&amp;amp;lt;/div&amp;amp;gt;';
  if (isAudioUnlocked) {
    makeOscillator(300, "triangle", 0.02, 0.05);
    setTimeout(() =&amp;amp;gt; makeOscillator(220, "triangle", 0.02, 0.05), 60);
    updateMeter(60, "System cleared");
  }
});

padButtons.forEach(btn =&amp;amp;gt; {
  btn.addEventListener("click", () =&amp;amp;gt; {
    initAudio();
    const value = btn.textContent.trim();
    input.value += value;
    input.focus();
    handleTypedChar(value);
  });
});
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;

</description>
      <category>codepen</category>
      <category>ai</category>
      <category>computer</category>
      <category>html</category>
    </item>
  </channel>
</rss>
