Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
from music21 import instrument, note, stream, chord | |
import sys | |
import numpy as np | |
def convert_to_float(frac_str): | |
try: | |
return float(frac_str) | |
except ValueError: | |
num, denom = frac_str.split('/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
from music21 import converter, instrument, note, chord, interval, pitch | |
import sys | |
from tqdm import tqdm | |
def valid_note(note_number): | |
return -12*5 <= note_number <= 12*5 | |
def first_note(notes_to_parse): | |
for element in notes_to_parse: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
def unir_txts(carpeta_con_los_txts): | |
lista_de_txts = os.listdir(carpeta_con_los_txts) # Esto arma la lista de todos los archivos que estan en ese directorio/carpeta | |
texto_final = "" # Variable donde voy a ir juntando el texto de todos los txts | |
for nombre_del_txt in lista_de_txts: # recorro los archivos uno por una | |
# uno el nombre de la carpeta con el nombre del archivo para armar la ruta exacta donde el txt se ubica |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import time | |
import multiprocessing | |
def supercollider(): | |
SC_CMD = "rm -f /tmp/foxdot.sc; echo FoxDot.start >> /tmp/foxdot.sc; sclang /tmp/foxdot.sc" | |
proc = multiprocessing.Process(target=lambda : os.system(SC_CMD), args=()) | |
proc.start() | |
return proc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
import multiprocessing | |
import os | |
def supercollider(): | |
SC_CMD = "rm -f /tmp/foxdot.sc; echo FoxDot.start >> /tmp/foxdot.sc; sclang /tmp/foxdot.sc" | |
proc = multiprocessing.Process(target=lambda : os.system(SC_CMD), args=()) | |
proc.start() | |
return proc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original gesture source code: https://github.com/Sadaival/Hand-Gestures | |
# Original source code video demonstration: https://youtu.be/v-XcmsYlzjA | |
from FoxDot import * | |
import traceback | |
import cv2 | |
import numpy as np | |
import math | |
cap = cv2.VideoCapture(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import argparse | |
import json | |
import re | |
import tensorflow.compat.v1 as tf | |
import numpy as np | |
from train.modeling import GroverModel, GroverConfig, sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import curses, os | |
def main(stdscr): | |
# do not wait for input when calling getch | |
stdscr.nodelay(1) | |
while True: | |
# get keyboard input, returns -1 if none available | |
c = stdscr.getch() | |
if c != -1: | |
# print numeric value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sounddevice as sd | |
import soundfile as sf | |
import threading | |
import time | |
def find_source(source): | |
devices = sd.query_devices() | |
for i, v in enumerate(list(devices)): | |
if v["name"] == source: | |
return i |