GeekFunkLabs / fluidpatcher

A performance-oriented patch interface for FluidSynth
MIT License
124 stars 15 forks source link

Error in bank0 Elevator Jam preset #51

Closed BeFrankly closed 2 years ago

BeFrankly commented 2 years ago

Hello, actual version of bank0 seems to have an error in the Elevator jam preset. Each time I switch to it by running headlesspi.py in a SSH session the output is:

elected patch 4/5: Cheap Synth
Exception ignored on calling ctypes callback function: <bound method Synth.custom_midi_router of <patcher.fswrap.Synth object at 0x7f9d8b1f70>>
Traceback (most recent call last):
  File "/home/pi/Synthy/patcher/fswrap.py", line 694, in custom_midi_router
    if self.msg_callback: self.msg_callback(res)
  File "/home/pi/Synthy/./headlesspi.py", line 152, in listener
    self.select_patch((self.pno + msg.patch) % len(pxr.patches))
  File "/home/pi/Synthy/./headlesspi.py", line 141, in select_patch
    pxr.apply_patch(self.pno)
  File "/home/pi/Synthy/patcher/__init__.py", line 163, in apply_patch
    self._fluid.player_add(name, **{**info, 'file': fpath, 'chan': pchan})
  File "/home/pi/Synthy/patcher/fswrap.py", line 820, in player_add
    self.players[name] = Player(self, file, loops, barlength, chan, mask)
  File "/home/pi/Synthy/patcher/fswrap.py", line 499, in __init__
    FL.fluid_midi_router_add_rule(self.frouter, rule, rtype)
ctypes.ArgumentError: argument 3: <class 'TypeError'>: wrong type

If you comment out this part of the preset

players: groove: file: elevatorgroove.mid chan: 1-10*1+5 # shift channels of messages in song barlength: 1536 # if given, finishes measure before seeking loops: [15350, 18419] # pairs of begin, end ticks

the error is not comming up.

Could you check this? Regards Frank

albedozero commented 2 years ago

Thanks! Bank0.yaml is fine, it was actually a bug in the Player code. This is fixed by db44a5d and added to v0.7.9.