Skip to content

Instantly share code, notes, and snippets.

View ology's full-sized avatar
💭
🤔

Gene Boggs ology

💭
🤔
View GitHub Profile
@ology
ology / Maths.yaml
Created April 13, 2024 23:10
Modular synth patch specification
model: 'Maths'
patches:
- patch: 'First'
settings:
- group: 'LFO 1'
parameter: 'triangle out'
control: 'patch'
group_to: 'E352'
param_to: 'cv-x'
- group: 'LFO 1'
@ology
ology / snap-patch.css
Created January 1, 2024 17:44
d3 gravity simulation function not working
body {
display: flex;
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
}
svg {
flex: 1 1;
@ology
ology / transform-chain.txt
Last active November 4, 2023 05:16
Musical transformation output
$ cd ~/sandbox/Music-Chord-Progression-Transform/
$ vim transform-chain
# :!rm -f %.mid ; perl % --r=2 --m=8 --bpm=110 --note=A --o=4 --q=m --t=8 --v; timidity -c ~/timidity.cfg -Od %.mid
Initial: A4 m
Transforms: T7,O,T-7,T-4,O,T1,RP,I
1. T7 (0): [ 76, 79, 83 ]
[ 'E5', 'G5', 'B5' ]
Em
@ology
ology / mass-clone.pl
Last active November 4, 2023 03:24
GitHub repo clone in Perl!
#!/usr/bin/env perl
use strict;
use warnings;
use Capture::Tiny qw(capture);
use Getopt::Long qw(GetOptions);
use JSON::MaybeXS qw(decode_json);
use URI ();
my %opt = (
@ology
ology / madness.pl
Last active October 21, 2023 22:11
Replacing static pitches with VoiceGen
#!/usr/bin/env perl
use 5.26.0;
use List::Util qw(shuffle);
use MIDI ();
use Music::Factory ();
use Music::Scales qw(get_scale_MIDI);
use Music::VoiceGen ();
use Object::Pad;
@ology
ology / .txt
Created October 21, 2023 20:09
marimba-madness mystery ?
▸ perl marimba-madness.pl
2023-10-21 13:08:18 geneboggs@mac-geneboggs:~/sandbox/Perl/music
▸ timidity -Od out.midi
Can't estimate audio queue length
Playing out.midi
MIDI file: out.midi
Format: 1 Tracks: 6 Divisions: 96
Sequence: Track 001 1697918898
Track name: Track 002 1697918898
Marker: silence
@ology
ology / gpt4.pl
Last active October 16, 2023 00:09
Hey GPT4, why does God allow mosquitoes to live?
>> The question of why God allows mosquitoes to live is a theological and philosophical one, and it depends on one's beliefs and interpretations. There are several possible explanations that people have put forth:
1. Balance in nature: Some argue that mosquitoes play a role in the ecosystem, serving as a food source for other animals and contributing to the overall balance of nature. Their presence may be necessary for maintaining the ecological system.
2. Free will and natural processes: In many religious beliefs, God has given humans and other creatures free will and allows natural processes to occur. This means that mosquitoes, like other organisms, have the freedom to exist and fulfill their purpose, even if it causes inconvenience or harm to humans.
3. Testing and growth: Some believe that God allows mosquitoes to exist as a way to test humans and help them grow in character. Dealing with challenges, discomfort, or annoyance caused by mosquitoes can contribute to personal growth, patience, or empathy.
@ology
ology / octatonic.pl
Last active October 12, 2023 06:12
ology's version of octatonic
#!/usr/bin/env perl
use strict;
use warnings;
package ChordExtra;
use Role::Tiny;
# chord intervals as relative to the previous note in the chord
sub chord_intervals {
my ($self, $name) = @_;
@ology
ology / route.pl
Created August 8, 2023 13:22
Can't get the /*img route to work - help?
#!/usr/bin/env perl
use Mojolicious::Lite -signatures;
use Mojo::File ();
get '/' => sub ($c) {
$c->render(template => 'index');
};
get '/album/*img' => sub ($c) {
@ology
ology / AuthEg.pm
Last active August 6, 2023 17:09
Mojo route does not fire?
sub startup ($self) {
$self->plugin('RemoteAddr');
$self->plugin('browser_detect');
$self->plugin('Thumbnail');
$self->plugin('AuthEg::Plugin');
$self->plugin('AuthEg::DB::Plugin');
my $config = $self->plugin('NotYAMLConfig');
$self->secrets($config->{secrets});