MarcTheSpark / scamp

a Suite in Python for Computer-Assisted Music [MIRROR of https://git.sr.ht/~marcevanstein/scamp]
http://scamp.marcevanstein.com
GNU General Public License v3.0
122 stars 11 forks source link

ValueError: Infered arg_value type is not supported #10

Open rgreset opened 9 months ago

rgreset commented 9 months ago

Hi,

When I try to run scamp/examples/Tutorial/24_osc_to_supercollider.py, I get a sound from SuperCollider but I get also this error:

$ python 24_osc_to_supercollider.py 
Exception in thread Thread-203 (_handle_results):
Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/pool.py", line 595, in _handle_results
    cache[job]._set(i, obj)
  File "/usr/local/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/pool.py", line 781, in _set
    self._error_callback(self._value)
  File "/usr/local/lib/python3.10/site-packages/clockblocks/clock.py", line 92, in _threadpool_error_callback
    raise e
  File "/usr/local/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/lib/python3.10/site-packages/clockblocks/clock.py", line 888, in _process
    process_function(child, *args, **kwds)
  File "/usr/local/lib/python3.10/site-packages/scamp/instruments.py", line 545, in _do_play_note
    note_handle = self.start_note(
  File "/usr/local/lib/python3.10/site-packages/scamp/instruments.py", line 661, in start_note
    playback_implementation.start_note(
  File "/usr/local/lib/python3.10/site-packages/scamp/playback_implementations.py", line 530, in start_note
    self.change_note_parameter(note_id, param, value)
  File "/usr/local/lib/python3.10/site-packages/scamp/playback_implementations.py", line 547, in change_note_parameter
    self.client.send_message("/{}/{}/{}".format(
  File "/usr/local/lib/python3.10/site-packages/pythonosc/udp_client.py", line 73, in send_message
    builder.add_arg(val)
  File "/usr/local/lib/python3.10/site-packages/pythonosc/osc_message_builder.py", line 83, in add_arg
    arg_type = self._get_arg_type(arg_value)
  File "/usr/local/lib/python3.10/site-packages/pythonosc/osc_message_builder.py", line 122, in _get_arg_type
    raise ValueError('Infered arg_value type is not supported')
ValueError: Infered arg_value type is not supported
MarcTheSpark commented 9 months ago

Are you using numpy perchance? If you try to send a parameter value that is not a standard python int or float, this seems to happen.

rgreset commented 8 months ago

I have numpy installed yes but I don't use it with scamp. The error I get is when running the examples included in the source code of Scamp (24_osc_to_supercollider.py). I have tried to uninstall numpy but the same error is thrown.