Re: MIDI Transpose?
Re: MIDI Transpose?
- Subject: Re: MIDI Transpose?
- From: Jay Koutavas <email@hidden>
- Date: Fri, 6 Jun 2008 10:46:18 -0400
Title: Re: MIDI Transpose?
At 10:45 PM -0700 6/4/08, Brian Willoughby wrote:
Hi Brian.
Thank you for your help. As it's probably fairly obvious, I'm new
to MIDI and Core Audio concepts and terminology, but I continue to
make steady progress learning them both.
It should be fairly easy to use CoreMIDI
to send the four MIDI messages needed to set Coarse Tuning whenever
you want to change the Tranpose amount in your program. I have
not tested whether the Apple DLS correctly implements the DLS Level 1
requirements in this regard, but I would assume that it does, or this
would be grounds for a bug report.
Based on what I learned from your previous message, and the
example here:
http://lists.apple.com/archives/coreaudio-api/2005/May/msg00301.html I've been able to successfully tune the Apple DLS Synth using this
in a modified PlaySoftMIDI example:
MusicDeviceMIDIEvent(synthUnit, 0xB0,
0x64, 0x02,
0);
MusicDeviceMIDIEvent(synthUnit, 0xB0,
0x65, 0x00,
0);
MusicDeviceMIDIEvent(synthUnit, 0xB0,
0x06, value, 0);
MusicDeviceMIDIEvent(synthUnit, 0xB0,
0x26, 0x00,
0);
A 'value' of 64 here sounds like (to my non-musical ear) that
it's the original tuning. In
http://lists.apple.com/archives/coreaudio-api/2005/May/msg00301.htm there is talk of a "groupID", from the Core Audio docs
I've gathered that is a synonym for "channel", which in
MusicPlayer terms is a synonym for "track", right?
My actual application is MusicPlayer and sequence based, with
each channel off on its own track. If I send the four above commands
to the synth's "channel 0" before starting the MusicPlayer,
nothing happens. I assume that this is because the MusicPlayer is
resetting the state of the synth at play start. If correct, then the
next step appears to me to be to inject a tuning command into the
front of each of the tracks using MusicTrackNewMIDIChannelEvent(),
right? If so, we won't be able to tune on the fly this way. We'd have
to stop the MusicPlayer, inject a new tuning command at the current
position we're in the sequence and restart.
Regarding Virtual Endpoint creation, this is documented in the
CoreMIDI API specification. I do not have a pointer at the
moment.
Thank you, I actually did already know how to create virtual
endpoints in general, just didn't know how to find the DLS synth's (or
make one for it.) Running test code that does "give me all
destinations" didn't list the internal synth.
I'm thinking I'll still want to pursue hooking my code between
the music player and the virtual endpoint for the internal synth, so
that I could toss MusicDeviceMIDIEvent()-based transpose events at the
synth while its playing. Though, this may not work, and as an
alternative, I could still manually transpose notes at the hook,
though I really don't like that idea now that I know about MIDI Course
Tuning.
--
--------------------------------------------------------
Jay
Koutavas
mailto:email@hidden
Heynow
Software
http://www.heynow.com
Windham, New Hampshire, USA
--------------------------------------------------------
_______________________________________________
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