Yamaha SMAF GLOBAL
Home What is SMAF? Tools Developers Support
    For Developers   |   Hint & Tips   |   Dave's Tips for SMAF   |   FAQ   |   Contact
Tips for SMAF - by Dave Bristow
Dave's Ringtones for SMAF Vol.5
Introduction
Article 4 took a break from MA specific synthesis, but here in article 5 we're back inside again, and this time we're going to take a look at the role of PCM in SMAF ringtones. Or rather, "how" and "what" audio can you put into a SMAF file?

The standard documentation explains the details of PCM from the view of MA functions and features - a "ground up" approach. I am going to take a different perspective and work from the "top down" by looking at some common ringtone scenarios where you might want to use PCM, or recorded audio in some form, and then discuss just how and what can be done. So for fine details, turn to the SMAF documentation available here on the website, but for answers to these three common PCM questions, read on...
  • Making a non-FM pad sound, say strings or choir, that can be played normally along with other voices
  • Adding a vocal chorus line, hook or recorded sound effect
  • Converting an audio file to a SMAF file
Making a non-FM pad sound, say strings or choir, that can be played normally along with other voices:
In this case, you will be making a normal voice with the standard voice editor, but using the PCM synth features instead of FM. Here are the important things to remember:
  1. This PCM voice will occupy memory INSIDE the MA chip , so the total size of all your wave files used as patches in any one SMAF file will be restricted. A safe working maximum is around 6KB, after being imported into the editor, but it is better to keep PCM sounds smaller than this if possible.

    For example, this Strings sound example has the following size attributes before and after importing in to the MA voice editor. (remake this sound yourself with the aif file provided)

Original File Attributes
MA Editor
Sampling rate
Bit Depth
length
File size
Bit Depth
File size
22,050
16bit
1/3 second
15KB
4bit(ADPCM)
4KB
22,050
8bit
1/3 second
7.5KB
8bit
7.5KB


Strings4_vm3
(patch 0, user bank 1)
Strings4_aif
  1. There are no restrictions on sample rate for your original 16bit wave source file. It will be imported into the editor as 8bit or 4bit ADPCM. (However, it is recommended that the sampling frequency is a multiple of 375 - as this will ensure that the playback frequency will not "miss" standard tuning frequencies.)

  2. Loop points are only imported into the MA voice editor from AIF files not WAV files

  3. In either case, you may have to adjust the loop in the MA voice editor

  4. Keyboard zones are not supported, therefore your sound will probably only work over a couple of octaves and you should plan for this.

  5. The PCM voice is like an FM voice in that it lives in your patch banks alongside the FM voices and drum patches, and is played and used normally by calling the appropriate patch number from any MIDI track.
Here is an overview of how you make a PCM voice. In the authoring software, open up a new Voice Bank Set and select any voice from a user bank. Double-Click on the voice to open up the Voice Editor. Then click on the PCM Voice Edit Tab to display the PCM Editor.

Click on the Load Wave File button and navigate to a wave file that you have just prepared and open it into the editor (remember what we said about file size - and make sure it is aif, if you want the loop points to load). Before you begin really fine adjustment of the voice parameters, check the sample for tuning. This is best done by ear against a standard GM voice from the factory bank, unless your original source wave is pitched at C4, in which case it will already be in tune. Adjusting the numbers in the box labeled "Fs" will tune the file. It is preferable for Fs to be in multiples of 375, since it recommends tuning data at the time of waveform creation. With the wave file attached and looped, you can move on to the final parameter adjustments. These are LFO, envelope, volume and modulation settings that will polish the final PCM voice.




When you have saved your PCM voice, give it a good work out from your keyboard, to test that it works well in the range you want. You will have discovered by now that the key to good PCM voices (like most other systems) is a quality source wave.
Adding a vocal chorus line, hook or sound-effect:
This is probably a recorded phrase that you want to be repeated occasionally in your ringtone, rather than played as an instrument. It is also probably a lot longer than a typical note or instrument wave, and therefore, making a PCM voice and then "playing it in" is not going to be a satisfactory solution due to file size restrictions. To solve this "size" challenge, SMAF allows audio to be introduced to the file as "StreamPCM". This wave does NOT live inside the MA internal memory, but sits outside in the handset memory, and is triggered by special notes on the drum channel (Bank select MSB 125) of the SMAF MIDI data. Although it is an external wave, 1KB of internal chip memory must be reserved as a buffer to read and playback the file. Two simultaneous streams can be read, by reserving 2KB. One or two voice reserved is set in the preferences menu of the MA software.

When using the StreamPCM function then, you are NOT making a voice, but using notes on the drum channel to trigger a wave that has been specially imported into your SMAF file. Here are the important things to remember (compare these to the PCM list to get a clear picture of the differences):
  1. This StreamPCM audio will NOT occupy memory INSIDE the MA chip, so the total size of all your wave files used as StreamPCM in any one SMAF file is not theoretically restricted, though there will be a limit on the handset's memory. A 1 KB of MA chip internal memory will be used however as a reading buffer for each stream (2 streams maximum).
    NOTE: you can actually import multiple audio files, as long as they are played pack in series! The concept of 1 or 2 streams means how many you can play back SIMULTANEOUSLY.

  2. There ARE restrictions on sample rate for your original 16bit wave source file as the data rate is a key factor. It will be imported into the editor as 8bit or 4bit ADPCM . The total maximum allowed data (sampling) rate is 16KHz @ 4bit ADPCM import compression. So, for example:

    1 stream of 16KHz files, imported at 4bitADPCM or
    2 streams of 8KHz files, imported at 4bit ADPCM or
    1 stream of 8KHz files, imported at 8bit or
    2 streams of 4KHz files, imported at 8bit

  3. StreamPCM audio does not loop automatically

  4. The StreamPCM audio cannot be edited from inside the MA software

  5. Keyboard zones are not applicable, because StreamPCM does not play across the keyboard, but is triggered by special notes on the drum track.

  6. The StreamPCM audio is NOT like an FM voice. It does not "live"in the voice bank, but is imported separately into the SMAF file. It is played back only at its original pitch.
The thought process for using StreamPCM is special in that the audio files are imported into a SMAF file AFTER a .mid file has been imported first. Up until the latest software versions were available, the following method was used to add StreamPCM. Begin by making a .mid file to import - it can be empty, but should have a channel 10 drum track with the drum bank in place. When you've imported that file into the MA editor, here is what you do to add StreamPCM. (Make sure that you have checked at least "1 voice reserved" in the preferences menu.)



Open up the Stream PCM assign window from the window menu, and right-click on the first space (shown in the diagram), select "New" and then choose your mono wav file to import. (remember what we discussed about sampling rates). The audio file will be placed at wave ID #1. Here is how notes on the drum track trigger the imported audio files:



Using the MA software tools, you will have to estimate the position of the StreamPCM note triggers in your drum track, import the .mid file then import the StreamPCM and playback from the MA editor. If the triggers are slightly out of sync, go back to the mid file and adjust the note positions, re-save the mid file then re-import it into the MA software and check again by playback from the MA software. (The StreamPCM will still play - it does not have to be re-imported)

If you have the MA hardware developers kit, you can hear the StreamPCM played directly from the sequencer, but you must remember to send it to the hardware box first. Do this by right-clicking at the head of the wave column on the StreamPCM window (Fs) then choosing Send StreamPCM from the pop-up menu. This is the best way for accurately positioning your StreamPCM wave.

However, using StreamPCM has now got much easier with the latest software, so make sure you regularly keep up with the new versions posted on this site...

The New Software - MA3 versions 1.4 (software tool) and 3.1 (hardware tool) makes adding PCM a breeze! The thought process is very much the same - you begin by importing a SMF, but now, you can add, position and set StreamPCM all from within the MA software. After the SMF is imported, click on the Piano Roll button to display this window:



Now import a wave into the StreamPCM window as shown in the previous paragraph. It can be dragged to the PCM channel that is now displayed at the bottom of the Piano Roll and placed at any point in the file. Its really that simple, and no longer requires any trips back to the midi file drum track in order to place StreamPCM trigger notes. The results can be monitored directly by playing back from within the SMAF software, using the transport controls. Isn't that neat!
Converting an Audio File directly to SMAF:

This can be a single-click operation using the converter tool found here on the smaf-yamaha website. It automates the process described above by creating an "empty" .mid file with one trigger note that is the length of your audio file. This mid file is then automatically used as the basis to create a SMAF file with your audio imported. It is a transparent process - all you do is drag your audio file onto the WscMA3 converter software and a SMAF file (.mmf) is automatically made.

If however, you want to do something a little more intricate, using two streams maybe, or different streams played back in various orders and so on, you will have to make the empty mid file yourself and adjust the placement of the StreamPCM trigger notes by hand.

So, PCM and recorded Audio is an integral part of the MA/SMAF ringtone sound, extending the pallette of sounds and keeping SMAF in the mainstream of ringtone development. Memory is an issue, and therefore all PCM sounds will be compressed to some extent, so look to FM for the best clarity, sparkle and unique sounds. The PCM features are there to ensure that your SMAF ringtones can include the realism of recorded audio. In the next article, we shall consider how to turn a general purpose SMF file into a great sounding SMAF ringtone.

back next
Dave's Tips for SMAF
Copyright
Copyright(c) 2014 Yamaha Corporation. All rights reserved.
Page Top Terms and conditions of use Privacy Policy Sitemap