tseaver / scarlett_yaml Goto Github PK
View Code? Open in Web Editor NEWDump / load Scarlett mixer configuration to / from YAML
License: MIT License
Dump / load Scarlett mixer configuration to / from YAML
License: MIT License
Helo I am using python3, and a scarlet 18i20. I got an error in extract_controls().
I have add to print to check the problem
def _extract_controls():
dump = subprocess.check_output(
["amixer", "-cUSB", "controls"])
#print(dump)
for line in dump.splitlines():
print("line : ",line)
num_id, _, name = line.split(b",")
_, num_id = num_id.split(b"=")
num_id = int(num_id.decode('ascii'))
_, name = name.split(b"=")
name = name.decode('ascii').strip("'")
print("name = ",name,"num_id =", num_id)
yield name, num_id
it ends with :
line : b"numid=9,iface=MIXER,name='Master Playback Volume'"
name = Master Playback Volume num_id = 9
line : b"numid=1,iface=MIXER,name='Extension Unit Switch'"
name = Extension Unit Switch num_id = 1
line : b"numid=6,iface=MIXER,name='Extension Unit Switch',index=1"
Traceback (most recent call last):
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 478, in
main()
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 468, in main
mixer.load_controls() # prepopulates enums, even for loading.
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 169, in load_controls
for name, num_id in sorted(self._extract_controls()):
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 405, in _extract_controls
num_id, _, name = line.split(b",")
ValueError: too many values to unpack (expected 3)
Not find a solution yet
Does this work on both generations?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.