Skip to content

Instantly share code, notes, and snippets.

View mwicat's full-sized avatar

Marek Wiewiorski mwicat

View GitHub Profile
sel_tr = RPR_GetSelectedTrack(0, 0)
snd = RPR_CreateTrackSend(sel_tr, None)
cat = 1 # positive = hwout
hwout_idx = 3
param_name = 'I_DSTCHAN'
RPR_SetTrackSendInfo_Value(sel_tr, cat, snd, param_name, hwout_idx)
perl -e '
use IO::Socket;
my $addr = $ARGV[0];
my $port = $ARGV[1];
print("Connecting...\n");
$socket = IO::Socket::INET->new(PeerAddr => $addr , PeerPort => $port , Proto => 'tcp' , Timeout => 1)
or die "Could not connect to $remote_host:$remote_port : $@\n";
print("Connected\n");
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import smtplib
import sys
msg = MIMEMultipart()
server = sys.argv[1]
from_addr = sys.argv[2]
to_addr = sys.argv[3]
#!/bin/bash
set -o nounset
set -o errexit
iface=any
function show_usage() {
echo "Usage: `basename $0` HOST EXPR"
echo "Example: `basename $0` myarg"
@mwicat
mwicat / minilogue_MIDIimp_rev.txt
Created July 31, 2021 14:34
KORG minilogue Implementation
KORG minilogue Implementation Revision 1.10 (2016.07.10)
1.TRANSMITTED DATA
1-1 CHANNEL MESSAGES [H]:Hex, [D]:Decimal
+--------+---------+-------------+-----------------------------------------+
| Status | Second | Third | Description |
| [Hex] | [H] [D] | [H] [D] | |
+--------+---------+-------------+-----------------------------------------+
@mwicat
mwicat / minilogue_xd__MIDIImp.txt
Created July 31, 2021 14:35
KORG minilogue xd Implementation
KORG minilogue xd Implementation Revision 1.01 (2020.2.10)
1.TRANSMITTED DATA
1-1 CHANNEL MESSAGES [H]:Hex, [D]:Decimal
+--------+---------+-------------+-----------------------------------------------------+
| Status | Second | Third | Description |
| [Hex] | [H] [D] | [H] [D] | |
+--------+---------+-------------+-----------------------------------------------------+
# You can set any of LinnStrument's note pad to any color by sending
# LinnStrument a series of three MIDI Control Change messages:
#
# 1) CC20: Column number of note pad to change (control key column is 0, left
# play column is 1, right play column is 25)
# 2) CC21: Row number of note pad to change (bottom row is 0, top is 7)
# 3) CC22: Color to change it to (0=as set in Note Lights settings,
# 1=red, 2=yellow, 3=green, 4=cyan, 5=blue,
# 6=magenta, 7=off, 8=white, 9=orange, 10=lime and 11=pink).
#
@mwicat
mwicat / foo.java
Created December 3, 2021 21:31
max/msp java external
/*
$ javac -cp "/Applications/Max.app/Contents/Resources/C74/packages/max-mxj/java-classes/lib/max.jar" foo.java
*/
import com.cycling74.max.*;
public class foo extends MaxObject {
String name;
float velocity;
int factor;
@mwicat
mwicat / vibrato.dsp
Created December 13, 2021 11:58
Vibrato effect implementation in Faust DSP
declare name "vibrato";
declare version "0.0";
declare author "mwicat";
declare description "Vibrato effect.";
import("stdfaust.lib");
// os.oscrs - https://github.com/grame-cncm/faustlibraries/blob/master/oscillators.lib#L982
// Sinusoidal (sine) oscillator based on 2D vector rotation
lfo = os.oscrs;
@mwicat
mwicat / teensy_sine.c
Created December 14, 2021 01:32
Teensy audio library test - sine wave
#include <Audio.h>
// GUItool: begin automatically generated code
AudioSynthWaveformSine sine1; //xy=595,300
AudioOutputAnalogStereo dacs2; //xy=884,334
AudioConnection patchCord1(sine1, 0, dacs2, 0);
// GUItool: end automatically generated code
void setup() {
AudioMemory(10);