CoreMidi Pitch Shift for Drum Instruments (SF2)

Hello,


On the latest version of iOS 9.x, I am achieving drum MIDI playback using a custom (non GM) soundfont. I am using CoreMidi (MusicPlayer, MusicSequence, Virtual Endpoint) and AUSampler. Now, unlike the melodic instruments, I cannot simply transpose the MIDI note numbers to achieve pitch-shift for a drum (percussive) instrument. Hence, I tried using the 'NewTimePitch' audio unit and was successful in the technical integration.


However, the problem is that the sound after pitch shift is very poor with dampening effect. I have confirmed that the SF2 file quality is good by playing the same with another MIDI synth named fluidsynth and the sound quality on pitch shift is good.


I would like to know if there is any other way to achieve pitch shift in the scenario described above, without having to use 'NewTimePitch'? I could not find any hint that I could provide to the AUSampler directly.


Thanks for the help.


Regards,

Krishnamurthy

Replies

[Not sure why this reply did not get posted 2 years ago]


If your goal is simply to play the percussion notes with the sounds transposed, you should be able to use pitch wheel events to do this. If you are not familiar with the MIDI spec, take a look and you will see that there is a way to change the range of transposition you get for the pitch wheel. For example, you could set it to plus/minus an octave (rather than its default plus/minus 2 semitones).

-DS