Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flow3r
flow3r firmware
Commits
6e641e08
Commit
6e641e08
authored
1 year ago
by
q3k
Browse files
Options
Downloads
Patches
Plain Diff
py/shoegaze: use InputController
parent
af5c1b35
No related branches found
No related tags found
No related merge requests found
Pipeline
#6358
failed
1 year ago
Stage: check
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python_payload/apps/shoegaze/__init__.py
+10
-17
10 additions, 17 deletions
python_payload/apps/shoegaze/__init__.py
with
10 additions
and
17 deletions
python_payload/apps/shoegaze/__init__.py
+
10
−
17
View file @
6e641e08
...
...
@@ -80,14 +80,10 @@ class ShoegazeApp(Application):
self
.
main_mixer
.
signals
.
gain
=
2000
self
.
main_lp
.
signals
.
reso
=
2000
self
.
cp_prev
=
captouch
.
read
()
self
.
_set_chord
(
3
)
self
.
prev_captouch
=
[
0
]
*
10
self
.
_tilt_bias
=
0.0
self
.
_detune_prev
=
0.0
self
.
_git_string_tuning
=
[
0
]
*
4
self
.
_button_prev
=
0
self
.
_update_connections
()
self
.
_spinny
=
-
0.5
self
.
_gaze_counter
=
0
...
...
@@ -202,24 +198,22 @@ class ShoegazeApp(Application):
detune
=
(
tilt
-
self
.
_tilt_bias
)
*
0.5
+
self
.
_detune_prev
*
0.5
self
.
_detune_prev
=
detune
cts
=
captouch
.
read
()
button
=
ins
.
left_button
if
button
!=
self
.
_button_prev
:
if
button
==
1
:
self
.
delay_toggle
()
if
button
==
-
1
:
pass
# self.fuzz_toggle()
self
.
_button_prev
=
button
buttons
=
self
.
input
.
buttons
petals
=
self
.
input
.
captouch
.
petals
if
buttons
.
app
.
left
.
pressed
:
self
.
delay_toggle
()
if
buttons
.
app
.
right
.
pressed
:
pass
# self.fuzz_toggle()
for
i
in
range
(
1
,
10
,
2
):
if
cts
.
petals
[
i
].
pressed
and
(
not
self
.
cp_prev
.
petals
[
i
]
.
pressed
)
:
if
petals
[
i
].
whole
.
pressed
:
k
=
int
((
i
-
1
)
/
2
)
self
.
_set_chord
(
k
)
for
i
in
range
(
2
,
10
,
2
):
k
=
int
(
i
/
2
)
-
1
if
cts
.
petals
[
i
].
pressed
and
(
not
self
.
cp_prev
.
petals
[
i
]
.
pressed
)
:
if
petals
[
i
].
whole
.
pressed
:
self
.
_git_string_tuning
[
k
]
=
self
.
chord
[
k
]
-
12
self
.
git_strings
[
k
].
signals
.
pitch
.
tone
=
self
.
_git_string_tuning
[
k
]
self
.
git_strings
[
k
].
decay
=
3000
...
...
@@ -227,12 +221,11 @@ class ShoegazeApp(Application):
self
.
git_strings
[
k
].
signals
.
pitch
.
tone
=
self
.
_git_string_tuning
[
k
]
+
detune
if
cts
.
petals
[
0
].
pressed
and
(
not
self
.
cp_prev
.
petals
[
0
]
.
pressed
)
:
if
petals
[
0
].
whole
.
pressed
:
self
.
bass_string
.
signals
.
pitch
.
tone
=
self
.
chord
[
0
]
-
24
self
.
bass_string
.
decay
=
1000
self
.
bass_string
.
signals
.
trigger
.
start
()
self
.
cp_prev
=
cts
def
__del__
(
self
)
->
None
:
self
.
blm
.
clear
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment