summaryrefslogtreecommitdiffhomepage
path: root/samples/01_rendering_basics
diff options
context:
space:
mode:
Diffstat (limited to 'samples/01_rendering_basics')
-rw-r--r--samples/01_rendering_basics/01_labels/app/main.rb4
-rw-r--r--samples/01_rendering_basics/03_solids_borders/app/main.rb2
-rw-r--r--samples/01_rendering_basics/05_sounds/app/main.rb163
-rw-r--r--samples/01_rendering_basics/06_audio_mixer/app/main.rb160
-rw-r--r--samples/01_rendering_basics/06_audio_mixer/license-for-audio.txt48
-rw-r--r--samples/01_rendering_basics/06_audio_mixer/license-for-sample.txt9
-rw-r--r--samples/01_rendering_basics/06_audio_mixer/sounds/1.wavbin409170 -> 0 bytes
-rw-r--r--samples/01_rendering_basics/06_audio_mixer/sounds/2.wavbin22374 -> 0 bytes
-rw-r--r--samples/01_rendering_basics/06_audio_mixer/sounds/3.wavbin420476 -> 0 bytes
-rw-r--r--samples/01_rendering_basics/06_audio_mixer/sounds/4.wavbin91358 -> 0 bytes
-rw-r--r--samples/01_rendering_basics/06_audio_mixer/sounds/5.wavbin117354 -> 0 bytes
-rw-r--r--samples/01_rendering_basics/06_audio_mixer/sounds/6.oggbin330572 -> 0 bytes
-rw-r--r--samples/01_rendering_basics/07_sound_synthesis/app/main.rb593
-rw-r--r--samples/01_rendering_basics/07_sound_synthesis/license-for-sample.txt9
-rw-r--r--samples/01_rendering_basics/07_sound_synthesis/metadata/game_metadata.txt6
-rw-r--r--samples/01_rendering_basics/07_sound_synthesis/metadata/icon.pngbin157056 -> 0 bytes
-rw-r--r--samples/01_rendering_basics/07_sound_synthesis/sprites/square-black.pngbin250 -> 0 bytes
-rw-r--r--samples/01_rendering_basics/07_sound_synthesis/sprites/square-white.pngbin279 -> 0 bytes
18 files changed, 9 insertions, 985 deletions
diff --git a/samples/01_rendering_basics/01_labels/app/main.rb b/samples/01_rendering_basics/01_labels/app/main.rb
index c3e1afc..837954f 100644
--- a/samples/01_rendering_basics/01_labels/app/main.rb
+++ b/samples/01_rendering_basics/01_labels/app/main.rb
@@ -67,7 +67,7 @@ def tick args
g: 0,
b: 200,
a: 255,
- font: "manaspc.ttf" }.label
+ font: "manaspc.ttf" }.label!
# Primitives can hold anything, and can be given a label in the following forms
args.outputs.primitives << [690 + 150, 330 - 80, "Custom font (.primitives Array)", 0, 1, 125, 0, 200, 255, "manaspc.ttf" ].label
@@ -81,7 +81,7 @@ def tick args
g: 0,
b: 200,
a: 255,
- font: "manaspc.ttf" }.label
+ font: "manaspc.ttf" }.label!
end
def tick_instructions args, text, y = 715
diff --git a/samples/01_rendering_basics/03_solids_borders/app/main.rb b/samples/01_rendering_basics/03_solids_borders/app/main.rb
index 2b9b1c4..8d1bfef 100644
--- a/samples/01_rendering_basics/03_solids_borders/app/main.rb
+++ b/samples/01_rendering_basics/03_solids_borders/app/main.rb
@@ -15,7 +15,7 @@ APIs listing that haven't been encountered in a previous sample apps:
# Borders are added to args.outputs.borders
# The parameters required for rects are:
-# 1. The bottom left corner (x, y)
+# 1. The upper right corner (x, y)
# 2. The width (w)
# 3. The height (h)
# 4. The rgba values for the color and transparency (r, g, b, a)
diff --git a/samples/01_rendering_basics/05_sounds/app/main.rb b/samples/01_rendering_basics/05_sounds/app/main.rb
index 630ce11..787d303 100644
--- a/samples/01_rendering_basics/05_sounds/app/main.rb
+++ b/samples/01_rendering_basics/05_sounds/app/main.rb
@@ -13,16 +13,7 @@
- args.outputs.labels: An array. The values generate a label.
The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
-
- - reject: Removes elements from a collection if they meet certain requirements.
-
- - first: Returns the first element of an array.
-
- - inside_rect: Returns true or false depending on if the point is inside the rect.
-
- - to_sym: Returns symbol corresponding to string. Will create a symbol if it does
- not already exist.
-
+ For more information about labels, go to mygame/documentation/02-labels.md.
=end
# This sample app allows users to test their musical skills by matching the piano sound that plays in each
@@ -30,153 +21,11 @@
# Runs all the methods necessary for the game to function properly.
def tick args
- defaults args
- render args
- calc args
- input_mouse args
- tick_instructions args, "Sample app shows how to play sounds. args.outputs.sounds << \"path_to_wav.wav\""
-end
-
-# Sets default values and creates empty collections
-# Initialization happens in the first frame only
-def defaults _
- _.state.notes ||= []
- _.state.click_feedbacks ||= []
- _.state.current_level ||= 1
- _.state.times_wrong ||= 0 # when game starts, user hasn't guessed wrong yet
-end
-
-# Uses a label to display current level, and shows the score
-# Creates a button to play the sample note, and displays the available notes that could be a potential match
-def render _
-
- # grid.w_half positions the label in the horizontal center of the screen.
- _.outputs.labels << [_.grid.w_half, _.grid.top.shift_down(40), "Hole #{_.state.current_level} of 9", 0, 1, 0, 0, 0]
-
- render_score _ # shows score on screen
-
- if _.state.game_over # if game is over, a "play again" button is shown
- # Calculations ensure that Play Again label is displayed in center of border
- # Remove calculations from y parameters and see what happens to border and label placement
- _.state.play_again_border ||= _.state.with_meta([560, _.grid.h * 3 / 4 - 40, 160, 60], 'again') # array definition, text/title
- _.outputs.labels << [_.grid.w_half, _.grid.h * 3 / 4, "Play Again", 0, 1, 0, 0, 0] # outputs label
- _.outputs.borders << _.state.play_again_border # outputs border
- else # otherwise, if game is not over
- # Calculations ensure that label appears in center of border
- _.state.play_note_border ||= _.state.with_meta([560, _.grid.h * 3 / 4 - 40, 160, 60], 'play') # array definition, text/title
- _.outputs.labels << [_.grid.w_half, _.grid.h * 3 / 4, "Play Note ##{_.state.current_level}", 0, 1, 0, 0, 0] # outputs label
- _.outputs.borders << _.state.play_note_border # outputs border
- end
-
- return if _.state.game_over # return if game is over
-
- _.outputs.labels << [_.grid.w_half, 400, "I think the note is a(n)...", 0, 1, 0, 0, 0] # outputs label
-
- # Shows all of the available notes that can be potential matches.
- available_notes.each_with_index do |note, i|
- _.state.notes[i] ||= piano_button(_, note, i + 1) # calls piano_button method on each note (creates label and border)
- _.outputs.labels << _.state.notes[i].label # outputs note on screen with a label and a border
- _.outputs.borders << _.state.notes[i].border
- end
-
- # Shows whether or not the user is correct by filling the screen with either red or green
- _.outputs.solids << _.state.click_feedbacks.map { |c| c.solid }
-end
-
-# Shows the score (number of times the user guesses wrong) onto the screen using labels.
-def render_score _
- if _.state.times_wrong == 0 # if the user has guessed wrong zero times, the score is par
- _.outputs.labels << [_.grid.w_half, _.grid.top.shift_down(80), "Score: PAR", 0, 1, 0, 0, 0]
- else # otherwise, number of times the user has guessed wrong is shown
- _.outputs.labels << [_.grid.w_half, _.grid.top.shift_down(80), "Score: +#{_.state.times_wrong}", 0, 1, 0, 0, 0] # shows score using string interpolation
- end
-end
-
-# Sets the target note for the level and performs calculations on click_feedbacks.
-def calc _
- _.state.target_note ||= available_notes.sample # chooses a note from available_notes collection as target note
- _.state.click_feedbacks.each { |c| c.solid[-1] -= 5 } # remove this line and solid color will remain on screen indefinitely
- # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection
- _.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 }
-end
-
-# Uses input from the user to play the target note, as well as the other notes that could be a potential match.
-def input_mouse _
- return unless _.inputs.mouse.click # return unless the mouse is clicked
-
- # finds button that was clicked by user
- button_clicked = _.outputs.borders.find_all do |b| # go through borders collection to find all borders that meet requirements
- _.inputs.mouse.click.point.inside_rect? b # find button border that mouse was clicked inside of
- end.reject {|b| !_.state.meta(b)}.first # reject, return first element
-
- return unless button_clicked # return unless button_clicked as a value (a button was clicked)
+ args.outputs.labels << [640, 360, "Click anywhere to play a random sound.", 0, 1]
+ args.state.notes ||= [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4]
- queue_click_feedback _, # calls queue_click_feedback method on the button that was clicked
- button_clicked.x,
- button_clicked.y,
- button_clicked.w,
- button_clicked.h,
- 150, 100, 200 # sets color of button to shade of purple
-
- if _.state.meta(button_clicked) == 'play' # if "play note" button is pressed
- _.outputs.sounds << "sounds/#{_.state.target_note}.wav" # sound of target note is output
- elsif _.state.meta(button_clicked) == 'again' # if "play game again" button is pressed
- _.state.target_note = nil # no target note
- _.state.current_level = 1 # starts at level 1 again
- _.state.times_wrong = 0 # starts off with 0 wrong guesses
- _.state.game_over = false # the game is not over (because it has just been restarted)
- else # otherwise if neither of those buttons were pressed
- _.outputs.sounds << "sounds/#{_.state.meta(button_clicked)}.wav" # sound of clicked note is played
- if _.state.meta(button_clicked).to_sym == _.state.target_note # if clicked note is target note
- _.state.target_note = nil # target note is emptied
-
- if _.state.current_level < 9 # if game hasn't reached level 9
- _.state.current_level += 1 # game goes to next level
- else # otherwise, if game has reached level 9
- _.state.game_over = true # the game is over
- end
-
- queue_click_feedback _, 0, 0, _.grid.w, _.grid.h, 100, 200, 100 # green shown if user guesses correctly
- else # otherwise, if clicked note is not target note
- _.state.times_wrong += 1 # increments times user guessed wrong
- queue_click_feedback _, 0, 0, _.grid.w, _.grid.h, 200, 100, 100 # red shown is user guesses wrong
- end
+ if args.inputs.mouse.click
+ # Play a sound by adding a string to args.outputs.sounds
+ args.outputs.sounds << "sounds/#{args.state.notes.sample}.wav" # sound of target note is output
end
end
-
-# Creates a collection of all of the available notes as symbols
-def available_notes
- [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4]
-end
-
-# Creates buttons for each note, and sets a label (the note's name) and border for each note's button.
-def piano_button _, note, position
- _.state.new_entity(:button) do |b| # declares button as new entity
- b.label = [460 + 40.mult(position), _.grid.h * 0.4, "#{note}", 0, 1, 0, 0, 0] # label definition
- b.border = _.state.with_meta([460 + 40.mult(position) - 20, _.grid.h * 0.4 - 32, 40, 40], note) # border definition, text/title; 20 subtracted so label is in center of border
- end
-end
-
-# Color of click feedback changes depending on what button was clicked, and whether the guess is right or wrong
-# If a button is clicked, the inside of button is purple (see input_mouse method)
-# If correct note is clicked, screen turns green
-# If incorrect note is clicked, screen turns red (again, see input_mouse method)
-def queue_click_feedback _, x, y, w, h, *color
- _.state.click_feedbacks << _.state.new_entity(:click_feedback) do |c| # declares feedback as new entity
- c.solid = [x, y, w, h, *color, 255] # sets color
- end
-end
-
-def tick_instructions args, text, y = 715
- return if args.state.key_event_occurred
- if args.inputs.mouse.click ||
- args.inputs.keyboard.directional_vector ||
- args.inputs.keyboard.key_down.enter ||
- args.inputs.keyboard.key_down.escape
- args.state.key_event_occurred = true
- end
-
- args.outputs.debug << [0, y - 50, 1280, 60].solid
- args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
- args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
-end
diff --git a/samples/01_rendering_basics/06_audio_mixer/app/main.rb b/samples/01_rendering_basics/06_audio_mixer/app/main.rb
deleted file mode 100644
index ce48d3f..0000000
--- a/samples/01_rendering_basics/06_audio_mixer/app/main.rb
+++ /dev/null
@@ -1,160 +0,0 @@
-$gtk.reset
-
-$boxsize = 30
-
-def render_sources args
- mouse_in_panel = (args.state.selected != 0) && args.inputs.mouse.position.inside_rect?([900, 450, 340, 250])
- mouse_new_down = (args.state.mouse_held == 1)
-
- if (mouse_new_down && !mouse_in_panel)
- args.state.selected = 0 # will reset below if we hit something.
- end
-
- args.audio.keys.each { |k|
- s = args.audio[k]
-
- if (mouse_new_down) && !mouse_in_panel && args.inputs.mouse.position.inside_rect?([s[:screenx], s[:screeny], $boxsize, $boxsize])
- args.state.selected = k
- args.state.dragging_source = true
- end
-
- isselected = (k == args.state.selected)
-
- if isselected && args.state.dragging_source
- # you can hang anything on the audio hashes you want, so we store the
- # actual screen position so it doesn't scale weirdly vs your mouse.
- s[:screenx] = args.inputs.mouse.x - ($boxsize / 2)
- s[:screeny] = args.inputs.mouse.y - ($boxsize / 2)
-
- s[:screeny] = 50 if s[:screeny] < 50
- s[:screeny] = (719 - $boxsize) if s[:screeny] > (719 - $boxsize)
- s[:screenx] = 0 if s[:screenx] < 0
- s[:screenx] = (1279 - $boxsize) if s[:screenx] > (1279 - $boxsize)
-
- s[:x] = ((s[:screenx] / 1279.0) * 2.0) - 1.0 # scale to -1.0 - 1.0 range
- s[:y] = ((s[:screeny] / 719.0) * 2.0) - 1.0 # scale to -1.0 - 1.0 range
- end
-
- color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ]
- args.outputs.primitives << [s[:screenx], s[:screeny], $boxsize, $boxsize, *color].solid
- }
-end
-
-def render_panel args
- s = args.audio[args.state.selected]
- return if s.nil?
- mouse_down = (args.state.mouse_held > 0)
-
- args.outputs.primitives << [900, 450, 340, 250, 127, 127, 200, 255].solid
- args.outputs.primitives << [1075, 690, "Source ##{args.state.selected}", 3, 1, 255, 255, 255].label
- args.outputs.primitives << [910, 660, 1230, 660, 255, 255, 255].line
- args.outputs.primitives << [910, 650, "screen: (#{s[:screenx].to_i}, #{s[:screeny].to_i})", 0, 0, 255, 255, 255].label
- args.outputs.primitives << [910, 625, "position: (#{s[:x].round(5).to_s[0..6]}, #{s[:y].round(5).to_s[0..6]})", 0, 0, 255, 255, 255].label
-
- slider = [1022, 586, 200, 7]
- if mouse_down && args.inputs.mouse.position.inside_rect?(slider)
- s[:pitch] = ((args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)) * 2.0
- end
- slidercolor = (s[:pitch] / 2.0) * 255
- args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid
- args.outputs.primitives << [910, 600, "pitch: #{s[:pitch].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label
-
- slider = [1022, 561, 200, 7]
- if mouse_down && args.inputs.mouse.position.inside_rect?(slider)
- s[:gain] = (args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)
- end
- slidercolor = s[:gain] * 255
- args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid
- args.outputs.primitives << [910, 575, "gain: #{s[:gain].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label
-
- checkbox = [1022, 533, 10, 12]
- if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)
- s[:looping] = !s[:looping]
- end
- checkboxcolor = s[:looping] ? 255 : 0
- args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid
- args.outputs.primitives << [910, 550, "looping:", 0, 0, 255, 255, 255].label
-
- checkbox = [1022, 508, 10, 12]
- if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)
- s[:paused] = !s[:paused]
- end
- checkboxcolor = s[:paused] ? 255 : 0
- args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid
- args.outputs.primitives << [910, 525, "paused:", 0, 0, 255, 255, 255].label
-
- button = [910, 460, 320, 20]
- if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(button)
- args.audio.delete(args.state.selected)
- args.state.selected = 0
- end
- args.outputs.primitives << [*button, 255, 0, 0, 255].solid
- args.outputs.primitives << [button[0] + (button[2] / 2), button[1]+20, "DELETE SOURCE", 0, 1, 255, 255, 0].label
-end
-
-def spawn_new_sound args, num
- input = nil
- input = "sounds/#{num}.#{(num == 6) ? 'ogg' : 'wav'}"
-
- # Spawn randomly in an area that won't be covered by UI.
- screenx = (rand * 600.0) + 200.0
- screeny = (rand * 400.0) + 100.0
-
- args.state.next_sound_index += 1
-
- # you can hang anything on the audio hashes you want, so we store the
- # actual screen position in here for convenience.
- args.audio[args.state.next_sound_index] = {
- input: input,
- screenx: screenx,
- screeny: screeny,
- x: ((screenx / 1279.0) * 2.0) - 1.0, # scale to -1.0 - 1.0 range
- y: ((screeny / 719.0) * 2.0) - 1.0, # scale to -1.0 - 1.0 range
- z: 0.0,
- gain: 1.0,
- pitch: 1.0,
- looping: true,
- paused: false
- }
-
- args.state.selected = args.state.next_sound_index
-end
-
-def render_launcher args
- total = 6
- x = (1280 - (total * $boxsize * 3)) / 2
- y = 10
- args.outputs.primitives << [0, 0, 1280, ((y*2) + $boxsize), 127, 127, 127, 255].solid
- for i in 1..total
- args.outputs.primitives << [x, y, $boxsize, $boxsize, 255, 255, 255, 255].solid
- args.outputs.primitives << [x+8, y+28, i.to_s, 3, 0, 0, 0, 255, 255].label
- if args.inputs.mouse.click && args.inputs.mouse.click.point.inside_rect?([x, y, $boxsize, $boxsize])
- spawn_new_sound args, i
- end
- x = x + ($boxsize * 3)
- end
-end
-
-def render_ui args
- render_launcher args
- render_panel args
-end
-
-def tick args
- args.state.mouse_held ||= 0
- args.state.dragging_source ||= false
- args.state.selected ||= 0
- args.state.next_sound_index ||= 0
-
- if args.inputs.mouse.up
- args.state.mouse_held = 0
- args.state.dragging_source = false
- elsif args.inputs.mouse.down || (args.state.mouse_held > 0)
- args.state.mouse_held += 1
- else
- end
-
- args.outputs.background_color = [ 0, 0, 0, 255 ]
- render_sources args
- render_ui args
-end
diff --git a/samples/01_rendering_basics/06_audio_mixer/license-for-audio.txt b/samples/01_rendering_basics/06_audio_mixer/license-for-audio.txt
deleted file mode 100644
index f05c25c..0000000
--- a/samples/01_rendering_basics/06_audio_mixer/license-for-audio.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-The audio files in this sample are used under various Creative Common licenses:
-
-
-sounds/1.wav:
-
- Party Pack, Horn Coil 01, Long, 01.wav by InspectorJ (www.jshaw.co.uk) of Freesound.org
- (We converted this to mono output.)
- Original: https://freesound.org/s/484267/
- License: https://creativecommons.org/licenses/by/3.0/
-
-
-sounds/2.wav:
-
- SPLASH.wav by petenice
- Original: https://freesound.org/s/9508/
- License: https://creativecommons.org/publicdomain/zero/1.0/
-
-
-sounds/3.wav:
-
- buzz roll.wav by bigjoedrummer
- (We converted this to mono output.)
- Original: https://freesound.org/s/77305/
- License: https://creativecommons.org/publicdomain/zero/1.0/
-
-
-sounds/4.wav:
-
- sword04.wav by Erdie
- Original: https://freesound.org/s/27858/
- License: https://creativecommons.org/licenses/by/3.0/
-
-
-sounds/5.wav:
-
- Game Over Arcade.wav by myfox14
- (We converted this to mono output.)
- Original: https://freesound.org/s/382310/
- License: https://creativecommons.org/publicdomain/zero/1.0/
-
-
-sounds/6.ogg:
-
- Arcade Music Loop.wav by joshuaempyre ( https://www.empyreanma.com/welcome )
- (We converted this to Ogg Vorbis format, and mono output.)
- Original: https://freesound.org/s/251461/
- License: https://creativecommons.org/licenses/by/3.0/
-
diff --git a/samples/01_rendering_basics/06_audio_mixer/license-for-sample.txt b/samples/01_rendering_basics/06_audio_mixer/license-for-sample.txt
deleted file mode 100644
index 100dcec..0000000
--- a/samples/01_rendering_basics/06_audio_mixer/license-for-sample.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Copyright 2019 DragonRuby LLC
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/1.wav b/samples/01_rendering_basics/06_audio_mixer/sounds/1.wav
deleted file mode 100644
index 8aa1be3..0000000
--- a/samples/01_rendering_basics/06_audio_mixer/sounds/1.wav
+++ /dev/null
Binary files differ
diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/2.wav b/samples/01_rendering_basics/06_audio_mixer/sounds/2.wav
deleted file mode 100644
index 52a09c2..0000000
--- a/samples/01_rendering_basics/06_audio_mixer/sounds/2.wav
+++ /dev/null
Binary files differ
diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/3.wav b/samples/01_rendering_basics/06_audio_mixer/sounds/3.wav
deleted file mode 100644
index c7bde27..0000000
--- a/samples/01_rendering_basics/06_audio_mixer/sounds/3.wav
+++ /dev/null
Binary files differ
diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/4.wav b/samples/01_rendering_basics/06_audio_mixer/sounds/4.wav
deleted file mode 100644
index 193cf54..0000000
--- a/samples/01_rendering_basics/06_audio_mixer/sounds/4.wav
+++ /dev/null
Binary files differ
diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/5.wav b/samples/01_rendering_basics/06_audio_mixer/sounds/5.wav
deleted file mode 100644
index 112f3cc..0000000
--- a/samples/01_rendering_basics/06_audio_mixer/sounds/5.wav
+++ /dev/null
Binary files differ
diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/6.ogg b/samples/01_rendering_basics/06_audio_mixer/sounds/6.ogg
deleted file mode 100644
index a952191..0000000
--- a/samples/01_rendering_basics/06_audio_mixer/sounds/6.ogg
+++ /dev/null
Binary files differ
diff --git a/samples/01_rendering_basics/07_sound_synthesis/app/main.rb b/samples/01_rendering_basics/07_sound_synthesis/app/main.rb
deleted file mode 100644
index 391ce68..0000000
--- a/samples/01_rendering_basics/07_sound_synthesis/app/main.rb
+++ /dev/null
@@ -1,593 +0,0 @@
-begin # region: top level tick methods
- def tick args
- defaults args
- render args
- input args
- process_audio_queue args
- end
-
- def defaults args
- args.state.sine_waves ||= {}
- args.state.square_waves ||= {}
- args.state.saw_tooth_waves ||= {}
- args.state.triangle_waves ||= {}
- args.state.audio_queue ||= []
- args.state.buttons ||= [
- (frequency_buttons args),
- (sine_wave_note_buttons args),
- (bell_buttons args),
- (square_wave_note_buttons args),
- (saw_tooth_wave_note_buttons args),
- (triangle_wave_note_buttons args),
- ].flatten
- end
-
- def render args
- args.outputs.borders << args.state.buttons.map { |b| b[:border] }
- args.outputs.labels << args.state.buttons.map { |b| b[:label] }
- args.outputs.labels << args.layout
- .rect(row: 0, col: 11.5)
- .yield_self { |r| r.merge y: r.y + r.h }
- .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.",
- alignment_enum: 1)
- end
-
-
- def input args
- args.state.buttons.each do |b|
- if args.inputs.mouse.click.inside_rect? b[:rect]
- parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", "
- args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}"
- send b[:method_to_call], args, b
- end
- end
-
- if args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half })
- args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan'
- end
- end
-
- def process_audio_queue args
- to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count }
- args.state.audio_queue -= to_queue
- to_queue.each { |a| args.audio[a[:id]] = a }
-
- args.audio.find_all { |k, v| v[:decay_rate] }
- .each { |k, v| v[:gain] -= v[:decay_rate] }
-
- sounds_to_stop = args.audio
- .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] }
- .map { |k, v| k }
-
- sounds_to_stop.each { |k| args.audio.delete k }
- end
-end
-
-begin # region: button definitions, ui layout, callback functions
- def button args, opts
- button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1))
-
- button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0
-
- label_offset_x = 5
- label_offset_y = 30
-
- button_def[:label] = button_def[:rect].merge text: opts[:text],
- size_enum: -2.5,
- x: button_def[:rect].x + label_offset_x,
- y: button_def[:rect].y + label_offset_y
-
- button_def
- end
-
- def play_sine_wave args, sender
- queue_sine_wave args,
- frequency: sender[:frequency],
- duration: 1.seconds,
- fade_out: true
- end
-
- def play_note args, sender
- method_to_call = :queue_sine_wave
- method_to_call = :queue_square_wave if sender[:type] == :square
- method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth
- method_to_call = :queue_triangle_wave if sender[:type] == :triangle
- method_to_call = :queue_bell if sender[:type] == :bell
-
- send method_to_call, args,
- frequency: (frequency_for note: sender[:note], octave: sender[:octave]),
- duration: 1.seconds,
- fade_out: true
- end
-
- def frequency_buttons args
- [
- (button args,
- row: 4.0, col: 0, text: "300hz",
- frequency: 300,
- method_to_call: :play_sine_wave),
- (button args,
- row: 5.0, col: 0, text: "400hz",
- frequency: 400,
- method_to_call: :play_sine_wave),
- (button args,
- row: 6.0, col: 0, text: "500hz",
- frequency: 500,
- method_to_call: :play_sine_wave),
- ]
- end
-
- def sine_wave_note_buttons args
- [
- (button args,
- row: 1.5, col: 2, text: "Sine C4",
- note: :c, octave: 4, type: :sine, method_to_call: :play_note),
- (button args,
- row: 2.5, col: 2, text: "Sine D4",
- note: :d, octave: 4, type: :sine, method_to_call: :play_note),
- (button args,
- row: 3.5, col: 2, text: "Sine E4",
- note: :e, octave: 4, type: :sine, method_to_call: :play_note),
- (button args,
- row: 4.5, col: 2, text: "Sine F4",
- note: :f, octave: 4, type: :sine, method_to_call: :play_note),
- (button args,
- row: 5.5, col: 2, text: "Sine G4",
- note: :g, octave: 4, type: :sine, method_to_call: :play_note),
- (button args,
- row: 6.5, col: 2, text: "Sine A5",
- note: :a, octave: 5, type: :sine, method_to_call: :play_note),
- (button args,
- row: 7.5, col: 2, text: "Sine B5",
- note: :b, octave: 5, type: :sine, method_to_call: :play_note),
- (button args,
- row: 8.5, col: 2, text: "Sine C5",
- note: :c, octave: 5, type: :sine, method_to_call: :play_note),
- ]
- end
-
- def square_wave_note_buttons args
- [
- (button args,
- row: 1.5, col: 6, text: "Square C4",
- note: :c, octave: 4, type: :square, method_to_call: :play_note),
- (button args,
- row: 2.5, col: 6, text: "Square D4",
- note: :d, octave: 4, type: :square, method_to_call: :play_note),
- (button args,
- row: 3.5, col: 6, text: "Square E4",
- note: :e, octave: 4, type: :square, method_to_call: :play_note),
- (button args,
- row: 4.5, col: 6, text: "Square F4",
- note: :f, octave: 4, type: :square, method_to_call: :play_note),
- (button args,
- row: 5.5, col: 6, text: "Square G4",
- note: :g, octave: 4, type: :square, method_to_call: :play_note),
- (button args,
- row: 6.5, col: 6, text: "Square A5",
- note: :a, octave: 5, type: :square, method_to_call: :play_note),
- (button args,
- row: 7.5, col: 6, text: "Square B5",
- note: :b, octave: 5, type: :square, method_to_call: :play_note),
- (button args,
- row: 8.5, col: 6, text: "Square C5",
- note: :c, octave: 5, type: :square, method_to_call: :play_note),
- ]
- end
- def saw_tooth_wave_note_buttons args
- [
- (button args,
- row: 1.5, col: 8, text: "Saw C4",
- note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note),
- (button args,
- row: 2.5, col: 8, text: "Saw D4",
- note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note),
- (button args,
- row: 3.5, col: 8, text: "Saw E4",
- note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note),
- (button args,
- row: 4.5, col: 8, text: "Saw F4",
- note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note),
- (button args,
- row: 5.5, col: 8, text: "Saw G4",
- note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note),
- (button args,
- row: 6.5, col: 8, text: "Saw A5",
- note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note),
- (button args,
- row: 7.5, col: 8, text: "Saw B5",
- note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note),
- (button args,
- row: 8.5, col: 8, text: "Saw C5",
- note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note),
- ]
- end
-
- def triangle_wave_note_buttons args
- [
- (button args,
- row: 1.5, col: 10, text: "Triangle C4",
- note: :c, octave: 4, type: :triangle, method_to_call: :play_note),
- (button args,
- row: 2.5, col: 10, text: "Triangle D4",
- note: :d, octave: 4, type: :triangle, method_to_call: :play_note),
- (button args,
- row: 3.5, col: 10, text: "Triangle E4",
- note: :e, octave: 4, type: :triangle, method_to_call: :play_note),
- (button args,
- row: 4.5, col: 10, text: "Triangle F4",
- note: :f, octave: 4, type: :triangle, method_to_call: :play_note),
- (button args,
- row: 5.5, col: 10, text: "Triangle G4",
- note: :g, octave: 4, type: :triangle, method_to_call: :play_note),
- (button args,
- row: 6.5, col: 10, text: "Triangle A5",
- note: :a, octave: 5, type: :triangle, method_to_call: :play_note),
- (button args,
- row: 7.5, col: 10, text: "Triangle B5",
- note: :b, octave: 5, type: :triangle, method_to_call: :play_note),
- (button args,
- row: 8.5, col: 10, text: "Triangle C5",
- note: :c, octave: 5, type: :triangle, method_to_call: :play_note),
- ]
- end
-
- def bell_buttons args
- [
- (button args,
- row: 1.5, col: 4, text: "Bell C4",
- note: :c, octave: 4, type: :bell, method_to_call: :play_note),
- (button args,
- row: 2.5, col: 4, text: "Bell D4",
- note: :d, octave: 4, type: :bell, method_to_call: :play_note),
- (button args,
- row: 3.5, col: 4, text: "Bell E4",
- note: :e, octave: 4, type: :bell, method_to_call: :play_note),
- (button args,
- row: 4.5, col: 4, text: "Bell F4",
- note: :f, octave: 4, type: :bell, method_to_call: :play_note),
- (button args,
- row: 5.5, col: 4, text: "Bell G4",
- note: :g, octave: 4, type: :bell, method_to_call: :play_note),
- (button args,
- row: 6.5, col: 4, text: "Bell A5",
- note: :a, octave: 5, type: :bell, method_to_call: :play_note),
- (button args,
- row: 7.5, col: 4, text: "Bell B5",
- note: :b, octave: 5, type: :bell, method_to_call: :play_note),
- (button args,
- row: 8.5, col: 4, text: "Bell C5",
- note: :c, octave: 5, type: :bell, method_to_call: :play_note),
- ]
- end
-end
-
-begin # region: wave generation
- begin # sine wave
- def defaults_sine_wave_for
- { frequency: 440, sample_rate: 48000 }
- end
-
- def sine_wave_for opts = {}
- opts = defaults_sine_wave_for.merge opts
- frequency = opts[:frequency]
- sample_rate = opts[:sample_rate]
- period_size = (sample_rate.fdiv frequency).ceil
- period_size.map_with_index do |i|
- Math::sin((2.0 * Math::PI) / (sample_rate.to_f / frequency.to_f) * i)
- end.to_a
- end
-
- def defaults_queue_sine_wave
- { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
- end
-
- def queue_sine_wave args, opts = {}
- opts = defaults_queue_sine_wave.merge opts
- frequency = opts[:frequency]
- sample_rate = 48000
-
- sine_wave = sine_wave_for frequency: frequency, sample_rate: sample_rate
- args.state.sine_waves[frequency] ||= sine_wave_for frequency: frequency, sample_rate: sample_rate
-
- proc = lambda do
- generate_audio_data args.state.sine_waves[frequency], sample_rate
- end
-
- audio_state = new_audio_state args, opts
- audio_state[:input] = [1, sample_rate, proc]
- queue_audio args, audio_state: audio_state, wave: sine_wave
- end
- end
-
- begin # region: square wave
- def defaults_square_wave_for
- { frequency: 440, sample_rate: 48000 }
- end
-
- def square_wave_for opts = {}
- opts = defaults_square_wave_for.merge opts
- sine_wave = sine_wave_for opts
- sine_wave.map do |v|
- if v >= 0
- 1.0
- else
- -1.0
- end
- end.to_a
- end
-
- def defaults_queue_square_wave
- { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
- end
-
- def queue_square_wave args, opts = {}
- opts = defaults_queue_square_wave.merge opts
- frequency = opts[:frequency]
- sample_rate = 48000
-
- square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate
- args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate
-
- proc = lambda do
- generate_audio_data args.state.square_waves[frequency], sample_rate
- end
-
- audio_state = new_audio_state args, opts
- audio_state[:input] = [1, sample_rate, proc]
- queue_audio args, audio_state: audio_state, wave: square_wave
- end
- end
-
- begin # region: saw tooth wave
- def defaults_saw_tooth_wave_for
- { frequency: 440, sample_rate: 48000 }
- end
-
- def saw_tooth_wave_for opts = {}
- opts = defaults_saw_tooth_wave_for.merge opts
- sine_wave = sine_wave_for opts
- period_size = sine_wave.length
- sine_wave.map_with_index do |v, i|
- (((i % period_size).fdiv period_size) * 2) - 1
- end
- end
-
- def defaults_queue_saw_tooth_wave
- { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
- end
-
- def queue_saw_tooth_wave args, opts = {}
- opts = defaults_queue_saw_tooth_wave.merge opts
- frequency = opts[:frequency]
- sample_rate = 48000
-
- saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
- args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
-
- proc = lambda do
- generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate
- end
-
- audio_state = new_audio_state args, opts
- audio_state[:input] = [1, sample_rate, proc]
- queue_audio args, audio_state: audio_state, wave: saw_tooth_wave
- end
- end
-
- begin # region: triangle wave
- def defaults_triangle_wave_for
- { frequency: 440, sample_rate: 48000 }
- end
-
- def triangle_wave_for opts = {}
- opts = defaults_saw_tooth_wave_for.merge opts
- sine_wave = sine_wave_for opts
- period_size = sine_wave.length
- sine_wave.map_with_index do |v, i|
- ratio = (i.fdiv period_size)
- if ratio <= 0.5
- (ratio * 4) - 1
- else
- ratio -= 0.5
- 1 - (ratio * 4)
- end
- end
- end
-
- def defaults_queue_triangle_wave
- { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
- end
-
- def queue_triangle_wave args, opts = {}
- opts = defaults_queue_triangle_wave.merge opts
- frequency = opts[:frequency]
- sample_rate = 48000
-
- triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate
- args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate
-
- proc = lambda do
- generate_audio_data args.state.triangle_waves[frequency], sample_rate
- end
-
- audio_state = new_audio_state args, opts
- audio_state[:input] = [1, sample_rate, proc]
- queue_audio args, audio_state: audio_state, wave: triangle_wave
- end
- end
-
- begin # region: bell
- def defaults_queue_bell
- { frequency: 440, duration: 1.seconds, queue_in: 0 }
- end
-
- def queue_bell args, opts = {}
- (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b }
- end
-
- def bell_harmonics
- [
- { frequency_ratio: 0.5, duration_ratio: 1.00 },
- { frequency_ratio: 1.0, duration_ratio: 0.80 },
- { frequency_ratio: 2.0, duration_ratio: 0.60 },
- { frequency_ratio: 3.0, duration_ratio: 0.40 },
- { frequency_ratio: 4.2, duration_ratio: 0.25 },
- { frequency_ratio: 5.4, duration_ratio: 0.20 },
- { frequency_ratio: 6.8, duration_ratio: 0.15 }
- ]
- end
-
- def defaults_bell_to_sine_waves
- { frequency: 440, duration: 1.seconds, queue_in: 0 }
- end
-
- def bell_to_sine_waves opts = {}
- opts = defaults_bell_to_sine_waves.merge opts
- bell_harmonics.map do |b|
- {
- frequency: opts[:frequency] * b[:frequency_ratio],
- duration: opts[:duration] * b[:duration_ratio],
- queue_in: opts[:queue_in],
- gain: (1.fdiv bell_harmonics.length),
- fade_out: true
- }
- end
- end
- end
-
- begin # audio entity construction
- def generate_audio_data sine_wave, sample_rate
- sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil
- copy_count = (sample_size.fdiv sine_wave.length).ceil
- sine_wave * copy_count
- end
-
- def defaults_new_audio_state
- { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
- end
-
- def new_audio_state args, opts = {}
- opts = defaults_new_audio_state.merge opts
- decay_rate = 0
- decay_rate = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out]
- frequency = opts[:frequency]
- sample_rate = 48000
-
- {
- id: (new_id! args),
- frequency: frequency,
- sample_rate: 48000,
- stop_at: args.tick_count + opts[:queue_in] + opts[:duration],
- gain: opts[:gain].to_f,
- queue_at: args.state.tick_count + opts[:queue_in],
- decay_rate: decay_rate,
- pitch: 1.0,
- looping: true,
- paused: false
- }
- end
-
- def queue_audio args, opts = {}
- graph_wave args, opts[:wave], opts[:audio_state][:frequency]
- args.state.audio_queue << opts[:audio_state]
- end
-
- def new_id! args
- args.state.audio_id ||= 0
- args.state.audio_id += 1
- end
-
- def graph_wave args, wave, frequency
- if args.state.tick_count != args.state.graphed_at
- args.outputs.static_lines.clear
- args.outputs.static_sprites.clear
- end
-
- wave = wave
-
- r, g, b = frequency.to_i % 85,
- frequency.to_i % 170,
- frequency.to_i % 255
-
- starting_rect = args.layout.rect(row: 5, col: 13)
- x_scale = 10
- y_scale = 100
- max_points = 25
-
- points = wave
- if wave.length > max_points
- resolution = wave.length.idiv max_points
- points = wave.find_all.with_index { |y, i| (i % resolution == 0) }
- end
-
- args.outputs.static_lines << points.map_with_index do |y, x|
- next_y = points[x + 1]
-
- if next_y
- {
- x: starting_rect.x + (x * x_scale),
- y: starting_rect.y + starting_rect.h.half + y_scale * y,
- x2: starting_rect.x + ((x + 1) * x_scale),
- y2: starting_rect.y + starting_rect.h.half + y_scale * next_y,
- r: r,
- g: g,
- b: b
- }
- end
- end
-
- args.outputs.static_sprites << points.map_with_index do |y, x|
- {
- x: (starting_rect.x + (x * x_scale)) - 2,
- y: (starting_rect.y + starting_rect.h.half + y_scale * y) - 2,
- w: 4,
- h: 4,
- path: 'sprites/square-white.png',
- r: r,
- g: g,
- b: b
- }
- end
-
- args.state.graphed_at = args.state.tick_count
- end
- end
-
- begin # region: musical note mapping
- def defaults_frequency_for
- { note: :a, octave: 5, sharp: false, flat: false }
- end
-
- def frequency_for opts = {}
- opts = defaults_frequency_for.merge opts
- octave_offset_multiplier = opts[:octave] - 5
- note = note_frequencies_octave_5[opts[:note]]
- if octave_offset_multiplier < 0
- note = note * 1 / (octave_offset_multiplier.abs + 1)
- elsif octave_offset_multiplier > 0
- note = note * (octave_offset_multiplier.abs + 1) / 1
- end
- note
- end
-
- def note_frequencies_octave_5
- {
- a: 440.0,
- a_sharp: 466.16, b_flat: 466.16,
- b: 493.88,
- c: 523.25,
- c_sharp: 554.37, d_flat: 587.33,
- d: 587.33,
- d_sharp: 622.25, e_flat: 659.25,
- e: 659.25,
- f: 698.25,
- f_sharp: 739.99, g_flat: 739.99,
- g: 783.99,
- g_sharp: 830.61, a_flat: 830.61
- }
- end
- end
-end
-
-$gtk.reset
diff --git a/samples/01_rendering_basics/07_sound_synthesis/license-for-sample.txt b/samples/01_rendering_basics/07_sound_synthesis/license-for-sample.txt
deleted file mode 100644
index 100dcec..0000000
--- a/samples/01_rendering_basics/07_sound_synthesis/license-for-sample.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Copyright 2019 DragonRuby LLC
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/samples/01_rendering_basics/07_sound_synthesis/metadata/game_metadata.txt b/samples/01_rendering_basics/07_sound_synthesis/metadata/game_metadata.txt
deleted file mode 100644
index 16cef1d..0000000
--- a/samples/01_rendering_basics/07_sound_synthesis/metadata/game_metadata.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-devid=amirrajan
-devtitle=Amir Rajan
-gameid=hello-world
-gametitle=Hello World
-version=1.0
-icon=metadata/icon.png
diff --git a/samples/01_rendering_basics/07_sound_synthesis/metadata/icon.png b/samples/01_rendering_basics/07_sound_synthesis/metadata/icon.png
deleted file mode 100644
index e20e8c2..0000000
--- a/samples/01_rendering_basics/07_sound_synthesis/metadata/icon.png
+++ /dev/null
Binary files differ
diff --git a/samples/01_rendering_basics/07_sound_synthesis/sprites/square-black.png b/samples/01_rendering_basics/07_sound_synthesis/sprites/square-black.png
deleted file mode 100644
index cea7bd7..0000000
--- a/samples/01_rendering_basics/07_sound_synthesis/sprites/square-black.png
+++ /dev/null
Binary files differ
diff --git a/samples/01_rendering_basics/07_sound_synthesis/sprites/square-white.png b/samples/01_rendering_basics/07_sound_synthesis/sprites/square-white.png
deleted file mode 100644
index 378c565..0000000
--- a/samples/01_rendering_basics/07_sound_synthesis/sprites/square-white.png
+++ /dev/null
Binary files differ