Code Monkey home page Code Monkey logo

push2-python's People

Contributors

alxdb avatar ffont avatar matangover avatar yoshakami 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

push2-python's Issues

Good news about the Push 3

Hi,

I have a Push 3 (standalone but can obviously still use it in controller mode).

I wanted to establish whether the display etc implementations are simillar to the Push 2. I used your code to do so. I changed the MIDI port names in your constants file to look for 3 in the names instead of 2, and changed the USB device ID to 0x1969 and your display example code worked on my Push 3!

on initializing the main class, _rtmidi.SystemError: MidiInAlsa::initialize: error

I was trying to light up the pads but I keep bumping into the same error when running push2_python.Push2(), in linux machine with the push2

_rtmidi.SystemError: MidiInAlsa::initialize: error creating ALSA sequencer client object.

being risen by the mido library

  File "/PATH/TO/ENV/lib/python3.8/site-packages/mido/backends/rtmidi.py", line 51, in get_devices
    input_names = set(rtmidi.MidiIn(rtapi=rtapi).get_ports())
  File "_rtmidi.pyx", line 821, in _rtmidi.MidiIn.__cinit__
_rtmidi.SystemError: MidiInAlsa::initialize: error creating ALSA sequencer client object.

I can't run any of the example code snippets. I posted on an active thread of mido in case it's an upstream problem.

I remember in january I tried this library and got the lights working - just did a fresh install of the library and no code works anymore!

the only code that doesn't make the errror appear is:

push = push2_python.Push2(use_user_midi_port=True)
but when i try to light up the pads nothing happens. I also tried calling the method push.configure_midi() but still not response from the push2.

I just found the old virtualenv that worked in january, the working state of the dependecies is : push2-python @ git+https://github.com/ffont/push2-python@ae91501788469f2c54aa95ed12f37f83505d73f8

Kinda new to the whole MIDI ecosystem! Thanks

Receive decorator events inside of class

Hey there,

I would like to organize everything related to the Ableton Push interaction inside of a class named PushService. However, when the decorated function is called, I need to have access to the object's properties. How can I access self property inside of that function?

Here's my class definition:

class PushService():
    def __init__(self, eventQueueService: EventQueueService):
        self.eventQueueService = eventQueueService

        print("Initializing push service...")
        self.push = push2_python.Push2(run_simulator=True)

        # Start by setting all pad colors to white
        self.push.pads.set_all_pads_to_color('white')

    @push2_python.on_pad_pressed()
    def on_pad_pressed(push, pad_n, pad_ij, velocity):
        if pad_ij == (7,7):
            self.eventQueueService.registerBeat()     # <= Here I need access to the self property to call the registerBeat function

        # Set pressed pad color to green
        print('Pad', pad_ij, 'pressed with velocity', velocity)
        push.pads.set_pad_color(pad_ij, 'green')

Thanks a lot in advance!

ERROR:root:Could not initialize Push 2 Display:

the code example provided in the readme gives out this error. I tried some workarounds to get the display working such as turning it off then on once the program is launched, or displaying a png, trying to set "use the user port" to false, but it's the same result

here's the full code, I made some edits so it would run without pressing any button
(sorry about the extension, github restricts the file extension we can upload lol)
push2-display-example.txt

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.