Code-It-Yourself! Sound Synthesizer #1 - Basic Noises
Why Stack Overflow recommends it
Stack Overflow users link it when they are following the tutorial's C++ synth code or trying to build their own software synthesizer, and they often ask about errors in olcNoiseMaker.h.
Recommended by 0 people across 0 different months, 2019 to 2022.
What it is
A 29-minute programming tutorial by javidx9 (OneLoneCoder) that introduces sound synthesis in C++. It walks through generating basic waveforms such as sine waves using his olcNoiseMaker.h helper header, with the code published on GitHub and his blog.
What people said
Cites harveyf2801 · 2019-02 · Stack Overflow · on “Is there a way to create a simple user-interactive music synth in python”
I am currently trying to write a python synthesizer using either pygame.mixer or sounddevice to output the samples of a sine wave I've created in a numpy array . The duration of the wave has to be stated before creating the sine wave for example: sin(frequency * 2 * Pi * duration) therefore how do you play this sound at the duration of the users key-press. There aren't many articles on this for python when I read up that seem easy to understand so any help would be appreciated. Also if someone could explain or give an example of how the sounddevice.Stream or sounddevice.RawStream using python buffer objects works and if it would help in my situation that would be much appreciated. I have alr
Cites Nasko · 2019-08 · Stack Overflow · on “Unhandled exception thrown: write access violation. Error”
I got an error while debuging a program i wrote down from a tutorial online, it is a sound synth made by the one lone coder on youtube. I'm not sure what caused it or how to fix it. I disabled pre-compiled headers witch was the first problem i encounterd. I have tried searching online, leading me here to awnsers about code of others, i have tried going on multiple discord servers and asking there. No luck so far. Also this is just as a little exercise to help me get back on track. Main.cpp #include <iostream> #include "olcNoiseMaker.h" using namespace std; double MakeNoise(double dTime) { return 0.5 * sin(540.0 * 2 * 3.14159 * dTime); } int main() { wcout << "onelonecoder.com - synth part 1"
Cites valentin diverchy · 2020-06 · Stack Overflow · on “Writing a wave generator with SDL”
I've coded a simple sequencer in C with SDL 1.2 and SDL_mixer(to play .wav file). It works well and I want to add some audio synthesis to this program. I've look up the and I found this sinewave code using SDL2( [LINK] ) Here's how the sinewave is coded in the program: static void build_sine_table(int16_t *data, int wave_length) { /* Build sine table to use as oscillator: Generate a 16bit signed integer sinewave table with 1024 samples. This table will be used to produce the notes. Different notes will be created by stepping through the table at different intervals (phase). */ double phase_increment = (2.0f * pi) / (double)wave_length; double current_phase = 0; for(int i = 0; i < wave_length
Cites NicknEma · 2022-05 · Stack Overflow · on “Apparent method call after destruction in olcSoundMaker.h”
I couldn't come up with a better title, so feel free to give suggestions. I tried to follow OneLoneCoder's tutorial on sound synthesizing [this video] , I'm only halfway through the first video and my code already throws an exception. All I did was downloading his olcSoundMaker.h from his github [LINK] , and copying the entry point: #include <iostream> #include "olcNoiseMaker.h" double make_noise(double time) { return 0.5 * sin(440.0 * 2 * PI * time); } int main() { std::wcout << "Synthesizer, part 1" << std::endl; std::vector<std::wstring> devices = olcNoiseMaker<short>::Enumerate(); for (auto d : devices) { std::wcout << "Found output device: " << d << std::endl; } olcNoiseMaker<short> sound(de
Cites Ben Gardner · 2022-05 · Stack Overflow · on “How do I access Sound Hardware in Dev-C++?”
I was following a video tutorial for playing music in c++ : [this video] I am using Dev-C++ and I keep getting an error in the header file that "I'm not supposed to worry about" The line is: auto d = std::find(devices.begin(), devices.end(), sOutputDevice); And the error says: >92 68 C:\Users\benna\Documents\Starting Over\wave_music\olcNoiseMaker.h [Error] no matching function for call to 'find(std::vector<std::basic_string<wchar_t> >::iterator, std::vector<std::basic_string<wchar_t> >::iterator, std::wstring&)' I am a noob here and I really don't get it. My code is the same, and I've looked at linkers , project settings and other IDEs ( VS Code & Eclipse ) and nothing changes. (Especially the ot