Just a note here: While including the Maximilian library as you had shown in the video I got lots of error, the error was cause mainly because of a file "maxiSynths.cpp" inside the "libs" folder which is not at all required in the project since all the code is already inside "Maximilian.cpp" file. So if anyone else is having the problem please just delete the file and also it's references anywhere in the project. That should fix the problem. And thanks Joshua for all these awesome videos !!
I know i'm a bit late but if anyone notices that a note (that you 're not currently playing) gets cut off when you press another key its because in stopNote function we 're always clearing the current note, even if its still playing. So we should add a piece of code like this: env1.trigger = 0; if (allowTailOff) { if (!isPlayingButReleased()) { clearCurrentNote(); } } else { clearCurrentNote(); } inside the function, so that, when the note is no longer pressed, it checks if its actually still playing and if it is (and the allowTailOff condition allows it) we can keep hearing it.
Hey Joshua, really nice tutorials so far, can follow up your thoughts and its a lot of fun. I tried the env by myself and set the env1.setSustain to the level which gets the velocity. Then you dont need to multiply your env1.adsr with the level, cause its set by the sustain. Works with no problems, and now the Velocity is again in to the game. Hope for the next one with the GUI Action!!!! Cheers, Manuel
For those of you who get emscripten.h related errors and std::min related errors when trying to incorporate Maximilian library, my solutions are: 1. For the missing 'emscripten.h' in maximilian.embind.cpp, I just remove maximilian.embind.cpp from our project. This 'emscripten.h' relates to web / javascript stuffs according to some quick google search, and our synthesizer project seems do not need that support, so I just delete the whole cpp file. (And also all the functions useful for our project are already in maximilian.cpp and in the maximilian\libs folder, so I think it should be fine to remove maximilian.embind.cpp) 2. For the type cast error of std::min in line 1071 in maximilian.cpp and reference error in line 109 in maxiConvolve.cpp, the solution is given by one of the issues in the github repo of maximilian: github.com/micknoise/Maximilian/issues/88. I'm on Windows 10 and VS2015. Everything works fine so far after the fix. Feel free to leave a comment if you have any further question or advice. Thanks again for the tutorials, awesome!
You mentioned that in the renderNextBlock the loops you are using are what you are used to, but you mentioned also that you have seen other people do it some other way. Can you please link a few example code to those other methods that you have seen. I believe that there is a much better and efficient way of doing it, which will be more optimised and faster as well. I just wanna test out all the possibilities that could be there. Thanks again.
Can anyone explain why 05:53 line 55 is using startSample instead of sample? I tried to use sample and the sound will clip when I release the key, but I don't understand why this is happening since startSample and sample are the same number the whole time.
For anyone stuck, check out tutorial 19 to set up maximilian correctly. (a) use lowercase 'm' in #include 'maximilian.h' (b) Get rid of maxiSynth and maxiSynth.h in the lib folder. Get rid of any references to maxisynth.cpp/.h , I think there is just one in maximilian.h. Use ctrl+f to find the empty function. (c) You may need to go into plugin_client module and set up the VST3 to replace VST2. Mess around with it if previous steps don't solve the issue. (d) It's not covered in the video but only check midi input and the two audio outputs, no need for midi output.
Seems like a strange choice to me to constantly be setting those envelope constants in your render function. Is there a specific reason why they are put there? I might put them somewhere they only get called once to initialize the adsr envelope. Thanks for these tutorials! You rock!
If anyone is using the latest commit of Maximilian, change the default header path to current path + src. Hope this helps someone. Also, if you get errors in the example projects, you can remove the references as it's not used by these tutorials.
A little info: The Maxi library is quite big and messy now, and causes loads of errors in Windows if you just copy the root folder. You probably only need the 'lib' folder and the 'maximillian.h/.cpp' files. To add source files directly to the source folder on 'Producer' click 'Source' first and then click '+' And I suspect the plug-in host could probably save your wired up project, so you only need to do it once.
Hello! Many thanks for this tutorial! At time 16:47 (in SynthVoice::stopNote), you say "if we don't have anymore velocity". But at time 15:55 (in the documentation of the stopNote function), we can see that: "The velocity indicates how quickly the note was released - 0 is slowly, 1 is quickly." It seems it has nothing to do with the note being finished. I tried adding a "std::cout
I think something is broken with my MIDI input. When I set theWave = osc1.sinewave(440), I hear a sine wave at 440 Hz. But when I set theWave = osc1.sinewave(frequency), and I put it into Audio Plugin Host and press a key, I don't hear that key's pitch. I hear a bunch of random tones that have nothing to do with the key I pressed, and they don't even sound like a sine wave. They sound buzzy and weird. And then as soon as I try to route it through the envelope's ADSR, I get no output at all. What am I doing wrong???
Hey can you do a tutorial on how to make a stand alone instrument that takes midi input and plays samples, almost like a stand alone kontakt instrument that has separate sampled instruments and there proper chords spread out on each key ( C#, C , D#, etc. )???
I'm sure I was probably the only one with this problem but just in case, For people making VST3 plugins who get errors along the lines of: 'iid': redefinition; multiple initialization This is probably because the 3rd party SDK you've installed in a few tutorials previously is in conflict with the SDK that's now built into Jucer. The built in SDKs are for me in "JUCE\modules\juce_audio_processors\format_types\VST3_SDK". Just go to File\global paths and replace the VST3 path both there and in the Exporters VST3 SDK folder bit. Not sure if this was just a dumb mistake by me or not but if you are on the same boat, now you know :)
What about wavelet neural networks (like zynaptiq) sometime in the future tutorials? This is cool method of doing crazy things with a sound, e.g. morphing, denoising, spectral filtering, stretching, pitch-shifting, etc. Thanks!
Hey Joshua, Loving the videos. For some reason I'm getting an error next to every class in: maxiSynths.h The error is: Redefinition of 'maxiKick' Redefinition of 'maxiSnare' Redefinition of 'maxiHats' Redefinition of 'maxiSynth' etc... Do you have any idea why this is? Any help would be massively appreciated. Cheers, Lloyd
@@TheAudioProgrammer Thank you very much for the reply Joshua, I removed the functions from the maxiSynths.cpp file - I've got to the end of Juce Tutorial 23, and everything worked. I'm hoping there will not be any repercussions from deleting that code further down the line. I've really enjoyed the tutorials, and still have lots to get through. I'll do my best to not ask too many questions... :-) Thanks again, Lloyd
Thanks. I'm trying to get my UI components to map to the parameters in SynthVoice but i can't make it work. I can get them to co to PluginProcessor but can't seem to change that. Am I missing something simple?
This doesn't work for me. It compiles fine and everything but the oscillator is not making any sound whatsoever when I hook it up to the Audio Plugin Host. I'm using Visual Studio 2017.
@@Xavierrex3 Yeah, the standalone build doesn't work with the Plugin Host as far as I can tell. The way I've set it up is to right-click on VST3 in the project browser, go to Properties>Configuration Properties>Debugging and set Command to the Plugin Host exe. Right click on it again to set it as the Startup Project. In the Plugin Host itself you have to scan the folder of the VST3 file for it to be accessible.
I am getting 2 errors with Maximilian, first is that the file "emscripten.h" which is included in maximilian.embind.cpp is not found, secondly line 109 of maxiConvolve.cpp gives the error "Non-const lvalue reference to type 'std::vector' cannot bind to a temporary of type 'std::__1::__vector_base::value_type *' (aka 'float *')" - what's the fix for these issues? thanks for the tutorial!
@@TheAudioProgrammer hey thanks for the reply, hmm the type mismatch error was happening without me even doing anything, just as soon as i tried to build after including the library - i'll join the community anyway, thanks again!
@@JanithHarinda emscripten.h is for compiling code to webassembly, i assume you don't need to do that so you can simply remove maximilian.embind.cpp which relies on it to use maximilian with webassembly from your project and it will no longer be looking for that header. good luck!
Hi there! I was having difficulties including the 'maximilian.h' file in SynthVoice header, and even after removing the two 'MaxiSynth' files from the source folder nothing worked. I even tried downloading the project from your github , and deleting everything done after this tutorial so that I'd still be at the same point in the tutorial, but still getting errors. It starts with one fatal error: '1>..\VST Design\Maximilian-master\Maximilian-master\src\maximilian.embind.cpp(7,10): fatal error C1083: Cannot open include file: 'emscripten.h': No such file or directory' Obviously I searched the Maximilian folders I have, but I couldn't find the specified header file. I then get more errors in the maximilian.cpp, starting with: 'error C2672: 'std::min': no matching overloaded function found', then more errors related to 'min'. I am still not the most advanced c++ programmer out there my apologies for the lengthy question, hopefully someone can help me find the problems I need to fix:)
Hi Yahya, I encountered these problems today and here's how I fix them. 1. For the type cast error of std::min in line 1071 in maximilian.cpp and reference error in line 109 in maxiConvolve.cpp, the solution is given by one of the issues in the github repo of maximilian: github.com/micknoise/Maximilian/issues/88. 2. For the missing 'emscripten.h' in maximilian.embind.cpp, my solution is just remove maximilian.embind.cpp from our project. This 'emscripten.h' relates to web / javascript stuffs according to some quick google search, and our synthesizer project seems do not need that support, so I just delete the whole cpp file. I'm on Win10, VS2015 and my fix works well so far (Tutorial 23). If I made any mistakes or if you have any comment, please let me know :)
Yeah I don't know if we have the same problem, but when I play my vst3 in my DAW I get pretty horrifying sounds. Different keys play different sounds, but not what they should be, and it sounds like I'm running it through a distortion/glitch effect or something, and it is extremely loud. Anyway, definitely not not the nice tunes that his sounded like. And I can't figure out how to get the VST Host JUCE provided to test if it is just something in my DAW or what.... Let me know if you find anything.
Hi Thank for all these videos. I have some problems: in renderNextBlock, I have used local variable "sample" to add sample to outputBuffer and I have encountered some pops and clicks. what's the mistake that I have made?. the local variable "sample" and the variable "startSample" start with 0 and end with numSamples. But the result is different. click and pops while midi on(attack) and midi off(release). Thanks in advance. the code is: void renderNextBlock (AudioBuffer& outputBuffer, int startSample, int numSamples) { env1.setAttack(2000); env1.setDecay(500); env1.setSustain(0.8); env1.setRelease(2000); for(int sample = 0 ; sample
This line; "outputBuffer.addSample(channel, sample, theSound);" needs to be "outputBuffer.addSample(channel, startSample, theSound);" as it is coming into renderNextBlock, because that start position will vary!
@@DKDiveDudethanks for your reply, I missed to realize that outputBuffer can be an array in any size (even an circular buffer) that the audio engine uses.
I'm trying to do do it on my laptop...but apparently you can ONLY sign up from a mobile device...So then I did that and now the codes that are sent to my phone won't work on the laptop app...argh...
Just a note here: While including the Maximilian library as you had shown in the video I got lots of error, the error was cause mainly because of a file "maxiSynths.cpp" inside the "libs" folder which is not at all required in the project since all the code is already inside "Maximilian.cpp" file. So if anyone else is having the problem please just delete the file and also it's references anywhere in the project. That should fix the problem.
And thanks Joshua for all these awesome videos !!
how do I delete its references?
I know i'm a bit late but if anyone notices that a note (that you 're not currently playing) gets cut off when you press another key its because in stopNote function we 're always clearing the current note, even if its still playing. So we should add a piece of code like this:
env1.trigger = 0;
if (allowTailOff) {
if (!isPlayingButReleased()) { clearCurrentNote(); }
}
else { clearCurrentNote(); }
inside the function, so that, when the note is no longer pressed, it checks if its actually still playing and if it is (and the allowTailOff condition allows it) we can keep hearing it.
Hey Joshua,
really nice tutorials so far, can follow up your thoughts and its a lot of fun. I tried the env by myself and set the env1.setSustain to the level which gets the velocity. Then you dont need to multiply your env1.adsr with the level, cause its set by the sustain. Works with no problems, and now the Velocity is again in to the game.
Hope for the next one with the GUI Action!!!!
Cheers,
Manuel
For those of you who get emscripten.h related errors and std::min related errors when trying to incorporate Maximilian library, my solutions are:
1. For the missing 'emscripten.h' in maximilian.embind.cpp, I just remove maximilian.embind.cpp from our project. This 'emscripten.h' relates to web / javascript stuffs according to some quick google search, and our synthesizer project seems do not need that support, so I just delete the whole cpp file. (And also all the functions useful for our project are already in maximilian.cpp and in the maximilian\libs folder, so I think it should be fine to remove maximilian.embind.cpp)
2. For the type cast error of std::min in line 1071 in maximilian.cpp and reference error in line 109 in maxiConvolve.cpp, the solution is given by one of the issues in the github repo of maximilian: github.com/micknoise/Maximilian/issues/88.
I'm on Windows 10 and VS2015. Everything works fine so far after the fix.
Feel free to leave a comment if you have any further question or advice. Thanks again for the tutorials, awesome!
Thank you for this series.
You mentioned that in the renderNextBlock the loops you are using are what you are used to, but you mentioned also that you have seen other people do it some other way. Can you please link a few example code to those other methods that you have seen.
I believe that there is a much better and efficient way of doing it, which will be more optimised and faster as well. I just wanna test out all the possibilities that could be there. Thanks again.
Can anyone explain why 05:53 line 55 is using startSample instead of sample? I tried to use sample and the sound will clip when I release the key, but I don't understand why this is happening since startSample and sample are the same number the whole time.
For anyone stuck, check out tutorial 19 to set up maximilian correctly.
(a) use lowercase 'm' in #include 'maximilian.h'
(b) Get rid of maxiSynth and maxiSynth.h in the lib folder. Get rid of any references to maxisynth.cpp/.h , I think there is just one in maximilian.h. Use ctrl+f to find the empty function.
(c) You may need to go into plugin_client module and set up the VST3 to replace VST2. Mess around with it if previous steps don't solve the issue.
(d) It's not covered in the video but only check midi input and the two audio outputs, no need for midi output.
Superb Tutorials Bro... Keep It Up
Seems like a strange choice to me to constantly be setting those envelope constants in your render function. Is there a specific reason why they are put there? I might put them somewhere they only get called once to initialize the adsr envelope. Thanks for these tutorials! You rock!
If anyone is using the latest commit of Maximilian, change the default header path to current path + src. Hope this helps someone. Also, if you get errors in the example projects, you can remove the references as it's not used by these tutorials.
A little info:
The Maxi library is quite big and messy now, and causes loads of errors in Windows if you just copy the root folder. You probably only need the 'lib' folder and the 'maximillian.h/.cpp' files.
To add source files directly to the source folder on 'Producer' click 'Source' first and then click '+'
And I suspect the plug-in host could probably save your wired up project, so you only need to do it once.
Hello! Many thanks for this tutorial!
At time 16:47 (in SynthVoice::stopNote), you say "if we don't have anymore velocity".
But at time 15:55 (in the documentation of the stopNote function), we can see that:
"The velocity indicates how quickly the note was released - 0 is slowly, 1 is quickly."
It seems it has nothing to do with the note being finished.
I tried adding a "std::cout
I think something is broken with my MIDI input. When I set theWave = osc1.sinewave(440), I hear a sine wave at 440 Hz. But when I set theWave = osc1.sinewave(frequency), and I put it into Audio Plugin Host and press a key, I don't hear that key's pitch. I hear a bunch of random tones that have nothing to do with the key I pressed, and they don't even sound like a sine wave. They sound buzzy and weird. And then as soon as I try to route it through the envelope's ADSR, I get no output at all. What am I doing wrong???
Hey can you do a tutorial on how to make a stand alone instrument that takes midi input and plays samples, almost like a stand alone kontakt instrument that has separate sampled instruments and there proper chords spread out on each key ( C#, C , D#, etc. )???
I'm sure I was probably the only one with this problem but just in case, For people making VST3 plugins who get errors along the lines of:
'iid': redefinition; multiple initialization
This is probably because the 3rd party SDK you've installed in a few tutorials previously is in conflict with the SDK that's now built into Jucer. The built in SDKs are for me in "JUCE\modules\juce_audio_processors\format_types\VST3_SDK". Just go to File\global paths and replace the VST3 path both there and in the Exporters VST3 SDK folder bit. Not sure if this was just a dumb mistake by me or not but if you are on the same boat, now you know :)
That's awesome! Thank you so much!!!
What about wavelet neural networks (like zynaptiq) sometime in the future tutorials? This is cool method of doing crazy things with a sound, e.g. morphing, denoising, spectral filtering, stretching, pitch-shifting, etc. Thanks!
Great videos thanks so much !!!!!!!!!
Hey Joshua, Loving the videos.
For some reason I'm getting an error next to every class in: maxiSynths.h
The error is: Redefinition of 'maxiKick'
Redefinition of 'maxiSnare'
Redefinition of 'maxiHats'
Redefinition of 'maxiSynth'
etc...
Do you have any idea why this is? Any help would be massively appreciated.
Cheers,
Lloyd
@@TheAudioProgrammer Thank you very much for the reply Joshua,
I removed the functions from the maxiSynths.cpp file - I've got to the end of Juce Tutorial 23, and everything worked. I'm hoping there will not be any repercussions from deleting that code further down the line.
I've really enjoyed the tutorials, and still have lots to get through. I'll do my best to not ask too many questions... :-)
Thanks again,
Lloyd
@@TheAudioProgrammer Thanks so much,
I've just joined the group. Look forward to speaking in the future :)
Cheers,
Lloyd
Thanks. I'm trying to get my UI components to map to the parameters in SynthVoice but i can't make it work. I can get them to co to PluginProcessor but can't seem to change that. Am I missing something simple?
This doesn't work for me. It compiles fine and everything but the oscillator is not making any sound whatsoever when I hook it up to the Audio Plugin Host. I'm using Visual Studio 2017.
Did you get it working? The problem for me was that I wasn't explicitly rebuilding the VST3 build when testing.
I did not yet, I’ve been busy with other things but I’ll take a stab at it today. I think I will join the group.
s elliot perez See I thought I wasn’t explicitly rebuilding the vst3, I hadn’t tested the standalone app now that I think about it.
@@Xavierrex3 Yeah, the standalone build doesn't work with the Plugin Host as far as I can tell. The way I've set it up is to right-click on VST3 in the project browser, go to Properties>Configuration Properties>Debugging and set Command to the Plugin Host exe. Right click on it again to set it as the Startup Project. In the Plugin Host itself you have to scan the folder of the VST3 file for it to be accessible.
@@ste_e_p @The Audio Programmer I got it to work! Thanks for your help though!
I am getting 2 errors with Maximilian, first is that the file "emscripten.h" which is included in maximilian.embind.cpp is not found, secondly line 109 of maxiConvolve.cpp gives the error "Non-const lvalue reference to type 'std::vector' cannot bind to a temporary of type 'std::__1::__vector_base::value_type *' (aka 'float *')" - what's the fix for these issues? thanks for the tutorial!
@@TheAudioProgrammer hey thanks for the reply, hmm the type mismatch error was happening without me even doing anything, just as soon as i tried to build after including the library - i'll join the community anyway, thanks again!
@@ryanjeffares8238 Hey man did you fix the "emscripten.h" not found error??
@@JanithHarinda emscripten.h is for compiling code to webassembly, i assume you don't need to do that so you can simply remove maximilian.embind.cpp which relies on it to use maximilian with webassembly from your project and it will no longer be looking for that header. good luck!
Hi there! I was having difficulties including the 'maximilian.h' file in SynthVoice header, and even after removing the two 'MaxiSynth' files from the source folder nothing worked. I even tried downloading the project from your github , and deleting everything done after this tutorial so that I'd still be at the same point in the tutorial, but still getting errors.
It starts with one fatal error:
'1>..\VST Design\Maximilian-master\Maximilian-master\src\maximilian.embind.cpp(7,10): fatal error C1083: Cannot open include file: 'emscripten.h': No such file or directory'
Obviously I searched the Maximilian folders I have, but I couldn't find the specified header file.
I then get more errors in the maximilian.cpp, starting with: 'error C2672: 'std::min': no matching overloaded function found',
then more errors related to 'min'.
I am still not the most advanced c++ programmer out there my apologies for the lengthy question, hopefully someone can help me find the problems I need to fix:)
Hi Yahya, I encountered these problems today and here's how I fix them.
1. For the type cast error of std::min in line 1071 in maximilian.cpp and reference error in line 109 in maxiConvolve.cpp, the solution is given by one of the issues in the github repo of maximilian: github.com/micknoise/Maximilian/issues/88.
2. For the missing 'emscripten.h' in maximilian.embind.cpp, my solution is just remove maximilian.embind.cpp from our project. This 'emscripten.h' relates to web / javascript stuffs according to some quick google search, and our synthesizer project seems do not need that support, so I just delete the whole cpp file.
I'm on Win10, VS2015 and my fix works well so far (Tutorial 23). If I made any mistakes or if you have any comment, please let me know :)
So uh, my vst maxes out in DAW and also sound output stuttering and not a sine wave lmao
Yeah I don't know if we have the same problem, but when I play my vst3 in my DAW I get pretty horrifying sounds. Different keys play different sounds, but not what they should be, and it sounds like I'm running it through a distortion/glitch effect or something, and it is extremely loud. Anyway, definitely not not the nice tunes that his sounded like. And I can't figure out how to get the VST Host JUCE provided to test if it is just something in my DAW or what.... Let me know if you find anything.
@Snazzie @Tanner Livingston did you guys ever get this solved?
@@macrondo5852 yeah i think i did, but i abandoned the project since.
@@SnazzieTV I actually figured it out yesterday. I was getting garbage until I moved ++startSample to the right place
@@macrondo5852 nice
Hi Thank for all these videos.
I have some problems: in renderNextBlock, I have used local variable "sample" to add sample to outputBuffer and I have encountered some pops and clicks. what's the mistake that I have made?. the local variable "sample" and the variable "startSample" start with 0 and end with numSamples. But the result is different. click and pops while midi on(attack) and midi off(release). Thanks in advance. the code is:
void renderNextBlock (AudioBuffer& outputBuffer,
int startSample,
int numSamples)
{
env1.setAttack(2000);
env1.setDecay(500);
env1.setSustain(0.8);
env1.setRelease(2000);
for(int sample = 0 ; sample
This line; "outputBuffer.addSample(channel, sample, theSound);" needs to be "outputBuffer.addSample(channel, startSample, theSound);" as it is coming into renderNextBlock, because that start position will vary!
@@DKDiveDudethanks for your reply, I missed to realize that outputBuffer can be an array in any size (even an circular buffer) that the audio engine uses.
How do I sign up for telegram? It's really strange to try and make it work...
I'm trying to do do it on my laptop...but apparently you can ONLY sign up from a mobile device...So then I did that and now the codes that are sent to my phone won't work on the laptop app...argh...
a sine-wave is the only shape you cant filer, it's only a fundamental frequency.
great tutorials, by the way, I am learning a lot from you - I am trying to start programming in a code environment .
I am an Reaktor User