Skip to content

Commit

Permalink
version 2.0.2
Browse files Browse the repository at this point in the history
add folder precedence in file explorer setting, fix ramona visualizer, other teeny tiny fixes
  • Loading branch information
Nanobot567 committed Aug 15, 2024
1 parent 5d60d53 commit cec21e0
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 15 deletions.
5 changes: 3 additions & 2 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ In the system menu, you can also access and change CS-16 settings, such as dark
- `general/`
- `author` (text value, default anonymous)
- `output` (audio output. can be auto, speaker, headset, or speaker and headset)
- `crank speed`
- `crank speed` (crank sensitivity)
- `folders > files` (folders should precede files in the file explorer)
- `credits`
- `behavior/`
- `play on load` (play pattern immediately on song load)
Expand Down Expand Up @@ -227,4 +228,4 @@ All of these are things you can do to improve CS-16's performance and reduce fra

I have a few custom visualizers in this repository under `visualizers` (and maybe you'll find another one on the internet somewhere??? idk haha). To import these into CS-16, check out the visualizer `building / importing` section in the [DEV document](DEV.md).

> note: by default, imported visualizers are disabled. head to `settings / ui / visualizers` to enable them.
> note: by default, imported visualizers are disabled. head to `settings / ui / visualizers` to enable them.
4 changes: 2 additions & 2 deletions src/pdxinfo
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name=CS-16
author=nanobot567
description=cranky synth 16: a 16-track synthesizer/sampler for playdate.
bundleID=com.nano.cs16
version=2.0
buildNumber=4587
version=2.0.2
buildNumber=4624
imagePath=SystemAssets/
3 changes: 2 additions & 1 deletion src/setup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ settings = {
["screenAnimation"] = true,
["logscreens"] = true,
["fxvfx"] = false,
["crankDockedScreen"] = "pattern"
["crankDockedScreen"] = "pattern",
["foldersPrecedeFiles"] = true
}
settings = loadSettings()
saveSettings()
Expand Down
14 changes: 11 additions & 3 deletions src/ui/screens/filepicker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ function filePicker.open(callback, mode)
filePicker.oldUpdate = pd.update
pd.update = filePicker.update

filePickList:set(filePicker.modifyDirContents(pd.file.listFiles(currentPath)))
filePickList:setSelectedRow(1)
filePickList:scrollToRow(1)
filePicker.updateFiles()
end

function filePicker.update(force)
Expand Down Expand Up @@ -262,6 +260,16 @@ function filePicker.modifyDirContents(val)
val[i] = string.normalize(val[i])
end

if settings["foldersPrecedeFiles"] then
local tempVal = table.shallowcopy(val)

for i = #tempVal, 1, -1 do
if string.sub(tempVal[i], #tempVal[i] - 5) ~= "(song)" then
table.insert(val, 1, table.remove(val, table.indexOfElement(val, tempVal[i])))
end
end
end

if currentPath ~= "/" then
table.insert(val, 1, "*Ā*")
elseif filePicker.mode ~= "song" then
Expand Down
15 changes: 9 additions & 6 deletions src/ui/screens/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function settingsScreen.rightButtonDown()
settingsScreen.updateOutputs()
elseif row == 4 and settingsScreen.subMenu == "general/" then
settings["cranksens"] = table.cycle(crankSensList, settings["cranksens"])
elseif row == 6 and settingsScreen.subMenu == "behavior/" then
elseif row == 5 and settingsScreen.subMenu == "behavior/" then
settings["crankDockedScreen"] = table.cycle(crankDockList, settings["crankDockedScreen"])
end
settingsScreen.updateSettings()
Expand Down Expand Up @@ -188,7 +188,7 @@ function settingsScreen.AButtonDown()
elseif row == 10 then
if settings["50fps"] == false then
messageBox.open(
"\n\nwarning!\n\nrunning cs-16 at 50fps will reduce your battery life, but improve performance.\n\nare you sure you want to enable this?\n\na = yes, b = no",
"warning!\n\nrunning cs-16 at 50fps will reduce your battery life, but improve performance.\n\nare you sure you want to enable this?\n\na = yes, b = no",
function(ans)
if ans == "yes" then
settings["50fps"] = not settings["50fps"]
Expand Down Expand Up @@ -219,8 +219,6 @@ function settingsScreen.AButtonDown()
elseif row == 4 then
settings["stopontempo"] = not settings["stopontempo"]
elseif row == 5 then
settings["savewavs"] = not settings["savewavs"]
elseif row == 6 then
settings["crankDockedScreen"] = table.cycle(crankDockList, settings["crankDockedScreen"])
end
elseif settingsScreen.subMenu == "recording/" then
Expand Down Expand Up @@ -272,13 +270,17 @@ function settingsScreen.AButtonDown()
elseif row == 4 then
settings["cranksens"] = table.cycle(crankSensList, settings["cranksens"])
elseif row == 5 then
settings["foldersPrecedeFiles"] = not settings["foldersPrecedeFiles"]
elseif row == 6 then
creditsScreen.open()
end
elseif settingsScreen.subMenu == "sampling/" then
if row == 2 then
settings["sample16bit"] = not settings["sample16bit"]
elseif row == 3 then
settings["saveWaveforms"] = not settings["saveWaveforms"]
elseif row == 4 then
settings["savewavs"] = not settings["savewavs"]
end
end
end
Expand Down Expand Up @@ -306,6 +308,7 @@ function settingsScreen.updateSettings()
"author: " .. settings["author"],
"output: " .. outputText,
"crank speed: " .. settings["cranksens"],
"folders > files: " .. tostring(settings["foldersPrecedeFiles"]),
"credits..."
})
elseif settingsScreen.subMenu == "behavior/" then
Expand All @@ -322,7 +325,6 @@ function settingsScreen.updateSettings()
"play on load: " .. tostring(settings["playonload"]),
"stop if sampling: " .. tostring(settings["stoponsample"]),
"tempo edit stop: " .. tostring(settings["stopontempo"]),
"save .wav samples: " .. tostring(settings["savewavs"]),
"crank dock screen: " .. tostring(screen)
})
elseif settingsScreen.subMenu == "recording/" then
Expand All @@ -344,7 +346,8 @@ function settingsScreen.updateSettings()
settingsList:set({
"*Ā*",
"sample format: " .. format,
"save waveforms: " .. tostring(settings["saveWaveforms"])
"save waveforms: " .. tostring(settings["saveWaveforms"]),
"save .wav samples: " .. tostring(settings["savewavs"])
})
elseif settingsScreen.subMenu == "ui/" then
settingsList:set({
Expand Down
5 changes: 4 additions & 1 deletion visualizers/ramona/ramona.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ local function ramonaUpdate(data)

if data.settings["dark"] then
gfx.setColor(gfx.kColorBlack)
gfx.fillRect(0, drawHeight, ramonaWidth, ramonaHeight)
else
gfx.setColor(gfx.kColorWhite)
end

gfx.fillRect(0, drawHeight, ramonaWidth, ramonaHeight)

gfx.setImageDrawMode(gfx.kDrawModeNXOR)
if animateCheck1(data) then
ramona_closed2:draw(0, drawHeight)
Expand Down

0 comments on commit cec21e0

Please sign in to comment.