Skip to content

Instantly share code, notes, and snippets.

Brandon Mulcahy jangler

  • USA
Block or report user

Report or block jangler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View it2fss.py
#!/usr/bin/env python
"""
it2fss.py, version 0.2
----------------------
Python 3 only.
This script converts single-channel Impulse Tracker module into a FSS text file
for use with fsound.exe. No effects commands are supported. Needless to say,
@jangler
jangler / plugbot.rb
Last active Aug 29, 2015
extensible IRC bot (requires suckless.org sic)
View plugbot.rb
#!/usr/bin/env ruby
# vim:sw=2
# IRC bot (requires suckless.org sic).
# Each executable file in the current directory is treated as a command
# plugin for the bot, and is executed when a command corresponding to its
# filename is called. For example, a plugin with filename "greet" would be
# invoked via the command "!greet".
@jangler
jangler / itsynth.py
Created Feb 21, 2014
IT module-based custom synth renderer
View itsynth.py
#!/usr/bin/env python
"""
Program that renders a WAV file by converting IT pattern data into a
playback routine for an imaginary sound chip.
"""
import operator
import wave
@jangler
jangler / search.go
Created Feb 21, 2014
simple regex-based recursive filename search
View search.go
package main
import (
"io/ioutil"
"os"
"path"
"regexp"
)
func handle(err error) {
@jangler
jangler / anagrap.py
Created Feb 21, 2014
anagram game IRC bot
View anagrap.py
#!/usr/bin/env python
"""
Anagram game IRC bot.
Requires http://tools.suckless.org/sic.
Public commands:
- !start
- !score [NICK]
@jangler
jangler / midimck.rb
Created Jun 29, 2013
Compiles MML to MIDI
View midimck.rb
require_relative 'midifile'
TicksPerQuarter = 32
NoteOffsets = { 'c' => 0, 'd' => 2, 'e' => 4, 'f' => 5, 'g' => 7, 'a' => 9, 'b' => 11 }
class Track
attr_reader :delay, :octave, :note, :velocity, :bytes, :default_delay
attr_writer :delay, :octave, :note, :velocity, :bytes, :default_delay
def initialize()
@delay = 0
@jangler
jangler / midifile.rb
Last active Dec 19, 2015
Rudimentary MIDI file writing code in Ruby
View midifile.rb
SingleTrack = 0
MultipleTracksSync = 1
MultipleTracksAsync = 2
class Event
attr_reader :command_byte, :num_data_bytes
def initialize(command_byte, num_data_bytes)
@command_byte = command_byte
@num_data_bytes = num_data_bytes
end
@jangler
jangler / tag.py
Last active Oct 12, 2015
CLI python2 / mutagen audio tag editor
View tag.py
#!/usr/bin/env python2
from argparse import ArgumentParser
from sys import stderr
import mutagen
def get_args():
parser = ArgumentParser(description='view and edit audio tags')
parser.add_argument('-t', '--title', type=str, help='set title')
@jangler
jangler / modfile.py
Created Oct 4, 2012
Amiga module reader
View modfile.py
#!/usr/bin/env python
periods = (
1712,1616,1525,1440,1357,1281,1209,1141,1077,1017, 961, 907,
856, 808, 762, 720, 678, 640, 604, 570, 538, 508, 480, 453,
428, 404, 381, 360, 339, 320, 302, 285, 269, 254, 240, 226,
214, 202, 190, 180, 170, 160, 151, 143, 135, 127, 120, 113,
107, 101, 95, 90, 85, 80, 76, 71, 67, 64, 60, 57
)
@jangler
jangler / ascii.c
Created Aug 9, 2012
idiotically simple ncurses ascii art program
View ascii.c
// Controls:
// - Arrow keys - move cursor
// - Esc - toggle reprint of last character on movement
// - ^C - exit program, printing the screen to standard output
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <ncurses.h>
You can’t perform that action at this time.