Newb - Question regarding MIDI and audio management in AudioProcessor

I have to begin saying I’m a newbie and there are still a lot of things that I don’t get or things that I just can’t seem to implement.
I’ll try to list the problems and questions as briefly as possible in a way that’s understandable.

  1. MidiKeyboardComponent does not send MIDI information to AudioProcessor, however a physical MIDI device does and I’m unsure on how to make that work.

  2. I am trying to implement the Tutorial: Build a MIDI synth using MIDI input 's classes used for the Synth voice to test what I need, but I can’t get it to make any sound.
    2.1 I did find out someone saying about declaring the processor within the class to pass the buffer that eventually has to come out, but that just makes me confused as in where I should declare the classes. (Out or inside AudioProcessor’s class? AudioProcessor.cpp or AudioProcessor.h?

  3. What’s the difference between SynthesiserSound and SynthesiserVoice ?

  4. Regarding the last point, I take these in a way generate the audio buffer that produces the ‘instrument’ made by the “SynthAudioSource” and as such I take I could define playing an audio file from the aforementioned classes (structs in the case of the tutorial)?

  5. Lastly, I am interested in changing / retuning the samples and I found out that you need to use a GenericInterpolator if I want to use resampling for example. For any other pitch shifting method I could just define it within the SynthesiserSound or SynthesiserVoice classes and they should play it accordingly, right? (Considering I’m searching for different samplerates between notes of the keyboard)

These are my questions. I apologize if they’re perhaps a bit too much, but I’m just having trouble processing these and I’m stalled at the moment. I have probably a lot of code malpractices within my code that I’d have to correct later, but I really just want it functional at the moment to test everything.
Thank you beforehand.

  1. Here is documentation for the Synthesizer: JUCE: Synthesiser Class Reference

When you scroll to the methods, there will be descriptions of methods that use SynthesizerVoice and SynthesizerSound. Click on these to read the descriptions of each.

I am also a newb but it seems to me on a quick read of the documentation that SynthesizerVoice is something that stores what a midi voice is like (ie what are the frequencies that resonate at each pitch to make a violin sound different than a piano). SynthesizerSound seems to be a description of what sounds the voice needs to make (for example, a string of ascending 8th notes). This way, you can have a Sound and very easily switch out what Voice is making the sound.

Sorry that I can’t easily answer more! I hope that by replying it bumps this thread and people who know more might also be able to answer questions.

1 Like

First of all, thank you very much for replying and taking the time to reply!
Other than that, it’s still a bit confusing if I’m honest with you, but it is perhaps the name what just throws me off. For example when I read voice I imagine two scenarios: Voice means timbre or Voice means a polyphonic / counterpoint voice. And when I read sound I quickly relate it to Audio, so I’d think it’s related to the actual processing of the audio, but from what the documentation says and what you understood it seems to be the opposite way (and hopefully someone can confirm).

SynthesiserSound → Timbre of the sound
SynthesiserVoice → Polyphonic voice that plays the selected instrument (sound)

Is this right?