• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MIDI CC and PitchBend with AUDLSSynth
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDI CC and PitchBend with AUDLSSynth


  • Subject: Re: MIDI CC and PitchBend with AUDLSSynth
  • From: Douglas Scott <email@hidden>
  • Date: Mon, 15 Apr 2013 13:35:09 -0700

Umm, PitchBend is 0xE0, not 0xEC.  That could make a wee bit of difference.

-DS

On Apr 15, 2013, at 1:20 PM, ben kamen <email@hidden> wrote:

> Hi Douglas, Thanks for getting back so quickly.
>
> Yes, I am getting notes out the dlssynth using the same code/the same *dlsUnit.  I am using the dereferenced *dlsSynth because I created an objective c wrapper for managing multiple outputs and I wanted to pass in the reference from my audiocontroller class.
>
> I'm pasting here the relevant parts of in this wrapper class -- Note-On and Note-Off, as well as PGM out work.  But CC and pitch bend do not.   The data all comes from a 3d sensing device, and it appropriately converted into the correct ranges --  all of the data works correctly over "virtual" MIDI to FM8 in ableton.
>
> I'm on 10.8.3
> Thanks!
>
>
> @property (assign)  AudioUnit           * dlsUnit;
>
> -(id)initForVoice:(int)voice client:(MIDIClientRef)MIDIClient dlsSynth:(AudioUnit*)dls{
>
> ///////....set up virtual and real MIDI ports using the MIDIClientRef....
>
> dlsUnit = dls;
>
> //////....MIDIRestart();
>
>    }
>
> -(void)noteOn:(NSUInteger)note velocity:(NSUInteger)velocity{
>
>    Byte midiStatus = 144;
>    Byte _note = (Byte)note;
>    Byte _velocity = (Byte)velocity;
>
>    [self sendStatus:midiStatus byte1:_note byte2:_velocity];
>
> }
>
>
> -(void)noteOff:(NSUInteger)note velocity:(NSUInteger)velocity{
>    Byte midiStatus = 128;
>    Byte _note = (Byte)note;
>    Byte _velocity = (Byte)velocity;
>
>    [self sendStatus:midiStatus byte1:_note byte2:_velocity];
>
>
> }
>
> -(void)pgmOut:(NSUInteger)program{
>
>    Byte midiStatus = 0xC0;
>    //program;
>    Byte pgm = (Byte)program;
>
>    [self sendStatus:midiStatus byte1:pgm byte2:0x00];
>
> }
>
> -(void)ccMessage:(NSUInteger)cc value:(NSUInteger)value{
>
>    Byte midiStatus = 0xBc;
>    [self sendStatus:midiStatus byte1:(Byte)cc byte2:(Byte)value];
> }
>
>
>
>
> -(void)pitchBend:(NSUInteger)pitchBend{
>
>    Byte midiStatus = 0xEc;
>    NSUInteger lsb;
>    NSUInteger msb;
>
>    encode14BitValue(pitchBend, &msb, &lsb);
>
>
>    [self sendStatus:midiStatus byte1:(Byte)lsb byte2:(Byte)msb];
>
> }
>
> -(void)sendStatus:(Byte)status byte1:(Byte)byte1 byte2:(Byte)byte2{
>
>    Byte offset = 0;
>
> if(output == dslOutput){
>        CheckError(
>                   MusicDeviceMIDIEvent(*dlsUnit, status, byte1, byte2, offset),
>                   "could not send midi to dls synth");
>        }
>
> /////if virtual MIDI, etc. send out MIDI using other methods
>
>
> }
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: MIDI CC and PitchBend with AUDLSSynth
      • From: Info <email@hidden>
References: 
 >Re: MIDI CC and PitchBend with AUDLSSynth (From: ben kamen <email@hidden>)

  • Prev by Date: Re: MIDI CC and PitchBend with AUDLSSynth
  • Next by Date: Re: MIDI CC and PitchBend with AUDLSSynth
  • Previous by thread: Re: MIDI CC and PitchBend with AUDLSSynth
  • Next by thread: Re: MIDI CC and PitchBend with AUDLSSynth
  • Index(es):
    • Date
    • Thread