Here is a heteroclitical collection of different audio networks that were found somewhat interesting.
These are networks that can be played with a MIDI keyboard.
// Copyright (c) 2016 Théo Friberg | |
// 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: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE O |
# Vaatii pip-asennukset | |
# sudo pip install PyAudio | |
# sudo pip install SpeechRecognition | |
import speech_recognition as sr | |
r = sr.Recognizer() | |
with sr.Microphone() as source: | |
r.adjust_for_ambient_noise(source) # Kuuntelee sekunnin ja yrittää päätellä taustamelun tason |
# Setup parameters to work in userspace | |
import sys | |
import os | |
import tempfile | |
import urllib.request | |
get_pip = urllib.request.urlopen("https://bootstrap.pypa.io/get-pip.py").read() | |
sys.argv.append("--user") |
# Blender addon sorcery | |
bl_info = {"name": "Audionodes", "description":"Create complex soundscapes in real time using nodes.", "author":"Roope Salmi, Théo Friberg", "version":(0,1), "blender":(2,77,0), "location":"Node Editor > Sound Icon > Add new", "warning":"Very much alpha, may blow up in your face.", "category": "Node", "tracker_url":"https://github.com/nomelif/Audionodes/issues", "wiki_url":"https://github.com/nomelif/Audionodes"} | |
import bpy | |
import numpy as np | |
import time | |
from bpy.types import NodeTree, Node, NodeSocket, NodeSocketFloat |
import pygame | |
import numpy as np | |
import time | |
class audioServer(): | |
channel = None | |
def __init__(self): |
from PIL import Image | |
import numpy as np | |
import random | |
w = h = 1024 | |
data = np.zeros((h, w, 3), dtype=np.uint8) | |
parallellism = 2048 | |
point = np.random.rand(parallellism).reshape((parallellism//2,2)) |
from PIL import Image | |
import numpy as np | |
import random | |
from multiprocessing import Pool | |
def f(taajuus): | |
w = (512 * np.sqrt(3))*2 | |
h = (512 + np.sqrt(3)*128)*2 | |
data = np.zeros((h, w, 3)).astype(np.float32) |
import pygame | |
import numpy as np | |
def eventGenerator(eventcode, bufferSize): # Event loop; wait while PyGame is OK, yield to the signal generator when pygame asks for signal | |
# Buffer | |
for chunk in range(bufferSize): |
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) |