Skip to content

hustmf/Music-with-Different-Timbre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Music-with-Different-Timbre

Generate digital music with different timbre by analysing instruments' timbres and making use of midi

Environment: MatlabR2015b

Setup

Add "matlab-midi-master" to Matlab path. It's a convinient toolbox for parsing midi file
Author of "matlab-midi-master": https://github.com/kts/matlab-midi. Thank you.

Inroduction

Generate music with midi
  1. Run guitarmusic.m in Guitar folder
    note: If error happens like "index exceeds dimension", you may need to pay attention to line4'len=ceil((score(end,6)+100)*fs) 'and increase its value

    This error is due to some problem happened in generating notes.
  2. Run midimusic.m in Violin or Piano folder
    Violin and piano timbres are generated by analysing their harmonic waves while guitar timbre is based on Karplus-Strong algorithm.
Generate music with music score

Run Melody.m in Melody folder. You can modify code inside to produce different timbre.
Music score is recorded in Melody.mat in the format of "Note do melody tbase"
Note: note means type of note; '16' means one-sixteenth note
do: do means pitch of whole melody such as C D E F G A B
melody: numbered musical notation
tbase: duration of a whole note

Analysis and prework

Example: Analysis_ViolinTimbre
Harmonic waves of different timbre are needed to be analysed to get ratio and envelope

About

Generate digital music with different timbre by analysing instruments' timbres

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published