ftsf / nimsynth

A modular synth and sequencer made with Nim
GNU General Public License v3.0
90 stars 7 forks source link

Make project compile again #12

Closed JTriggerFish closed 1 year ago

JTriggerFish commented 1 year ago

The project seemed to be based on an old version of nim, I've tried to upgrade to a more modern setup with using nimble instead of make, fixing the imports, a few explicit conversions between float and int, and a couple of issues with capturing references in closures.

There are some issues left however:

I'm quite interested in contributing further to this project, I hope this PR revives it a bit :)

JTriggerFish commented 1 year ago

Here is the test output when launching main.exe:

[Suite] util E:\Dev\nimsynth\src\util.nim(434, 24): Check failed: -5.0 mod 10.0 == 5.0 -5.0 mod 10.0 was -5.0 E:\Dev\nimsynth\src\util.nim(436, 24): Check failed: -1.0 mod 10.0 == 9.0 -1.0 mod 10.0 was -1.0 [FAILED] modSign [OK] invLerp E:\Dev\nimsynth\src\util.nim(444, 27): Check failed: angleDiff(TAU, 0) == 0 angleDiff(TAU, 0) was -1.748455531469517e-07 E:\Dev\nimsynth\src\util.nim(445, 28): Check failed: angleDiff(PI, -PI) == 0 angleDiff(PI, -PI) was -1.748455531469517e-07 E:\Dev\nimsynth\src\util.nim(446, 28): Check failed: angleDiff(-PI, PI) == 0 angleDiff(-PI, PI) was 1.748455531469517e-07 E:\Dev\nimsynth\src\util.nim(447, 32): Check failed: angleDiff(-PI / 2, PI / 2) == -PI angleDiff(-PI / 2, PI / 2) was -3.141592502593994 -PI was -3.141592653589793 E:\Dev\nimsynth\src\util.nim(448, 32): Check failed: angleDiff(PI / 2, -PI / 2) == -PI angleDiff(PI / 2, -PI / 2) was 3.141592502593994 -PI was -3.141592653589793 E:\Dev\nimsynth\src\util.nim(449, 42): Check failed: angleDiff(PI / 4, -PI / 4).round(10) == (PI / 2).round(10) angleDiff(PI / 4, -PI / 4).round(10) was -1.570796370506287 (PI / 2).round(10) was 1.5707963268 E:\Dev\nimsynth\src\util.nim(450, 30): Check failed: angleDiff(10 TAU, 0) == 0 angleDiff(10 TAU, 0) was 1.112567360905814e-06 [FAILED] angleDiff [OK] roundTo [OK] modDiff [OK] %%/ [OK] floatToTimeStr [OK] normal [OK] normal [OK] lineLineIntersection [OK] lineSegmentIntersection [OK] lineSegDistance [OK] ordinal

[Suite] noise 2136399744.0 1068199872.0 534099936.0 535485408.0 536178176.0 [OK] noise

[Suite] bitrate E:\Dev\nimsynth\src\machines\fx\bitcrush.nim(53, 33): Check failed: snapToBitDepth(0.0, 2) == 0.0 snapToBitDepth(0.0, 2) was 0.3333333730697632 [FAILED] snapToBitDepth

[Suite] gbsynth [OK] freq [OK] freq added game controller: -1: Keyboard: KEYBOARD loading font with 94 chars, width: 381 loaded font with 94/94 chars run initFuncCalled = false loaded spritesheet: spritesheet.png 128x128 tile:8x8 loading font E:\Dev\nimsynth\assets\font.png with 94 chars, width: 390 loaded font with 94/94 chars using SDL audio

heysokam commented 1 year ago

Thanks for this PR. Hoping that ftsf accepts it, and the project can be revived

ftsf commented 1 year ago

Thanks for all that! I actually have a mostly working updated version and external Nico, but I keep forgetting to push it up, so I've done that now. Sorry you had to waste your time with this, I suspect it'll heavily conflict with your work, but it compiles and runs now, though there are likely many little issues with machines that need fixing.

Unfortunately I'm very rarely working on this project anymore since I've been busy making music instead of coding.

JTriggerFish commented 1 year ago

Thanks for that ! Great, I will close this PR then. And yes I know what you mean about the eternal conflict between making music and making tools for music :)