Use MIDI to make a drum pattern with drum samples #137
-
I have a hi hat MIDI file and a hi hat sample file. I was wondering how I could make a clip where the hi hat sample is played to the midi notes? I've tried:
but that obviously doesn't work, but the idea is sort of there. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
One way is to use the 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 It currently plays back a cymbal with polyphony, and the MIDI note affects the pitch and speed of the sample. To not let the MIDI not affect the pitch/speed, you'd change the definition of ratio to You may want to remove |
Beta Was this translation helpful? Give feedback.
One way is to use the
SamplerProcessor
, which is missing good examples...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…