Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
C
crowbx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacob Vosmaer
crowbx
Commits
98512076
Commit
98512076
authored
May 08, 2020
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify gate retrigger: AS3310s reset faster
parent
ada89eb9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
31 deletions
+2
-31
crowbx.c
crowbx.c
+0
-1
gate.c
gate.c
+2
-29
gate.h
gate.h
+0
-1
No files found.
crowbx.c
View file @
98512076
...
...
@@ -133,7 +133,6 @@ void do_clock_update(void) {
}
vibrato_update
(
delta
);
gate_update
(
delta
);
pitch_update_clock
(
delta
);
}
...
...
gate.c
View file @
98512076
...
...
@@ -2,16 +2,6 @@
#include "pitch.h"
#include "voice.h"
static
uint8_t
_gate_retrig
[
NUM_VOICES
];
enum
{
// RETRIG_DELAY should be as low as possible to reduce MIDI latency, but
// high enough to allow the hardware envelope generators in the CrowBX
// to
// reset. I know 0x3f to be too low.
RETRIG_DELAY
=
0x5f
,
};
void
gate_init
(
void
)
{
for_each_voice
(
v
)
{
gate_off
(
v
);
}
}
...
...
@@ -31,7 +21,6 @@ void gate_off(uint8_t v) {
return
;
}
_gate_retrig
[
v
]
=
0
;
*
(
g
->
port
)
&=
~
(
g
->
mask
);
}
...
...
@@ -41,22 +30,6 @@ void gate_on(uint8_t v) {
}
gate_off
(
v
);
_gate_retrig
[
v
]
=
RETRIG_DELAY
;
}
void
gate_update
(
uint8_t
delta
)
{
for_each_voice
(
v
)
{
if
(
_gate_retrig
[
v
]
==
0
)
{
continue
;
}
if
(
delta
<
_gate_retrig
[
v
])
{
_gate_retrig
[
v
]
-=
delta
;
continue
;
}
_gate_retrig
[
v
]
=
0
;
gate_on_legato
(
v
);
pitch_env_trigger
(
v
);
}
gate_on_legato
(
v
);
pitch_env_trigger
(
v
);
}
gate.h
View file @
98512076
...
...
@@ -7,6 +7,5 @@ void gate_init(void);
void
gate_on
(
uint8_t
voice
);
void
gate_on_legato
(
uint8_t
voice
);
void
gate_off
(
uint8_t
voice
);
void
gate_update
(
uint8_t
delta
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment