Skip to content

Instantly share code, notes, and snippets.

View robstenzinger's full-sized avatar

Rob Stenzinger robstenzinger

View GitHub Profile
@robstenzinger
robstenzinger / game-assets.py
Created January 20, 2021 22:16
Takes visual game screen layouts in PSD files, exports the layers in different resolutions, and saves layout data as JSON and Lua. Currently using this for a game built with the Solar2D game platform.
import os
import sys
from psd_tools import PSDImage
import json
import shutil
import math
from PIL import Image
# target resolutions
primary_resolution = (480,320)
@robstenzinger
robstenzinger / generating-music-based-on-text-and-seeded-randomality.markdown
Created January 5, 2021 22:25
Generating Music Based on Text and Seeded Randomality

Generating Music Based on Text and Seeded Randomality

Generate music and a visualization based on the text length and sentiment + the given list of rhythms and note patterns + seeded randomness.

This experiment uses:

  • Gibber.js as a synth and sequencer
  • AFINN sentiment analysis to help with generating the music
  • Seeded randomness to be able to generate the same music given the same input
  • P5js to for the UI and visualization of the sound
@robstenzinger
robstenzinger / makey-game-animal-edition.html
Created September 2, 2017 00:04
Display and feedback for an operation-like game using the Makey-makey, based on: https://makercamp.com/makey-game
<!DOCTYPE html>
<html lang="en-US" prefix="og: http://ogp.me/ns#">
<head>
<title>Makey Makey Animal Hospital</title>
<!--
based on: https://makercamp.com/makey-game
-->
<script>
@robstenzinger
robstenzinger / simulated-garagedoor-controllerV3.groovy
Created August 20, 2017 04:17
A Smartthings Device Handler groovy script. Based on examples at: https://github.com/jrhbcn/smartthings
/**
* Copyright 2015 SmartThings
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
@robstenzinger
robstenzinger / pi-smartthings-task-runnery.py
Created August 20, 2017 04:11
A Python Flask server to receive API calls from a Smartthings hub. Based on examples at: https://github.com/jrhbcn/smartthings
import RPi.GPIO as GPIO
from flask import Flask, jsonify
import time
# create the flask server app
app = Flask(__name__)
# set the mode on the GPIO pins to be based on counting the pins via
# the the layout:
@robstenzinger
robstenzinger / xp-summary.py
Created January 29, 2016 02:45
Based on an Experience Inventory excel file where you've captured data, this script will export reports in excel
from xls2db import xls2db
import xlrd
import sqlite3 as sqlite
import xlsxwriter
import os
#
# SOURCE DATA
#
@robstenzinger
robstenzinger / twine-simple-interactive-story-example
Created January 30, 2015 03:38
An experiment with the Twine interactive fiction creation environment/engine
:: Start
You enter the room. It looks familiar - yet you need a moment to remember what it's for.
[[ForFun]] or is it [[ForWork]]?
:: ForFun
Fun fun fun!
Or is it really [[ForWork]]?
@robstenzinger
robstenzinger / artsoundoff-raw-text-tweets.txt
Created December 6, 2014 03:08
Art Soundoff 2014 - archive of tweets as raw text
Rob Stenzinger ‏@RobStenzinger Oct 30 In the latest Extra Lean, @jerzy and I announce a 30 day creative challenge called #ArtSoundoff: http://www.patreon.com/creation?hid=1138804&rf=59709&ty=2 … 0 replies 3 retweets 0 favorites
Rob Stenzinger ‏@RobStenzinger Oct 31 Art Soundoff makes a creative challenge out of posting a month of art audio journals: http://artsoundoff.com  #artsoundoff 0 replies 2 retweets 0 favorites
Rob Stenzinger ‏@RobStenzinger Oct 31 Polytechnicast - Art Soundoff http://www.patreon.com/creation?hid=1142442&rf=59709&ty=2 … #artsoundoff 0 replies 0 retweets 0 favorites
Jerzy Drozd ‏@Jerzy Nov 1 Thunder Punch Daily is back, and will update daily through the month of November: http://www.patreon.com/creation?hid=1165523&u=59709 … #artsoundoff 0 replies 6 retweets 3 favorites
Owen Jollands ‏@ComicColorist Nov 1 My 1st ever podcast for the #ArtSoundoff challenge started by @jerzy & @robstenzinger -The beginning https://audioboom.com/boos/2613659-art-soundoff-1-the-beginning?utm_campai
@robstenzinger
robstenzinger / artsoundoff-tweets.json
Created December 6, 2014 01:56
ArtSoundoff 2014 Tweet Stream in JSON format (from the artsoundoff.com creative challenge - post a microjournal podcast for every day in the month of November 2014)
[
{
"header": "Rob Stenzinger ‏@RobStenzinger Oct 30",
"body": "In the latest Extra Lean, @jerzy and I announce a 30 day creative challenge called #ArtSoundoff: http://www.patreon.com/creation?hid=1138804&rf=59709&ty=2 …",
"interactions": "0 replies 3 retweets 0 favorites"
},
{
"header": "Rob Stenzinger ‏@RobStenzinger Oct 31",
"body": "Art Soundoff makes a creative challenge out of posting a month of art audio journals: http://artsoundoff.com  #artsoundoff",
"interactions": "0 replies 2 retweets 0 favorites"
@robstenzinger
robstenzinger / gist:365bb4600c812f370238
Created November 20, 2014 07:20
polytechnicast.py Gets an MP3 file ready to post for the Polytechnicast using eyeD3 to set all the MP3 metadata plus artwork.
"""
polytechnicast.py
Gets an MP3 file ready to post for the Polytechnicast using eyeD3 to set all the MP3 metadata plus artwork.
Accepts a file path as a parameter,
assumes that the show notes and podcast MP3 file are named the same,
except for their given file extension,
and are in the same file directory.