{
 "timestamp": "2026-06-18T14:54:12.516Z",
 "code": "# Source: https://in-thread.sonic-pi.net/t/evolving-atmospheric-drone-with-harmonized-melodies-in-sonic-pi/9934\n# Author: Blitzfury\n# Title: Evolving Atmospheric Drone with Harmonized Melodies in Sonic Pi\n# Captured: 2026-04-24\n\nuse_bpm 60\nuse_synth :piano\n\nmelody = [:c4, :e4, :g4, :b4, :a4, :g4, :e4, :c4]\ndurations = [1, 1, 1, 1, 1, 1, 1, 2]\n\nsoft_melody = [:e3, :g3, :b3, :c4, :d4, :b3, :g3, :e3]\nsoft_durations = [1, 1, 1, 1, 1, 1, 1, 2]\n\nthird_voice = [:g2, :a2, :b2, :c3, :d3, :b2, :a2, :g2]\nthird_durations = durations\n\nnotes_played_main = 0\nnotes_played_bg = 0\nnotes_played_third = 0\n\namp_min_main = 0.2\namp_max_main = 1.0\namp_min_bg = 0.1\namp_max_bg = 0.3\namp_third = 0.15\n\nlive_loop :soft_melody do\n with_fx :reverb, mix: 0.5, room: 1 do\n melody.zip(durations).each do |note, dur|\n amp_range = (amp_max_main - amp_min_main) / 2.0\n amp_offset = amp_min_main + amp_range\n amp = amp_offset + amp_range * Math.sin(notes_played_main * Math::PI / 8)\n play note, amp: amp\n sleep dur\n notes_played_main += 1\n end\n end\nend\n\nlive_loop :background_melody do\n with_fx :reverb, mix: 0.7, room: 1 do\n soft_melody.zip(soft_durations).each do |note, dur|\n amp_range = (amp_max_bg - amp_min_bg) / 2.0\n amp_offset = amp_min_bg + amp_range\n amp = amp_offset + amp_range * Math.sin(notes_played_bg * Math::PI / 12)\n play note, amp: amp\n sleep dur\n notes_played_bg += 1\n end\n end\nend\n\nlive_loop :third_voice do\n sleep durations.sum / 2\n with_fx :reverb, mix: 0.4, room: 0.7 do\n third_voice.zip(third_durations).each do |note, dur|\n play note, amp: amp_third, sustain: dur * 0.9, release: dur * 0.1\n sleep dur\n notes_played_third += 1\n end\n end\nend\n\nlive_loop :drone_continu do\n use_synth :hollow\n base_note = 36\n dur = 0.1\n tick_count = tick\n\n scale_notes = scale(base_note, :minor_pentatonic, num_octaves: 1)\n note = scale_notes[tick_count % scale_notes.length]\n amp_mod = 0.9 + 0.1 * Math.sin(tick_count * Math::PI / 150 + Math::PI / 3)\n\n play note, sustain: dur, release: 0, amp: amp_mod\n sleep dur\nend\n",
 "duration": 30000,
 "name": "comm-in-thread-forum__30_atmospheric_drone",
 "desktop": {
 "wavPath": "/Users/mrityunjaybhardwaj/Documents/projects/sonicPiWeb/.captures/desktop-recordings/desktop_2026-06-18T14-52-58-176Z_comm-in-thread-forum__30_atmospheric_drone.wav",
 "stats": {
 "duration": 31.370666666666665,
 "peak": 0.4811,
 "rms": 0.0674,
 "clipping": 0,
 "sampleRate": 48000,
 "channels": 2
 },
 "ok": true,
 "pitch": {
 "count": 75,
 "median_spacing_s": 0.17,
 "midi": [
 60,
 51,
 43,
 41,
 67,
 43,
 46,
 48,
 41,
 43,
 46,
 52,
 43,
 55,
 64,
 41,
 43,
 48,
 51,
 41,
 43,
 46,
 47,
 51,
 41,
 69,
 41,
 46,
 48,
 41,
 44,
 47,
 64,
 41,
 43,
 43,
 60,
 52,
 41,
 43,
 46,
 47,
 41,
 41,
 44,
 46,
 47,
 46,
 60,
 51,
 43,
 67,
 67,
 43,
 48,
 44,
 46,
 47,
 64,
 41,
 48,
 47,
 51,
 48,
 47,
 47,
 41,
 41,
 43,
 48,
 41,
 51,
 41,
 43,
 60
 ],
 "pc": [
 0,
 3,
 7,
 5,
 7,
 7,
 10,
 0,
 5,
 7,
 10,
 4,
 7,
 7,
 4,
 5,
 7,
 0,
 3,
 5,
 7,
 10,
 11,
 3,
 5,
 9,
 5,
 10,
 0,
 5,
 8,
 11,
 4,
 5,
 7,
 7,
 0,
 4,
 5,
 7,
 10,
 11,
 5,
 5,
 8,
 10,
 11,
 10,
 0,
 3,
 7,
 7,
 7,
 7,
 0,
 8,
 10,
 11,
 4,
 5,
 0,
 11,
 3,
 0,
 11,
 11,
 5,
 5,
 7,
 0,
 5,
 3,
 5,
 7,
 0
 ],
 "names": [
 "C4",
 "D#3",
 "G2",
 "F2",
 "G4",
 "G2",
 "A#2",
 "C3",
 "F2",
 "G2",
 "A#2",
 "E3",
 "G2",
 "G3",
 "E4",
 "F2",
 "G2",
 "C3",
 "D#3",
 "F2",
 "G2",
 "A#2",
 "B2",
 "D#3",
 "F2",
 "A4",
 "F2",
 "A#2",
 "C3",
 "F2",
 "G#2",
 "B2",
 "E4",
 "F2",
 "G2",
 "G2",
 "C4",
 "E3",
 "F2",
 "G2",
 "A#2",
 "B2",
 "F2",
 "F2",
 "G#2",
 "A#2",
 "B2",
 "A#2",
 "C4",
 "D#3",
 "G2",
 "G4",
 "G4",
 "G2",
 "C3",
 "G#2",
 "A#2",
 "B2",
 "E4",
 "F2",
 "C3",
 "B2",
 "D#3",
 "C3",
 "B2",
 "B2",
 "F2",
 "F2",
 "G2",
 "C3",
 "F2",
 "D#3",
 "F2",
 "G2",
 "C4"
 ],
 "method": "onset",
 "confidence": 1,
 "inconclusive": false,
 "compare": "midi"
 }
 },
 "web": {
 "wavPath": "/Users/mrityunjaybhardwaj/Documents/projects/sonicPiWeb/.captures/2026-06-18T14-52-59-019Z_inline_audio.wav",
 "stats": {
 "duration": 29.696,
 "peak": 0.1618,
 "rms": 0.024,
 "clipping": 0,
 "sampleRate": 48000,
 "channels": 2
 },
 "ok": true,
 "pitch": {
 "count": 82,
 "median_spacing_s": 0.19,
 "midi": [
 60,
 45,
 48,
 40,
 40,
 67,
 64,
 45,
 71,
 49,
 58,
 44,
 48,
 49,
 62,
 48,
 60,
 47,
 48,
 51,
 40,
 64,
 40,
 40,
 40,
 48,
 55,
 49,
 42,
 48,
 48,
 48,
 49,
 67,
 59,
 40,
 42,
 49,
 45,
 60,
 64,
 42,
 45,
 48,
 40,
 55,
 49,
 50,
 42,
 45,
 49,
 45,
 48,
 51,
 64,
 64,
 45,
 71,
 48,
 44,
 47,
 48,
 67,
 45,
 64,
 64,
 48,
 40,
 45,
 60,
 40,
 40,
 44,
 45,
 60,
 45,
 52,
 40,
 55,
 60,
 48,
 40
 ],
 "pc": [
 0,
 9,
 0,
 4,
 4,
 7,
 4,
 9,
 11,
 1,
 10,
 8,
 0,
 1,
 2,
 0,
 0,
 11,
 0,
 3,
 4,
 4,
 4,
 4,
 4,
 0,
 7,
 1,
 6,
 0,
 0,
 0,
 1,
 7,
 11,
 4,
 6,
 1,
 9,
 0,
 4,
 6,
 9,
 0,
 4,
 7,
 1,
 2,
 6,
 9,
 1,
 9,
 0,
 3,
 4,
 4,
 9,
 11,
 0,
 8,
 11,
 0,
 7,
 9,
 4,
 4,
 0,
 4,
 9,
 0,
 4,
 4,
 8,
 9,
 0,
 9,
 4,
 4,
 7,
 0,
 0,
 4
 ],
 "names": [
 "C4",
 "A2",
 "C3",
 "E2",
 "E2",
 "G4",
 "E4",
 "A2",
 "B4",
 "C#3",
 "A#3",
 "G#2",
 "C3",
 "C#3",
 "D4",
 "C3",
 "C4",
 "B2",
 "C3",
 "D#3",
 "E2",
 "E4",
 "E2",
 "E2",
 "E2",
 "C3",
 "G3",
 "C#3",
 "F#2",
 "C3",
 "C3",
 "C3",
 "C#3",
 "G4",
 "B3",
 "E2",
 "F#2",
 "C#3",
 "A2",
 "C4",
 "E4",
 "F#2",
 "A2",
 "C3",
 "E2",
 "G3",
 "C#3",
 "D3",
 "F#2",
 "A2",
 "C#3",
 "A2",
 "C3",
 "D#3",
 "E4",
 "E4",
 "A2",
 "B4",
 "C3",
 "G#2",
 "B2",
 "C3",
 "G4",
 "A2",
 "E4",
 "E4",
 "C3",
 "E2",
 "A2",
 "C4",
 "E2",
 "E2",
 "G#2",
 "A2",
 "C4",
 "A2",
 "E3",
 "E2",
 "G3",
 "C4",
 "C3",
 "E2"
 ],
 "method": "onset",
 "confidence": 1,
 "inconclusive": false,
 "compare": "midi"
 },
 "toolFailReason": null,
 "errors": []
 },
 "spectrogram": {
 "l2_mel_db": 9.046655654907227,
 "mfcc_distance": 118.96674346923828,
 "frames_compared": 2785,
 "spectrogram_png": "/Users/mrityunjaybhardwaj/Documents/projects/sonicPiWeb/.captures/compare_2026-06-18T14-53-34-651Z_comm-in-thread-forum__30_atmospheric_drone_spectrogram.png",
 "desktop_peak_freq_hz": 331.0098605916355,
 "web_peak_freq_hz": 331.2230603448276,
 "per_beat": null
 },
 "spectrogramError": null,
 "reportPath": "/Users/mrityunjaybhardwaj/Documents/projects/sonicPiWeb/.captures/compare_2026-06-18T14-53-34-651Z_comm-in-thread-forum__30_atmospheric_drone.md",
 "reconciledPitch": null,
 "eventParity": {
 "report": {
 "verdict": "STRUCTURE-MATCH",
 "isPrng": false,
 "reasons": [
 "Significant synthdef multiset matches."
 ],
 "rows": [
 {
 "synthdef": "sonic-pi-hollow",
 "desktop": 314,
 "web": 308,
 "ratio": 0.9808917197452229,
 "significant": true,
 "status": "match",
 "desktopOnset": 0,
 "webOnset": 0
 },
 {
 "synthdef": "sonic-pi-piano",
 "desktop": 76,
 "web": 72,
 "ratio": 0.9473684210526315,
 "significant": true,
 "status": "match",
 "desktopOnset": 0,
 "webOnset": 0
 }
 ],
 "fxRows": [
 {
 "synthdef": "sonic-pi-fx_reverb",
 "desktop": 11,
 "web": 10,
 "ratio": 0.9090909090909091,
 "significant": false,
 "status": "match",
 "desktopOnset": null,
 "webOnset": -1.975
 }
 ],
 "desktopTotal": 390,
 "webTotal": 380,
 "totalRatio": 0.97,
 "orderMatch": true,
 "desktopOrder": [
 "hollow",
 "piano"
 ],
 "webOrder": [
 "hollow",
 "piano"
 ],
 "sequenceParity": {
 "match": false,
 "epsilonMs": 15,
 "notesChecked": true,
 "rows": [
 {
 "synthdef": "sonic-pi-hollow",
 "desktopOnsets": [
 0,
 0.1,
 0.2,
 0.3,
 0.4,
 0.5,
 0.6,
 0.7,
 0.8,
 0.9,
 1,
 1.1,
 1.2,
 1.3,
 1.4,
 1.5,
 1.6,
 1.7,
 1.8,
 1.9,
 2,
 2.1,
 2.2,
 2.3,
 2.4,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1,
 20.2,
 20.3,
 20.4,
 20.5,
 20.6,
 20.7,
 20.8,
 20.9,
 21,
 21.1,
 21.2,
 21.3,
 21.4,
 21.5,
 21.6,
 21.7,
 21.8,
 21.9,
 22,
 22.1,
 22.2,
 22.3,
 22.4,
 22.5,
 22.6,
 22.7,
 22.8,
 22.9,
 23,
 23.1,
 23.2,
 23.3,
 23.4,
 23.5,
 23.6,
 23.7,
 23.8,
 23.9,
 24,
 24.1,
 24.2,
 24.3,
 24.4,
 24.5,
 24.6,
 24.7,
 24.8,
 24.9,
 25,
 25.1,
 25.2,
 25.3,
 25.4,
 25.5,
 25.6,
 25.7,
 25.8,
 25.9,
 26,
 26.1,
 26.2,
 26.3,
 26.4,
 26.5,
 26.6,
 26.7,
 26.8,
 26.9,
 27,
 27.1,
 27.2,
 27.3,
 27.4,
 27.5,
 27.6,
 27.7,
 27.8,
 27.9,
 28,
 28.1,
 28.2,
 28.3,
 28.4,
 28.5,
 28.6,
 28.7,
 28.8,
 28.9,
 29,
 29.1,
 29.2,
 29.3,
 29.4,
 29.5,
 29.6,
 29.7,
 29.8,
 29.9,
 30,
 30.1,
 30.2,
 30.3,
 30.4,
 30.5,
 30.6,
 30.7,
 30.8,
 30.9,
 31,
 31.1,
 31.2,
 31.3
 ],
 "webOnsets": [
 0,
 0.1,
 0.2,
 0.3,
 0.4,
 0.5,
 0.6,
 0.7,
 0.8,
 0.9,
 1,
 1.1,
 1.2,
 1.3,
 1.4,
 1.5,
 1.6,
 1.7,
 1.8,
 1.9,
 2,
 2.1,
 2.2,
 2.3,
 2.4,
 2.5,
 2.6,
 2.7,
 2.8,
 2.9,
 3,
 3.1,
 3.2,
 3.3,
 3.4,
 3.5,
 3.6,
 3.7,
 3.8,
 3.9,
 4,
 4.1,
 4.2,
 4.3,
 4.4,
 4.5,
 4.6,
 4.7,
 4.8,
 4.9,
 5,
 5.1,
 5.2,
 5.3,
 5.4,
 5.5,
 5.6,
 5.7,
 5.8,
 5.9,
 6,
 6.1,
 6.2,
 6.3,
 6.4,
 6.5,
 6.6,
 6.7,
 6.8,
 6.9,
 7,
 7.1,
 7.2,
 7.3,
 7.4,
 7.5,
 7.6,
 7.7,
 7.8,
 7.9,
 8,
 8.1,
 8.2,
 8.3,
 8.4,
 8.5,
 8.6,
 8.7,
 8.8,
 8.9,
 9,
 9.1,
 9.2,
 9.3,
 9.4,
 9.5,
 9.6,
 9.7,
 9.8,
 9.9,
 10,
 10.1,
 10.2,
 10.3,
 10.4,
 10.5,
 10.6,
 10.7,
 10.8,
 10.9,
 11,
 11.1,
 11.2,
 11.3,
 11.4,
 11.5,
 11.6,
 11.7,
 11.8,
 11.9,
 12,
 12.1,
 12.2,
 12.3,
 12.4,
 12.5,
 12.6,
 12.7,
 12.8,
 12.9,
 13,
 13.1,
 13.2,
 13.3,
 13.4,
 13.5,
 13.6,
 13.7,
 13.8,
 13.9,
 14,
 14.1,
 14.2,
 14.3,
 14.4,
 14.5,
 14.6,
 14.7,
 14.8,
 14.9,
 15,
 15.1,
 15.2,
 15.3,
 15.4,
 15.5,
 15.6,
 15.7,
 15.8,
 15.9,
 16,
 16.1,
 16.2,
 16.3,
 16.4,
 16.5,
 16.6,
 16.7,
 16.8,
 16.9,
 17,
 17.1,
 17.2,
 17.3,
 17.4,
 17.5,
 17.6,
 17.7,
 17.8,
 17.9,
 18,
 18.1,
 18.2,
 18.3,
 18.4,
 18.5,
 18.6,
 18.7,
 18.8,
 18.9,
 19,
 19.1,
 19.2,
 19.3,
 19.4,
 19.5,
 19.6,
 19.7,
 19.8,
 19.9,
 20,
 20.1,
 20.2,
 20.3,
 20.4,
 20.5,
 20.6,
 20.7,
 20.8,
 20.9,
 21,
 21.1,
 21.2,
 21.3,
 21.4,
 21.5,
 21.6,
 21.7,
 21.8,
 21.9,
 22,
 22.1,
 22.2,
 22.3,
 22.4,
 22.5,
 22.6,
 22.7,
 22.8,
 22.9,
 23,
 23.1,
 23.2,
 23.3,
 23.4,
 23.5,
 23.6,
 23.7,
 23.8,
 23.9,
 24,
 24.1,
 24.2,
 24.3,
 24.4,
 24.5,
 24.6,
 24.7,
 24.8,
 24.9,
 25,
 25.1,
 25.2,
 25.3,
 25.4,
 25.5,
 25.6,
 25.7,
 25.8,
 25.9,
 26,
 26.1,
 26.2,
 26.3,
 26.4,
 26.5,
 26.6,
 26.7,
 26.8,
 26.9,
 27,
 27.1,
 27.2,
 27.3,
 27.4,
 27.5,
 27.6,
 27.7,
 27.8,
 27.9,
 28,
 28.1,
 28.2,
 28.3,
 28.4,
 28.5,
 28.6,
 28.7,
 28.8,
 28.9,
 29,
 29.1,
 29.2,
 29.3,
 29.4,
 29.5,
 29.6,
 29.7,
 29.8,
 29.9,
 30,
 30.1,
 30.2,
 30.3,
 30.4,
 30.5,
 30.6,
 30.7
 ],
 "comparedLen": 308,
 "timingMatched": true,
 "firstMismatchIdx": -1,
 "maxDevMs": 0,
 "noteMatched": true,
 "matched": true
 },
 {
 "synthdef": "sonic-pi-piano",
 "desktopOnsets": [
 0,
 0,
 1,
 1,
 2,
 2,
 3,
 3,
 4,
 4,
 4,
 5,
 5,
 5,
 6,
 6,
 6,
 7,
 7,
 7,
 8,
 9,
 9,
 9,
 10,
 10,
 10,
 11,
 11,
 11,
 12,
 12,
 13,
 13,
 14,
 14,
 15,
 15,
 16,
 16,
 17,
 18,
 18,
 18,
 19,
 19,
 19,
 20,
 20,
 20,
 21,
 21,
 21,
 22,
 22,
 22,
 23,
 23,
 23,
 24,
 24,
 24,
 25,
 25,
 27,
 27,
 28,
 28,
 29,
 29,
 30,
 30,
 30,
 31,
 31,
 31
 ],
 "webOnsets": [
 0,
 0,
 1,
 1,
 2,
 2,
 3,
 3,
 4,
 4,
 4.5,
 5,
 5,
 5.5,
 6,
 6,
 6.5,
 7,
 7,
 7.5,
 8.5,
 9,
 9,
 9.5,
 10,
 10,
 10.5,
 11,
 11,
 11.5,
 12,
 12,
 13,
 13,
 14,
 14,
 15,
 15,
 16,
 16,
 18,
 18,
 18,
 19,
 19,
 19,
 20,
 20,
 20,
 21,
 21,
 21,
 22,
 22,
 22,
 23,
 23,
 23,
 24,
 24,
 24,
 25,
 25,
 25,
 27,
 27,
 28,
 28,
 29,
 29,
 30,
 30
 ],
 "comparedLen": 72,
 "timingMatched": false,
 "firstMismatchIdx": 10,
 "maxDevMs": 1000,
 "noteMatched": false,
 "matched": false
 }
 ],
 "reasons": [
 "hollow: 308 onsets match within ε (max Δ 0ms), notes match",
 "piano: onset #10 desktop 4s vs web 4.5s (Δ 500ms > 15ms ε) — mis-timed layer"
 ]
 }
 },
 "note": "STRUCTURE-MATCH · onset-seq diverge · d390/w380"
 }
}