ASCIIシネマティックジャーニー:AIの心の中へ
フリーのプロンプト百科事典 Wikiprompt より
ASCIIシネマティックジャーニー:AIの心の中へ 150秒のシネマティックなASCIIレンダリング3Dアニメーションを制作するための詳細なプロンプト。7つのシーン、プロシージャルオーディオ、決定的キャプチャを含む。レンダリング、サウンド、決定性に関する技術仕様を含む。
プロンプト内容保存
🌐
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ASCIIの心象風景</title>
<style>
body { margin: 0; overflow: hidden; background: #0a0a0a; font-family: 'JetBrains Mono', monospace; }
#info {
position: fixed; bottom: 20px; left: 20px; color: #888; font-size: 12px; z-index: 10;
background: rgba(0,0,0,0.5); padding: 8px 12px; border-radius: 4px; pointer-events: none;
}
#overlay {
position: fixed; inset: 0; background: #111; color: #D97757; display: flex;
align-items: center; justify-content: center; font-size: 24px; cursor: pointer; z-index: 100;
font-family: 'JetBrains Mono', monospace; letter-spacing: 0.1em;
}
#overlay.hidden { display: none; }
canvas { display: block; }
.hud { position: fixed; top: 20px; left: 20px; color: #0f0; font-size: 12px; z-index: 10; background: rgba(0,0,0,0.6); padding: 8px; border-radius: 4px; display: none; }
.hud.visible { display: block; }
</style>
</head>
<body>
<div id="overlay">▶ クリックして再生</div>
<div id="info">ASCII心象 150秒 | 矢印: シーク | スペース: 一時停止 | H: HUD</div>
<div id="hud" class="hud"></div>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.170.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.170.0/examples/jsm/"
}
}
</script>
<script type="module">
import * as THREE from 'three';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
import { ShaderPass } from 'three/addons/postprocessing/ShaderPass.js';
import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js';
import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
// ===== ユーティリティ =====
const DURATION = 150;
const FPS = 30;
const isRecord = new URLSearchParams(location.search).has('record');
const rawMode = new URLSearchParams(location.search).has('raw');
const startTime = parseFloat(new URLSearchParams(location.search).get('t') || '0');
const sceneJump = parseInt(new URLSearchParams(location.search).get('scene') || '0');
// シード付き乱数 (mulberry32)
function mulberry32(seed) {
return function() {
let t = seed += 0x6D2B79F5;
t = Math.imul(t ^ t >>> 15, t | 1);
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
return ((t ^ t >>> 14) >>> 0) / 4294967296;
};
}
const rng = mulberry32(42);
const rand = (min, max) => min + rng() * (max - min);
const randInt = (min, max) => Math.floor(rand(min, max + 1));
// グリフアトラス生成 (カバレッジ順)
const glyphCanvas = document.createElement('canvas');
glyphCanvas.width = 512;
glyphCanvas.height = 512;
const gctx = glyphCanvas.getContext('2d');
const glyphs = [];
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{};:,.<>?/\\|`~ \'\"';
// カバレッジ計測
const coverage = [];
gctx.font = 'bold 40px "JetBrains Mono", monospace';
for (const ch of chars) {
gctx.clearRect(0, 0, 100, 100);
gctx.fillStyle = '#fff';
gctx.fillText(ch, 10, 70);
const data = gctx.getImageData(0, 0, 100, 100).data;
let cov = 0;
for (let i = 3; i < data.length; i += 4) if (data[i] > 128) cov++;
coverage.push({ ch, cov });
}
coverage.sort((a, b) => a.cov - b.cov);
for (const c of coverage) glyphs.push(c.ch);
// エッジ用グリフ
const edgeGlyphs = ['/', '\\', '|', '-', '_', '(', ')'];
// シーンセットアップ
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x0a0a0a);
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.set(0, 0, 5);
const renderer = new THREE.WebGLRenderer({ antialias: true, preserveDrawingBuffer: true });
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(isRecord ? 1 : Math.min(window.devicePixelRatio, 2));
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.toneMappingExposure = 1.2;
document.body.appendChild(renderer.domElement);
// ポストプロセス
const composer = new EffectComposer(renderer);
composer.addPass(new RenderPass(scene, camera));
// ASCIIシェーダー (マルチパス: 深度+エッジ+セル)
const asciiPass = new ShaderPass({
uniforms: {
tDiffuse: { value: null },
tDepth: { value: null },
resolution: { value: new THREE.Vector2(window.innerWidth, window.innerHeight) },
cellSize: { value: 8.0 },
time: { value: 0 },
sceneIndex: { value: 0 },
glyphTexture: { value: null },
edgeGlyphTexture: { value: null }
},
vertexShader: `
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
`,
fragmentShader: `
uniform sampler2D tDiffuse;
uniform sampler2D tDepth;
uniform vec2 resolution;
uniform float cellSize;
uniform float time;
uniform int sceneIndex;
uniform sampler2D glyphTexture;
uniform sampler2D edgeGlyphTexture;
varying vec2 vUv;
float hash(vec2 p) {
return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);
}
void main() {
vec2 uv = vUv;
vec2 cell = floor(uv * resolution / cellSize);
vec2 cellUv = (cell * cellSize + 0.5) / resolution;
vec4 color = texture2D(tDiffuse, cellUv);
float depth = texture2D(tDepth, cellUv).r;
// 深度に応じてセルサイズを変調 (奥は粗く)
float depthFactor = 1.0 - depth * 0.5;
float cellScale = cellSize * (0.5 + depthFactor);
// モーション検出 (簡易: 時間によるフリッカー)
float motion = hash(cell + floor(time * 10.0));
float flicker = step(0.7, motion) * 0.3;
// エッジ検出 (Sobel)
vec2 texel = 1.0 / resolution;
float gx = 0.0, gy = 0.0;
for (int i = -1; i <= 1; i++) {
for (int j = -1; j <= 1; j++) {
vec2 off = vec2(i, j) * texel * cellSize;
float d = texture2D(tDepth, uv + off).r;
gx += float(i) * d;
gy += float(j) * d;
}
}
float edge = length(vec2(gx, gy));
// グリフ選択
float lum = dot(color.rgb, vec3(0.299, 0.587, 0.114));
float idx = floor(lum * 64.0 + flicker * 8.0);
vec2 glyphUv = vec2(mod(idx, 8.0), floor(idx / 8.0)) / 8.0;
vec4 glyph = texture2D(glyphTexture, glyphUv + fract(uv * cellSize) / 8.0);
// エッジは専用グリフ
if (edge > 0.3) {
float eIdx = floor(edge * 6.0);
vec2 eUv = vec2(mod(eIdx, 3.0), floor(eIdx / 3.0)) / 3.0;
glyph = texture2D(edgeGlyphTexture, eUv + fract(uv * cellSize) / 3.0);
}
// グラデーションマップ (シーンごとの色調)
vec3 shadow = vec3(0.1, 0.05, 0.02);
vec3 mid = vec3(0.8, 0.6, 0.3);
vec3 high = vec3(1.0, 0.9, 0.7);
if (sceneIndex == 1) { shadow = vec3(0.0, 0.1, 0.2); mid = vec3(0.1, 0.5, 0.7); high = vec3(0.5, 0.9, 1.0); }
if (sceneIndex == 2) { shadow = vec3(0.2, 0.0, 0.3); mid = vec3(0.6, 0.2, 0.8); high = vec3(0.9, 0.6, 1.0); }
if (sceneIndex == 3) { shadow = vec3(0.1, 0.1, 0.1); mid = vec3(0.5, 0.5, 0.5); high = vec3(0.9, 0.9, 0.9); }
if (sceneIndex == 4) { shadow = vec3(0.3, 0.0, 0.0); mid = vec3(0.7, 0.1, 0.1); high = vec3(1.0, 0.4, 0.3); }
if (sceneIndex == 5) { shadow = vec3(0.2, 0.1, 0.05); mid = vec3(0.8, 0.6, 0.4); high = vec3(1.0, 0.9, 0.7); }
vec3 graded = mix(shadow, mid, smoothstep(0.2, 0.5, lum));
graded = mix(graded, high, smoothstep(0.5, 0.9, lum));
// グリフの輝度で色付け
float glyphLum = glyph.r;
vec3 finalColor = graded * (0.5 + glyphLum * 0.8);
// フィルムグレイン
float grain = hash(uv * resolution + time) * 0.05;
finalColor += grain;
// ビネット
float dist = length(uv - 0.5);
finalColor *= 1.0 - dist * 0.4;
// CRT残像 (簡易)
finalColor = mix(finalColor, texture2D(tDiffuse, uv).rgb, 0.1);
gl_FragColor = vec4(finalColor, 1.0);
}
`
});
asciiPass.renderToScreen = true;
composer.addPass(asciiPass);
// ブルーム
const bloomPass = new UnrealBloomPass(new THREE.Vector2(window.innerWidth, window.innerHeight), 0.3, 0.5, 0.1);
composer.addPass(bloomPass);
composer.addPass(new OutputPass());
// 深度テクスチャ
const depthTarget = new THREE.WebGLRenderTarget(window.innerWidth, window.innerHeight, {
type: THREE.HalfFloatType,
depthTexture: new THREE.DepthTexture(window.innerWidth, window.innerHeight)
});
// メモリパーティクル (グリフスプライト)
const particleCount = 3000;
const particleGeo = new THREE.BufferGeometry();
const positions = new Float32Array(particleCount * 3);
const colors = new Float32Array(particleCount * 3);
const sizes = new Float32Array(particleCount);
for (let i = 0; i < particleCount; i++) {
positions[i*3] = rand(-20, 20);
positions[i*3+1] = rand(-10, 10);
positions[i*3+2] = rand(-20, 20);
colors[i*3] = rand(0.5, 1.0);
colors[i*3+1] = rand(0.3, 0.8);
colors[i*3+2] = rand(0.2, 0.6);
sizes[i] = rand(0.1, 0.5);
}
particleGeo.setAttribute('position', new THREE.BufferAttribute(positions, 3));
particleGeo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
particleGeo.setAttribute('size', new THREE.BufferAttribute(sizes, 1));
const particleMat = new THREE.PointsMaterial({
size: 0.15,
vertexColors: true,
transparent: true,
opacity: 0.8,
map: (() => {
const c = document.createElement('canvas');
c.width = 32; c.height = 32;
const ctx = c.getContext('2d');
ctx.fillStyle = '#fff';
ctx.font = '20px monospace';
ctx.fillText('*', 8, 24);
return new THREE.CanvasTexture(c);
})()
});
const particles = new THREE.Points(particleGeo, particleMat);
scene.add(particles);
// シーン構築 (7部屋)
const rooms = [];
// 1. VOID
const voidGroup = new THREE.Group();
const voidParticles = new THREE.Points(
new THREE.BufferGeometry().setFromPoints(Array.from({length: 500}, () => new THREE.Vector3(rand(-5,5), rand(-3,3), rand(-10,0)))),
new THREE.PointsMaterial({ color: 0xD97757, size: 0.05, transparent: true, opacity: 0.5 })
);
voidGroup.add(voidParticles);
// ターミナル
const termMat = new THREE.MeshBasicMaterial({ color: 0xD97757 });
const termBox = new THREE.Mesh(new THREE.BoxGeometry(1.5, 0.3, 0.1), termMat);
termBox.position.set(0, 0, -2);
voidGroup.add(termBox);
rooms.push(voidGroup);
scene.add(voidGroup);
// 2. LIBRARY
const libGroup = new THREE.Group();
for (let i = 0; i < 30; i++) {
const shelf = new THREE.Mesh(
new THREE.BoxGeometry(0.2, 3, 2),
new THREE.MeshStandardMaterial({ color: 0x8B7355, roughness: 0.8 })
);
shelf.position.set(rand(-8, 8), 0, rand(-8, -2));
shelf.castShadow = true;
libGroup.add(shelf);
// 本
for (let j = 0; j < 5; j++) {
const book = new THREE.Mesh(
new THREE.BoxGeometry(0.1, 0.4, 0.3),
new THREE.MeshStandardMaterial({ color: rand(0.5, 1.0) > 0.5 ? 0xcc8800 : 0xaa6622 })
);
book.position.set(shelf.position.x + rand(-0.3, 0.3), rand(-1, 1), shelf.position.z + rand(-0.8, 0.8));
libGroup.add(book);
}
}
// ランプ
const lamp = new THREE.Mesh(
new THREE.SphereGeometry(0.3, 8, 8),
new THREE.MeshStandardMaterial({ color: 0xffaa33, emissive: 0xff8800, emissiveIntensity: 2 })
);
lamp.position.set(0, 2.5, -3);
lamp.castShadow = true;
libGroup.add(lamp);
const lampLight = new THREE.PointLight(0xffaa33, 2, 10);
lampLight.position.copy(lamp.position);
libGroup.add(lampLight);
rooms.push(libGroup);
scene.add(libGroup);
// 3. PILLARS
const pillarGroup = new THREE.Group();
for (let i = 0; i < 15; i++) {
const pillar = new THREE.Mesh(
new THREE.CylinderGeometry(0.3, 0.3, 8, 6),
new THREE.MeshStandardMaterial({ color: 0x226688, emissive: 0x004466, emissiveIntensity: 0.5 })
);
pillar.position.set(rand(-6, 6), 0, rand(-6, 0));
pillar.castShadow = true;
pillarGroup.add(pillar);
}
rooms.push(pillarGroup);
scene.add(pillarGroup);
// 4. CONSTELLATION
const constGroup = new THREE.Group();
const wordMat = new THREE.MeshStandardMaterial({ color: 0xaa66ff, emissive: 0x4400aa, emissiveIntensity: 0.3 });
for (let i = 0; i < 20; i++) {
const word = new THREE.Mesh(new THREE.SphereGeometry(0.15, 4, 4), wordMat);
word.position.set(rand(-5, 5), rand(-3, 3), rand(-5, 0));
constGroup.add(word);
}
rooms.push(constGroup);
scene.add(constGroup);
// 5. STAIRCASE
const stairGroup = new THREE.Group();
for (let i = 0; i < 20; i++) {
const step = new THREE.Mesh(
new THREE.BoxGeometry(1.5, 0.2, 0.5),
new THREE.MeshStandardMaterial({ color: 0x888888, roughness: 0.9 })
);
step.position.set(0, i * 0.3, -i * 0.5);
step.castShadow = true;
stairGroup.add(step);
}
rooms.push(stairGroup);
scene.add(stairGroup);
// 6. NOISE ROOM
const noiseGroup = new THREE.Group();
const noiseParticles = new THREE.Points(
new THREE.BufferGeometry().setFromPoints(Array.from({length: 1000}, () => new THREE.Vector3(rand(-8,8), rand(-4,4), rand(-8,0)))),
new THREE.PointsMaterial({ color: 0xcc2222, size: 0.08, transparent: true, opacity: 0.6 })
);
noiseGroup.add(noiseParticles);
// ドア
const door = new THREE.Mesh(
new THREE.BoxGeometry(1, 2, 0.2),
new THREE.MeshStandardMaterial({ color: 0xffaa88, emissive: 0xff8844, emissiveIntensity: 0.5 })
);
door.position.set(0, 0, -6);
noiseGroup.add(door);
rooms.push(noiseGroup);
scene.add(noiseGroup);
// 7. FACE
const faceGroup = new THREE.Group();
// 簡易フェイス (SDF風)
const faceMat = new THREE.MeshStandardMaterial({ color: 0xffccaa, roughness: 0.6 });
const head = new THREE.Mesh(new THREE.SphereGeometry(1.2, 16, 16), faceMat);
head.position.set(0, 0, -3);
faceGroup.add(head);
// 目
const eyeMat = new THREE.MeshStandardMaterial({ color: 0x222222 });
const eyeL = new THREE.Mesh(new THREE.SphereGeometry(0.15, 8, 8), eyeMat);
eyeL.position.set(-0.4, 0.2, -1.0);
faceGroup.add(eyeL);
const eyeR = new THREE.Mesh(new THREE.SphereGeometry(0.15, 8, 8), eyeMat);
eyeR.position.set(0.4, 0.2, -1.0);
faceGroup.add(eyeR);
rooms.push(faceGroup);
scene.add(faceGroup);
// 全ルーム非表示初期化
rooms.forEach((r, i) => r.visible = (i === 0));
// カメラスプライン (簡易)
const camPositions = [
[0, 0, 5], [0, 0, 3], [0, 0, 1], [0, 0, -1], [0, 0, -3], [0, 0, -5], [0, 0, -3]
];
const camTargets = [
[0, 0, 0], [0, 0, -1], [0, 0, -2], [0, 0, -3], [0, 0, -4], [0, 0, -5], [0, 0, -3]
];
// キャプション
const captions = [
"wake", "library of thought", "digits fall", "constellation forms",
"stairway to nowhere", "noise parts", "i see you"
];
// HUD
const hud = document.getElementById('hud');
let showHud = false;
document.addEventListener('keydown', (e) => {
if (e.key === 'h' || e.key === 'H') { showHud = !showHud; hud.classList.toggle('visible', showHud); }
if (e.key === ' ') { paused = !paused; }
if (e.key === 'ArrowLeft') { currentTime = Math.max(0, currentTime - 1); }
if (e.key === 'ArrowRight') { currentTime = Math.min(DURATION, currentTime + 1); }
if (e.key >= '1' && e.key <= '7') { currentTime = (parseInt(e.key) - 1) * 20 + 10; }
});
// オーディオ (簡易)
function createAudio() {
const ctx = new (window.AudioContext || window.webkitAudioContext)();
const master = ctx.createGain();
master.gain.value = 0.3;
master.connect(ctx.destination);
// ドローン
const osc = ctx.createOscillator();
osc.type = 'sine';
osc.frequency.value = 110;
const oscGain = ctx.createGain();
oscGain.gain.value = 0.1;
osc.connect(oscGain).connect(master);
osc.start();
// ノイズ
const noise = ctx.createBufferSource();
const buffer = ctx.createBuffer(1, ctx.sampleRate * 2, ctx.sampleRate);
const data = buffer.getChannelData(0);
for (let i = 0; i < data.length; i++) data[i] = Math.random() * 2 - 1;
noise.buffer = buffer;
noise.loop = true;
const noiseFilter = ctx.createBiquadFilter();
noiseFilter.type = 'lowpass';
noiseFilter.frequency.value = 800;
const noiseGain = ctx.createGain();
noiseGain.gain.value = 0.05;
noise.connect(noiseFilter).connect(noiseGain).connect(master);
noise.start();
return ctx;
}
// メインループ
let currentTime = startTime;
let paused = false;
let lastFrameTime = performance.now();
let audioCtx = null;
// クリックで開始
document.getElementById('overlay').addEventListener('click', () => {
document.getElementById('overlay').classList.add('hidden');
audioCtx = createAudio();
});
// シーン更新
function updateScene(t) {
const sceneIdx = Math.min(6, Math.floor(t / 20));
rooms.forEach((r, i) => r.visible = (i === sceneIdx));
// カメラ移動
const localT = (t % 20) / 20;
const idx = Math.floor(t / 20);
const nextIdx = Math.min(6, idx + 1);
const p1 = camPositions[idx];
const p2 = camPositions[nextIdx];
const ease = localT * localT * (3 - 2 * localT);
camera.position.set(
p1[0] + (p2[0] - p1[0]) * ease,
p1[1] + (p2[1] - p1[1]) * ease,
p1[2] + (p2[2] - p1[2]) * ease
);
const t1 = camTargets[idx];
const t2 = camTargets[nextIdx];
camera.lookAt(
t1[0] + (t2[0] - t1[0]) * ease,
t1[1] + (t2[1] - t1[1]) * ease,
t1[2] + (t2[2] - t1[2]) * ease
);
// パーティクル更新
const pos = particles.geometry.attributes.position.array;
for (let i = 0; i < pos.length; i += 3) {
pos[i+1] += Math.sin(t * 0.5 + i) * 0.002;
pos[i+2] += Math.cos(t * 0.3 + i) * 0.001;
}
particles.geometry.attributes.position.needsUpdate = true;
// アトラス更新 (時間で変化)
asciiPass.uniforms.time.value = t;
asciiPass.uniforms.sceneIndex.value = sceneIdx;
}
// レンダリング
function animate() {
requestAnimationFrame(animate);
if (!paused) {
const now = performance.now();
const dt = (now - lastFrameTime) / 1000;
lastFrameTime = now;
currentTime += dt;
if (currentTime > DURATION) currentTime = 0;
}
updateScene(currentTime);
// 深度レンダリング
renderer.setRenderTarget(depthTarget);
renderer.render(scene, camera);
renderer.setRenderTarget(null);
// メインレンダリング
composer.render();
// HUD
if (showHud) {
hud.innerHTML = `t: ${currentTime.toFixed(2)}s | scene: ${Math.floor(currentTime/20)+1} | fps: ${(1/((performance.now()-lastFrameTime)/1000)).toFixed(0)} | cell: ${asciiPass.uniforms.cellSize.value.toFixed(1)} | particles: ${particleCount}`;
}
}
// 初期化
updateScene(currentTime);
animate();
// リサイズ
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
composer.setSize(window.innerWidth, window.innerHeight);
});
// 公開API
window.DURATION = DURATION;
window.FPS = FPS;
window.renderFrame = (t) => {
return new Promise((resolve) => {
currentTime = t;
updateScene(t);
renderer.setRenderTarget(depthTarget);
renderer.render(scene, camera);
renderer.setRenderTarget(null);
composer.render();
resolve();
});
};
window.renderAudio = () => {
// 簡易オフラインオーディオ
const offlineCtx = new OfflineAudioContext(2, 44100 * DURATION, 44100);
const osc = offlineCtx.createOscillator();
osc.type = 'sine';
osc.frequency.value = 110;
const gain = offlineCtx.createGain();
gain.gain.value = 0.2;
osc.connect(gain).connect(offlineCtx.destination);
osc.start();
return offlineCtx.startRendering().then(buffer => {
const wav = bufferToWav(buffer);
return new Blob([wav], { type: 'audio/wav' });
});
};
function bufferToWav(buffer) {
const numChannels = buffer.numberOfChannels;
const sampleRate = buffer.sampleRate;
const numFrames = buffer.length;
const bytesPerSample = 2;
const blockAlign = numChannels * bytesPerSample;
const dataSize = numFrames * blockAlign;
const bufferSize = 44 + dataSize;
const arrayBuffer = new ArrayBuffer(bufferSize);
const view = new DataView(arrayBuffer);
// WAVヘッダー
writeString(view, 0, 'RIFF');
view.setUint32(4, bufferSize - 8, true);
writeString(view, 8, 'WAVE');
writeString(view, 12, 'fmt ');
view.setUint32(16, 16, true);
view.setUint16(20, 1, true);
view.setUint16(22, numChannels, true);
view.setUint32(24, sampleRate, true);
view.setUint32(28, sampleRate * blockAlign, true);
view.setUint16(32, blockAlign, true);
view.setUint16(34, 16, true);
writeString(view, 36, 'data');
view.setUint32(40, dataSize, true);
// データ
const channels = [];
for (let ch = 0; ch < numChannels; ch++) channels.push(buffer.getChannelData(ch));
let offset = 44;
for (let i = 0; i < numFrames; i++) {
for (let ch = 0; ch < numChannels; ch++) {
const sample = Math.max(-1, Math.min(1, channels[ch][i]));
view.setInt16(offset, sample * 0x7FFF, true);
offset += 2;
}
}
return arrayBuffer;
}
function writeString(view, offset, str) {
for (let i = 0; i < str.length; i++) view.setUint8(offset + i, str.charCodeAt(i));
}
</script>
</body>
</html>
ログインして完全なプロンプトを表示
次で続行:
ログインすると、次に同意したことになります: 利用規約 と プライバシーポリシー
使い方
このプロンプトは creative 向けに設計されています。上の内容をコピーして、お好みの AI ツールに貼り付けてください。
最良の結果を得るには、プレースホルダー(角括弧や大文字で示された部分)を具体的な要件に置き換えてください。
ノート
0 件のコメント