Skip to content

Use MIDI to make a drum pattern with drum samples #137

Answered by DBraun
samuelbraun04 asked this question in Q&A
Discussion options

You must be logged in to vote

One way is to use the SamplerProcessor, which is missing good examples...

sampler = engine.make_sampler_processor("sampler", self.load_audio_file(pathHihat))
# later you can call set_data
# sampler.set_data(self.load_audio_file(pathHihat))
sampler.load_midi(midiHihat, beats=True)

However, that sampler will pitch the notes according to the MIDI note, which you may not want. It also comes with many ADSR features which you'll have to set to your needs.

I'd also recommend adapting the polyphonic Faust example here: https://github.com/DBraun/DawDreamer/blob/main/tests/test_faust_poly_sampler.py
and Faust code here: https://github.com/DBraun/DawDreamer/blob/main/tests/faust_dsp/polyphonic_sampl…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@samuelbraun04
Comment options

@DBraun
Comment options

@samuelbraun04
Comment options

@samuelbraun04
Comment options

@samuelbraun04
Comment options

Answer selected by samuelbraun04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants