This repository has been archived by the owner on Sep 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a bug in repa(), added print command, introduced an example mel…
…ody along with its LMMS project and ogg output
- Loading branch information
Dave
committed
Sep 20, 2017
1 parent
1022e74
commit 8ff4828
Showing
8 changed files
with
123 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*.mid | ||
*.gem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
|
||
def repa(array, x) | ||
result = [] | ||
(0..x).each do | ||
(1..x).each do | ||
result.concat(array) | ||
end | ||
return result | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
def mybpm() | ||
return 60 | ||
end | ||
|
||
def mysynth() | ||
return :piano | ||
end | ||
|
||
def melody() | ||
|
||
m = [] | ||
t = [] | ||
|
||
m1 = [] | ||
t1 = [] | ||
[64, 60, 62, 59].each do |x| | ||
m1.concat([x]) | ||
t1.concat([2*F]) | ||
end | ||
|
||
m.concat(m1 + m1) | ||
t.concat(t1 + t1) | ||
|
||
m2 = [64, 66] | ||
t2 = rep(2*F, 2) | ||
|
||
m.concat(m2 + m2) | ||
t.concat(t2 + t2) | ||
|
||
m3 = [] | ||
t3 = [] | ||
m3.concat(repa([67, 71], 4)) | ||
m3.concat(repa([69, 72], 4)) | ||
t3 = rep(Q, 16) | ||
|
||
m.concat(m3 + m3) | ||
t.concat(t3 + t3) | ||
|
||
m.concat(m1) | ||
t.concat(t1) | ||
|
||
return m, t | ||
end |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
def mybpm() | ||
return 60 | ||
end | ||
|
||
def mysynth() | ||
return :piano | ||
end | ||
|
||
def melody() | ||
|
||
m = [] | ||
t = [] | ||
|
||
m1 = [] | ||
t1 = [] | ||
[64, 60, 62, 59].each do |x| | ||
m1.concat(rep(x, 5)) | ||
t1.concat(rep(Q, 4) + [F]) | ||
end | ||
|
||
m.concat(m1 + m1) | ||
t.concat(t1 + t1) | ||
|
||
m2 = [] | ||
t2 = [] | ||
m2.concat(repa([64, 67], 4)) | ||
m2.concat(repa([66, 69], 4)) | ||
t2 = rep(Q, 16) | ||
|
||
m.concat(m2 + m2) | ||
t.concat(t2 + t2) | ||
|
||
m3 = [] | ||
t3 = [] | ||
m3.concat(repa([67, 71], 4)) | ||
m3.concat(repa([69, 72], 4)) | ||
t3 = rep(Q, 16) | ||
|
||
m.concat(m3 + m3) | ||
t.concat(t3 + t3) | ||
|
||
m.concat(m1) | ||
t.concat(t1) | ||
|
||
return m, t | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters