Re: AuSampler - Play out a one shot sample for looping MusicTrack
Re: AuSampler - Play out a one shot sample for looping MusicTrack
- Subject: Re: AuSampler - Play out a one shot sample for looping MusicTrack
- From: Aran Mulholland <email@hidden>
- Date: Thu, 27 Oct 2011 10:39:56 +1100
the setting "Key Down (Ignore Key Up)" does what I need. I must have
had a bad aupreset when testing this. When I created a new one this
setting works without a hitch.
On Wed, Oct 26, 2011 at 8:41 AM, Aran Mulholland
<email@hidden> wrote:
> The AUSampler (as viewed in AULab) has a setting for Trigger that
> determines when a note is fired. The options are Key Down, Key Up or
> Key Down (Ignore Key Up). Does anyone know of a setting for when the
> note ends. I would like to change settings so that whenever the note
> is triggered it plays out the full sample even if the note is only
> triggered for a very short time. Like a One Shot sample mode on other
> samplers.
>
> The reason why I want this is probably a lack of understanding on my
> part of MusicTrack. I have set up a sequence that is 4 bars long and I
> want to trigger the notes every 16th note (every 0.25 of a bar). I
> want to loop this track. Setting up a looping track is done as
> follows.
>
> MusicTrackLoopInfo loopInfo = { 4.0f, 0 };
> OSStatus result = MusicTrackSetProperty(musicTrack,
> kSequenceTrackProperty_LoopInfo, &loopInfo,
> sizeof(MusicTrackLoopInfo));
>
> This will set up a loop that is 4 bars long. However this setting sets
> the loop duration from the end of the last event in the MusicTrack. If
> I have an event at 3.75 (the last 16th note of the 4th bar - zero
> indexed) and that event lasts for 1.0 (the length of time needed to
> sound the whole sample at 120bpm) then the 4 bar loop will run from
> 0.75 - 4.75. Now I can avoid this by making my events last for 0.25
> which means that the MusicTrack will end right on the dot of 4.00 and
> the loop will run from 0 to 4.00. However if I do this the samples
> only will sound for 0.25 of a beat, which at 120bpm does not sound the
> whole sample and at a higher tempo will sound even less. So I would
> like it if I could set the AUSampler to always play out the whole
> sample regardless of how long the note lasts.
>
> If I cannot get this to work I suppose I could roll my own sequencer,
> but I have done that before and would really like to use a code base
> that someone else maintains :)
>
_______________________________________________
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