Synthesizer :D
- 7 Devlogs
- 15 Total hours
synthesizer coded in java, will hopefully feature the typical settings like ADSR, filters :)
synthesizer coded in java, will hopefully feature the typical settings like ADSR, filters :)
i have the concept of a plan for a better looking gui. also, you can change the samplerate now (this took too much time). planning to add a keyboard display and keybinds that change based on the tuning, being able to change the tuning in the gui (i don’t have videos to show but with the simple change of a variable you can play cool microtonal stuff!!) more oscillators, and finally a little display of the shape of the env i guess? like the second attached image
ADSR is adjustable from the ui !! Also fixed the code throwing errors when you play a note again before the previous one is done fading out if the release is high. There are still some issues with the key events not registering when the main jframe is out of focus :(
you can now play notes live with your keyboard!! i also resolved an issue where the notes would be delayed because of bad coding
(the program now checks which notes to play at intervals based on the samplerate instead of just looping forever. i don’t know how i thought that would work but it’s fixed now!!)
sooo I may have mostly restructured ADSR since my last devlog, so now you can change the settings in the middle of a note being played. now there is a single function that takes in the time since the note was played or released and returns a volume based on the current ADSR settings, instead of the note storing the settings upon being pressed. I also found out concurrent hash maps are a thing, which will hopefully fix some of the issues I was expecting to have implementing live key pressing.
LOOK IT’S ADSR!! it’s still very janky (as you can see from the s.out that breaks the code if i delete it) but it mostly works!!! next up is allowing the user to edit the ADSR from the UI and the plentiful debugging that is sure to come with that.
not a lot of progress to be honest… but I got a surprising amount of stuff fixed just by messing around. I found out adding the value of each note lets you play chords (tho it probably breaks if the value goes over 127) and also fixed there being the crackling sound between notes. Also fixed some structural stuff and started on a UI that lets you adjust the sound of the synth.
Learned how to play tone with Java! And coded in saw and square waves which is pretty swag :) Implementing them was easier than I expected once I figured out how they worked, tho I did spend way too much time trying to learn how to find a wavelength
Here’s a video of the saw, I still need to fix it having the lil crunching sounds but ye