Synthesizer
-
That’s awesome. Well done!!
-
Good job !!!!
-
the link doesn't work for me :-(
-
hmm.. refreshed and it now does. It's brilliant!
-
Very cool
-
I am waiting for someone to make a bad apple demo with fuze
-
@ITzTravelInTime I am currently trying to add switches and settings to the top. Which means redrawing the keyboard each time. You can visually see fuze drawing each box. I'd say the entire keyboard takes a couple milliseconds to draw so I am unsure if something like bad Apple demo is possible at a decent speed. (It's no doubt machine coded)
I have made ui's on android using 2d shapes and it's the same way. I might have to use images and sprites instead. One more trick to try first.
-
@sys64738 Can't you draw the content on an offscreen bitmap first?
-
@Nisse5 I have no idea. Feel free to point me in the right direction so I can study how to do it though
-
you can do this very easily using
setdrawtarget
so create an image to store your keyboard
setdrawtarget(mynewimage)
draw your stuff
then setdrawtarget(framebuffer)then to draw your keyboard
drawimage(mynewimage) -
@MikeDX Hi Mike playing around with this. Got it working and it's rock solid now thanks. But the behaviour seems different than the help shows it.
Pseudo explanation but if I do as help implies it works
Setdrawtarget (imagename)
Box
Circle
TriangleIt draws the box to the image but circle and triangle directly to screen.
I'm using loops in my program to draw keys but essentially had to do it like this.
Setdrawtarget (imagename)
Box
Setdrawtarget (imagename)
Circle
Setdrawtarget (imagename)
Triangle -
I'm going to test this. setdrawtarget shouldn't change ever (maybe update?) unless called manually.
i use it a lot in pacman for the different layers, but admittedly I don't use 2d drawing primitives much
-
Seemed to be using update in my loop that was making it change target Mike.
Update on the project. Now have all the black keys working and a 2d array that holds all the note and modulation values. You can cycle through each parameter with the dpad and change the parameters. Will work on sequencer next.
-
Very nice. 👍 Great job.
-
@sys64738 ooh what's YOUR friend code?
-
@Ancientspark not sure yet, I will share the project and friend code when I finish it
-
@sys64738 Kitty didn't like that last part. Did you see it hitting itself? :P
-
@Discostew yeah he face Palmed. At least he let me program that day instead of standing on the switch.
Small update.
Making good progress today. Have the 16 sequencer buttons drawn. Playing just a test note each step as the sequencer plays and lights up each step. Also made the sequencer buttons selectable by touch.
Amazing how much better you get just by iterating.
I looked at the 60 or so lines of if statements that works out the keyboard press locations and went ugh. Did it in about 4 lines for the sequencer. So might have to redo the keyboard code soon.Next up is expanding the 2d array to hold 16 patches instead of 1 and getting the sequencer to play through it.
-
Awesome work!
-
Phew the 2d array has been expanded, and the sequencer is semi operational! I've modelled it after the sequencer in korgs monologue synth but have already added some things it can't do.
you select a sequencer step (when its red its currently selected) and press a note on the keyboard and records that note as well as every other setting like wavetype, modulator frequency into the corresponding column in the 2d array, so this means it can not only record a note in each step but an entirely different sound (this is how the sidchip on c64 did so much with only 3 voices) which is currently mostly working but I need to sort out a few niggles.
So when you select another step you will notice the last one you set is green, when the sequencer is playing it only plays the green blocks, the white blocks can be considered rests (though they can and do hold data and notes) you can toggle blocks on and off as you see fit, even while the sequencer is playing. This allows some progressive melodies in live performances.
Heres a video showing the basics of the sequencer
next up I need to work on a step recorder, so it just automatically fills in the notes to the sequencer blocks as you play, also need to fix some minor issues and niggles. Hopefully in the next video I'll show how it can play through 16 different patches.