• 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
disappearing MIDI control events...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

disappearing MIDI control events...


  • Subject: disappearing MIDI control events...
  • From: "Frank Quinn" <email@hidden>
  • Date: Tue, 30 Jan 2007 15:59:51 +0000

hi list,

I've working on an application that plays midi sequences using core audio/midi. I am currently adding volume envelopes / faders to the application
by adding kMidiMessage_VolumeChange messages to the sequence. My sequence has a blank control message at 10th of a second intervals throughout
the duration of the sequence. When I want to fade a track down or up, I just replace these blank control events with a volume change ones.

The volume fader region is comprised of a number of kMidiMessage_VolumeChange at different volume levels.
I do this by looping through each MusicTrack in the sequence and add my volume faders using the following code:

     loop
{
                     if( eventIsWithinFaderRegion() )
                     {
                    MusicEventIteratorDeleteEvent(iter);   // delete the blank event
                                       
        
                    MIDIChannelMessage Volmsg;          // make a new message
                    Volmsg.status = kMidiMessage_ControlChange << 4 | channel;
                    Volmsg.data1  = kMidiMessage_VolumeChange;
                    Volmsg.data2  = interpolatedVolume;
               
                    // add it to the track
                    err = MusicTrackNewMIDIChannelEvent(track, eventTime, &Volmsg);
                    }
 }

My application allows the user to add these volume faders on the fly, so in practice, when I add one event on a certain channel, it works fine.
However, when I add another fader event (on any channel) the original one seems to dissappear and I am left with only the last fader event
to be added to the sequence.

Is there some call that I am required to make to retain whatever I add to the sequence?

I have a workaround but it is clumsy too ugly to be the correct solution, and I would much rather not use it!!!!!.

If anybody has an idea as to what might be going wrong , I would greatly appreciate their advice!

Thanks in advance,

frank
 _______________________________________________
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: disappearing MIDI control events...
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: AudioUnitSetProperty() returns -10879
  • Next by Date: Re: AudioUnitSetProperty() returns -10879
  • Previous by thread: CocoaAUHost example - another crasch
  • Next by thread: Re: disappearing MIDI control events...
  • Index(es):
    • Date
    • Thread