Coder Social home page Coder Social logo

mpk-m2-editor's People

Contributors

glindstedt avatar houston4444 avatar juliendehos avatar pioverfour avatar trebmuh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mpk-m2-editor's Issues

Installation Issues with M1

PyQt5 Installation on an M1 Mac does not seem to work properly. Not sure if you have any advice here, but I can't get pip3 install -r requirements.txt to complete without an error and the following output:

Requirement already satisfied: python-rtmidi in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from -r requirements.txt (line 1)) (1.5.6)
Collecting PyQt5 (from -r requirements.txt (line 2))
  Using cached PyQt5-5.15.9.tar.gz (3.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      Traceback (most recent call last):
        File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/site-packages/sipbuild/project.py", line 586, in setup
          self.apply_user_defaults(tool)
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-install-0ycb9l_7/pyqt5_18e6d347e3bc467980aaa54bdce294a0/project.py", line 68, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/site-packages/sipbuild/project.py", line 237, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/site-packages/pyqtbuild/builder.py", line 69, in apply_user_defaults
          raise PyProjectOptionException('qmake',
      sipbuild.pyproject.PyProjectOptionException
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

addWidget(...): argument 2 has unexpected type 'float'

So this does not work as is on my system. (Arch Linux, python-pyqt5 5.15.6-7 (pyqt5), python-pyqt5-sip 12.9.1-1), because addWidget expects the 2nd parameter (row) to be int:

# ./mpk-m2-editor
Traceback (most recent call last):
  File "/home/asko/AUR/MPK-M2-editor/./mpk-m2-editor", line 374, in <module>
    ui.setupUi(MainWindow)
  File "/home/asko/AUR/MPK-M2-editor/ui/qt_ui.py", line 171, in setupUi
    prog["gridLayout_5"].addWidget(knob["knobGroupBox"], knob_i/4+1, knob_i%4, 1, 1)
TypeError: arguments did not match any overloaded call:
  addWidget(self, QWidget): too many arguments
  addWidget(self, QWidget, int, int, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 2 has unexpected type 'float'
  addWidget(self, QWidget, int, int, int, int, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 2 has unexpected type 'float'

The original code is, at line 171:

prog["gridLayout_5"].addWidget(knob["knobGroupBox"], knob_i/4+1, knob_i%4, 1, 1)

knob_i/4+1 results in floats, see below:

>>> for knob_i in range(8): print(knob_i/4+1)
...
1.0
1.25
1.5
1.75
2.0
2.25
2.5
2.75

However something like this works, and places the knobs in right rows:

# check if this knob goes on 1st row
prog["gridLayout_5"].addWidget(knob["knobGroupBox"], 1 if knob_i < 4 else 2, knob_i%4, 1, 1)

OR use the previous implementation, but cast the float to int, rounding the decimals away.

prog["gridLayout_5"].addWidget(knob["knobGroupBox"],  int(knob_i/4+1), knob_i%4, 1, 1)
# results in 1 or 2. Atleast in this case.
>>> for knob_i in range(8): print(int(knob_i/4+1))
...
1
1
1
1
2
2
2
2

However AFAIK rowLayout index starts at 0, so maybe this is better?:

prog["gridLayout_5"].addWidget(knob["knobGroupBox"],  int(knob_i/4), knob_i%4, 1, 1)
# results in 1 or 0
>>> for knob_i in range(8): print(int(knob_i/4))
...
0
0
0
0
1
1
1
1

libjack-dev2 instead of libjack-dev

Hi,
I had an issue trying to get the dependencies right, I stumbled on libjack-dev, it's an empty package in latest ubuntustudio, 20.10. installing libjack2-dev seems to have solved the issue, it runs good as far as I can see.
Maybe you could add in you documentation that libjack-dev2 works too.
edit: changed libjack-dev2 to libjack2-dev

editor window not rendering

Hi ,
not sure what I've done wrong, but suddenly the editor won't launch anymore, no clue what is changed.
After Ctrl-C I get the following traceback:

^CTraceback (most recent call last):'
  File "/home/bart/Documenten/software/audio/mpkmini/MPK-M2-editor-master/./mpk-m2-editor", line 376, in <module>
    ui.get_all_programmes()
  File "/home/bart/Documenten/software/audio/mpkmini/MPK-M2-editor-master/./mpk-m2-editor", line 291, in get_all_programmes
    self.get_programme(p_i)
  File "/home/bart/Documenten/software/audio/mpkmini/MPK-M2-editor-master/./mpk-m2-editor", line 300, in get_programme
    in_message = self.send_midi_message(out_message, 117)
  File "/home/bart/Documenten/software/audio/mpkmini/MPK-M2-editor-master/./mpk-m2-editor", line 283, in send_midi_message
    in_message = self.mi.get_message()
KeyboardInterrupt

I hope this helps to find a solution.

grtz,
Bart

[feature request] i18n

I'd like to provide a French translation of it if/when the translation system is/will_be in place.

Support for MPK mini mk3

Hi.
I just purchased a MPK mini and got the newer MK3 model.
I tried installing the editor, and got a "device not found" error.

I tried adding "MPK mini" to the arrays in lines 252 and 255 as I noticed the mk3 has a lowercase mini in the name.
is_out_open, is_in_open = False, False
for i, p in enumerate(self.mo.get_ports()):
if any(mpk in p for mpk in ("MPKmini", "MPK Mini", "MPK mini")):
self.mo.open_port(i)
is_out_open = True
for i, p in enumerate(self.mi.get_ports()):
if any(mpk in p for mpk in ("MPKmini", "MPK Mini", "MPK mini")):
self.mi.open_port(i)
self.mi.ignore_types(sysex=False)
is_in_open = True
If I unplug the keyboard, I get the 'device not found' message so that part at least I got right ^^

Now, once launched, the editor opens a window but that window stays empty. (It copies the screen and doesn't refresh or go black or anything. the window can be moved around and keeps the same image inside.) Resize works (fills the rest with black) but not the close window 'x' button.

When I eventually ctrl-c to kill it, the following message appears in the console :

./mpk-m2-editor.py
^CTraceback (most recent call last):
File "./mpk-m2-editor.py", line 376, in
ui.get_all_programmes()
File "./mpk-m2-editor.py", line 291, in get_all_programmes
self.get_programme(p_i)
File "./mpk-m2-editor.py", line 300, in get_programme
in_message = self.send_midi_message(out_message, 117)
File "./mpk-m2-editor.py", line 283, in send_midi_message
in_message = self.mi.get_message()
KeyboardInterrupt

I am not a developper so my abilities to help solving this are limited, but I will gladly try to help getting the editor wirk with an mk3 :)
I'm using ubuntu 20.4

rtmidi-python won't work with Python3.10+

The following error occurs when running:
pip3 install -r ./requirements.txt

********@mercury:~/Downloads/mpk2Editor/MPK-M2-editor$ python3 -m pip install -r ./requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting python-rtmidi
Using cached python-rtmidi-1.4.9.tar.gz (251 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-pckdl961/python-rtmidi_89d8212de8a64dc9bfe4bab75acc5966/setup.py", line 153, in
check_for_jack(define_macros, libraries)
File "/tmp/pip-install-pckdl961/python-rtmidi_89d8212de8a64dc9bfe4bab75acc5966/setup.py", line 44, in check_for_jack
res = subprocess.check_output(['pkg-config', '--modversion', 'jack'])
File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 966, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

This is where is went looking for an explanation:
https://stackoverflow.com/questions/71410788/pip-failed-building-wheel-for-rtmidi-python-subprocess-exited-with-error-and-le

Here's a link to the old library.
https://pypi.org/project/rtmidi-python/#history

Link to another:
https://pypi.org/project/python-rtmidi/

I may add more notes or see if I can fix this since I really enjoy using the editor.

Pads Off by One Octave

First, thanks very much for making this app. The official MPK editor currently crashes on my Mac, so this project is keeping my Mk2 alive and useful.

One issue I'm encountering is that the editor seems to be off by one octave for my pads. E.g., if I want Pad 1, Bank B to be C1, I have to set it to C2 in the editor.
image
image

Speficy a version in setup to avoid packaging problems

I am trying to build a mpk package and I met the following error:

Error: The version in the Python package metadata 0.0.0 normalizes to zero.
It's likely a packaging error caused by missing version information
(e.g. when using a version control system snapshot as a source).

Maybe this error can be fixed by specifying a version in setup.py ?

Problem with installing requirements.txt (Debian 12.1)

I downloaded all project files as .zip, unzipped them and opened a terminal in the downloaded folder. I ran the first command line in the Readme, no problem.

Then, I tried to run the command
pip install -r requirements.txt
as suggested, and got an error saying it's an "externally managed environment"

After looking online for a solution, I tried
pipx install requirements.txt
But then an error says that there's no version that satisfies requirements.txt (no version found)

I must say I've never used python related commands so I may have missed steps that aren't mentioned but are essential.

To add a bit more context:

I received an MPK mini from a friend, and want to make it to work inside Pure Data. In a sense, I don't really need the editor to map pads, keys and knobs, as I will need to do it myself in Pure Data anyway.

The only thing I'd like to do is to set the arpeggiator clock to "external", in order to synchronize the MPK mini with Pure Data. Is there any SysEx message that could to the job ? How is this specific parameter implemented in your editor ? This would be an even better solution for my setup.

Thanks in advance !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.