Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Fadecandy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scanlime
Fadecandy
Commits
7b7513a6
Commit
7b7513a6
authored
11 years ago
by
Micah Elizabeth Scott
Browse files
Options
Downloads
Patches
Plain Diff
Fix spin rate (pitch bend) control
parent
e6d4bed7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/node/midi_particles.coffee
+3
-3
3 additions, 3 deletions
examples/node/midi_particles.coffee
with
3 additions
and
3 deletions
examples/node/midi_particles.coffee
+
3
−
3
View file @
7b7513a6
...
...
@@ -39,7 +39,7 @@ particleNotes = {}
# Adjustable parameters
particleLifetime
=
1.0
brightness
=
1.0
spinRate
=
1.
0
spinRate
=
0
noteSustain
=
1.6
wobbleAmount
=
24.0
origin
=
[
0
,
0
,
0
]
...
...
@@ -95,7 +95,7 @@ input.on 'message', (deltaTime, message) ->
when
0xe0
# Voice 0, Pitch Bend
# Default spin 1.0, but allow forward/backward
spinRate
=
1.0
+
(
message
[
2
]
-
64
)
*
2
0.0
/
64
spinRate
=
(
message
[
2
]
-
64
)
*
1
0.0
/
64
draw
=
()
->
...
...
@@ -119,7 +119,7 @@ draw = () ->
for
p
in
particles
# Angle: Global spin, thne positional mapping to key
theta
=
midiToAngle
p
.
note
.
key
theta
=
spinAngle
+
midiToAngle
p
.
note
.
key
# Radius: Particles spawn in center, fly outward
radius
=
3.0
*
(
1
-
p
.
life
)
...
...
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