Skip to content

Instantly share code, notes, and snippets.

View p3r7's full-sized avatar
🦖

Jordan Besly p3r7

🦖
View GitHub Profile
-- melody generator
engine.name="PolyPerc"
musicutil=require("musicutil")
function init()
engine.release(2)
engine.amp(0.3)
local chords={"I","vi","IV","iii"} -- change to any chords
local movement_left=6 -- change to 0-12
@andr-ew
andr-ew / txtbox.lua
Created November 27, 2020 17:59
norns boxed text with alignment & placement options
local function txtbox(txt, x, y, x2, y2, xalign, yalign, font, size, lvl, border, fill, padding, font_headroom, font_leftroom)
font_headroom = font_headroom or 3/8
font_leftroom = font_leftroom or 1/16
screen.font_face(font)
screen.font_size(size)
local fixed = (x2 ~= nil) and (y2 ~= nil)
local width = screen.text_extents(txt)
local height = size * (1 - font_headroom)
@dndrks
dndrks / midimatrix.lua
Last active November 3, 2020 08:33
example midi matrix
box = {} -- a table of boxes
msg =
{
["cc"] = {"cc","val","ch"}
, ["note_on"] = {"note","vel","ch"}
, ["note_off"] = {"note","vel","ch"}
, ["key_pressure"] = {"note","val","ch"}
, ["pitchbend"] = {"val","ch",nil}
, ["channel_pressure"] = {"val","ch",nil}
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 3, 2024 10:01
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

msys2 vs msys vs msysgit
MinGW doesn't provide a linux-like environment, that is MSYS(2) and/or Cygwin
Cygwin is an attempt to create a complete UNIX/POSIX environment on Windows.
MinGW is a C/C++ compiler suite which allows you to create Windows executables - you only
need the normal MSVC runtimes, which are part of any normal Microsoft Windows installation.
MinGW provides headers and libraries so that GCC (a compiler suite,
not just a "unix/linux compiler") can be built and used against the Windows C runtime.
@samdoshi
samdoshi / .gitignore
Last active October 26, 2023 14:57
Running SuperCollider/Jack2 inside Docker with ALSA pass-through
/jackdrc
@jmlsf
jmlsf / js-in-cljs.md
Last active January 25, 2024 23:15
Using JavaScript modules in ClojureScript

Using JavaScript Libraries from ClojureScript

Using JavaScript libraries from ClojureScript involves two distinct concerns:

  1. Packaging the code and delivering it to the browser
  2. Making ClojureScript code that accesses JavaScript libraries safe for advanced optimization

Right now, the only single tool that solves these probems reliably, optimally, and with minimal configuration is shadow-cljs, and so that is what I favor. In paricular, shadow-cljs lets you install npm modules using npm or yarn and uses the resulting package.json to bundle external dependencies. Below I describe why, what alternatives there are, and what solutions I disfavor at this time.

Packaging and Delivering Code

@saitoha
saitoha / .vimrc
Created December 3, 2013 22:56
Vimで画像を見る(DRCSのSIXEL拡張の話) ref: http://qiita.com/kefir_/items/78e64c545a70a0ebea8a
" Vimであいまいな幅の文字の論理幅を1にします
set ambiwidth=single
" RLoginであいまいな幅の文字の論理幅を1にします。
call writefile(["\e[?8428h"], '/dev/tty')
@saitoha
saitoha / drcsconv.pl
Last active April 11, 2019 14:10
Convert an image to DRCS characters
#!/usr/bin/env perl
#
# This snippet is in public domain.
#
use strict;
use warnings;
use encoding "UTF-8";
if ($#ARGV != 0) {