Skip to content

Commit

Permalink
Remove wah effect; change color name bright -> text
Browse files Browse the repository at this point in the history
  • Loading branch information
jmiskovic committed Aug 3, 2019
1 parent 8024540 commit 3c03661
Show file tree
Hide file tree
Showing 14 changed files with 187 additions and 175 deletions.
2 changes: 1 addition & 1 deletion conf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function love.conf(t)
}
t.window.title = "Hexpress"
t.window.width, t.window.height = unpack(resolutions[5])
t.window.fullscreen = not true
t.window.fullscreen = true
t.window.resizable = true
t.window.vsync = false
end
5 changes: 0 additions & 5 deletions efx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ local defaults = {
type = 'ringmodulator',
frequency = 0.6
},
wah = {
volume = 0.0,
type = 'crybaby',
position = 0.5,
},
}

efx.activeEffects = {}
Expand Down
4 changes: 2 additions & 2 deletions hexpad.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function hexpad.new(displayNoteNames, noteOffset, radius)
surfaceC = {l.hsl(0.67, 0.08, 0.23)},
background = {l.hsl(0.68, 0.12, 0.31)},
highlight = {l.hsl(0.05, 0.72, 0.58)},
bright = {l.hsl(0.68, 0.12, 0.31)},
text = {l.hsl(0.68, 0.12, 0.31)},
},
}, hexpad)
-- would like to keep cell size constant across different devices, so have to
Expand Down Expand Up @@ -121,7 +121,7 @@ function hexpad:drawCell(q, r, s, touch)
love.graphics.setFont(self.font)
local h = self.font:getHeight()
local w = self.font:getWidth(text)
love.graphics.setColor(self.colorScheme.bright)
love.graphics.setColor(self.colorScheme.text)
love.graphics.print(text, -w / 2, -h / 2)
end
end
Expand Down
278 changes: 161 additions & 117 deletions media/instruments_explaned.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 2 additions & 7 deletions patches/analog/analog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local hexgrid = require('hexgrid')

local colorScheme = {
background = {l.hsl(0.21, 0.13, 0.28)},
bright = {l.hsl(0.19, 0.26, 0.45)},
text = {l.hsl(0.19, 0.26, 0.45)},
highlight = {l.hsl(0.04, 0.63, 0.50)},
surface = {l.hsl(0.20, 0.48, 0.63)},
surfaceC = {l.hsl(0.20, 0.30, 0.50)},
Expand All @@ -26,10 +26,6 @@ local filter = {

function patch.load()
patch.keyboard = hexpad.new(true)
if love.system.getOS() == 'Android' then
efx.setDryVolume(0.2)
efx.addEffect(efx.wah)
end
efx.reverb.decaytime = 2

patch.chorus_synth = sampler.new({
Expand Down Expand Up @@ -58,7 +54,7 @@ function patch.load()
patch.keyboard.colorScheme.highlight = colorScheme.highlight
patch.keyboard.colorScheme.surface = colorScheme.surface
patch.keyboard.colorScheme.surfaceC = colorScheme.surfaceC
patch.keyboard.colorScheme.bright = colorScheme.bright
patch.keyboard.colorScheme.text = colorScheme.text
love.graphics.setBackgroundColor(colorScheme.background)

function patch.keyboard:drawCell(q, r, s, touch)
Expand Down Expand Up @@ -107,7 +103,6 @@ function patch.process(s)
patch.chorus_synth.masterVolume = l.remap(s.tilt.lp[1], -0.1, 0.0, 0, 1, 'clamp')
patch.melanc_synth.masterVolume = l.remap(s.tilt.lp[1], 0.1, 0.0, 0, 1, 'clamp')
patch.sawsaw_synth.masterVolume = l.remap(s.tilt.lp[2], 0.7, 0.2, 1, 0, 'clamp')
efx.wah.position = l.remap(math.abs(s.tilt[2]), 0.7, 0, 0.3, 1.0, 'clamp')

patch.chorus_synth:processTouches(s.dt, s.touches)
patch.melanc_synth:processTouches(s.dt, s.touches)
Expand Down
6 changes: 0 additions & 6 deletions patches/broom/broom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ local colorScheme = {
function patch.load()
patch.keyboard = fretboard.new(false, {-29, -24, -19, -14, -9, -4, 1, 6})
patch.keyboard.fretWidth = 0.4
if efx.addEffect(efx.wah) then
efx.setDryVolume(0)
end

patch.tone = sampler.new({

{path='patches/broom/acbass_A21.ogg', note = notes.toIndex['A2']},
{path='patches/broom/acbass_B21.ogg', note = notes.toIndex['B2']},
{path='patches/broom/acbass_B31.ogg', note = notes.toIndex['B3']},
Expand Down Expand Up @@ -50,8 +46,6 @@ end

function patch.process(s)
patch.keyboard:interpret(s)
efx.wah.position = l.remap(s.tilt[1], -.2, .2, 0, 1, 'camp')
patch.tone.masterVolume = l.remap(efx.wah.position, 0, 0.5, .2, 1, 'clamp')
efx.reverb.decaytime = l.remap(s.tilt.lp[2], 0.7, -0.1, 0.2, 2.0, 'clamp')
-- sustain pedal
patch.tone.envelope.release = l.remap(s.tilt[2], .0, -0.2, 0.05, 5, 'clamp')
Expand Down
2 changes: 1 addition & 1 deletion patches/choir/choir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function patch.load()

patch.keyboard.colorScheme.background = {l.rgba(0x2d2734ff)}
patch.keyboard.colorScheme.highlight = {l.rgba(0xe86630ff)}
patch.keyboard.colorScheme.bright = {l.rgba(0xa7a2b8ff)}
patch.keyboard.colorScheme.text = {l.rgba(0xa7a2b8ff)}
patch.keyboard.colorScheme.surface = {l.hsl(0.62, 0.16, 0.49)}
patch.keyboard.colorScheme.surfaceC = {l.hsl(0.62, 0.10, 0.40)}
end
Expand Down
4 changes: 2 additions & 2 deletions patches/chromakey/chromakey.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local colorScheme = {
surface = {l.hsl(0.66, 0.25, 0.26)},
surfaceC = {l.hsl(0.66, 0.20, 0.23)},
knob = {l.hsl(0.67, 0.09, 0.15)},
bright = {l.hsl(0.66, 0.18, 0.38)},
text = {l.hsl(0.66, 0.18, 0.38)},
text = {l.hsl(0.24, 0.09, 0.72)},
shiny = {l.hsl(0.24, 0.09, 0.96, 0.5)},
noteColors = {
Expand Down Expand Up @@ -59,7 +59,7 @@ function patch.load()
patch.keyboard.colorScheme.highlight = colorScheme.highlight
patch.keyboard.colorScheme.surface = colorScheme.surface
patch.keyboard.colorScheme.surfaceC = colorScheme.surfaceC
patch.keyboard.colorScheme.bright = colorScheme.bright
patch.keyboard.colorScheme.text = colorScheme.text
love.graphics.setBackgroundColor(colorScheme.background)

patch.keyboard.drawCell = patch.drawCell
Expand Down
6 changes: 1 addition & 5 deletions patches/fretless/fretless.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ function patch.load()
local tapePath = 'patches/broom/seventies-pop-funk-groove.ogg'
patch.keyboard = fretboard.new(false, {-47, -42, -37, -32, -27, -22, -17, -12})
patch.keyboard.fretWidth = 0.4
if efx.addEffect(efx.wah) then
efx.setDryVolume(0)
end

patch.tone = sampler.new({
{path='patches/fretless/C1.ogg', note = notes.toIndex['C1']},
{path='patches/fretless/D#1.ogg', note = notes.toIndex['D#1']},
Expand All @@ -45,8 +43,6 @@ end

function patch.process(s)
patch.keyboard:interpret(s)
efx.wah.position = l.remap(s.tilt[1], -0.2, 0.2, 0.2, 1.0, 'clamp')
patch.tone.masterVolume = l.remap(efx.wah.position, 0, 0.5, .2, 1, 'clamp')
efx.reverb.decaytime = l.remap(s.tilt.lp[2], -.1, 2, 0.5, 2)
patch.tone:processTouches(s.dt, s.touches)
end
Expand Down
2 changes: 1 addition & 1 deletion patches/organ/organ.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function patch.load()
love.graphics.setBackgroundColor(colorScheme.background)
patch.keyboard.colorScheme.background = {l.rgba(0x000000ff)}
patch.keyboard.colorScheme.highlight = {l.rgba(0xd3660aff)}
patch.keyboard.colorScheme.bright = {l.rgba(0x3e3c23ff)}
patch.keyboard.colorScheme.text = {l.rgba(0x3e3c23ff)}
patch.keyboard.colorScheme.surface = {l.rgba(0x302e19ff)}
patch.keyboard.colorScheme.surfaceC = {l.rgba(0x2a2510ff)}

Expand Down
8 changes: 4 additions & 4 deletions patches/riders/riders.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ local colorScheme = {
surface = {l.hsl(0.66, 0.25, 0.26)},
surfaceC = {l.hsl(0.66, 0.20, 0.23)},
knob = {l.hsl(0.67, 0.09, 0.15)},
bright = {l.hsl(0.66, 0.18, 0.38)},
text = {l.hsl(0.24, 0.09, 0.72)},
text = {l.hsl(0.66, 0.18, 0.38)},
label = {l.hsl(0.24, 0.09, 0.72)},
shiny = {l.hsl(0.24, 0.09, 0.96, 0.5)},
}

Expand Down Expand Up @@ -62,7 +62,7 @@ function patch.load()
patch.keyboard.colorScheme.highlight = colorScheme.highlight
patch.keyboard.colorScheme.surface = colorScheme.surface
patch.keyboard.colorScheme.surfaceC = colorScheme.surfaceC
patch.keyboard.colorScheme.bright = colorScheme.bright
patch.keyboard.colorScheme.text = colorScheme.text
love.graphics.setBackgroundColor(colorScheme.background)
end

Expand Down Expand Up @@ -90,7 +90,7 @@ function patch.icon(time)
love.graphics.rectangle('fill', -1, -1, 2, 2)

love.graphics.translate(0, 0.4)
love.graphics.setColor(colorScheme.text)
love.graphics.setColor(colorScheme.label)
love.graphics.arc('fill', 0, -0.78, 0.18, -math.pi / 2 - math.pi / 5, -math.pi / 2 + math.pi / 5)
love.graphics.setColor(colorScheme.knob)
love.graphics.circle('fill', 0, 0, 0.8)
Expand Down
2 changes: 1 addition & 1 deletion patches/scat/scat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function patch.load()
})
patch.keyboard.colorScheme.background = {l.rgba(0x2d2734ff)}
patch.keyboard.colorScheme.highlight = {l.rgba(0xe86630ff)}
patch.keyboard.colorScheme.bright = {l.rgba(0xa7a2b8ff)}
patch.keyboard.colorScheme.text = {l.rgba(0xa7a2b8ff)}
patch.keyboard.colorScheme.surface = {l.hsl(0.62, 0.16, 0.49)}
patch.keyboard.colorScheme.surfaceC = {l.hsl(0.62, 0.10, 0.40)}
end
Expand Down
29 changes: 9 additions & 20 deletions patches/sustain-choir/sustain-choir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,11 @@ local hexpad = require('hexpad')
local hexgrid = require('hexgrid')

local colorScheme = {
wood = {l.color('#8c3c00')},
neck = {l.color('#302400')},
strings = {
{l.color('#a69b87')},
{l.color('#988c75')},
{l.color('#847965')},
},
hair = {l.color('#a39782')},
stick = {l.color('#5e2400')},

background = {l.rgba(0x262626ff)},
highlight = {l.hsl(0.66, 0.20, 0.23)},
surface = {l.rgba(0x444444ff)},
surfaceC = {l.rgba(0x353535ff)},
bright = {l.rgba(0x75ade699)},
background = {l.rgba(0x957037ff)},
highlight = {l.rgba(0xcd8e43ff)},
surface = {l.rgba(0xdfb558e5)},
surfaceC = {l.rgba(0xe3bd6bff)},
text = {l.rgba(0x846b43ff)},
}

function patch.load()
Expand All @@ -44,7 +34,7 @@ function patch.load()
patch.keyboard.colorScheme.highlight = colorScheme.highlight
patch.keyboard.colorScheme.surface = colorScheme.surface
patch.keyboard.colorScheme.surfaceC = colorScheme.surfaceC
patch.keyboard.colorScheme.bright = colorScheme.bright
patch.keyboard.colorScheme.text = colorScheme.text
love.graphics.setBackgroundColor(colorScheme.background)
end

Expand Down Expand Up @@ -107,16 +97,15 @@ function patch.draw(s)
end

function patch.icon(time)
-- TODO: meaningful icon
love.graphics.setColor(colorScheme.background)
love.graphics.setColor(colorScheme.text)
love.graphics.rectangle('fill', -1, -1, 2, 2)
local i = 0
love.graphics.rotate(time/5 + 0.2*math.sin(time))
for q, r in hexgrid.spiralIter(0, 0, 1) do
if i % 2 == 0 then
love.graphics.setColor(colorScheme.highlight)
love.graphics.setColor(colorScheme.surfaceC)
else
love.graphics.setColor(colorScheme.surface)
love.graphics.setColor(colorScheme.highlight)
end
love.graphics.push()
local x, y = hexgrid.hexToPixel(q, r)
Expand Down
5 changes: 2 additions & 3 deletions patches/sustain-strings/sustain-strings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ local colorScheme = {
highlight = {l.rgba(0x44617bff)},
surface = {l.rgba(0x444444ff)},
surfaceC = {l.rgba(0x353535ff)},
bright = {l.rgba(0x75ade699)},
text = {l.rgba(0x75ade699)},
}

function patch.load()
Expand All @@ -49,7 +49,7 @@ function patch.load()
patch.keyboard.colorScheme.highlight = colorScheme.highlight
patch.keyboard.colorScheme.surface = colorScheme.surface
patch.keyboard.colorScheme.surfaceC = colorScheme.surfaceC
patch.keyboard.colorScheme.bright = colorScheme.bright
patch.keyboard.colorScheme.text = colorScheme.text
love.graphics.setBackgroundColor(colorScheme.background)
end

Expand Down Expand Up @@ -112,7 +112,6 @@ function patch.draw(s)
end

function patch.icon(time)
-- TODO: meaningful icon
love.graphics.setColor(colorScheme.background)
love.graphics.rectangle('fill', -1, -1, 2, 2)
local i = 0
Expand Down

0 comments on commit 3c03661

Please sign in to comment.