Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Noteblock
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
Container Registry
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fxk8y
Noteblock
Commits
300108f3
Verified
Commit
300108f3
authored
1 year ago
by
Andreas Horn
Browse files
Options
Downloads
Patches
Plain Diff
adds 6th valve
parent
bcccf173
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
noteblock.ino
+7
-6
7 additions, 6 deletions
noteblock.ino
with
7 additions
and
6 deletions
noteblock.ino
+
7
−
6
View file @
300108f3
...
...
@@ -6,28 +6,29 @@
#define MIDI_IN_PIN 0
#define VALVE_0 4
#define VALVE_1 5
#define VALVE_2 6
#define VALVE_3 7
#define VALVE_4 8
#define VALVE_5 9
#define NUM_VALVES
5
#define NUM_VALVES
6
// array of currently active notes, index 0 is the oldest one
int16_t
notes
[
NUM_VALVES
]
=
{
-
1
,
-
1
,
-
1
,
-
1
,
-
1
};
int16_t
notes
[
NUM_VALVES
]
=
{
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
};
bbb
// array of the length of the tone period required to create the tone
uint16_t
periods
[
NUM_VALVES
]
=
{
0
,
0
,
0
,
0
,
0
};
uint16_t
periods
[
NUM_VALVES
]
=
{
0
,
0
,
0
,
0
,
0
,
0
};
// array of the current state of the valve pins (for tone periods)
uint8_t
states
[
NUM_VALVES
]
=
{
0
,
0
,
0
,
0
,
0
};
uint8_t
states
[
NUM_VALVES
]
=
{
0
,
0
,
0
,
0
,
0
,
0
};
// array for the period timer helpers
uint64_t
lastNoteMicros
[
NUM_VALVES
]
=
{
0
,
0
,
0
,
0
,
0
};
uint64_t
lastNoteMicros
[
NUM_VALVES
]
=
{
0
,
0
,
0
,
0
,
0
,
0
};
// array of the valve pin numbers
const
uint8_t
valves
[
NUM_VALVES
]
=
{
VALVE_1
,
VALVE_2
,
VALVE_3
,
VALVE_4
,
VALVE_5
};
const
uint8_t
valves
[
NUM_VALVES
]
=
{
VALVE_0
,
VALVE_1
,
VALVE_2
,
VALVE_3
,
VALVE_4
,
VALVE_5
};
// MIDI parameter overview
// First parameter is the event type (0x0B = control change).
...
...
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