All Projects → vipul-sharma20 → tayuya

vipul-sharma20 / tayuya

Licence: MIT license
Python library to generate guitar tabs from MIDI files

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to tayuya

arm synth
Wavetable Synth Running on an STM32F 32-bit ARM Cortex M3 microprocessor
Stars: ✭ 23 (-55.77%)
Mutual labels:  midi, midi-parser
guitar-tabs-to-MIDI
A program that converts Guitar Tabs into MIDI files.
Stars: ✭ 38 (-26.92%)
Mutual labels:  midi, guitar-tabs
MidiTok
A convenient MIDI / symbolic music tokenizer for Deep Learning networks, with multiple strategies 🎶
Stars: ✭ 180 (+246.15%)
Mutual labels:  midi
DoMiSo-genshin
Genshin impact Lyre Automatic player
Stars: ✭ 76 (+46.15%)
Mutual labels:  midi
synth
A Teensy 4 modular FM polyphonic synth.
Stars: ✭ 39 (-25%)
Mutual labels:  midi
apollo-studio
Apollo Studio is a standalone editor and live playback engine for RGB Launchpad light effects.
Stars: ✭ 115 (+121.15%)
Mutual labels:  midi
libDaisy
Hardware Library for the Daisy Audio Platform
Stars: ✭ 164 (+215.38%)
Mutual labels:  midi
braid
Polyrhythms in Python: a sequencer and musical notation system for monophonic MIDI synths
Stars: ✭ 34 (-34.62%)
Mutual labels:  midi
midica
A Music programming language. Translates source code into MIDI. Includes a player. Supports MIDI-Karaoke. Includes a MIDI analyzer.
Stars: ✭ 57 (+9.62%)
Mutual labels:  midi
ableton-midi-sculptor
Ableton MIDI Sculptor: Tools for MIDI editing in Ableton Live
Stars: ✭ 56 (+7.69%)
Mutual labels:  midi
learn-push2-with-svelte
Learn chords, scales, and music theory on the Push 2, right inside your web browser!
Stars: ✭ 37 (-28.85%)
Mutual labels:  midi
melrose
interactive programming of melodies, producing MIDI
Stars: ✭ 130 (+150%)
Mutual labels:  midi
BS2-Web
Novation Bass Station II Web interface
Stars: ✭ 34 (-34.62%)
Mutual labels:  midi
facet
Facet is a live coding system for algorithmic music
Stars: ✭ 72 (+38.46%)
Mutual labels:  midi
kotoist
A VST plugin for live coding and algorithmic composition
Stars: ✭ 37 (-28.85%)
Mutual labels:  midi
ScalaMIDI
A library for accessing standard MIDI files
Stars: ✭ 14 (-73.08%)
Mutual labels:  midi
qq
Houdini little tools and knowledge
Stars: ✭ 21 (-59.62%)
Mutual labels:  midi
portmidi
PortMidi is a cross platform (Windows, macOS, Linux, and BSDs which support alsalib) library for interfacing with operating systems' MIDI I/O APIs.
Stars: ✭ 16 (-69.23%)
Mutual labels:  midi
MidiAnimationExample
An example of use of the MIDI animation track with Unity Timeline
Stars: ✭ 67 (+28.85%)
Mutual labels:  midi
amanuensis
The Amanuensis is an automated songwriting and recording system aimed at ridding the process of anything left-brained, so one need never leave a creative, spontaneous and improvisational state of mind, from the inception of the song until its final master. See the README for instructions and feel free to message me at soundcloud.com/to_the_sun.
Stars: ✭ 30 (-42.31%)
Mutual labels:  midi

Tayuya

Python library to generate guitar tabs from MIDI files

Installation

# Install globaly
$ pip install tayuya

# Install only for the current user
$ pip install --user tayuya

Usage

>>> from tayuya import MIDIParser
>>> mid = MIDIParser('sample.mid', track=0)
>>> print(mid.render_tabs())
E-------------14--------------------------16--14----------14--------------
A-------------------------------------------------17--17------16--17--16--
D-16------16------16--16--16--16------16----------------------------------
G-----18--------------------------18--------------------------------------
B-------------------------------------------------------------------------
E-------------------------------------------------------------------------

Don't forget to set the track argument with the appropriate track number desired.

Get track numbers of all the tracks in the MIDI file

>>> from tayuya import MIDIParser
>>> mid = MIDIParser('sample.mid', track=0)
>>> mid.get_tracks()
{0: 'Lead Guitar',
 1: 'Rhthym Guitar Dist',
 2: 'Acoustic Guitar',
 3: 'Rhthym Guitar Clean & Dist',
 4: 'Lead Guitar Fill',
 5: 'Guitar Harmonics',

Advanced

MIDI

Get all notes played in the MIDI track

>>> mid = MIDIParser('sample.mid', track=0)
>>> mid.notes_played()
[{'note': 'C#5', 'time': 18},
 {'note': 'C#5', 'time': 30},
 {'note': 'B4', 'time': 26},
 {'note': 'C5', 'time': 0},
 {'note': 'C5', 'time': 28},
 {'note': 'C#5', 'time': 28},
 {'note': 'C#5', 'time': 30}]

Get key of the track

>>> mid = MIDIParser('sample.mid', track=0)
>>> mid.get_key()

Tabs

Get all notes to play

You can use this example to generate all the notes to play with their string and fret positions.

>>> mid = MIDIParser('sample.mid', track=0)
>>> tabs = Tabs(notes=mid.notes_played(), key=mid.get_key())
>>> tabs.generate_notes(tabs.find_start())
[('C#3', 5, 4),
 ('G#3', 4, 6),
 ('C#4', 3, 6),
 ('F4', 2, 6),
 ('B2', 6, 7),
 ('D#3', 5, 6),
 ('F#3', 4, 4),
 ('B3', 3, 4),
 ('D#4', 3, 8),
 ('F#2', 6, 2)]

Each tuple here is (note, string, fret)

How it works?

Here's a brief of how it works:

  • Fetch a track from the MIDI file
  • Find all the notes played and convert from MIDI code values to music notes
  • Find a scale for the set of notes extracted
  • Find the best position to play the extracted notes using the scale detected

Limitations

  • Works only for guitar solos. Implementation for determination and rendering of chords is not done yet.
  • Works only for standard tuning (E A D G B E)

Todo

  • Render tabs using Lilypond or some GUI alternative
  • Implement logic to determine and render chords
  • Better the scale detection implementation
  • Transposing
  • Add way to handle non standard tuning
  • More stringed instruments

License

MIT

Credits

Tayuya is made possible by following open source softwares:

The name

Tayuya (たゆや)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].