A: You can use any of the memory for audio samples; but you have to decide how much you want to commit to audio. The technical limit of the address bus is 16 MB.
A: Loops can be set at any 32-bit boundary, so stereo 16-bit data can loop at any frame. Mono samples can loop at any even-numbered frame. It does not matter whether the sample is streaming off the disc from a sound file or is in memory.
LoadSample()
returns all these "can't parse AIFF" type of messages. Is this even supported? Do I have to somehow manually loop it?A: "Can't parse AIFF" is a really generic error that the Audio folio reports when it cannot access a sample for some reason. This could even mean that the sample is not on the path that you specified. Does the sample load with no loop points enabled?
Old versions of the Audio folio (before V24) had a problem reading looped files from old versions of SoundHack (before 2.10). If you passed the file through SoundDesigner, that fixed the problem. The problem was due to the MARK+INST chunk being in the wrong order.
A: No. SoundHack can convert between 10 different formats, including IRCAM format, but PC VOX is not supported. The new SoundHack V0.70 does, however, support Microsoft WAV format files. If you convert from PC VOX to WAV using some PC based tool, you could convert from WAV to AIFF using SoundHack V0.70. Another alternative is to convert your files to RAW binary data files, then read them using SoundHack, set the header info to 8 bit, 22,050 Hertz, then write them out as AIFF files.
Although the CD-ROM loads at the fairly adequate speed of 300 KB/s, the seek-to-read time is very long. Loading ten digitized sound files from CD-ROM at the beginning of a screen takes a long time.
CreateSample()
. You can then determine their placement in memory any way you choose.
LoadSample()
function of the Audio folio allocates memory and determines its location. I want to load the sample into memory that I allocate.
A: Use the LoadSampleHere()
function, which lets you allocate the memory into which the sample is loaded. If you write your own loader and have the samples in memory, you can call CreateSample()
to turn it into an Audio folio compatible sample item.
Playback Rate
Q: How do you play an audio sample recorded at 11,025 Hertz using a sampler.dsp
. I am using AF_TAG_FREQUENCY but cannot get the proper playback rate.
A: You should use AF_TAG_RATE. The tag value, Rate, is calculated as follows:
The PlaybackRate in this case would be 0x2000 which is one fourth of the nominal playback rate of 0x8000. The rate can range from 0 to 0xFFFF.
#define NORMAL_RATE (0x8000)
#define SAMPLE_RATE (44100)
RecordedRate = 11025;
PlaybackRate = (RecordedRate * NORMAL_RATE) / SAMPLE_RATE;
As an alternative, if you would like the Audio folio to do the calculations in a more hardware independent fashion, you could do the following:
CreateSample()
using the following TagArgs:
#define PITCH_MIDDLE_C (60)
{ AF_TAG_SAMPLE_RATE, (void *) Convert32_F16(11025) },
{ AF_TAG_BASENOTE, (void *) PITCH_MIDDLE_C },
{ AF_TAG_PITCH, (void *) PITCH_MIDDLE_C }
Because the playback pitch matches the BASENOTE, the Audio folio plays the sample at its original pitch taking into account the recorded sample rate. This works even if the DSP sample rate is not 44,100 Hertz.