Giter Club home page Giter Club logo

ez-sample-splitter-for-soundfont's Introduction

ez-sample-splitter-for-soundfont

This Python program is designed to split a single WAV file, which contains multiple recorded notes from an instrument, into separate WAV files for each note.

image output-20240504-114043

Functions

The program includes several functions:

  • frequency_to_midi(frequency): Converts a frequency to a MIDI note.
  • midi_to_note(midi_note): Converts a MIDI note to a note name.
  • fade_in(arr, n) and fade_out(arr, n): Apply fade-in and fade-out effects to an array.
  • split_wav_file(args): Splits a WAV file into separate files for each note.

Command Line Arguments

The program uses the following command-line arguments:

  • --input_dir: The directory of input WAV files. This argument is required.
  • --output_dir: The directory to save the output WAV files. The default is ./output/.
  • --analyze_note_fft: If this flag is set, the program will analyze the key of each note using FFT.
  • --mono: If this flag is set, the program will convert the output to mono.
  • --fadein and --fadeout: If these flags are set, the program will apply fade-in and fade-out effects to each note.
  • --show_split_graph: If this flag is set, the program will display a graph showing how the input file was split.
  • --use_next_split_point: If this flag is set, the program will use the next split point to terminate the current sample.
  • --peak_threshold: The peak threshold. The default is 150.
  • --shift: The shift. The default is 0.001.
  • --silence_threshold: The silence threshold. The default is 0.2.
  • --fade_sample: The number of samples to use for the fade-in and fade-out effects. The default is 20.

Usage

To use the program, run it with the desired command-line arguments. For example:

python sample_splitter.py --input_dir ./input/ --output_dir ./output/ --analyze_note_fft --mono --fadein --fadeout

This will split each WAV file in the ./input/ directory into separate files for each note, analyze the key of each note using FFT, convert the output to mono, and apply fade-in and fade-out effects to each note. The output files will be saved in the ./output/ directory. The program will also display a graph showing how each input file was split.

The program is designed to be flexible and customizable, allowing you to adjust its behavior to suit your needs. Enjoy splitting your WAV files! ๐ŸŽต

ez-sample-splitter-for-soundfont's People

Contributors

keisuke-okb avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.