INNER CODE UNIT · TypeScript

idx

scribbletune/scribbletune · src/cli.ts:351

        const idx = letter.charCodeAt(0) - 65;
        const note = riffScale[idx >= 0 ? idx % riffScale.length : 0];
        sectionCache[letter] = clip({
          notes: [note],
          randomNotes: riffScale,
          pattern: sectionPattern,
          ...clipParams,
        });
      }

      // Clone section events so each block can be mutated independently downstream if needed.
      combined.push(
        ...sectionCache[letter].map(event => ({
          ...event,
          note: event.note ? [...event.note] : null,
        }))
      );
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…