Open comments for this post
I have mostly finished the week organizer in c++, but I am not as happy with it as I thought I’d be. There are some small problems that could be solved manually each time, but that’s not how I want it to work. I want it fully automated. From the last update I have only added a few things to make it run smoother and fix some small mistakes like, like adding a memory for each day, so one person doesn’t show up two times in a day.
I think I should rework this design a bit and I want to use a matrix instead of a string, which I don’t know why I didn’t use from the beginning, like it’s so much better for this.
I’ll keep on working on this and improving it and I’ll post soon… :>
Open comments for this post
After working around eight and a half hours on the c++ script for this sorter, how I call it, I’ve finally made the platform from which I’ll build everything else.
How it works? Well, basically, you input the path to your .txt file containing all the info you want to input, the info being in the form of a lot of users, each user having his for lines, first: being the name, second: time of day, third: type of training and fourth: some exceptions that may exist for the said user.
Next, the script reads the file and creates a list with all the users and their info. After that it creates a long string that contains all the users, sorted into days of the week and times of days. It calculates it so it uses the least hours of day per week, and so that everyone has the same amount of appointments as it says in the file.
For good measure, I have a function to count how many times each user appears in the string, so I know if there is an error.
That’s all for now (the segmentation errors took a lot of time…), and I’ll keep working and posting about this project! :D
Open comments for this post
From the last devlog, I have been working on the GUI of the synthesizer. For now it looks pretty promising and I lile how it is going. I have made the synthesizer work and now you click on the notes and the sound lasts two seconds.
The high pitched sounds don’t sound like the piano though…but I’m not sure how to work that out yet.
What was the hard part from the last update wasd making the buttons change colour once clicked. Since they are not part of any class or struct, I have to draw them again in different colour once they are clicked and again in the original colour two seconds later. For that I use a matrix which serves as a memory, which works fine for now, which holds the time when the button was clicked and its position so it can be drawn again.
Open comments for this post
Currently I have imported the .mp3 file of the C major note onto python and have read it’s contents. And here is the plot of the sound itself.
One part of the code currently reads from your terminal which note you want to play, for example “A4”, and it scales the C major note to that pitch and plays it. After that there is a low-pass filter to clear the frequencies over 4500Hz, mainly to make the notes of higher octaves sound cleaner and like piano notes and not banjo.
I have started to copy the final products from a jupyter notebook to a python file because I want to create a GUI so the user can actually click the note to play, like a little piano.