konsumer / hydro2sf2

convert a Hydrogen drumkit into a SF2 soundfont
14 stars 4 forks source link

ushort format requires 0 <= number <= USHRT_MAX #3

Open konsumer opened 4 years ago

konsumer commented 4 years ago

I currently get this error in python2. Need to investigate. it seems like it's trying to pass a negative number in the sample-data.

In python:2.7.9:

./hydroToSf2 Boss_DR-110.h2drumkit
bank name: Boss DR-110
designer: Ed Vargo
copyright: 2006, David Konsumer <david.konsumer@gmail.com>
comment: DR-110 is one of the last fully-analog computer-controlled drum boxes made by Roland/Boss. It's ever-fresh sounds lie somewhere between TR-808 and TR-606. Sounds recorded by Ed Vargo, Hydrogen kit created by Artemiy Pavlov (Sineshine).
Layer: 1 loV: 0 hiV: 127 atten(cB): 0 6
Copying sample data:......
Traceback (most recent call last):
  File "./hydroToSf2", line 243, in <module>
    main(sys.argv)
  File "./hydroToSf2", line 238, in main
    hydrogenToSf(drumkitDir,sf2,stereo,tempDir)
  File "./hydroToSf2", line 168, in hydrogenToSf
    sf.writeFromKmap()
  File "/code/jMksf.py", line 851, in writeFromKmap
    self.riffLen += self.writePdta()
  File "/code/jMksf.py", line 837, in writePdta
    dlen += self.writeIgen()
  File "/code/jMksf.py", line 713, in writeIgen
    ), self.outf)
  File "/code/jtype.py", line 188, in writeval
    slen += field.type.writeval(val[ix], outf)
  File "/code/jtype.py", line 33, in writeval
    outf.write(struct.pack(self.fmt, val))
struct.error: ushort format requires 0 <= number <= USHRT_MAX