Skip to content

Instantly share code, notes, and snippets.

View now-its-dark's full-sized avatar
💭
always searching & ⭐️'ing interesting projects related to sound and MIDI

now_its_dark now-its-dark

💭
always searching & ⭐️'ing interesting projects related to sound and MIDI
View GitHub Profile
@hsiboy
hsiboy / FastLED_DMX.ino
Created March 2, 2015 16:37
DMX control of neopixels, WS2811, WS2812 etc using FastLED Arduino Teensy3.1
#include <DmxReceiver.h>
#include <FastLED.h>
#define DMX_NUM_CHANNELS 15
#define NUM_LEDS 15
#define DATA_PIN 11
#define LED_TYPE WS2811
#define COLOUR_ORDER
#define CLOCK_PIN 13 // Clock pin only needed for SPI based chipsets when not using hardware SPI
@paulhayes
paulhayes / Sun.cs
Last active July 3, 2024 10:34
Rotates a Unity directional light based on location and time. Includes time scale, and frame stepping for continuous use.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Entropedia
{
[RequireComponent(typeof(Light))]
[ExecuteInEditMode]
@bryc
bryc / YamahaFM.md
Last active July 16, 2024 20:28
Collecting info on Yamaha FM soundchips

DX7

image

Note: One of the algorithms is incorrect due to a missing operator. Need to update the image. Will have to get on that soon.

These are the original 32 algorithms as used in Yamaha DX7.

The later Yamaha FS1R and Yamaha SY77 may have compatibility with these algorithms, but that's beyond the current scope. The FS1R contains 88 algorithms, while the SY77 contains 45 algorithms.

@simondotm
simondotm / SN76489 tuning.md
Last active January 14, 2021 02:25
Retuning SN76489 chip tune music written for Sega Master System on a BBC Micro

We use Deflemask to author SN76489 chip music, for which support is aimed mainly at NTSC Sega Master System. We export these tunes as VGMs from Deflemask and then to get them working on a BBC Micro we have to do some shenanigans because the BBC version of the SN76489 has two key differences from the SMS:

  1. It is clocked at 4Mhz not 3.58Mhz
  2. It has a 15-bit linear-feedback shift register (LFSR) for noise channel generation (the SMS version has 16-bits).

Because the squarewave output of the sound chip is driven by its clockspeed, to transpose frequencies from NTSC to 4Mhz we have to adjust every pitch value sent to the chip registers. This is done mathematically by converting the NTSC pitch register value to Hz and then calculating the equivalent pitch register value on a 4Mhz clocked chip to deliver the same Hz frequency.

That bit is easy (ish).

The tricky bit is when musicians use the tuned periodic noise function on the chip to create basslines. In this scenario channel 2 pitch controls the pitch of t

@chz16
chz16 / current tracklist
Last active July 20, 2024 10:28
stream jukebox
Last updated: 2024-07-20 03:28
5194 songs, 11:09:56:50 time
A.III. - Rapid Progress
A5 - Flower Dance
A5Tours - EPISODE from "DECADE SUITE for ORCHESTRA"
A-Train 6 - Another Moon (Rural: Night)
A-Train 6 - Morning Wind (Residential: Morning)
A-Train 6 - On Line (Industrial: Daytime)
A-Train 6 - Python (Industrial: Night)
@tablatronix
tablatronix / scrolltext.cpp
Last active May 18, 2023 12:20
dirty scroll text for adafruit gfx
void scrollString(String str) {
int yoff = 1;
display.clearDisplay();
display.setTextWrap(false); // we don't wrap text so it scrolls nicely
display.setTextSize(2);
display.setRotation(0);
int charWidth = 12; // textsize 2 @todo auto calculate charwidth from font
int pxwidth = (str.length()*charWidth)+32; // @todo get actual string pixel length, add support to gfx if needed
for (int32_t x=charWidth; x>=-pxwidth; x--) {
@loveemu
loveemu / gax_info.md
Last active April 16, 2024 03:36
Shin'en GAX Sound Engine (GBA) Specification / Research Note

Shin'en GAX Sound Engine (GBA) Specification

The research is based on GAX Engine V3. Information about V2 can be found at the end of the document.

FYI: GaXM is a tool that can analyze GAX data. You may find more information there.

FYI: You can find my IDA FLIRT signature for GAX V3 here. https://github.com/loveemu/ida-sig

FYI: Gaxtapper: Diagnostic tool / Automated GSF ripper for GAX Sound Engine.

@innocuo
innocuo / AddUV
Last active February 25, 2022 07:32
How to create a rigged humanoid character using Clayxels and Puppet3D.
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class AddUV : MonoBehaviour
{
public Mesh mesh;
void Awake()