Advertisement
arnaldorusso

sardine rtmidi

Oct 8th, 2022
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.23 KB | None | 0 0
  1. In [1]: from sardine import *
  2. 32949
  3.  
  4.  
  5. ░██████╗░█████╗░██████╗░██████╗░██╗███╗░░██╗███████╗
  6. ██╔════╝██╔══██╗██╔══██╗██╔══██╗██║████╗░██║██╔════╝
  7. ╚█████╗░███████║██████╔╝██║░░██║██║██╔██╗██║█████╗░░
  8. ░╚═══██╗██╔══██║██╔══██╗██║░░██║██║██║╚████║██╔══╝░░
  9. ██████╔╝██║░░██║██║░░██║██████╔╝██║██║░╚███║███████╗
  10. ╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚═╝╚═╝░░╚══╝╚══════╝
  11.  
  12. Sardine is a MIDI/OSC sequencer made for live-coding
  13. Play music, read the docs, contribute, and have fun!
  14.  
  15. BPM: 135, BEATS: 4 SC: [ ], DEFERRED: [X] MIDI: Sardine
  16. Booting without SuperCollider!
  17. ---------------------------------------------------------------------------
  18. AttributeError                            Traceback (most recent call last)
  19. Cell In [1], line 1
  20. ----> 1 from sardine import *
  21.  
  22. File ~/Art/Sardine/sardine/__init__.py:90
  23.      87     print("[green]Booting without SuperCollider![/green]")
  24.      89 # Starting the default Clock
  25. ---> 90 c = Clock(
  26.      91     midi_port=config.midi,
  27.      92     bpm=config.bpm,
  28.      93     beats_per_bar=config.beats,
  29.      94     ppqn=config.ppqn,
  30.      95     deferred_scheduling=config.deferred_scheduling,
  31.      96 )
  32.      98 # Synonyms for swimming function management
  33.      99 cs = again = anew = a = c.schedule_func
  34.  
  35. File ~/Art/Sardine/sardine/clock/Clock.py:100, in Clock.__init__(self, midi_port, ppqn, bpm, beats_per_bar, deferred_scheduling)
  36.      92 def __init__(
  37.      93     self,
  38.      94     midi_port: Optional[str],
  39.    (...)
  40.      98     deferred_scheduling: bool = True,
  41.      99 ):
  42. --> 100     self._midi = MIDIIo(port_name=midi_port, clock=self)
  43.     101     self._osc = Client(
  44.     102         ip="127.0.0.1", port=12345, name="SardineOsc", ahead_amount=0
  45.     103     )
  46.     105     # Clock parameters
  47.  
  48. File ~/Art/Sardine/sardine/io/MidiIo.py:40, in MIDIIo.__init__(self, clock, port_name, at)
  49.      28 """Open a MIDI Output Port. A name can be given, corresponding to
  50.     29 the name of a valid currently opened MIDI port on the given system.
  51.     30 If the name is invalid or if the port couldn't be found, the user
  52.   (...)
  53.     35 a new virtual port will spawn, named Sardine.
  54.     36 """
  55.      38 threading.Thread.__init__(self)
  56. ---> 40 self._midi_ports = mido.get_output_names()
  57.      41 self.port_name = port_name
  58.      42 self.clock = clock
  59.  
  60. File ~/Envs/art/lib/python3.9/site-packages/mido/backends/backend.py:175, in Backend.get_output_names(self, **kwargs)
  61.     173 def get_output_names(self, **kwargs):
  62.     174     """Return a list of all output port names."""
  63. --> 175     devices = self._get_devices(**self._add_api(kwargs))
  64.     176     names = [device['name'] for device in devices if device['is_output']]
  65.     177     return names
  66.  
  67. File ~/Envs/art/lib/python3.9/site-packages/mido/backends/backend.py:163, in Backend._get_devices(self, **kwargs)
  68.     161 def _get_devices(self, **kwargs):
  69.     162     if hasattr(self.module, 'get_devices'):
  70. --> 163         return self.module.get_devices(**self._add_api(kwargs))
  71.     164     else:
  72.     165         return []
  73.  
  74. File ~/Envs/art/lib/python3.9/site-packages/mido/backends/rtmidi.py:50, in get_devices(api, **kwargs)
  75.      47 def get_devices(api=None, **kwargs):
  76.      48     devices = []
  77. ---> 50     rtapi = _get_api_id(api)
  78.      52     mi = rtmidi.MidiIn(rtapi=rtapi)
  79.      53     mo = rtmidi.MidiOut(rtapi=rtapi)
  80.  
  81. File ~/Envs/art/lib/python3.9/site-packages/mido/backends/rtmidi.py:34, in _get_api_id(name)
  82.      32 def _get_api_id(name=None):
  83.      33     if name is None:
  84. ---> 34         return rtmidi.API_UNSPECIFIED
  85.      36     try:
  86.      37         api = _name_to_api[name]
  87.  
  88. AttributeError: module 'rtmidi' has no attribute 'API_UNSPECIFIED'
  89.  
  90.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement