Questions tagged [musicsequence]

MusicSequence, now called AudioToolbox, is an Apple framework for controlling music/audio playback. Use this tag for questions on how to implement features or commands from this framework.

8 questions
9
votes
1 answer

Change time signature in MusicSequence

I'm trying to change the time signature (default to 4/4) in a MusicSequence but I don't seem to understand how to do this. I have 2 MusicTracks inside the sequence and a MusicPlayer also to reproduce the music. How can I change this value? EDIT: I…
fdiaz
  • 2,600
  • 21
  • 27
5
votes
1 answer

Saving a very simple MusicSequence into MIDI doesn't reproduce sound

I'm trying to save a very basic one note MusicSequence (MusicSequence Reference) into a MIDI file. The file is being written right now and the duration of the note also (if I put duration 4 then the MIDI file lasts 2 secs, if I change it to 2 then…
fdiaz
  • 2,600
  • 21
  • 27
4
votes
1 answer

Core Audio: How to play MIDI MusicSequence by MusicPlayer while AUGraph is deprecated?

I have a MIDI Synth Unit AudioComponentDescription midiSynthDesc; midiSynthDesc.componentType = kAudioUnitType_MusicDevice; midiSynthDesc.componentSubType = kAudioUnitSubType_MIDISynth; midiSynthDesc.componentManufacturer =…
John
  • 2,672
  • 2
  • 23
  • 29
4
votes
0 answers

Where to start in order to create a MIDI sequencer / drum machine?

I've been searching all over to find some sample code of how to use Apple's MusicSequence framework or anything else available. I'm an Objective C programmer, so I find the MusicSequence documentation (and also WWDC videos) rather thin and TBH,…
kanstraktar
  • 5,357
  • 2
  • 21
  • 29
2
votes
1 answer

AVAudioSequencer playing AVAudioUnitSampler cuts of tail end of midi notes

I am playing a midi file using AVAudioSequencer and AVAudioUnitSampler. A midi file is being loaded into a MusicSequence object. The notes are being cut off as soon as another note is played essentially making it monophonic. For example, a crash…
jaybers
  • 1,991
  • 13
  • 18
2
votes
0 answers

EXEC_BAD_INSTRUCTION (code=1, address=0xe) with MusicSequenceBarBeatTimeToBeats in Swift 2

I have problem when using Apples MusicSequence C API in Swift 2. I can't figure out how to get rid of EXEC_BAD_INSTRUCTION when calling MusicSequenceBarBeatTimeToBeats. I have tried a lot of different solutions found on internet, but nothing seems…
Gustaf
  • 21
  • 4
0
votes
2 answers

Adding a Sound Font to a MusicTrack with MIDINotes? CoreMIDI iOS

I'm successfully loading a Sound Font (.sf2) to a MusicSequence when the MusicSequence it's loaded by file (.mid) like the following: //the interesting code ... NSString *midiFilePath = [[NSBundle mainBundle] …
Pau Senabre
  • 4,155
  • 2
  • 27
  • 36
-1
votes
1 answer

iOS MusicSequence: MusicPlayerStart() failed, return error code: -66720

I searched this error code, that means kAudioToolboxError_NoTrackDestination. I want to know how to figure it out