xcode - Pitch transpose with AudioToolbox AudioUnit samplerUnit -
this "pitch transposing" test code not working audiounit samplerunit. sending same midi messages thru midi out external sound module, works perfect. wrong. can't use "pitch bend" case. controller "0x06" not implemented in api?
- (void) demotranspose { [at0 setinstrument :0x11 :0x00]; [at0 midievent :0xb0 :0x65 :0x00]; [at0 midievent :0xb0 :0x64 :0x02]; [at0 midievent :0x90 :0x3c :0x7f]; // note on usleep(1000000); [at0 midievent :0xb0 :0x06 :0x40+6]; // 40: center, +6 semi tones higher usleep(1000000); [at0 midievent :0xb0 :0x06 :0x40+12]; // 40: center, +12 semi tones higher usleep(1000000); [at0 midievent :0x90 :0x3c :0x00]; // note off [at0 midievent :0xb0 :0x06 :0x40]; // reset center } - (void) midievent :(byte)statusinfoa :(byte)param1a :(byte)param2a { musicdevicemidievent (self.samplerunit, statusinfoa, param1a, param2a, 0); }
Comments
Post a Comment