Skip to content

Instantly share code, notes, and snippets.

CC drivers/media/video/camdrv_ss.o
drivers/media/video/camdrv_ss.c:264:3: warning: initialization from incompatible pointer type
.show = rear_flash_show,
^
drivers/media/video/camdrv_ss.c:264:3: warning: (near initialization for 'dev_attr_rear_flash.show')
drivers/media/video/camdrv_ss.c: In function 'camdrv_ss_g_parm':
drivers/media/video/camdrv_ss.c:3915:36: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
memcpy(param, &state->strm, sizeof(param));
^
#!/bin/bash
g++ -O2 -Wall -std=c++11 $1 --debug && echo "===" && time ./a.out
t _ [] = 0
t !n ('8':rest) = t (n+1) rest
t !n (')':rest) = n + (t n rest)
main = getLine >>= (\l -> print (t 0 l))
# Polygon generator for python3 using numpy.
# Released under the MIT lisence
# Copyright (c) 2017 Théo Friberg & Roope Salmi
# 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
# Polygon generator for python3 using numpy.
# Released under the MIT lisence
# Copyright (c) 2017 Théo Friberg & Roope Salmi
# 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
@nomelif
nomelif / voicemod.py
Created March 20, 2017 15:40
Skeleton for on-line voice modification scripts. Requires numpy and PyAudio
import pyaudio
import numpy as np
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 44100
CHUNK = 1024
audio = pyaudio.PyAudio()
@nomelif
nomelif / decompose.py
Last active December 15, 2021 13:41
Decompose a microphone input by frequency. Depends on PyAudio, Matplotib and NumPy
import pyaudio
import numpy as np
import matplotlib.pyplot as plt
CHUNKSIZE = 1024*2 # fixed chunk size
# initialize portaudio
p = pyaudio.PyAudio()
stream = p.open(format=pyaudio.paInt16, channels=1, rate=44100, input=True, frames_per_buffer=CHUNKSIZE)
@nomelif
nomelif / rooliarpoja.py
Last active January 25, 2017 06:30
susirunko.py
# WSGI:n perus kirjasto
from wsgiref.simple_server import make_server
# Tätä funktiota kutsutaan aina, kun selain haluaa sivun
# environ: yleistä tietoutta: mitä sivua kysyttiin, millainen vempain jne jne jne
# start_response: funktio, jolla kerrotaan WSGIlle palautetun kaman tyyppi ja mahdolliset virheet
ilmoittautuneet = []
@nomelif
nomelif / Midify.py
Created January 8, 2017 18:19
This transforms microphone input into MIDI data in real time and spits it over ALSA.
import pyaudio
import alsaseq
import numpy as np
CHUNKSIZE = 1024*2 # fixed chunk size
# initialize portaudio
p = pyaudio.PyAudio()
stream = p.open(format=pyaudio.paInt16, channels=1, rate=44100, input=True, frames_per_buffer=CHUNKSIZE)

Audionodes demo networks

Here is a heteroclitical collection of different audio networks that were found somewhat interesting.

MIDI-enabled

These are networks that can be played with a MIDI keyboard.

Electric guitar