Announcement

Collapse
No announcement yet.

Griffin PowerMate tool

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Griffin PowerMate tool

    Hi,

    Here is a little tool to use the Griffin PowerMate with any OSC enabled application.
    The attached zip contain an executable tool that can be double clicked (it will open a Terminal window), and an example Osculator file.

    When the tool is launched, it searches for a PowerMate. I have not installed the drivers, so I can't tell for sure if there is no side effect with the software provided by Griffin, but I guess it should be ok. If there are some strange interactions, I would recommend to either uninstall the Griffin software or disable it there is a way to do so.

    Right now, only one PowerMate can be used at a time.

    The tool sends OSC messages to port 8000, which is the default input port of OSCulator.
    The sent messages are as follows :
    • /powermate/button
      A message with one float argument (0 or 1), that gives the state of the button. 0 is released, 1 is pressed.
    • /powermate/button/long
      A message with no argument telling if the press on the button was a long press (600 ms).
    • /powermate/button/double
      A message with no argument telling if the button has been double clicked in a short time (200 ms).
    • /powermate/rotation
      The current rotation. It can go indefinitely in the positive of the negative direction. The message has one float argument that starts at value 0. 1 represents one full rotation in the clockwise direction, 2 two full rotations, and so on. -1 is one full rotation in anti-clockwise direction.
    • /powermate/rotation/bounded
      The current rotation but stops at the [-1 1] bounds. The initial value is 0.
      Note: I was wondering if I should not rather make it start at 0.5 and limit the bounds at [0 1]
    • /powermate/rotation/cyclic
      The current rotation, but wraps around [0 1], that is, when a full turn is done, the value wraps at 0 again.
    • /powermate/rotation/increment
      No argument. Sent every time the value increases.
    • /powermate/rotation/decrement
      No argument. Sent every time the value decreases.
    The tool listens for OSC message on port 7999.
    It reacts to the following OSC messages:
    • /powermate/rotation/reset
      Resets the /powermate/rotation message to its initial value (0).
      No argument.
    • /powermate/led
      Changes the led brightness.
      One float argument between 0 and 1. A value of 0 means that the led is turned off, and a value of 1 means full brightness.

    Depending on the macOS version you are using, you will need to download
    Last edited by camille; 02-10-2021, 10:28 PM.

  • #2
    Hi there,
    Very nice tool so far. I'm wondering, is it possible to get this so that the increment/decrement can be run the entire time? Or can we have another event such as "wheel is incrementing" and "wheel is decrementing"? Problem I'm having is that Applescripts and such will only be run on the initial increment/decrement. If you don't stop, or move very quickly, the script is run just once, and you're left spinning the dial without any effect.

    Thanks

    Comment


    • #3
      Hi!

      Note that in OSCulator, AppleScripts are triggered once and are supposed to be short lived events. I don't think that even a change to the powermate tool would help you solve this problem. Also AppleScripts are rather slow and long to execute, whereas the PowerMate events are fast in comparison, which means that the OS could certainly decide not to execute an AppleScript at a given moment.

      Maybe a solution would be to add an argument that indicates the rotation direction to the /powermate/rotation message, so that you can trigger the AppleScript but only when the direction changes. Do you think it would work for you?


      Best,
      Cam

      Comment


      • #4
        Cam,

        Thanks much for the reply. I think that this would be useful, though not necessarily for my case.

        Perhaps I need to study a bit more about how Osculator works. I was just making a quick volume-knob which didn't use Griffin's driver. However, it seems like there are much faster ways to do so, without Applescript.

        Thanks.

        Comment


        • #5
          Camille,

          Is it also possible to connect multiple powermates?

          Best, Sam

          Comment


          • #6
            I'm very curious about this. I recently purchased a PowerMate Bluetooth and am looking for a way to get MIDI CC out of it. Should this work with the bluetooth version?

            Comment


            • #7
              Hi Naenyn,

              I don't know if this the PowerMate tool has been tested successfully with a Bluetooth PowerMate.
              This tool is free, would you like to try?

              Camille

              Comment


              • #8
                I'd be happy to try it once I receive it this week. =)

                I'm assuming it'd work the same way as the USB version...

                Does the USB version stop sending messages when the max value is achieved? Or does it loop back around to zero?

                Comment


                • #9
                  Does the USB version stop sending messages when the max value is achieved? Or does it loop back around to zero?
                  There is a different message for both cases, look at the dictionary in the first post.

                  Comment


                  • #10
                    I am trying it out on mac os 10.9 with latest osculator (2.13.2) version and it is not working. The scripts is executing ok but I am getting no response in osculator. Any hints perhaps ? I tried running the executable as root but that didn't make a difference.

                    Comment


                    • #11
                      Hi Yommulator,

                      I don't seem to have any problem on 10.9.5.
                      Here is the output I get on my computer:

                      Code:
                      nightfly:oscltr-powermate camille$ ./oscltr-powermate 
                      - 22:41:04.018658 INFO: PowerMate Tool - version 1.0
                      - 22:41:04.018803 INFO: This software is part of Osculator (c) Wildora, 2011.
                      - 22:41:04.018810 INFO: Ready to output on port 8000, listen on port: 7999.
                      - 22:41:12.581030 INFO: Device found:
                      - 22:41:12.581060 INFO:     Vendor:  Griffin Technology, Inc.
                      - 22:41:12.581105 INFO:     Product: Griffin PowerMate
                      - 22:41:12.581147 INFO:     SN#:     
                      ^C- 22:41:25.100403 INFO: Exit.
                      And OSCulator was receiving data, I tried the example oscd file.

                      Cam

                      Comment


                      • #12
                        Hmm strange. I did a fresh install of Mavericks (10.9.5) and Osculator (because i had recently installed the powermate official drivers and macports and other things so i thought it might have messed a bit with my powermate and/or terminal/bash). But still no luck with the osc powermate script on the 'virgin' install. I'm running an Imac late 2013 2,9Ghz I5. The script doesn't seem to detect the powermate. Mac OS recognizes it because the mouse pointer is moving when i turn the powermate and the button is passed as a mouse click. (no powermate drivers installed)

                        Here's my terminal output:

                        pc165scltr-powermate yomm$ ./oscltr-powermate
                        - 20:18:35.081152 INFO: PowerMate Tool - version 1.0
                        - 20:18:35.081463 INFO: This software is part of Osculator (c) Wildora, 2011.
                        - 20:18:35.081471 INFO: Ready to output on port 8000, listen on port: 7999.

                        So no Device found as in your output ...

                        This showed up in dmesg: (not sure if it is related)

                        SMC::smcReadKeyAction ERROR TL0V kSMCKeyNotReadable(0x85) fKeyHashTable=0x0xffffff80e18c3000


                        No joy yet

                        Keep up the good work !

                        Comment


                        • #13
                          Hi,

                          The Powermate never controls the mouse pointer. So I there is something wrong either with your operating system (have you installed a specific driver?) or the device you are connecting is not a Powermate.

                          Best,
                          Cam

                          Comment


                          • #14
                            Originally posted by camille View Post
                            Hi,

                            The Powermate never controls the mouse pointer. So I there is something wrong either with your operating system (have you installed a specific driver?) or the device you are connecting is not a Powermate.

                            Best,
                            Cam
                            Hi Camille,

                            I tried the powermate with and without the drivers installed (even on a clean mavericks install, so i can rule out the drivers being the issue).
                            I think i definitely have a powermate. It might be a first generation powermate. Here is how it looks:
                            Powermate.jpg
                            The powermate always moves the mouse pointer (just by a tiny bit) when plugged in, even without any driver installed (tested on both my Intel Imac & PPC G5) , Maybe I have an older model Powermate ?
                            It works fine though on intel & PPC mac with the latest griffin drivers installed.

                            As I said I can rule out drivers & OS being the issue because i did a clean install of Mavericks with no griffin drivers and that didnt work.

                            Cheers,

                            Yommulator

                            Comment


                            • #15
                              Hallo Camille! Hallo, everyone! I'm new here! I have just purchased a new Osculator 3 license.
                              I got your script working fine on MacOS 10.11.6 However I have a question that will be quite simple to answer for you as the developer.
                              I try to convert the Powermate rotation to Midi CC to control an automation in Logic Pro X which works.
                              But when I turn the Powermate clockwise, the Midi Message goes up (or down when I turn counterclockwise) until 127 is reached and then begins at 0 again.
                              How can I make this stop at a value of 127?
                              And another question would be if I can also reach a finer solution with OSC or Midi NRPN. What would I have to put in the Event Type and value fields in Osculator to reach this and would Logic Pro X recognize this?

                              Best wishes and thanks for this great script!

                              Comment

                              Working...
                              X