org.algorave.set

archive.algorave.org

Samples

100 randomly sampled records from the AT Protocol firehose

org.algorave.set (100 samples)
{
  "set": {
    "bpm": 120,
    "tags": [
      "algorave",
      "livecoding",
      "sonic-pi"
    ],
    "genre": [
      "experimental",
      "livecoding",
      "algorave"
    ],
    "title": "From Start",
    "duration": 0,
    "description": "A Sonic Pi live coding pattern."
  },
  "code": {
    "seed": 0,
    "engine": "sonic-pi",
    "source": "#from start by laufey (https://pianoletternotes.blogspot.com/2023/06/from-start-by-laufey.html)\nuse_synth :piano\nuse_bpm 120\n\nMUSIC_FILE_PATH = \"./from start.txt\"\nSMALLEST_TIME_UNIT_RATIO = 0.5\n\nNOTE_MAP = {\n  'a' => :a, 'b' => :b, 'c' => :c, 'd' => :d, 'e' => :e, 'f' => :f, 'g' => :g,\n  'A' => :as, 'C' => :cs, 'D' => :ds, 'F' => :fs, 'G' => :gs,\n  'B' => :bs, 'H' => :b\n}\n\ndefine :get_note do |char, octave|\n  base_note = NOTE_MAP[char]\n  return nil unless base_note\n  \"#{base_note}#{octave}\".to_sym\nend\n\ndefine :parse_and_play_block do |block_text|\n  time_unit = 60.0 / current_bpm * SMALLEST_TIME_UNIT_RATIO\n  \n  lines = block_text.split(\"\\n\").map(&:strip).reject do |l|\n    l.empty? || l.start_with?('#') || l.match(/^\\d+$/)\n  end\n  \n  raw_patterns = lines.map do |line|\n    if line =~ /(?:RH|LH)?:?(\\d)\\|(.+)\\|/\n      octave = $1.to_i\n      pattern = $2\n      {\n        octave: octave,\n        pattern: pattern,\n        line_length: pattern.length\n      }\n    else\n      nil\n    end\n  end.compact\n  \n  return if raw_patterns.empty?\n  \n  total_steps = raw_patterns.max_by { |p| p[:line_length] }[:line_length]\n  \n  with_fx :reverb, room: 0.6 do\n    (0...total_steps).each do |step|\n      notes = []\n      \n      raw_patterns.each do |p|\n        char = p[:pattern][step]\n        next if char.nil? || char == '-' || char == '—' || char == ' '\n        \n        n = get_note(char, p[:octave])\n        notes << n if n\n      end\n      \n      if notes.empty?\n        sleep time_unit\n      else\n        play notes, sustain: time_unit * 1.2, release: 0.2, amp: 1.2\n        sleep time_unit\n      end\n    end\n  end\nend\n\nin_thread do\n  begin\n    file = File.read(MUSIC_FILE_PATH)\n    \n    blocks = file.split(/(?=\\n\\d+\\n|\\n\\d+$)/)\n    \n    blocks.each do |block|\n      next if block.strip.empty?\n      parse_and_play_block(block)\n      sleep 0.1\n    end\n    \n  rescue Errno::ENOENT\n    puts \"File not found: #{MUSIC_FILE_PATH}\"\n  rescue => e\n    puts \"Error: #{e.message}\"\n  end\nend",
    "language": "sonic-pi",
    "dependencies": {},
    "engineVersion": "1.0",
    "languageVersion": "1.0"
  },
  "$type": "org.algorave.set",
  "event": {
    "url": "",
    "date": "",
    "name": "",
    "location": ""
  },
  "links": {
    "github": "https://github.com/Sudhanshu-Ambastha/sonic-pi-notes/blob/main/from start.rb",
    "social": ""
  },
  "version": 1,
  "metadata": {
    "isLive": false,
    "license": "NO-LICENSE",
    "createdAt": "2026-01-01T12:00:00Z",
    "sourceRepo": "Sudhanshu-Ambastha/sonic-pi-notes",
    "supersedes": null,
    "publishedAt": "2026-01-01T12:00:00Z"
  },
  "performer": {
    "handle": "Sudhanshu-Ambastha",
    "displayName": "Sudhanshu-Ambastha"
  },
  "recording": {
    "audio": "",
    "video": ""
  }
}

did:plc:zevnzfwozqlsqz54c3artdzt | at://did:plc:zevnzfwozqlsqz54c3artdzt/org.algorave.set/from-start-99a24385

Lexicon Garden

@