I’m trying to develop a Sampler keyboard instrument in JUCE and have an audio sample (drone) looping in the background.
I have managed to create a sampler instrument using the SynthAudioSource class and the sample player exactly as shown in the tutorial here https://docs.juce.com/master/tutorial_playing_sound_files.html.
Upon adding the loop section exactly as shown here https://docs.juce.com/master/tutorial_looping_audio_sample_buffer.html, the audio sample loops from the get go rather than being controlled by a play button. I was looking to get some advise on the best way of incorporating the two to have a start button that when clicked starts the sample playback and looping.
I’m using a MixerAudioSource object to mix the SynthAudioSource(sampler instrument) and TransportSource(sample player) outputs together. What would be the best way to use the looping mechanism shown in the 2nd link above and loop just the sample player, while the sampler instrument output still works only when triggered?
Any advise would be appreciated!