Skip to content

Instantly share code, notes, and snippets.

/*
p5sbr2gbs 0.2 (by haaglar)
Searchs a file for single music data created using paragon5 (Game Boy) tracker (by Stéphane Hockenhull) compiles and creates a gbs of it
To be used on the single bank player roms
Really just searches for a pattern takes some data then slaps on some stuff before it into a new file
Lazy mod of my carillion one
Worked on the demo songs and a couple of files that had lying around
Update Log:
0.2: Gbs actually works now on things other than VLC, removal of excess data to gbs
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import java.io.File;
public class Rename {
public static void main(String[] args) {
if(args.length == 0)
{
return;
}
String replaceValue ="";
# Usage: 9now-hls.py URL
#
# Grabs the HLS m3u8 URL from 9Now using a method similar to the mobile request
# To download the HLS stream using ffmpeg, use the following command:
# ffmpeg -i <URL> -acodec copy -vcodec copy -bsf:a aac_adtstoasc <OUTPUT_FILE>
#
import sys, os, re, argparse, urllib2, urllib, urlparse, json
# Constants
BC_URL_1 = "http://api.brightcove.com/services/library?media_delivery=http&reference_id="
//Uses midifile https://github.com/craigsapp/midifile to shift pitch of a .MID
#include "MidiFile.h"
#include <string>
#include <iostream>
#include <algorithm>
int main(int argc, char* argv[]) {
if (argc != 3)
{
@Haaglar
Haaglar / miditimingadjust.cpp
Created February 26, 2016 06:35
Adjust tempo and midi notes by a multiplier
// Uses midifile https://github.com/craigsapp/midifile
// Adjusts note values and tempo by a multiple of the user input
// For example if the input was 2
// Tempo, note lengths and start times will double
// Devd in VS, untested on other sys.
#include "MidiFile.h"
#include <string>
#include <iostream>
using namespace std;
@Haaglar
Haaglar / trimmidirest.cpp
Last active February 26, 2016 11:22
Trim midi rest from start
//Uses midifile https://github.com/craigsapp/midifile to trim rests from the start of a .MID
//e.g.
// d d
// d a
//Becomes
//d d
// d a
//Devd in windows, untested on other sys.
#include "MidiFile.h"
#include <string>
@Haaglar
Haaglar / carillon2gbs.c
Last active November 8, 2016 05:16
carillon2gbs
/*
carillon2gbs 0.4
Searchs a file for a singletrack carillon music data (.bin from the split) and creates a gbs of it
Really just searches for a pattern takes some data then slaps on some stuff before it into a new file
Old bad code
Worked on the demo songs and a couple of files that had lying around, fails on some aswell ()
Update Log:
0.4: Less error riddled code
0.3: Allow manual input Title, author and copyright information. Freeing memory, removed useless variables
@Haaglar
Haaglar / tp-hls.py
Created November 23, 2015 10:49
Tenplay URL HLS extract
# Usage: tp-hls.py URL
#
# Grabs the HLS m3u8 URL from Tenplay
# Initially began as a modification of p7-hls.py by adammw
# but it required significant modifications so only little remains of the old file
# To download the HLS stream using ffmpeg, use the following command:
# ffmpeg -i <URL> -acodec copy -vcodec copy -bsf:a aac_adtstoasc <OUTPUT_FILE>
#
import sys, os, re, argparse, urllib2, urllib, urlparse