milkey-mouse / swood

Turn any sound into an instrument
https://meme.institute/swood/
MIT License
10 stars 3 forks source link

Cut off audio when rendering from a cached note #8

Closed milkey-mouse closed 8 years ago

milkey-mouse commented 8 years ago

I did this in the old version but the fix disappeared

Creating output buffer
Rendering audio
 99% |################################################################################### | ETA:  0:00:00T
 recent call last):
  File "C:\Program Files\Python 3.5\Scripts\swood-script.py", line 9, in <module>
    load_entry_point('swood==0.9.8', 'console_scripts', 'swood')()
  File "c:\program files\python 3.5\lib\site-packages\swood.py", line 328, in run_cmd
    run(sys.argv[1], sys.argv[2], sys.argv[3], transpose=transpose, speed=speed, threshold_mult=threshold,
ze, linear=linear, cachesize=cachesize, fullclip=fullclip)
  File "c:\program files\python 3.5\lib\site-packages\swood.py", line 248, in run
    output[time:time + cachednote.length] += (cachednote.rendered * (note.volume / midi.maxvolume)).astype
ValueError: operands could not be broadcast together with shapes (11046,) (12958,) (11046,)

Just crop the arrays

milkey-mouse commented 8 years ago

Fixed with the new array thing