I was searching for the right classes to use to make a step sequencer/drum machine, but i wont have a clue where to search (there are soooo many classes in the API) and my knowledge about the technical side of music is almost zero (learned the most while trying to figure this out).
I was searching for a way we can program a sequence so it will play music-samples on specific times (my music-sample is a .wav). I tried to build from the synth demo and tried to manually make MIDI-messages (instead of the keyboard making them). But with this method this will only make a noise (i think its turning it on and off all the time).
What i changed in the getNextAudioBlock function:
//old (in comment): keyboardState.processNextMidiBuffer (incomingMidi, 0, bufferToFill.numSamples, true); //new: MidiMessage message = MidiMessage::noteOn(1, 74, (float) 1.0); incomingMidi.addEvent(message, 0); // and now get the synth to process the midi events and generate its output. synth.renderNextBlock (*bufferToFill.buffer, incomingMidi, 0, bufferToFill.numSamples);
Am i searching in the right way? If yes: What am i doing wrong, if no: how can I do this the best way?
Thanks in advance