You are browsing as a guest. Sign up (or log in) to start making projects!

Synthesizer

  • 4 Devlogs
  • 12 Total hours

The idea behind this is project is to create a virtual synthesizer by having an .wav of a single note, in this case C Major, and with it, by scaling the pitch, creating all the other notes.

Open comments for this post

2h 0m 2s logged

So, in the last week I’ve been trying to make this synth into and executable binary, but python being python made problems with the libraries such as librosa, which I can’t replace because there aren’t any other suitable libraries like that that work for me in this case. I’ve been breaking my back with libraries like nuitka and pyinstaller which had problems of their own (pyinstaller not wanting to work because of flexiblas and nuitk because of librosa). But I finally think I did the job and It’s available on the itch.io page of the game.

0
0
4
Ship #1 Pending review

I made a simple python and pygame GUI of a synthesizer. What is special about this is that it only uses of note, that is C major, to create all the other notes for the synthesizer. It uses librosas pitch_shift function to create all the other notes needed. All of this came from a single project of creating a code for transforming one note into another. I liked it a lot so I decided to build a GUI for it and here we are.

Throughout the project, there weren’t many problems, since it isn’t that complicted, but there still were a few. When I first tried to make the notes change colour when you clicked them, it was really challenging to create a system so they would do it in a set amount of time. Then I came to the idea of using some kind of memory for the notes and empty it in a set amount of time. So I made it like this:
-once you click a note it changes colour;
-its position and time when it was clicked is added to the memory;
-with every frame, the game checks if the time that was recoreded in the memory was 3 or more seconds ago;
-after it sees that it was, it changes back the colour of the note, and empties the note from the memory.
I am really proud of how I made a solution for that problem, because I really like using matrices and arrays for such solutions.
Except that, I tried making the sound change pitch different instead of with librosas pitch_shift funtion. I wanted to create a funtion which will utilise the FFT and change the frequency that way. That was really hard. Most of the time spent in the last devpost were me trying to do it. I just didn’t realise how it should me done, but then I tested it on a random sine signal I created using numpy and once I did it with that simple signal I tried it with mine signal. Some key problems I had to solve was that:
-I had to change my audio array froma multidimensional to a onedimensional array, since the fft worked with those;
-I had to move items to a fractional place, which used some special python and mathematical function.
Other than those, there weren’t any significant problems I found.

But I am really proud of myself on this project for doing more than just creating a GUI. I am proud I used signal proccesiong and mathematical functions to manipulate the audio waves inputted. What’s fun is that you can input any wave file into the program and it will use it, so you can basically input anything you want to use for your synth.

  • 3 devlogs
  • 10h
Try project → See source code →
Open comments for this post

4h 56m 35s logged

I’m finally done with the idea of this synthesizer. From the last update I have tried to implement a different approach to the pitch change. I have tried, instead of the librosa pitch_shift, to use the sound made using a FFT. That ended up not sounding better, even though I though it would.
I basically just turned my audio info into a complex array using a FFT, where I mover the frequency bins higher or lower depending on if the sound should be lower or higher. There I also calculate how much the sound should be moved based on how many semitones you want.
In the end, the full project consists of a notebook (where you can see the FFT) where there are some tests with the audio. There are also the input audio: C_Major_Piano and the output audio(Only used in testing): Output_Note. Other than that, there are two GUIs, where on one you play with the C Major note and change it’s pitch and on the other you just play the frequency of the wanted note.

0
0
3
Open comments for this post

3h 32m 19s logged

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.

0
0
4
Open comments for this post

1h 11m 19s logged

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.

0
0
3

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…