• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Python module to manage Genelec SAM

OP
M

markb

Member
Joined
Apr 29, 2021
Messages
55
Likes
101
That would surprise me, but Genelec has no way to check anyway with the current protocol.
Indeed. But use at your own risk; I can’t give any guarantees, certainly not about others’ warranties. :)
 

limealot

New Member
Joined
Aug 23, 2021
Messages
3
Likes
3
Location
Finland
Nice to hear it's useful to other people. :)

Yes, I noticed it as well with my 8330s! I don't believe that happens with GLM, and I haven't noticed it with my 7350 subwoofer (which I used the most for testing, as I could steal it without affecting my normal audio setup too much.) I will need to investigate a bit on what GLM does differently here. I'll look into it soon.
Any progress on the silence on volume setting?
I looked at the Genelec GLM 4 user manual, and found that there are these kb shortcuts:
1640080067185.png

Perhaps it would be possible to sniff what is sent to the GLM through USB when pressing "Up arrow" and "Down arrow" to set the volume by increments, presumably without GLM going silent for a while when that happens? I would imagine it would be most useful for most people to be able to set the volume up/down in increments, instead of setting an absolute value.
 
OP
M

markb

Member
Joined
Apr 29, 2021
Messages
55
Likes
101
Sorry, some serious life events got in the way in the past few months, which meant I haven't had much time to work on genlc. Hopefully that will improve soon.

Any progress on the silence on volume setting?

Yes - a while ago I noticed that this happens if we don't do a "discover" before setting the volume. I just pushed a commit that now always does this first. Let me know if that fixes it for you?

I looked at the Genelec GLM 4 user manual, and found that there are these kb shortcuts:
View attachment 173834
Perhaps it would be possible to sniff what is sent to the GLM through USB when pressing "Up arrow" and "Down arrow" to set the volume by increments, presumably without GLM going silent for a while when that happens? I would imagine it would be most useful for most people to be able to set the volume up/down in increments, instead of setting an absolute value.

Well, problem is that the GLM protocol doesn't seem to offer a way to read/request what the current volume set on the monitor is. What GLM appears to do is simply remember what it sent last, and increase that value by some amount, and then send the new value.

genlc currently starts new on every command, without any prior information, and can't do that. I may look into building a persistent daemon (i.e. keeps running all the time) in the future that does similar, and that can be sent commands to control things.
 

hege

Senior Member
Forum Donor
Joined
Dec 25, 2018
Messages
466
Likes
821
Location
Finland
Well, problem is that the GLM protocol doesn't seem to offer a way to read/request what the current volume set on the monitor is. What GLM appears to do is simply remember what it sent last, and increase that value by some amount, and then send the new value.

But GLM software does initialize the group volume on software startup, so surely there must be a method. If nothing else, then send a -1000dB command and +wanted_dB after that.. :)
 
OP
M

markb

Member
Joined
Apr 29, 2021
Messages
55
Likes
101
But GLM software does initialize the group volume on software startup, so surely there must be a method. If nothing else, then send a -1000dB command and +wanted_dB after that.. :)

Yes, they just write their own desired value on startup, overwriting and disregarding the old volume that was set on the monitors before.
 

limealot

New Member
Joined
Aug 23, 2021
Messages
3
Likes
3
Location
Finland
Yes - a while ago I noticed that this happens if we don't do a "discover" before setting the volume. I just pushed a commit that now always does this first. Let me know if that fixes it for you?
Hi! I can confirm that this fixes the problem. Amazing job, THANKS! When fiddling with the volume control back and forth a lot, the silence can still occur, but that is quite rare and is not a problem with normal operation.
Btw, I upgraded my speakers from a pair of 8330 to a pair of 8341, and I was happy to discover that genlc still worked exactly as before. :)
 

DuncanDirkDick

Member
Forum Donor
Joined
Mar 8, 2021
Messages
54
Likes
40
Code:
./genlc --debug discover             
Traceback (most recent call last):
  File "./genlc", line 5, in <module>
    from genlc.cli import main
  File "/home/crm/.local/lib/python3.8/site-packages/genlc/cli.py", line 10, in <module>
    import hid
  File "/home/crm/.local/lib/python3.8/site-packages/hid/__init__.py", line 83, in <module>
    hidapi.hid_get_input_report.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_size_t]
  File "/usr/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/aarch64-linux-gnu/libhidapi-libusb.so.0: undefined symbol: hid_get_input_report

Same with hidraw
Code:
./genlc --debug discover            
Traceback (most recent call last):
  File "./genlc", line 5, in <module>
    from genlc.cli import main
  File "/home/crm/.local/lib/python3.8/site-packages/genlc/cli.py", line 10, in <module>
    import hid
  File "/home/crm/.local/lib/python3.8/site-packages/hid/__init__.py", line 83, in <module>
    hidapi.hid_get_input_report.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_size_t]
  File "/usr/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/aarch64-linux-gnu/libhidapi-hidraw.so.0: undefined symbol: hid_get_input_report

Getting no further than this on Ubuntu 20.04.4 LTS on pi. Any ideas? Just followed install section in git
 

cata02

Member
Joined
Dec 15, 2021
Messages
71
Likes
23
I got this working but it's freaking slow.

I am looking into hooking this to HDMI CEC commands received from a TV; goal being to use the TV remote's control to set volume/on-off/mute to the GLM box using a raspberry pi.

Will try to use node red or smth to receive HDMI CEC events and trigger the GLM commands, though i believe some small persistence will be needed to get volume working correctly.
 
Last edited:

Trell

Major Contributor
Joined
May 13, 2021
Messages
2,752
Likes
3,285
I go this working but it's freaking slow.

Not much info to act upon for the creator for this free software.

I am looking into hooking this to HDMI CEC commands received from a TV; goal being to use the TV remote's control to set volume/on-off/mute to the GLM box using a raspberry pi.

Will try to use node red or smth to receive HDMI CEC events and trigger the GLM commands, though i believe some small persistence will be needed to get volume working correctly.

Nice goal but how is that to help the OP solving your reported problem?
 

jk42

New Member
Joined
Mar 31, 2023
Messages
1
Likes
0
Location
Helsinki, Finland
Nice work. Incremental volume changes would indeed be golden. Just another thought; How about checking what happens when a Genelec RF remote is used? Volume changes are somehow communicated back to GLM software if it's running...
 
Top Bottom