Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2o committed Oct 13, 2022
1 parent 06ba46f commit 3a8a2b7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions Examples/monster-tale.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

@env0 = { 2, 16, 64, 48 }
@env1 = { 8, 32, 72, 64 }

t120

A @02 o5 l4 @env0 v120
Expand Down
4 changes: 2 additions & 2 deletions Examples/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ f. e. d
e c @02 r d
e c @01 < h > c

C q5 l8 o2 v100
C q5 l8 o2
c. > c. < c c. > c. < c
c. > c. < c c. > c. < c
c. > c. < c c. > c. < c
Expand All @@ -29,7 +29,7 @@ r1
c c c c c c c c
c c c c c c c c

E o1 l8 v100
E o1 l8 v127
r1 r1
@env3 v127 c r @env1 v80 c @env3 v127 c
@env3 v127 c r @env1 v80 c @env3 v127 c
Expand Down
8 changes: 5 additions & 3 deletions Modules/Music.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ end
function music:NOISE(sample_rate, frequency) --> function()
local npoints = sample_rate / frequency

return function()
i = i % npoints + 1
return i < npoints - 1 and math.random(-1.0, 1.0)
return function(i)
--i = i % npoints + 1
--return i < npoints - 1 and math.random(-1.0, 1.0)
return math.random(-1.0, 1.0)
end
end

Expand Down Expand Up @@ -331,6 +332,7 @@ function music:render_audio()
local song_voices = 0
local song_sample_count = 0
local previous_sound = {}
local sample = 0

for track, _ in pairs(self.tracks.info) do
if song_duration < self:get_track_duration(track) then
Expand Down

0 comments on commit 3a8a2b7

Please sign in to comment.