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
25dbcaa2
Commit
25dbcaa2
authored
1 year ago
by
q3k
Committed by
q3k
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
py/shoegaze: use InputController
parent
41b7dd6d
No related branches found
No related tags found
1 merge request
!88
py: re-introduce os/app button naming, pop views on os button press
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python_payload/apps/shoegaze/__init__.py
+10
-18
10 additions, 18 deletions
python_payload/apps/shoegaze/__init__.py
with
10 additions
and
18 deletions
python_payload/apps/shoegaze/__init__.py
+
10
−
18
View file @
25dbcaa2
...
@@ -80,14 +80,10 @@ class ShoegazeApp(Application):
...
@@ -80,14 +80,10 @@ class ShoegazeApp(Application):
self
.
main_mixer
.
signals
.
gain
=
2000
self
.
main_mixer
.
signals
.
gain
=
2000
self
.
main_lp
.
signals
.
reso
=
2000
self
.
main_lp
.
signals
.
reso
=
2000
self
.
cp_prev
=
captouch
.
read
()
self
.
_set_chord
(
3
)
self
.
_set_chord
(
3
)
self
.
prev_captouch
=
[
0
]
*
10
self
.
_tilt_bias
=
0.0
self
.
_tilt_bias
=
0.0
self
.
_detune_prev
=
0.0
self
.
_detune_prev
=
0.0
self
.
_git_string_tuning
=
[
0
]
*
4
self
.
_git_string_tuning
=
[
0
]
*
4
self
.
_button_prev
=
0
self
.
_update_connections
()
self
.
_update_connections
()
self
.
_spinny
=
-
0.5
self
.
_spinny
=
-
0.5
self
.
_gaze_counter
=
0
self
.
_gaze_counter
=
0
...
@@ -202,24 +198,22 @@ class ShoegazeApp(Application):
...
@@ -202,24 +198,22 @@ class ShoegazeApp(Application):
detune
=
(
tilt
-
self
.
_tilt_bias
)
*
0.5
+
self
.
_detune_prev
*
0.5
detune
=
(
tilt
-
self
.
_tilt_bias
)
*
0.5
+
self
.
_detune_prev
*
0.5
self
.
_detune_prev
=
detune
self
.
_detune_prev
=
detune
cts
=
captouch
.
read
()
buttons
=
self
.
input
.
buttons
button
=
ins
.
left_button
petals
=
self
.
input
.
captouch
.
petals
if
button
!=
self
.
_button_prev
:
if
buttons
.
app
.
right
.
pressed
:
if
button
==
1
:
self
.
delay_toggle
()
self
.
delay_toggle
()
if
buttons
.
app
.
left
.
pressed
:
if
button
==
-
1
:
pass
pass
# self.fuzz_toggle()
# self.fuzz_toggle()
self
.
_button_prev
=
button
for
i
in
range
(
1
,
10
,
2
):
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
)
k
=
int
((
i
-
1
)
/
2
)
self
.
_set_chord
(
k
)
self
.
_set_chord
(
k
)
for
i
in
range
(
2
,
10
,
2
):
for
i
in
range
(
2
,
10
,
2
):
k
=
int
(
i
/
2
)
-
1
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_string_tuning
[
k
]
=
self
.
chord
[
k
]
-
12
self
.
git_strings
[
k
].
signals
.
pitch
.
tone
=
self
.
_git_string_tuning
[
k
]
self
.
git_strings
[
k
].
signals
.
pitch
.
tone
=
self
.
_git_string_tuning
[
k
]
self
.
git_strings
[
k
].
decay
=
3000
self
.
git_strings
[
k
].
decay
=
3000
...
@@ -227,12 +221,10 @@ class ShoegazeApp(Application):
...
@@ -227,12 +221,10 @@ class ShoegazeApp(Application):
self
.
git_strings
[
k
].
signals
.
pitch
.
tone
=
self
.
_git_string_tuning
[
k
]
+
detune
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
.
signals
.
pitch
.
tone
=
self
.
chord
[
0
]
-
24
self
.
bass_string
.
decay
=
1000
self
.
bass_string
.
decay
=
1000
self
.
bass_string
.
signals
.
trigger
.
start
()
self
.
bass_string
.
signals
.
trigger
.
start
()
self
.
cp_prev
=
cts
def
__del__
(
self
)
->
None
:
def
__del__
(
self
)
->
None
:
self
.
blm
.
clear
()
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