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 as np | |
import soundfile as sf | |
import csv | |
import os | |
import sys | |
import glob | |
# Directory is passed as a command-line argument | |
directory = sys.argv[1] |
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 | |
from moviepy.editor import VideoFileClip | |
from PIL import Image | |
# Directory containing the .mov files to be converted | |
input_dir = sys.argv[1] | |
# Base directory for outputting the image files | |
output_base_dir = sys.argv[2] |
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 csv | |
from bvh import Bvh | |
with open('your_file.bvh') as f: | |
mocap = Bvh(f.read()) | |
with open('output.csv', 'w', newline='') as f: | |
writer = csv.writer(f) | |
writer.writerow(['Frame', 'Rotation_X', 'Rotation_Y', 'Rotation_Z']) | |
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 mido | |
import pandas as pd | |
import argparse | |
import os | |
from collections import defaultdict | |
def midi_to_csv(midi_path, bpm): | |
mid = mido.MidiFile(midi_path) | |
active_notes = defaultdict(int) |
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 argparse | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from datetime import datetime | |
# コマンドライン引数のパーサーを作成 | |
parser = argparse.ArgumentParser(description='CSVファイルの結合') | |
parser.add_argument('input_dir', type=str, help='入力ディレクトリのパス') | |
parser.add_argument('output_file', type=str, help='出力ファイルの名前') |
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
while IFS= read -r line; do echo "$line" | say -o "${line}.aiff"; done < input.txt |
OlderNewer