I hereby claim:
- I am polyzium on github.
- I am polyzium (https://keybase.io/polyzium) on keybase.
- I have a public key ASAQBeOXVt_9MriaaOoiHx9tEz2B2iHCquVRbiPz_wpazQo
To claim this, I am signing this object:
| /* | |
| Semi-accurate TR808 rimshot | |
| ISC License | |
| Copyright 2025 Polyzium | |
| Permission to use, copy, modify, and/or distribute this software for any purpose | |
| with or without fee is hereby granted, provided that the above copyright notice | |
| and this permission notice appear in all copies. |
| use std::sync::mpsc::{Receiver, Sender}; | |
| // pub trait CrossThreadExecutor { | |
| // fn set_rx(&mut self, rx: Receiver<Box<dyn Fn(&mut Self)>>); | |
| // } | |
| // struct CteBridge<T: CrossThreadExecutor> { | |
| pub struct CteBridge<T> { | |
| pub tx: Sender<Box<dyn Fn(&T) + Send>> | |
| } |
| // Slightly tweaked, smoother sounding version of the DFPWM decoder (the encoder had to be tweaked as well) | |
| // Audio source: https://www.youtube.com/watch?v=8yOskhDn468 | |
| t==0?( | |
| // Initialize | |
| // RESP_INC = 7, | |
| // RESP_DEC = 20, | |
| // RESP_PREC = 8, | |
| // LPF_STRENGTH = 100, |
| t==0?( | |
| // Initialize | |
| RESP_INC = 7, | |
| RESP_DEC = 20, | |
| RESP_PREC = 8, | |
| LPF_STRENGTH = 100, | |
| // RESP_INC = 1, | |
| // RESP_DEC = 1, | |
| // RESP_PREC = 10, |
| /* | |
| DFPWM decoder implementation in JavaScript | |
| operates on little-endian DFPWM data | |
| JS bytebeat port by Polyzium, 2024 - Public Domain | |
| Original Java code by Ben "GreaseMonkey" Russell, 2013, 2016 - Public Domain | |
| Audio by Jexus/WC Olo Garb, 2011 (source: https://youtu.be/2NLtThKkiP8?si=AmeGVGDglcCTpSnf&t=810) | |
| (Go to https://dollchan.net/bytebeat, paste this gist and set 44100 Hz, Signed Bytebeat) | |
| */ |
| #include <iostream> | |
| #include <SDL2/SDL.h> | |
| #include "oscsine.h" | |
| float freq = 440.f; //A4 | |
| int samplerate = 44100; | |
| OscSine sine(0.5, freq, samplerate); | |
| void generate(void* userdata, Uint8* stream, int len) { | |
| float *streamf = (float*) stream; //SDL gives uint8, convert to float |
I hereby claim:
To claim this, I am signing this object:
| -- Double Buffered Magic -- | |
| local component = require("component") | |
| local unicode = require("unicode") | |
| local color = require("color") | |
| local format = require("format") | |
| local gpuProxy = component.gpu | |
| if not gpuProxy then | |
| error("A graphics card is required for screen.lua") | |
| end |
| [20:16:26] [Server thread/WARN]: Failed to handle packet for /127.0.0.1:37978 | |
| net.minecraft.util.ReportedException: Ticking player | |
| at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:459) ~[oq.class:?] | |
| at net.minecraft.network.NetHandlerPlayServer.redirect$onPlayerTick$zhm000(NetHandlerPlayServer.java:2029) ~[pa.class:?] | |
| at net.minecraft.network.NetHandlerPlayServer.func_73660_a(NetHandlerPlayServer.java:173) ~[pa.class:?] | |
| at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:209) ~[NetworkDispatcher$1.class:?] | |
| at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:285) ~[gw.class:?] | |
| at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:180) [oz.class:?] | |
| at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:788) [MinecraftServer.class:?] | |
| at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396) [nz.class:?] |
| MODS: | |
| 'ActuallyAdditions-1.12.2-r125(1).jar' | |
| AdvancedRocketry-1.12.2-1.2.6-7.jar | |
| 'AppliedFluidics-1.12.1-1.0.3(2).jar' | |
| 'applied-llamagistics-1.12.1-rv5-beta-10(1).jar' | |
| AutomatedRedstone-1.12.2-6.0.3.jar | |
| AutoRegLib-1.3-15.jar | |
| bdlib-1.14.3.10-mc1.12.2.jar | |
| Bookshelf-1.12.2-2.3.503.jar | |
| BrandonsCore-1.12-2.3.4.134-universal.jar |