Skip to content

Instantly share code, notes, and snippets.

View AliceLR's full-sized avatar

Alice R. AliceLR

View GitHub Profile
@AliceLR
AliceLR / lol.cpp
Last active January 25, 2023 22:57
terrible
/* ITI Recorder
*
* Copyright (C) 2023 Alice Rowan
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
/* Extended Module Player
* Copyright (C) 1996-2022 Claudio Matsuoka and Hipolito Carraro Jr
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
@AliceLR
AliceLR / FAR Comparison.md
Last active January 9, 2022 02:26
FAR effects info, player comparison

FAR module testing.

Module xmp (libxmp/libxmp#500) MikMod (sezero/mikmod#37) OpenMPT Effects
4Go10/m31.far OK OK OK B F
Dafydd/pond in the palace of pythagoras.far OK OK OK B
Daniel Potter/residual ambient amperage.far OK OK OK 1 F
Dirty Jester/techno riders.far OK (a2cc3bd) OK OK F
Guillermo Luijk Delgado/to the polish of valencia.far OK (32a338f) OK (b2a5c13) [1], [2] D E F (+zero pattern)
Haj/before.far OK, [3] OK, [3], [6] @ 16h [1], [3], [6] @ 16h 1 2 4 B D E F
@AliceLR
AliceLR / dsymgen.cpp
Last active January 9, 2022 03:30
Digital Symphony module generator :)
#if 0
g++ -O3 -Wall -Wextra dsymgen.cpp -odsymgen
exit
#endif
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
@AliceLR
AliceLR / bus.py
Last active September 22, 2021 12:44
#!/usr/bin/env python
import math
import random
totalnotes = 256;
def clamp(n,mn,mx):
return max(mn,min(mx,n));
#if 0
[ -z "$PREFIX" ] && [ "$MSYSTEM" = "MINGW64" ] && { PREFIX=/mingw64; TARGET=filematch64; }
[ -z "$PREFIX" ] && [ "$MSYSTEM" = "MINGW32" ] && { PREFIX=/mingw32; TARGET=filematch32; }
[ -z "$PREFIX" ] && { PREFIX=/usr; }
[ -z "$TARGET" ] && { TARGET=filematch; }
echo "PREFIX=$PREFIX"
echo "TARGET=$TARGET"
g++ -O3 -Wall -Wextra -I"$PREFIX/include" filematch.cpp -o"$TARGET" -L"$PREFIX/lib" -lz
exit 0
#endif
/* crc32c.c -- compute CRC-32C using the Intel crc32 instruction
* Copyright (C) 2013, 2021 Mark Adler
* Version 1.2 5 Jun 2021 Mark Adler
*/
/*
This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.
diff --git a/src/scan.c b/src/scan.c
index 23d1f5ae..039f0b86 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -54,9 +54,9 @@ static int scan_module(struct context_data *ctx, int ep, int chain)
int parm, gvol_memory, f1, f2, p1, p2, ord, ord2;
int row, last_row, break_row, row_count, row_count_total;
int orders_since_last_valid, any_valid;
- int gvl, bpm, speed, base_time, chn;
+ int gvl, bpm, speed, chn;
@AliceLR
AliceLR / mem.cpp
Last active November 23, 2021 03:03
#if 0
clang++ $CXXFLAGS -fno-pie mem.cpp -omem src/depackers/vorbis.lo -lxmp
exit
#endif
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
--------------------------------------------------------------------------------------------------
Most likely already fixed in #406:
--------------------------------------------------------------------------------------------------
src/loaders/iff.c:192:7: runtime error: member access within null pointer of type 'struct iff_info'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/loaders/iff.c:192:7 in
src/loaders/iff.c:46:7: runtime error: member access within null pointer of type 'struct iff_info'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/loaders/iff.c:46:7 in
src/loaders/mdl_load.c:851:22: runtime error: signed integer overflow: -2130738945 + -2139062144 cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/loaders/mdl_load.c:851:22 in