chrisdonahue / nesmdb

The NES Music Database: use machine learning to compose music for the Nintendo Entertainment System!
MIT License
450 stars 39 forks source link

Velocity and Volume inconsistency #8

Closed jerryli27 closed 6 years ago

jerryli27 commented 6 years ago

Hi, First of all, thank you for this awesome work! It makes researching 8bit music a lot easier.

I found there are some inconsistency between the notations in midi and exprsco compared to elsewhere. In midi, the velocity and the control_changes with cc.number == 11 are commented as velocity. However when converting to rawsco and to ndf, the velocity part is used as the volume:

def rawsco_to_ndf(rawsco):
  clock, rate, nsamps, score = rawsco
...
  for i in xrange(max_i):
    for j, ch in enumerate(['p1', 'p2']):
      th, tl, volume, du = score[i, j]

Is this intended, or am I missing some important details?

jerryli27 commented 6 years ago

Sorry for the confusion. The meaning of velocity here is actually the force with which a note is played. It's a little bit different from what I imagined.