Skip to content

Instantly share code, notes, and snippets.

var _file_dialog: FileDialog
var _lookup: Dictionary[ResourceLumber, TreeEditorLumber]
func _ready() -> void:
tree = ResourceBranch.new()
var material: StandardMaterial3D = wind_mesh_instance.get_surface_override_material(0)
material.albedo_texture = wind_noise_texture
_clear()
_tree_node = tree_node
@twobob
twobob / cascade_mid.py
Created March 9, 2026 00:36
place an input.mid in the same directory
import numpy as np
import mido
from scipy.io import wavfile
import os
class RissetExpertSynth:
def __init__(self, sample_rate=44100):
self.fs = sample_rate
# Specific partial weights to mimic the 'hollow' Csound timbre
# Skipping 2, 3, and 4 to create the authentic spectral gaps
@twobob
twobob / ghostBeats.py
Last active March 8, 2026 04:07
Ghost Beats straight to midi. No Deps. >V1 = Midi 1 format and adds chord generation
import struct
import math
import random
import os
import argparse
from typing import List, Tuple, Dict, Optional
# --- MIDI CONSTANTS ---
PPQ = 960
@twobob
twobob / Version 25H2 (OS Build 26200.6899).txt
Last active March 3, 2026 22:49
# Disable Telemetry Scheduled Tasks # Run as Administrator
Open a POWERSHELL window as admin and run the following then choose y (Yoiu can change it back after if you want)
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): y
@twobob
twobob / MultiplayerSpawnerExtender.gs
Created February 27, 2026 23:07
if you need to pass extra stuff to spawn
extends MultiplayerSpawner
# Example of packing multiple data points into the single allowed argument
func trigger_player_spawn(id: int, spawn_pos: Vector2, player_name: String):
var spawn_data = {
"id": id,
"position": spawn_pos,
"name": player_name
}
# Call spawn with the single dictionary argument
@twobob
twobob / spec_ops_header_bye_bye.js
Created February 26, 2026 04:49
https://specterops.io header remover bookmarklet
javascript:void%20function(){var%20a=document.getElementById(%22rs-so-web-redesign-header%22);a%26%26(a.style.display=%22none%22);var%20b=document.querySelectorAll(%22article%22);for(var%20i=0;i%3Cb.length;i%2B%2B){b%5Bi%5D.style.setProperty(%22margin-top%22,%220%22,%22important%22)}}();
@twobob
twobob / convert_to_ogg.cmd
Created February 23, 2026 17:52
if ffmpeg is in your path this allows a right click to convert on windows
@echo off
ffmpeg -hide_banner -loglevel error -y -i "%~1" -vn -c:a libvorbis -q:a 6 "%~dpn1.ogg"
@twobob
twobob / acemusic_mp3_dl.js
Created February 19, 2026 01:49
adds a download button to acemusic.ai and also converts the mp4 to mp3 on the way down - client side
javascript:void%20function(){var%20a=Math.max;function%20b(a,b=%22%23222%22){let%20c=document.getElementById(%22ace-dl-status%22);c||(c=Object.assign(document.createElement(%22div%22),{id:%22ace-dl-status%22}),c.style.cssText=%22position:fixed;bottom:20px;right:20px;padding:10px%2014px;border-radius:8px;font:600%2013px/1.4%20system-ui;z-index:2147483647;box-shadow:0%204px%2012px%20rgba(0,0,0,.35);max-width:340px;word-break:break-word%22,document.body.appendChild(c)),Object.assign(c.style,{background:b,color:%22%23fff%22}),c.textContent=a,clearTimeout(window.__aceStatusTimer),window.__aceStatusTimer=setTimeout(()=%3Ec.remove(),6e3)}function%20c(a){if(!a||%22string%22!=typeof%20a)return!1;const%20b=a.toLowerCase();return%20b.includes(%22ace-music.s3%22)%26%26b.includes(%22/app/user/works/%22)%26%26b.includes(%22awsaccesskeyid=%22)%26%26b.includes(%22signature=%22)}function%20d(a){const%20b=(a||%22%22).split(%22%3F%22)[0].toLowerCase().match(/\.(aac|m4a|mp3|wav|ogg|mp4)$/);return%20b%3Fb[1]:%22mp4%22}function%20
@twobob
twobob / ConsoleSnippet.js
Last active February 19, 2026 01:45
Bookmarklet to add a "download the last URL played as a file" button temporarily to the acemusic.ai UI - V2 with mp3 conversion
javascript:void%20function(){var%20a=Math.max;function%20b(a,b=%22%23222%22){let%20c=document.getElementById(%22ace-dl-status%22);c||(c=Object.assign(document.createElement(%22div%22),{id:%22ace-dl-status%22}),c.style.cssText=%22position:fixed;bottom:20px;right:20px;padding:10px%2014px;border-radius:8px;font:600%2013px/1.4%20system-ui;z-index:2147483647;box-shadow:0%204px%2012px%20rgba(0,0,0,.35);max-width:340px;word-break:break-word%22,document.body.appendChild(c)),Object.assign(c.style,{background:b,color:%22%23fff%22}),c.textContent=a,clearTimeout(window.__aceStatusTimer),window.__aceStatusTimer=setTimeout(()=%3Ec.remove(),6e3)}function%20c(a){if(!a||%22string%22!=typeof%20a)return!1;const%20b=a.toLowerCase();return%20b.includes(%22ace-music.s3%22)%26%26b.includes(%22/app/user/works/%22)%26%26b.includes(%22awsaccesskeyid=%22)%26%26b.includes(%22signature=%22)}function%20d(a){const%20b=(a||%22%22).split(%22%3F%22)[0].toLowerCase().match(/\.(aac|m4a|mp3|wav|ogg|mp4)$/);return%20b%3Fb[1]:%22mp4%22}function%20
@twobob
twobob / audio.gd
Last active February 3, 2026 23:20
loading and playing from a list of sounds with timed Xfade. provides a very basic test UI for the task. When the fancy meta options are too much for your needs.
extends Node3D
# Enhanced 3D Audio Player with crossfade, debug UI, and auto-setup
# Audio players for crossfading
var audio_player1: AudioStreamPlayer3D
var audio_player2: AudioStreamPlayer3D
var current_player: AudioStreamPlayer3D
var next_player: AudioStreamPlayer3D
# Playlist configuration