GithubHelp home page GithubHelp logo

corbanbrook / spectrotune Goto Github PK

View Code? Open in Web Editor NEW
97.0 8.0 12.0 34.28 MB

Performs pitch detection on a polyphonic audio source and outputs to MIDI

Home Page: weare.buildingsky.net

License: MIT License

Shell 0.35% Processing 99.65%

spectrotune's Introduction

Spectrotune

Spectrotune is a Processing application which scans a polyphonic audio source (in wav, mp3, etc formats), performs pitch detection and outputs to MIDI.

Spectrotune offers adjustable options to help improve pitch detection, including:

  • Pitch Class Profiling (PCP)

  • FFT Bin Distance Weighting

  • FFT Windowing - rectangular, hamming, hann, triangular, cosine, and blackman windows.

  • FFT Linear Equalization - attenuate low freqencies and amplify high freqencies.

  • Harmonic Filter - filters peak harmonics.

  • Noise Smoothing - rectangle, triangle, and adjacent average smoothers.

  • Parabolic Peak Interpolation.

  • Adjustable Peak Threshold.

  • Octave toggles - narrow the spectrum to the octaves you are interested in recording.

  • MIDI octave channel segmenting - route each octave to its own MIDI channel.

Install and Basic Usage (macOS Standalone Application):

Spectrotune is now available in a standalone application for macOS which you can download from Downloads/Releases

  • Open DMG file.

  • Put audio files(wav, mp3, etc) in the music folder. (Note: music folder must be relative to the spectrotune.app path)

  • Launch application.

  • Click 'Files' tab and select the audio file you wish to open.

  • Record with MIDI sequencer.

Currently only exported as an application for macOS as I dont have any other platforms to test on. If you want a standalone application for Windows or Linux please send me a request or install processing and export the application yourself.

If you wish to play with the source code you can follow the instructions below to install processing and the required libraries.

Processing Install (all platforms):

  • Install processing

  • Install rwmidi

  • Install ControlP5

  • Clone Spectrotune and place inside your Processing Sketchbook directory

  cd ~/Documents/Processing (this is where I keep mine)
  git clone https://github.com/corbanbrook/spectrotune.git
  • Make sure your operating systems MIDI interface is configured properly.

  • Put audio files (wav, mp3, etc) you wish to open in the 'music' folder within the route of the sketch.

  • Open MIDI enabled sequencer software, ie Reason, Cubase, Fruityloops, etc.

  • Open processing.

  • Run.

If you are using a MIDI enabled sequencer software you should be able to record the input and pass on to any soft synth, or hardware synth.

Keyboard Commands:

Command Result
0-7 Octave filter: toggle octaves 0 to 7 On/Off
p Pitch Class Profile (PCP) toggle On/Off
e Linear EQ toggle On/Off
h Harmonic Filter toggle On/Off
m Mute audio toggle On/Off
n MIDI output toggle On/Off
SPACE Pause/Play toggle
RIGHT/LEFT Peak Threshold Increase/decrease
ESC Quit

spectrotune's People

Contributors

corbanbrook avatar superusercode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spectrotune's Issues

Change AudioSample to an AudioPlayer

AudioBuffer loads the entire file into memory, this is encountering problems with mp3 files.
AudioPlayer will allow for streaming files as to not use as much memory and still be able to access the audio buffers through an AudioListener.

Minim has support to Listeners which listen to the AudioPlayer and build sample buffers which operations can then be performed upon.

Playable options like, play(), pause(), cue() should be used to seek.

Controller options such as mute() and unMute() should be used to toggle the output of sound.

NOTE: mute does not infact mute zero out the volume level of the samples buffer it mearly stops the audio from being sent to the audio device so spectrotune can quietly process sample buffers.

Scale Lock

pre compute a scale before pitch detection and add a scale lock option to snap detected pitches to scale.

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.