From the help for Tune Smithy
Skip navigation Overview Seeds etc User guide Main Window Musical note intervals Scales Midi in Analyse sound
Contents
Hide Contents

FAQ

Skip navigation General Music making Fractal tunes Scale Construction Trouble Shooting Complete list

Help | FAQ

For the most up to date version of this page, see the on-line version in the wiki. It is currently being re-written to take account of changes since the page was originally prepared.

If your question isn't answered here yet, please ask - email to support@tunesmithy.co.uk

Please also note - some of these FAQs may be a bit out of date as I have focussed n completing FTS 3.0 first, then will review the help and FAQs after it is completed. See also the tips you get when you hover the mouse over a control in Tune Smithy. These may often be more up to date.

Some Fractal Tune Smithy users may be fairly new to using Windows too - there are many tips and tricks to using the keyboard and mouse well, not all covered in the standard Microsoft help. I may mention occasional things, but assume most of it as given. You can find an excellent introduction to Windows basics for newbies - such as, what do all those window keyboard keys do here: Internet4Classsrooms: Windows / PC. I also have a web page up myself at Windows Baby tips and Keyboard shortcuts for windows.

How do I save my work?

How do I record and play back recordings?

Does FTS support 24-bit playback and recording?

What kind of computer should I get for microtonal music making?

How do I analyse a note played in FTS to find the actual pitch played on the sound card / soft synth / synth?

What level of pitch accuracy can I expect to find typically?

How do I do a frequency analysis to find the partials of a note?

What is pitch bend, and how is it applied?

How do I convert the frequency analysis into a scale?

How do I make a custom voice consisting of one instrument playing the partials of another one?

How do I find the pitch of a note (second method)?

Is there a version of FTS for the Mac?

What language should I learn to write a music program, and how long does it take to write one?

top

 

How do I save my work?

FTS has many formats, so you need to decide what you want to save. Many are saved from File | Save As and then you choose the file type there. You can also save the file and e-mail it to someone all in one go using File | Save As & E-mail

To save an entire project with everything, use File | Save As Project. This includes things such as the format to use to display scales, the skin, colours etc. You can choose what to save in the Project Options window.

Fractal tunes are saved as Tune Smithy Files (extension .ts).

Scales naturally enough are saved as .SCL files, of type "SCALA Scales" - this is the format developed by Manuel Op de Coul for his SCALA program, which has become the standard format in the field.

For midi relaying, and keyboard retuning, save all your settings as Midi Relaying files (extension RLY).

To save (just about) everything including things to do with the visual appearance of FTS, various special features such as the chord progression player, and also relaying and the fractal tunes all in one go, save as type Configuration settings (ext..INI)

You can also all your settings as a desktop shortcut from File | Make Desktop Shortcut. This saves a .INI file with all your current settings, and makes a desktop shortcut which you can use later to launch FTS again with those particular settings.

Then, if you want to save your work as a .MIDI file or as an mp3 or such like, you normally do that from the Record to File Options window. You can start and stop the recording from the record buttons in the main window, but go to the Recording Options window to set the file name to save and to set various options. You get to this window from Bs | Record to File Options or go to it using the To File button. Record to File button - tied quaver with wavy line in the main window. See the next FAQ for more details: How do I record and play back recordings?

In the case of the fractal tunes however, you can also save them as MIDI files from File | Save As | Files of type | Current Fractal Tune as Midi File. This is to be preferred as it does it all in one go and you don't need to wait for the tune toplay, and the exact desired times are saved rather than the actual times that were achieved during play of the tune. You choose how much of the recording to save (since many of the tunes are very long and for all practical purposes endless) from File | Midi FileOptions | Playing time for fractal tune save. This is only relevant for the fractal tunes of course. However the other options in the Midi FileOptions window such as whether to add time signature, key signature etc are also used for the recordings to midi that you can make as you play.

If this hasn't answered your question be sure to contact support@tunesmithy.co.uk. I know that with the large number of file formats supported there is some potential for confusion, and it isn't always easy to find the information you need in this help - and some things may not even have been documented here yet.

For a more techy account of the file formats, start at: Open and Save

top

 

How do I record and play back recordings?

Recording, Adding support for mp3s, Sun Au etc, Custom option for audio formats, Alternative Method, Opening / Playing.

Recording

You can show the recording dialog from Bs | Record to File Options or go to it using the To File button. Record to File button - tied quaver with wavy line in the main window.

Choose one of the audio formats from the list.

MIDI records music as note and instrument numbers. This file format contains no audio data as such, and plays on the listeners soundcard synth or synth / soft synth - much like playing notes on a keyboard synth, indeed you can often play midi tunes on such synths. It usually gives the smallest file sizes, but is highly dependent on the quality of the synth used to play it back.

The other audio formats record the waveforms for the actual sounds you hear, which ensure that the listener hears the recording pretty much exactly as you will hear it if you play your own recording back

Set the folder and file name for your recording in the To File , and in current folder fields..

For all audio formats except Midi, be sure to select the recording volume level and choose a suitable source for the recordng - using the Record Vol (WAV) button - your system may be set to record from the microphone for instance. Also be sure you set the fader volume accordingly and don't have it set to 0. This isn't needed for Midi though as the entire recording is done within FTS itself in that case.

You show / hide the faders from Record Control | Options | Properties . If you need more information at this point, or don't see the control when you press the button, go to Why is no sound recorded in the audio formats? for help.

When ready to start your recording, click the Record to File button. For more about this window see Record to file

Now do a test recording, maybe record a fractal tune or play a few notes. If this doesn't work, perhaps you need to try another fader - try any suitable looking ones. If it still doesn't work, check to see if you have a half duplex sound card instead of a full duplex one - you need a full duplex soundcard to play and record at the same time. If this is your situation, see Why is no sound recorded in the audio formats?

Two options are particularly relevant for fractal tunes: Start recording just before tune starts , and Stop at end of tune . If you select these both, it means that the recording will start when you press the play button in the main window, so you don't need to start the recording first yourself. Also it will stop as soon as you stop the tune.

For the WAV or .MID formats, you can click the main window Rec. Rec. button - red buttonor Midi Record to Midi icon - red button with quaver buttons which select the format and start the recording all in one go

If your final recording has a gap at the start and the end of it, then you can remove this in FTS provided the recording is small enough to fit in its entirety in RAM. Open the recording again using Open | Files of type | Wave Sound In the Recording window that pops up, choose Options then Find region to trim - and look out for the option to set how much overlap to leave to either side here (often you don't want to trim right down to the beginning and end of the sound but wish to leave a tiny gap). Then click Trim to highlight .

Another option here is to make the clip in Midi format and then render it in .WAV format using a Midi to Wav renderer. The Virtual Sound Canvas can render midi clips directly in this way. See Roland, Yamaha and Quicktime for more about the Roland. There are other midi to Wav renderers available too. Of course you can also use this method to render any midi clips you make of your own playing.

. top, start of section

Adding support for the latest mp3 encoders, and add Sun Au etc

As installed, FTS can only record in waveform audio, or Midi. However you can add other sound formats by installing suitable helper apps.

You can do this all in one go using a special installer I made for Tune Smithy - see the on-line page: Adding other sound formats to FTS.

You will also find details there about how to add them in separately - e.g. to get the latest encoders. For instance, the quality of sound you get for the mp3 encoders continues to improve as the programmers find ways to improve the encoding.

After you run the installer, or unzip the archive for the helper app, you need to browse to find it from FTS | File | File Associations | More Options so that FTS can find it. However, if you use the all in one installer, this isn't necessary as it installs them into the program's own folder, under standard names, so that Tune Smithy can find them automatically.

Note that FTS will record audio files as .uncompressed wav files first, then it uses the helper app to convert these to the desired format. If you want to remove the original .wav files to save space on your hard drive, you need to delete them yourself later (FTS doesn't do it automatically in case you want to convert the same .wav file into a number of different formats - this lets you do this without the need to re-record it each time). See Tip for Windows newbies.

To convert to real audio you use the free Helix Producer from Real Audio. They did an encoder before which worked for all their audio formats. This new version however will only convert to Real Audio 9 format - and to make backwards compatible audio clips for the earlier versions of Real Player you are supposed to buy the Helix Producer Plus - well so it says on the web site, and in the program too when you run it.

Or you can add them in separately.

These helper apps will also be useful if you want to read the various audio formats in FTS, e.g. for spectrum analysis or to find seed notes from the recording (e.g. using File | Open | Files of type | Wave Sound).

For mp3s, download the Latest verion of Lame. This is a console app, i.e. it runs from the MSDOS prompt. However, if you are also interested in converting other .wav files to mp3s yourself, then you may like to get it's windows interface at the same time - RazorLame . You can get both in one go from mp3-tech.org/encoders_win.html. If you use this, be sure to look at my tip for users of RazorLame.

Tip for users of Real Audio : actually the Real Audio 9 clips it makes seem to play fine in Real Audio 8 too. To make sure that it will play them by file association, just make a Real Audio 9 clip, which will have file extension .RM. Then just rename the file (right click | rename in Explorer) and change the file extension to the older.RAM or RA extension, and the older players will probably be able to play it too.

Tip for users of RazorLame: I recommend that you go to Options | Expert | q level , and set this to 0 - to make the highest quality mp3s. The preset value (4) does let you do the compression a bit more quickly, but you won't notice this on a modern machine. FTS uses Lame with a q level of 0. Once you have installed it, you should also update its version of Lame to the Latest verion again, which is worth doing as they keep improving it, making smaller better quality mp3s as they refine the methods..

Tip for Windows newbies: If there are many files in the folder, as there are in the FTS install folder, you may want to know how to find the .wav files in Explorer. One way is to show the details view, and click on the title bar for the type column. Alternatively show the files in order modfied, then they will be the most recently modified files if you have just done your recording. Or do a search of the install folder for files of type "*.wav" - or whatever the file type is that you are interested in.

The list of file formats we have so far seem pretty extensive, with all the SOX supported formats, plus mp3s, Real Audio, and Ogg Vorbis - but there are always more that aren't included. The next section is included in case you come across one of those.

. top, start of section

Custom

The Custom option lets you use any other audio conversion command line tool with FTS. There are list entries for two custom formats which you can set up as you like. If you come across one that you think should really be included in FTS already, together with a suitable command line tool to do the conversion,please be sure to let me know so I can add it in to the list proper: support@tunesmithy.co.uk

To add a custom encoding, make a file called " custom_audio.txt " in your Fractal Tune Smithy folder, which has a three lines in it as follows.

Here the example uses SOX and the . AU format - of course FTS is set up to do . AU files like this already, but it could be used as a test to see how it works :

. AU
C:\SOX\SOX.EXE
*INPUT *ARGS *OUTPUT

You need to put these on separate lines in the first three lines of the file:

File extension (e.g . AU )
Complete path and file for the application to use
The parameters to pass to it. In many cases you can just use the line shown here.

Here, *INPUT gets replaced with the input file name for the encoding (i.e. the .wav file), and *OUTPUT with the output file name (the one with the new file extension, in this case . AU ). These file names get put in quotes before the substitution is made, as is usually required when passing file names on the command line in Windows - so you don't put the *INPUT or *OUTPUT themselves in quotes. Finally, *ARGS gets replaced by whatever the user enters for the Extra Arguments field in FTS - or ignored if there are no extra arguments supplied.

Here is another example, with parameters included as part of the format. The Sun AU for applets format could just as well be done like this. It adds in all the necessary parameters needed to specify the version of the .au format suitable for Java applets:

. AU
C:\SOX\SOX.EXE
*INPUT -U -b -c 1 -r 8000 *ARGS *OUTPUT

So to give a concrete example to show how this all works - suppose you want to save your recording as Playalong.au in the Java .au format, and have the usual install folder for FTS and SOX, and supply no extra arguments. You then just provide the file name for the recording as usual, and select the custom format, and then FTS would use this comand line to convert the file:

C:\SOX\SOX.EXE "c:\Program Files\Fractal Tune Smithy\Playalong.wav" -U -b -c 1 -r 8000 " c:\Program Files\Fractal Tune Smithy\Playalong.au "

For decoding make a similar file called " custom_audio_decode.txt ". This time of course, *INPUT gets replaced with the file you want to decode to .WAV, - e.g. the one with extension .au in this case. The decoding is needed in FTS if you use File | Open | Files of type | Wave Sound . to open these files, e.g. for spectrum analysis or to do Wav2Midi work in FTS to find seed notes from the recording.

If the encoding and decoding require the same comand line (with just the names of the input and output files swapped around) then you don't need a separate decoding step - just delete " custom_audio_decode.txt " if present. Then " custom_audio.txt " gets used for both encoding and decoding.

For Custom 2, use the same method but call your files " custom2_audio.txt ", and " custom2_audio_decode.txt "

top, start of section

Alernative method:

You can also record to waveform audio in FTS and then convert the files later. FTS has a button to do this for them one at a time - Bs | Record to File | Convert from .wav .

There are many other programs that let one do this too. I recommend the free dBpoweramp Music Converter - as it adds a Convert option to the right click menu which you can use when browsing for files on your hard disk in Explorer . A nice thing about this is that it is multi-select - you can highlight all the .wav files in a folder in Explorer for instance, then using the right click menu convert them all into your desired format in one go.

dBpoweramp can convert many audio types in the same way - all you need to do is to install the codecs for them from the dBpoweramp Codec Central page. Amongst other things this page includes the useful Monkey's Audio which is a loss-less compression method. It compresses audio files up to four times without losing quality, like a kind of audio "Win zip". Waveform audio doesn't zip well by usual methods - the zip is normally roughly the same size as the original, so this is a great boon if disk space is short or you want to e-mail original recordings or back them up to CD..

top, start of section

Opening / Playing

To play back the recording you can go to Bs | Record to File | Play by File Association .

You can also open audio files in FTS from Tasks | Analyse Recording or midi Voice | Open Audio File or from File | Open | Files of type | Audio files .

One useful option in FTS is to automatically trim the recording which you can find in Tasks | Analyse Recording or midi Voice | Show Recording | Options .

top, start of section

 

Does FTS support 24-bit recording?

Sorry, no, it doesn't, not for the normal Record to File window. FTS uses routines there that can only handle 8 and 16 bit recordings. There is an option to select 24 bit in the drop list in case it gets supported in some future - but at present it doesn't work.

It does however support them for the recordng to temporary memory, and for the spectrum analysis and to find notes e.g. in bird song.

24-bit recordings can be played on a PC if it has a 24 bit sound card. You can play them using the most recent versions of WinAmp, and you can make the recordings using some software packages.

For more about the wave formats FTS can record in: Wav format - details

If you want to record music in the 24-bit format, you need a suitable sound card of course, and you will need to use another program for the recording itself, such as one of the ones from Sonic Foundry or Steinberg that support it.

See The 24-bit Field Recording FAQ

Particularly: 24-bit Field Recording FAQ | 1.2.1 What software packages are available for 24-bit recording?

Also 0.1.1 Why 24-bits? Isn't 16-bits enough?.

Most of the synths and soft synths you can use with FTS will be playing the notes in 16-bit format, so these may just as well be recorded in that format. It may be worth recording in 24-bit if your synth or sound card plays Midi notes in this format, or if you want to combine quiet tracks with loud ones in the same piece of music.

top, start of section

Background:

CD players can only play in 16 bit. 24-bit is a standard for a new type of recording.

You can play a 24-bit recording on a computer if it has a sound card which supports 24-bit. You need to use a suitable program to play it such as the most recent version of WinAmp.

This format will probably eventually replace standard audio CDs in general use. Proably they will be recorded as Audio DVDs, - but there are no widely available players for it yet, so no-one yet knows for sure how it will work.

Why are audiophiles so keen on 24-bit recording?

24 bit recordings are needed for ultra high fidelity recordings of quiet background sounds such as guitar fret noise - or quiet instruments played at the same time as loud ones, or even quiet passages if the music varies considerably in volume - as is common in orchestral music for instance. Normal 16-bit recording will record very quiet passages using small numbers, and so, probably only 8 of the available bits or less, so the quality of recordings for ultra-quiet sounds and passages may be extremely poor in 16-bit recordings. Meanwhile, the old LP is considered by some to still be a superior format to the CD for music with ultra-quiet sections in it.

top, start of section

 

Can you suggest a computer to get for microtonal music making?

Okay, - this isn't a question about FTS particularly, but it is one that I get asked by FTS users. The aim here is to help users of FTS who wish to buy their first computer for microtonal music making. Musicians who have ventured along this road already, or who run recording studios will have special requirements - and I won't try to address those. However perhaps I can say a few things that will help a newbie music maker.

The main thing to look out for is the sound card. If you get a laptop or some other computers, it may only have on-board sound and there may be no way to install a new one - however you can explore the possibliity of an external USB sound card in this case.

Also make sure that the sound card has Midi In, unless sure you don't need this. It is needed for standard midi keyboards, and also for other midi input devices you can get, such as wind controllers for wind players, and specialist keyboards for microtonal music making This however is less important nowadays, as you can get USB midi devices such as the UM1-SX to add midi in / out to any computer.

If you want your soundcard to play the standard GM midi clips such as the ones you can download from the web, you need one with a GM synth - GM is a midi standard that was developed so that musicians could make midi clips that would sound approximately the same on any GM midi system, e.g. instrument 0 is always an Acoustic Grand Piano (of some description).

Most sound cards can play GM, and if not, you can install a GM soft synth in its place. So this isn't a big deal.

However if you use midi only as an intermediate step to make audio clips for others to listen to, as many musicians do, then one doesn't need a GM synth. You just set up your non GM synth or sampler to play whatever instruments you wish to use for the clip.

So, which sound card? First of all, note that you can add a second sound card, or upgrade it - so you don't need to make the best possible decision at this point. This is just to get you started. The soundcards in the SoundBlaster series are good entry level cards as they let you use sound fonts, and come with a decent sound set. I started with one of them - the Sound Blaster Live! (now no longer in production). They are still a fine choice for ones first sound card.

Your soundcard can also be used with a sample player such as Giga or Kontakt to play virtual orchestras (e.g. Garritan Personal Orchestra etc).

To find out about the most recent sound cards that get recommended, take a glance at the latest issues of the music magazines, such as Computer Music or Sound on Sound.

For the operating system - XP is fine for this. Some musicians still use Win 2K or Win 98, which may be preferrable if you have a very old machine.

The main technical difference between these is that Win 2K has no resource limitations - while if you run many programs at once inWn 9x, or show many windows with lists and drop lists in them, then eventually you reach a point where you run out of resources, and can't run any more - in fact the operating system usually freezes at that point if you ignore the earlier warning messages.

Windows XP has better multimedia support than Windows 2K and can run many Win 98 programs - but not necessarily all of them - there are small changes in the operating system. FTS will run fine in either. Also in ME - I haven't tested it in ME myself but it should be fine as FTS gets used in this operating system with no ME specific bug reports yet..

If using Windows 9x, make sure that you have the minimum of other programs running, as this is the most usual cause of crashes in Windows 98. See Trouble shooting for some tips on this.

The speed of the processor isn't much of a consideration for most audio work. If you use FM synthesis (such as the FM7) then the faster the computer the more polyphony you can get - but on the latest Pcs the polyphony you have there is almost unlimited anyway. Certainly it's not a case where a twenty percent improvement of speed or the like will be noticeable - as it is for PC gamers.

Giga works best with the fastest hard disks - indeed, it used to be recommended that you have a dedicated hard disk for it. However hard disks are now so fast anyway - a modern one should be plenty fast enough.

So I think the only other consideration is the noise your computer makes. If you are about to get a new computer, then this is the best time to decide whether you want it to be a quiet PC Musicians usually like to have a silent PC - and I gather that you can get one that is so quiet you can't even hear the sound it makes in a recording studio.

It. needn't cost much either - for instance, a quiet hard disk will cost just a bit more than a noisy one, it's just that most people who buy hard disks will buy the slightly cheaper but noiser one. Similarly, you can get quiet fans, and a quiet power unit - which is one of the really noisy units n the computer - and quiet graphics cards, and quiet cooling units for the CPU.Then - no more background hum when doing computer music work :-).

This is also relevant if you want to use your PC to analyse the frequency spectrum of an instrument - the background hum will add extra peaks to the spectrum. Another reason for getting a quiet PC is that the background noise may have distinct pitches to it, which can beat with the chords that you play - this can be confusing when listening to just triads, and trying to hear when they are beat free - they may always have beats with your PC fan etc.

See the article How to silence a computer from Quiet Pc

For those building a quiet PC themselves, this article looks as though it could be helpful: Building your own PC for music. See also the previous article on sound cards and motherboards - Sound on Sound | Articles | August | PC Musician - they are from summer 2001 however, so won't describe the most up to date gear available..

Then, for independent reviews and foruims: Silent PC review. See also the links in The silent PC

Or just do a web search for "quiet Pc" - plenty of material out there..., problem probably will be choosing where to start :-).

For headphones, the Grado Labs headphones (such as the SR60) are quite a find - if your priority is the best quality of sound for the cost, rather than the appearance. Or indeed, the even lower cos and still with very high quality sound i-Grado Portable Headphones.

For the music keyboard, see Some things to look out for in a midi keyboard.

Some musicians set up a separate partition for the swap file - the idea of a swap file is that sometimes you may have more programs running, or audio files in memory than you have the memory available for, so Windows swaps some of them out to disk - and sometimes may swap them out anyway to keep memory free.

Your swap file may run a little faster if you keep it unfragmented - and if you do it in a separate partition all to its own like this, it will never get fragmented. You specify the swap file location from Start | Settings | Control Panel | System | Performance | Virtual Memory | Let me specify my own virtual memory settings in Windows 9x. Don't worry about the alarming message that pops up to check if you really intend to change this advanced setting - it will be fine - so long as you have space available for it on that partition. I use Partition Magic to make new partitions - highly recommended..

However if you have a brand new up to date computer, these speed issues are probably not nearly so relevant as they were a few years ago. You have to be a pro. stretching your software to push a modern computer to its limit, and if that describes your situation, you wouldn't have needed to read this FAQ in the first place as you surely know it all already :-).

top

 

How do I analyse a note played in FTS to find the actual pitch played on the sound card / synth / soft synth?

How to do it, tweaks, accuracy, artefacts, missing fundamentals and bells, chords

How to do it

Go to Tasks | Analyse Midi Voice .

Click the Standard Settings button. Make sure you have Auto record and analyse selected (standard setting).

Choose the voice you want to analyse from the Voice menu. Set a value for How much to analyse - say 20 seconds. You may get asked if you want to increase the maximum amount of memory to allocate for the recording - the entire recording is kept in computer memory so a limit is set on this. You can also go to Freq. Analysis | Times... to set this value yourself to a high value straight away to avoid seeing those messages again.

Now set how long you want each note to be in the Note (secs) box. For a continuous note on strings / wind etc set this to a large number, say 10000. For plucked or percussive instruments, you may want to set it to a small number such as one second so you get repeated notes, so more data to analyse - however this will also add extra peaks to the spectrum - see artefacts.

Now click the play button, and play the note for a while, say 20 seconds. It gets automatically recorded.

When you click Stop, the note you have just played gets automatically analysed. The Find Freq. button changes to show Halt Search at this point, for a moment or two. When that changes back to Find Freq. the analysis is finished. Now you can use Show Freq. to show the frequency spectrum, and Show partials as text file to show the list of partials.

Scroll down to the bottom of the list of partials (tip: the Windows shortcut key to scroll to end of a text field is Ctrl + End ) - and you'll see something like this:

Closest concert pitch note to lowest fequency C

Deviation of lowest frequency from concert pitch: -0.373259 cents
From 1/1 in pitch window (Midi note 60): -0.373259 cents

This shows that the note was measured to be -0.373259 cents flatter than concert pitch - rather small for a wave table synth, though large for an FM synth.

To get a first idea of the accuracy of the result, look out for the FFT bin size in cents at the fundamental , which you will see a bit earlier in the Show partials as text file results. The accuracy is usually a lot better than that - but it depends a bit on the spectrum - as we will see in a bit.

In the same way you can measure the pitch of the middle c for any of your synth voices.

Tweaks

It is useful to have a look a the spectrum from time to time using Show Freq to see what you are measuring.

This is the recorder voice of the Roland Sound Canvas, a 60 secs clip, at middle c. It's a log plot, which shows finer details of the spectrum more readily, and I have cropped the botom of the figure, which is blank here in the log plot.. In this particular one I also used the preset windowing of Blackmann from Freq. analysis | Pitch detection | Detection of partials in the spectrum ( shortcut to show the window : Ctrl +Alt + L ). You can try various windows there - pitch detection may be most accurate if you set it to none - but you will get a cleaner looking spectrum with windowing.

To show the spectrum like this, just click on the Show Freq. button after you do the analysis.

I have clipped it at about 200 hz at the left. This can be useful to do as you sometimes get a few weak partials below the expected pitch, e.g. often there may be one at around 130 Hz for a note expected to be concert pitch c, and one may wish to just ignore those here..

You can clip the spetrum to left and right from Freq. analysis | Options | Frequency spectrum Layout ( shortcut : Ctrl +Alt + Z ) . Set the Min Freq. to find and to show to a little below the note you are measuring, e.g. if you are measuring a note at concert pitch C, set this to 200 Hz, say.

If you need to re-position a partial by eye, or add or remove partials, this is done by using Ctrl + Right click to remove a partial and Ctrl + left click above a peak to add it as a partial, with other options to fine tune the position of the partials which you get to from Freq. analysis | Options | Frequency spectrum Options

If some of the peaks get missed out - then you need to change the sensitivity for the peak detection. Go to Freq. Analysis | Pitch Det. | Find Peaks in the Spectrum . Then you can vary things in the lower half of this window.

First try the Peak Max Width . Reduce the width, say to 10 Hz, to find more peaks, or increase the number of decibels, say to 80. You can see the effect of your changes by choosing to show the peak detection curves from the Layout window. ( Options | Freq. Spectrum Layout - or the button in this window). The idea here is that if a peak is within the peak detection curve of another peak, it gets left out. So, decreasing the width makes these curves narrower, which means you detect more peaks. The width refers to the width at the chosen difference in decibels, so for example, a width of 40 Hz at 20 Db means that the peak detection curve is 40 Hz wide at a point 20 Db quieter than the peak.

So vary these parameters, and use Refind Peaks and see what happens.

Also try unselecting Only detect larger fluctuations in the spectrum . If that makes a difference, you can fine tune those settings, or just leave it unselected if it isn't needed. It is particularly needed when the frequency spectrum has a fair amount of noise in it, so with small peaks you don't want to detect, also FFT artefacts from repeated notes and so forth..

There are two other values to vary which set a background noise level to ignore - either dependent on the maximum valaue of the spectrum (preset to 0.125 percent), or the average sound level. (preset to 0.125 i.e. one eighth of the average sound level in the spectrum).

Finally, as a useful check of what you are measuring, you can try the wave count method of finding pitch. This is extremely accurate for suitable voices, can be better than the frequency spectrum method. On wave table synths, the Ocarina is often particularly suitable for the wave count method. See How do I find the pitch of a note (second method)?

Wave countint is a completely different approach to it, so if both methods show the same frequency it is a pretty strong confirmation that it is indeed the pitch of the note.

So now you are all set to go on and measure other notes, and chords - if you want to do this straight away, skip on to the chords section - and perhaps see you here again later :-)..

top, start of section

Accuracy

To get a better idea of the accuracy, let's look at a spectrum:

You can click Find Freq. to refind the spectrum for the current recording - saves re-recording it. You can show the recording itself, if you wish, from Freq. Analysis | RAM recording - and save it in .wav format from RAM recording | Options , and indeed you can also record it using a microphone, or open an audio file and use that to find the spectrum - Have a look through the Analyse sound page to find out more about the other options - it would be something of a digression to go into it all here..

Now zoom in on one of the peaks. To do that, click and drag to highlight the region you are interested in. A details window will pop up. You can use the zoom in / out menu and the left / right menu options for this window to look closely at any point. Or within the detail view, you can use Shift + Left click and Shift + right click to crop it to a smaller region.

This shows a detailed view of the very tip of the leftmost partial (it is stretched out considerably to left and right - the curve you see sloping down towards the edge of this view is just the beginning of the steep curve that makes the peak).

The red line shows a region of one cent above and below the frequency of the measured peak. So we see the measurement is to within considerably better than one cent accuracy. The 0.01051 shown here is in herz, and refers to the bin size - which is the spacing between the data points that make up the spectrum

The data points in a FFT spectrum are at a constant separation in herz - known as the bin size. It depends only on the number of data points in the original recording and the length of it in seconds. Sinced it is a fixed value in hertz, this means that the cents values get smaller as you go higher in pitch. At middle C, 0.01051 herz is the same as 0.07 cents. You can choose to show the values in cents from the Frequency spectrum Layout Ctrl +Alt + Z

So how accurately is the pitch measured. One would think, maybe to the nearest data point. But actually one can do rather better than that - the process of doing so is called peak interpolation. Often these get you to within maybe a third or even a tenth of a bin size when you have a nice clear spectrum. So this measurement we have just found might well be accurate to within maybe 0.02 cents, possibly better. It's rather hard to estimate how good it is actually.

Here is a really close zoom in. I've also set it to show it as a bar chart, which you can do from the layout window:

See how the peak is actually made of two data points exactly the same height. If one went for the highest data point, one would have to choose one or other of these (the data points are at the mid points of the bars). However the peak interpolation algorithm has instead gone for the mid point between the two. We can see that this is clearly a more sensible choice for this peak than the mid points of the bars to either side!

One could position the point by eye too and that is a legitimate thing to do actually as this is irregular real life data. An expert can often beat a computer program at analysing such things by eye - in fact, programs sometimes get written which get improved by using feedback by experts (this is a whole area of study in itself in programming, called expert systems).

In this case the partial is nice and clear however, so I don''t know whether an expert could improve on it. Maybe the original computer program can be expected to be better for nice clear cut examples like this one.

There are several peak interpolation methods you can use, which you can select from Freq. Analysis | Pitch Det. | Find Peaks in the Spectrum .

Barycentric , quadratic , Quinns first and second estimator , and Jains method are all three point methods - that means they just use the highest data point of the peak and one point to either side to estimate the position of the peak.

Quinns estimators require one to use Complex FFT. You need to unselect the Real FFT check box at the bottom of this window. Then when you re-find the spectrum, you will find it is a bit slower (probably take roughly twice as long). What Complex FFT does is to take account of the phase of each wave - where it is in its cycle compared with all the other ones. The spectrum itself will look identical, but during the calculation the phase component of the specturm will have been found too, and this is needed by Quinns estimators.

Technical information (skip if not interested): Complex numbers are ones that can use the square root of minus one, and they happen to be especially suitable for finding the frequency spectrum phase information. In fact for those who know a bit about complex numbers, the phase is recorded as the angle the complex number makes with the real axis, and the amplitude is recorded as the magnitude of the complex number (as the square root of the sum of its real and imaginary parts).

I find Jain's method is best of all of the three point methods for musical notes - but each has its good points, so see what you find for your own special data.

Three point methods are pretty standard in this field I gather. However, why stop at three points. In real data like this with irregularly shaped peaks, maybe one should look at more than three points to either side? That's where the mean value idea comes in. It's my own idea and I haven't seen it mentioned anywhere else yet as a technique for frequency spectrum analysis (though surely someone else will have used it - it is nearly always the case that someone has).

Anyway, it works like a charm, and seems to get even more accurate pitch measurements than the others for most musical data, which is what we are interested in here.

The idea is to find the sum of the products of the amplitudes and the frequencies over a region to either side of the peak - and then divide the result by the sum of all the amplitudes within the region. This gives you the mean frequency for the region.

Okay maybe that sounds a bit complicated but it isn't really. It is just like finding the mean of a population in statistics. Here is a slower and more detailed explanation. It is suitable if the peak is reasonably symmetrical, as the ones for most partials are, for musical notes anyway.

In fact, this option is now the standard setting - because I find it works better than the others in a wider range of situations, for musical notes. But, be sure to try the others too and see what you think for your particular data.

The partial in all these pictures was actually found by the mean value method. Rather than use just three points, as is usual for peak interpolation for frequency analysis, it used perhaps dozens of ponts to either side of the peak. It works well because though the peak is irregular, it is by and large symmetrical, and this point is at the very top and centre of it.

You'll see some other options on the drop list here - you can position the peak yourself using the mouse, and use that to estimate the frequency by eye, or both the frequency and the amplitude of the partial (vertical height).

See Finding peaks in the spectrum for some of the other options in this window.

top, start of section

Artefacts

First a note about how the frequency spectrum works. The method used is called FFT which means Fast Fourier Transform. Anyway what is special about it is that you can take a finite set of data points for a wave, and convert it into a frequency spectrum with the same number of points. So the more points the wave has (the longer and higher resolution the sample is) then the more accurate the spectrum.

However, a rather extraordinary thing about it is that you can reconstruct the original waveform exactly from the FFT. You need the frequency spectrum and you also need the phase information for all the frequencies as well - this means you need to use a Complex FFT (as it is called) which finds both of these simultaneously. Then you can do this magic trick of recovering the waveform exactly - all the data points in place - from the frequency analysis.

For this to work, the frequency spectrum has to contain information about everything in the original waveform, including things one might not normally think of as frequencies.

For instance, if you play a note once a second - that counts as a frequency. If the notes have vibrato, that also counts as a frequency. If a note starts and stops suddenly, even if it is just a single note, that also counts as a frequency. So, these are the artefacts - they properly belong in the spectrum, the analysis is correct, but they are artefacts because they aren't the things we are interested in.

One might think a note played once a second wouldn't matter because it would be way to the left of the frequency spectrum - and ditto for vibrato. But, the thing is that the frequency spectrum will analyse it, and find not just that frequency, but all its overtones too (any frequency has overtones apart from a perfect sine wave).

Here is a frequency spectrum for the Roland recorder voice again, this time with a pitch vibrato added to it of 10 cents at 2.5 herz .

Those extra peaks to either side of the main peak are caused by the pitch vibrato. This time the red line is 10 cents. There are similar peaks around the higher partials, but closer together. Don't ask me to explain the details here - I'm no expert on this - but observationally, this is what happens if you do an FFT of a voice with vibrato.

You can add pitch vibrato yourself at a precise frequency in this way from Parts | More | Pitch Var .

Repeated notes give extra peaks too - look pretty similar to thes.

The sudden stop at the start and end of a clip can also cause artefacts unless you so arrange things that the time for teh clip is an exact multiple of all the frequencies - since most FFT requires the clips to also be of particular lengths only (power of two for the number of samples) this will only happen seldomly.

Usually one uses a so called windowing function. The simplest is triangular windowing - you add a fade in at the start of the recording, all the way up to a maximum at the middle point of the recording - then you fade it out at the end similarly. This fade gets added in to the data just before it gets sent on for the frequency analysis - the recording itself doesn't get changed of course, though you could alternatively do it that way too.

You can try the effect of various windowing functions from Freq. Analysis | Pitch Det. | Find Peaks in the Spectrum

I find that Windowing has less of an effect than vibrato or shorter repeated notes for typical samples for this work of say thirty seconds or so. The main effect is a decrease in the background continuous part of the spectrum - i.e. windowing removes some "noise" from the spectrum. You may also see artefacts if you look at the spectrum in fine detail, and depending on the length of the clip and other details.

Here is the Roland recorder voice again to show the effect of no windowing:

What you see here is very dependent on the exact frequency of the note, the length of the recording, and whether you include the attack of the note in it (as windowing naturally will smudge the attack away since it starts the notes). Some choices may lead to few windowing artefacts if any while others may have more obvious artefacts.

To find out more about FFT in its many aspects, try some of the links to sites on the FFTW links page.

top, start of section

Bells, and missing fundamentals

You can get a program called wavanal for analysing church bells from The Sound of Bells web site..

Bells often have only a very weak partial at the frequency that is perceived as the pitch of the instrument by most listeners, and some may have no partials there at all. See The timbe and pitch of bells.

The author Bill Hibbert synthesizes an example bell sound with partials 5/9~ 6/5~ 2~ 3~ 4~ 16/3~ 13/2~ 8~ 21/2~ (to within 30 cents) for a perceived pitch of 1/1.

The perceived pitch makes a harmonic series with the actual partials 2~ 3~ 4~. However, he finds that even the sound made up of 5/9~ 6/5~ 2~ (hum, tierce and nominal) can be perceived to have it's pitch at the 1/1!. Try his file 8 and see what you think.

His actual frequencies used, in Hertz, are 176.6 390.2 640.9 949.0 1302.4 1690.9 2110.2 2604.6 3380.0 with the usual perceived pitch at 320.5 Hz.

top, start of section

Chords

So now you see how to compare the pitches of the middle cs of all the voices on your synth - try each in turn, play a long-ish note, and see what you find using Show partials as text file .

How about analysing chords though. For those you use Make Chord to analyse . Enter the chord you want to test into the edit field, then click that button, and use the play button as before. With this one, try selecting Add harmonic series analysis . before you use Show partials as text file . This analyses the list of frequencies to look for overtone series.

This gives especially good pitch accuracy for instruments rich in overtones, such as strings, because then it can find the average of maybe ten or more partials for each note of the chord. The higher partials are more precisely determined too, because the frequency spectrum, as it turns out, has finer resolution for higher pitches. (Techy detail: the harmonic series analysis works by dividing all the overtones by integer numbers down to the fundamental, and then taking the average of all those values to find the adjusted frequency of the fundamental.).

The harmonic series analysis is not suitable for the piano or for some inharmonic timbres such as some bell sounds - you will see why if you try analysing a note played on these instruments. The ones that are suitable for the harmonic series analyses are the ones with partials at nearly exact multiples of 1200 cents..

You can enter a single note for the "chord" here if desired - say, 350 cents. You can also use any of the notations you use for entering scales.

You would normally need to click the Make chord to analyse button each time you try a new chord. However, if analysing many chords in this way, you can select Auto remake to automatically remake the chord every time you click the play button - and so save yourself some time.

To get back to the preset (play the 1/1 only) and ignore the chord to analyse, use the Standard Settings button again (which will also unselect Auto remake ).

top, start of section

What level of pitch accuracy can I expect to find typically?

Wave table synths seem to be variable in this respect, while an FM synth can be really extraordinarily accurate. Typicaly wave table synths seem to vary from say 0.1 cents to 4 cents of accuracy, while FM synths can be accurate to better than 0.01 cents.

Here are a few that I have worked with, but I haven't made an exhaustive set of measurements by any means, these just a result of a few spot checks:

The Virtual Sound Canvas seems to be accurate to about a cent in relative pitch within the same voice, and has similar variation in pitch from one voice to another.

The SB Live! is much more accurate than this within a single voice if it uses a single sample, about 0.2 cents or so. However, it can vary by 2 or 3 cents or more as you vary the sample (i.e from voice to voice, even different registers of the same voice sometimes). The reason for this variation seems to be because the orginal wave samples have their frequencies set to only 2 or 3 cents of accuracy - so it can be fixed, with a great deal of work, by retuning all the individual wave samples. You just need to change the sample rate at the head of the file, which could be done using Autotune perhaps.

The Yamaha soft synth is accurate to perhaps 0.5 cents or so within a single voice.

I sometimes wonder why the wave table synths vary so much as this actually - especially the ones that use only a single waveform for the note. Why is the SB live! for instance only accurate to within 0.2 cents when you use a single waveform - instead of the better than 0.01 cents accuracy of FM synthesis? One would have thought linear stretching of the waveform would do and would have as good pitch accuracy as the FM synths - maybe there is some reason why this doesn't work... (any wave table synth designers reading this??).

The FM7 has much better accuracy - an amazing at least one hundredth of a cent - that is just the limits of my measurements - probably accurate to one thousandth of a cent.

As for the larger variations due to wave samples only pitched to within 2 or 3 cents of the target frequency, I may later add an option to FTS to autotune, and do it so it can retune all the wave samples in a font in one go. However, the FTS peak detection algorihtm needs to be improved first - it finds the frequencies accurately, but sometimes doesn't easily distinguish the main peaks in the spectrum from noise and smaller peaks

Some musicians with particularly fine sensitivity to pitch can distinguish an interval of one cent or better as a melodic step (1200 notes to an octave or more). Most though probably have best pitch resolution in the range four to fifteen cents, and some with no musical training are unable to distinguish notes a semitone apart. So, these are pitch variations beyond the limit of hearing for most.

So, why are we concerned about them - it's because fine pitch distinctions are more important in chords, and can be more noticeable, as they can cause beats. There, even a one or two cent distinction can be fairly easily noticeable.

Try this - show a scale window, and set the step to 1 cent, and try playing two notes together (say harpsichord) and you may hear beats - a slow wah wah type sound as the note fades away. Try comparing the equal temperament 1/1 700.0 and 1/1 3/2 and you'll probably hear beats in the equal temperament one.

You may hear slow beats in the 3/2 too though, with a wave table synth. (Something to watch out for - notes can also beat with the hum from your computer).

Probably not that many performers are able to play notes to better than one cent accuracy - even in sustained chords. It is a fine pitch distinction to make, and easily overwhelmed by the slightest vibrato or involuntary pitch variation. In the case of fixed pitched instruments, maybe you can tune it to this accuracy, but then the tuning may change a little during performance or because of change of temperature etc.

However, some modern microtonal performers do indeed claim that in their performances they can pitch notes to the exact cent desired, and that they can hear the distinction between notes a cent apart melodically.

The wave table synths leave something to be desired by comparision, but are fine for getting to know and enjoy microtones. If you want to hear the purest possible intervals you can get in computer generated music, try an FM synth such as the FM7.

top

What is pitch bend and how is it applied?

Midi is set up to work with the twelve equal scale. Each note has a number between 0 and 127. The number is the number of semitones above the 0 note, with the 0 chosen to be five octaves below middle c. So 60 is middle c, 61 is c#, 62 is d etc. This spans the entire range of musically useful notes.

However, when one wants to play notes "in the cracks between the keys" of a twelve equal keyboard, you need to bend the pitch up or down from its twelve equal position. Midi keyboards often have a pitch bend wheel - and when you move it, it bends the current note up / down in pitch - usually with a range of plus or minus a whole tone.

So if you want the pure just intonation 5/4 for your e above middle c, at 386 cents for instance, you could make its Midi note 64 flat by 14 cents by moving the wheel by the appropriate amount. Unfortunately for this approach though, the wheel applies to the keyboard as a whole, so all the notes will get moved down, including the c as well. That's not what we want.

The solution here is to play the c and e on separate Midi channels. The pitch bend only applies to one channel at a time - though this does require that you have a multi-timbral synth or soundcard - one that lets you play notes on separate channels. Supposing all is well and you can indeed play on separate channels, then what you do is to play the c on channel 1 say, and the e on channel 2. Then bend the pitch for channel 2 down by 14 cents - and there you are, a perfect just intonation major third diad. To complete this to make a triad you'd then play a g on say channel 3, and bend the pitch of it up by 2 cents.

You can make any chord in this way, so long as it needs no more than 15 simuiltaneous pitch bends. That's not much of a restriction as few scales have more than 15 distinct pitches in them. Notes a perfect octave apart can be played in the same channel (also notes at any equal tempered interval such as say 300 cents etc.). Non octave scales are more tricky and you can run out of channels if you have more than 15 simultaneous notes in a chord in a non octave scale. For more about this, see Situations where one can run out of channels.

Although this used the pitch bend wheel, you can do it also by sending an appropriate mdi message. Composers of microtonal music used to insert these pitch bends by hand into their scores in order to pitch bend the notes - indeed a few still do it this way. But, I think it is a little easier to use a progoram like FTS or SCALA to do it automatically :-).

Now for the nitty gritty, how its done. The pitch bend is in the range of -200 to + 200 cents. You can see the pitch bends as they are applied in Out | Notes in Play . Play a just major chord for instance - to do this, select the major chord from the Scales drop list. Then in Bs | Arpeggio / Scale Playback , choose chord for the play method, and click the play button for the arpeggio.

Or, perhaps better actually, play it on the PC keyboard and watch to see what pitch bends get applied for each note as you play.

You will see the notes:

60 pitch bend 0 cents
64 pitch bend -14 cents
67 pitch bend + 2 cents

The actual channel used for each note will depend on what has gone before in the tunes or your improvisations. Also, here I'm rounding the figures to the nearest cent - you can choose how many significant figures you want to show in this window, and in most of the FTS windows, from File | scale notation .

(first use File | New . if you have been playing one of the exotic fractal tunes first such as the Fibonacci tonescapes).

How accurately can these notes be pitched then?

The midi spec actually uses numbers in the range 0 to 16833 to specify the pitch bends, where 8192 corresponds to a pitch bend of 0, and 0 means bend the pitch down as far as you can, with the midi standard setting here is -200 cents. The highest pitch bend upwards in the spec is 16833. The next number, 16834 (which you aren't supposed to be able to send) would bend the pitch up by 200 cents.

So each unit of pitch bend is 0.024414 cents. This is a tiny amount and likely to be better than that available on many sound cards or synths and well beyond human pitch perception limits in all except possibly very special situations (one might be possible to detect it by listening to beats in carefully designed synthetic sustained chords).

For those interested in the technicalities, these pitch bend numbers are 14 bit numbers. This is a bit unusual as usually computers use multiples of 8 bits - the reason is that in midi the first bit of each data byte has to be zero as a way of distinguishing them from other types of byte that specify types of event such as note ons and offs. So in midi you send data in multiples of 7 bits. That's also why you have 128 midi voices instead of 256. Here, you have 128*128 (=18634) midi pitch bend units instead of 256*256.

Midi keyboards usually have pitch bend wheels that only send the most significant (7 bit) byte of the pitch bend, which means the smallest pitch bend unit for a wheel is only 200/127 cents = 1.57483 cents. This is fine enough so that most musicians will hear the bend as a continuous slide (pitch bend sensitivity for musicians is often in the range of 4 to 20 cents though some can hear pitch changes less than 1 cent and so I suppose they might perhaps hear a pitch bend wheel slide as a series of melodic steps). Some low end keyboards have pitch bend wheels with only maybe a dozen or so pitch bend steps per semitone..

There's a reason for reducing the number of pitch bend units - if you were to send a pitch bend message for each position of the wheel for 8192 distinct pitches per tone, you'd need to send thousands of messages each time you move the wheel. That would slow everything down - even a modern fast computer might need to pause if you start sending thousands of midi messages in a fraction of a second. This is especially true when you use a midi keyboard, since it connects to the computer via a cable, and transmission along a midi cable is usually much slower than internal processing in the computer itself.

FTS however sends "instant pitch bends", so can use the highest available resolution because it only needs to send one pitch bend each time to retune the note as desired.

top

How do I do a frequency analysis to find the partials of a note?

See the How do I analyse a note played in FTS to find the actual pitch played on the sound card / soft synth / synth? FAQ for details about the frequency spectrum method, discussion of artefacts that can occur, and examples.

Midi Voice, A note you play yourself or have already recorded.

Midi voice

This is already covered in How do I check the pitch accuracy of my synth / soft synth / sound card synth?

Here is a quick review::

Tasks | Analyse Midi Voice .

Standard Settings

Make sure you have Auto record and analyse selected.

Choose the voice you want to analyse from the Voice menu.

Set a value for How much to analyse - say 60 seconds. Set Note (secs) to 60 seconds too - if you make it small, then overtones of the repeat period of the repeated notes will add extra peaks to the spectrum.

Now click the play button. When you click the stop button, the note you have just played gets automatically analysed. The Find Freq. button will change to show Halt Search while the note is analysed (maybe very briefly if it is a short recording). So wait a moment for it to turn back to Find Freq.

Then use Show Freq. to show the frequency spectrum, and Show partials as text file to show the list of partials.

You can also resynthesize the sound from its partials and compare it with the original. Use Make Waveform from partials , and then Play synthesised wave .

Select Use original volume envelope to resynthesize it with the same volumes, e.g. the same level of attach and fade away for a percussive or plucked note.

top, start of section

A note you play yourself, or have already recorded

Tasks | Analyse Recording or Midi Voice .

Now if you have a recording already, open it from Open Audio file

Choose How much to analyse - if you want to analyse the complete clip, set this large

Then in the main window, click Find Frequencies , and Show Frequencies , and that will show the frequency spectrum. Use Show partials as text file to show the list of partials.

To find the partials for a selection from the recording, highlight the part you want to analyse, and use Show Freq. | Options | Find for Detail .

If you want to find the exact pitches for the notes of a chord played on harmonic partials type instruments such as voice / strings / brass / wind etc, try selecting Add harmonic series analysis before you click the Show partials as text file button. Look at the end of the partials file to see the analysis.

If you want to make a new recording then click the Record Control Button and select a suitable recording device such as microphone. Then back in FTS, click Show recording , and press Start rec. .

Alternatively, to keep an eye on the recording as it goes along, show the Oscilloscope and record from there.

The Record Control is the same one you get from Windows if you go to Start | Programs | Accessories | Entertainment | Volume Control and then choose Options | Properties | Recording (Saves a few clicks to do it from this FTS short cut. :-)).

When finished, click Stop Rec . Note that this is a temporary recording which is kept in memory only and will be lost when you exit the program. If you want to save it, use File | Save As | Save as type | Ram Recording as Audio File (*.WAV) . You can also do it from Show recording. | Options | Save recording as .

Then you can play it to check it is recorded okay, and analyse it as before.

top, start of section

How do I convert the frequency analysis into a scale?

This is easy - just use the Show partials as text file . Then scroll down and you'll find the partials as a scale.

top

How do I make a custom voice consisting of one instrument playing the partials of another one?

Use Make partials into custom voice .

So for instance, suppose you'd like to hear the sound of a sitar playing the partials of an oboe. Analyse your oboe voice in the usual way. Then click the Make partials into custom voice button. In the window that pops up, click Select Voice or non melodic percussion . Select the Sitar from the Voices menu. Then click End selection.

Now to hear what it sounds like, click Select into highl. Part . Back in the main window view, to try it out, first unselect Auto record and analyse (so you don't record over your oboe recording), and click the play button to hear what it sounds like.

This is a voice you can use like any other midi voice in FTS. You'll find it has been added to the menu in Voice | Custom Voices . For more about the things you can do with custom voices, see the help for those windows: Custom Voices and Custom Voice as Timbre.

top

How do I find the pitch of a note (second method)?

Tasks | Analyse Recording or Midi Voice .

Record your playing, or open an audio file, or select Auto record only and play one of the midi voices to record it.

Then go to Find Seed , select Find as a single note , and click Find notes .

This works better for some voices than others - tends to work well if the waveform has clearly defined peaks or waves all very similar in shape to each other. It's set up to work well with recorder - but you will find other options from the Find Seed Options drop list (and can save your own presets here too).

If you do this with a wave table synth, it tends to work especially well with ocarina, which tends to be pretty close to a sine wave in shape. Or look and see if you can find a voice that consists of a repeating wave (as shown in the oscilloscope).

You can show the Oscilloscope while the note is played and recorded, and select Oscilloscope Options | Show Info , for a first idea of the pitch.

However, this doesn't do much analysis of the sound - in particular, it skips the search for similar waves, so is fairly likely to show a pitch too high or too low. It finds the pitch based on the length of the current waveform as shown in the window (= same pitch you hear if you click the "Play this" button) - as this is a very short section of the recording, the measured pitch will tend to fluctuate. (However, it uses zero crossing interpolation to get a more accurate measure of the pitch than one might otherwise expect from such a short sample - it measures the length of the waveform not just to the nearest sample, but to a fraction of a sample depending on the interpolated zero crossing point).

top

 

Is there a version of FTS for the Mac or Linux?

No, sorry, there isn't.

FTS would need to be written from the start in a multi-platform language such as Ada which Manuel Op de Coul uses for SCALA. As it is written in Windows C, all of it is highly Windows specific.

The way to port it to the Mac would be to use a Windows emulator there of some kind. I am told that FTS is used successfully on a Mac with Virtual PC. Wikepedia entry,

If you haven't heard of it yet, you should also check out Jeff Scott's L'il Miss' Scale Oven. It is used to make scales and to update the tuning tables of synthesizers so that they can play in the scales.

He has an intimate understanding of scales as a composer, so this must surely be a must-have program for Mac microtonal composers and musicians.

For Linux, you could try FTS with Wine. FTS uses only standard Windows calls, so it may work.

I'll be interested to hear if you try out one of these methods, or any other windows emulator, and find it works - let me know which Windows emulator you used, and I will update this FAQ entry accordingly :-).

top

What language should I learn to write a music program, and how long does it take to write one?

Intro - Books on C - Assembly - Programming tools - Selling your program

Intro

Though not particularly about how to use FTS, this is a FAQ from FTS users. I'm glad if FTS has inspired you to want to program yourself :-).

I'm not really the one to answer this question though. In short - I don't know which language is best. If you want a quick start you certainly shouldn't follow the route I took myself which I think would take just about anyone a fair number of years to get to the point where you can write Windows programs. If starting from scratch now I'd do something different probably myself too. Anyway I'll say a it from my limited experience - maybe some links here may be of interest to someone or other reading this.

You need to take time to learn how to program first of course. It depends how quickly you pick it up, and also depends on the language you use, but you probably need to put in several years. There are some things you'll be able to do pretty early on depending on the language, and what your aims are. If you find you like programming, it's a lot of fun :-).

If you want a gentle introduction to programming, you may want to try something with easier than music making, which is quite an advanced topic in most programming languages.

Many get started by making Flash animations for web pages. Even children in Primary School are able to make Flash animations, so it can't be that hard to get started on it. Yet it is also a widely needed and useful skill for professional web designers as well. I imagine you get visible results rather quickly. You can also use Flash to play Midi events with the right tools so eventually you may be able to make musical flash animations as well. Try Flash Midi - currently a beta. So far I haven't needed to learn Flash myself.

A program with really as many features as FTS would represent a fair number of programmer years. However, you can build it up gradually.

As an alternative to building on existing code you can also use various tools that have been developed to make music programs. In some cases the result can only be run within a particular program, and sometimes they can be deployed more generally, within web pages or as stand alone programs. Maybe you will find some useful material amongst the links here: http://www.synthzone.com/miditech.htm.

FTS is written in a language called C. That's really the only language I'm familiar with apart from some now nearly obsolete languages that I used to use in the past. I can probably most usefully say things to help any aspiring C music programmers reading this. So I'll focus on that, but before getting to it, I'll mention some other programming languages that I know of.

C++ is often used for Windows programming. It has a reputation as a particularly tough language for beginners however, and probably most would learn some other language first, before tackling this one, and you would probably start by learning C instead of C++. The newer C# is supposed to be somewhat easier to use than C++. However, I can't say much about it as I don't use either of them myself.

One language often recommended for beginners is Visual Basic. I don't know much about it but have seen example programs of a few lines that are fully functional useful Windows programs. You should be able to do the same things in Visual Basic that you can do in Windows C as you can call the same routines, so for instance you should be able to play notes and so on.

However, I don't know any more details. If you have some Visual Basic experience, why not try some of the visual basic sample projects - here is one from Microsoft which looks as if it does all the right things to get one started with midi music programming. Or check it out with someone experienced in it if interested.

Another one that is good to know is Java - one of many C like languages. It's used for making applets for web pages, and occasionally for stand alone programs. You could reasonably jump into Java straight away without learning any other language first, it is more suitable for beginners than C++. The latest versions of java have midi support - so you can write musical web page applets :-). Again I have little experience in Java myself. Java developers will probably be interested to explore some of the java tools available to generate music - see this page again: http://www.synthzone.com/softsyn.htm - for instance Jsyn if you are into making new virtual instruments and the like..

Then, if you make web pages, it is useful to know javascript. Though the name is similar, actually there is almost no connection with Java - both are C like and they have a few things in common, that is all. I'm not sure how much actual music making you can do in javascript, but it is useful in other ways.

Javascript can be quite a nice introduction to basics of programming. It is not so much used for large programs. It's only suitable for use with forms in web pages and other web page applications, but is widely used for those, and is very useful indeed in that way. It is easy to make a small javascript applet - for an example with few lines of code, see my ratio to cents applet in the Cents and Ratios page - use view source to see the code (within the script tags). So - if you are interested in very short calculation type applets for web pages, it could be an interesting language to explore.

If you get into javascript, it will save you a lot of time to have a good javascript debugger. You can download free ones for both Internet Explorer, and the Netscape one Venkman. Here is a nice on-line tutorial on Using the Netscape javascript debugger.

There are many other languages - e.g. Small Talk - one of the earliest object orientated and gui based languages, and still going strong. - I'll also mention Ada which is the one that Manuel Op de Coul uses to write SCALA (along with Gtk)- so it must be good :-). It has a reputation as a language that lets one write bug free code more easily and quickly than most languages.

You may also be intereseted in the widget tool kits (which Gtk would be an example of).

Many windows programs are written in C++. Plain windows c programs tend to be "lower level" - useful if you want to optimise them to be as fast as possible.

The route I took myself was first a bit of early main frame programming in Fortran in the early 70s, through Algol at university - then after a gap, C for XWindows on Unix (for some of my maths research) then Windows C.

I think the style of programming I use myself, low level Windows C, would be hard for anyone to learn in less than at least a few years of programming.

I probably would follow a very different route if I were to start programming now. Indeed, the two main languages I learnt in my early days are now rarely used - at least for windows, I'm not sure if you can even use them to make GUI type programs for Windows, at any rate it would be a most unusual route to start with those as your first programming languages nowadays..

Programming in C++ or C anyway is very hard, for a beginner starting from scratch. You would need to allow at least a number of years before you can make useful programs - I believe, for Windows anyway.

However, there may be some future in new C language based languages for beginners. I had a look recently at a language called Ultimate++. It comes with a very nice Integrated Development Environment (IDE), which you can use for ordinary C programming as well. The language itself looks elegant from its descriptions and some things are much simpler thatn they are in normal Windows C++ - and it is designed from scratch to be naturally an object orientated language - unlike C++.

I don't know what the future is for Ultimate++ - it is at present being developed by just a single developer. Though with an enthusiastic body of users to judge by the forums.

This is just a first impression - maybe this or if not this one exactly, something like it may eventually be a good programming language for beginners to Windows programming who like to follow a C like route. The program code in Ultimate++ is remarkably compact and concise compared with either Windows C and Windows C++ code for gui based apps - and has the big advantage too that it is cross platform - the programs can run on a Mac and on Linux as well.

I plan to investigate it for my own programming in the near future. I haven't tested it yet .

top - start of section

Books on C

If you want to learn C++ or Windows C, or some other C based language, first you need to learn C anyway, and the classic book on that is Kerningham and Ritchie " The C Programming Language, Second Edition ".

The classic book on Windows C programming is Charles Petzold's " Programming Windows, 5th Edition ". This explains how to make gui based windows programs in pure C. FTS is written entirely in C in this fashion. FTS is a bit unusual because it is written entirely in plain Windows C. Most programmers use a higher level language for large programs like this one.

Here is the ACCU (Association of C and C++ users) list of Beginner's c programming books (on-line), Advanced c programming, and MS Windows

Music making is a fairly advanced topic in Windows C (chapter 22 in Petzold's book), so I've made a library of subroutines to help with this. You can use it to play notes in any scale or tuning - even in your first "hello world" type programs. It may well be of use for more experienced programmers too (I find it useful myself to get a small music program together quickly). Here it is (on line) PlayMidiLib. I will probably add to it from time to time, and make a few demo programs to show how it can be used.

It's usual to start with console apps, then move on to Windows C later. That's just because of the size of most programs written in plain Windows C. You can make some simple programs that just display an Ok or Ok Cancel message and such like, then the next step up in Charles Petzold's book is to a program of about 80 lines - most of which is specific to Windows.

It's best to get used to the c language first, and how it works, loops, variables, arrays and so forth, and to do that with the minimum of extra overhead. C has inspired many C like languages, and if you learn C you have a good basis from which to learn those too.

It would be nice if someone were to write a book on programming in Windows C from scratch - but I can see the difficulty - there's this gap between a Windows program suitable for about chapter 2 or so, and one for chapter 10 - what do you do in between? Perhaps one could add a library of extra routines which you link in to all your beginner programs, to make input and output of data much easier than it usually is in Windows C - I thnk this approach may have some potential.

Many find C++ a useful language. My own inclinations are towards the lower level type of C programming as in FTS and I have very little experience really of C++. So I'm not the one to recommend C++ books.

C programmers are often interested in programming at a low level - it is a good language to use if you are into optimising your code by hand, and if you know how to optimise your C code, your C programs will run as quickly as programs in any other language except perhaps Assembly Language, though this advantage isn't such a big thing nowadays.. The programs also tend to be a bit smaller too.

top - start of section

Assembly

If you are interested in this style of programming you may also be attracted by assembly - I am. It's possible to write an entire windows program in assembly - I know of one music program in this style called abox. However, this is so rarely done because of the sheer number of lines of code needed - apart from that one, I've only come across one other Windows program entirely in assembly. For those interested in this subject, I came across this site on how to write Windows programs in assembly: Win ASM. .

C compilers translate your code into assembly before they build the program, and often include an option to show the assembly code. Here is one line of code from FTS expanded into Assembly by the compiler.

5151:   zero_ypos=zero_line_central?wave_height:2*wave_height;
007DBFA7   movsx       ecx,byte ptr [zero_line_central]
007DBFAB   test        ecx,ecx
007DBFAD   je          PaintWave+0D9Ah (007dbfba)
007DBFAF   mov         edx,dword ptr [wave_height]
007DBFB2   mov         dword ptr [ebp-23A0h],edx
007DBFB8   jmp         PaintWave+0DA5h (007dbfc5)
007DBFBA   mov         eax,dword ptr [wave_height]
007DBFBD   shl         eax,1
007DBFBF   mov         dword ptr [ebp-23A0h],eax
007DBFC5   mov         ecx,dword ptr [ebp-23A0h]
007DBFCB   mov         dword ptr [zero_ypos],ecx

Quite remarkable that anyone should write an entire Windows program in this language. It used to be used frequently for optimising sections of a program for speed - but compilers have got so good at that nowadays that they say you often don't gain much in speed by doing it by hand, and it may even slow your program down if you aren't well up on how the latest generation of chips operate. So, much as I'd like to, I've never had much incentive to learn Assembly, and that is probably true of most C programmers.

top - start of section

Programming tools

Whichever language you decide on, it is worth getting good tools even as a beginner.

It may seem a trivial kind of thing if you are new to programming - syntax colouring is a great help for spotting syntax errors as you type. The idea is to show, e.g. variables in one colour, comments in another, strings in another, and so on. As a beginner programmer, most of your errors to fix in the first programs you write will be syntax errors, and this will mean you spot many of them immediately while you are typing, If you make a typo, the things you type show up in the wrong colour - "black instead of blue - Ah - a typo!". It's a great time saver and will make the learning process much more fun.

Then, it is useful to get an IDE (Integrated Develpment Environment) that lets one edit the code, run it, and step through it in a debugger within the same application - that saves a lot of time - however it isn't needed perhaps for ones early programs.

I can only really comment on tools for c programming. The one I use is Microsoft Visual C++ - suitable for experienced programmers who already know that they will be using Windows C or C++. There is a free version for hobbyists - however it doesn't include a resource editor which is a bit of a drawback in a GUI program.

Others use Borland C++ which is the other main commercial C compiler - I don't happen to have used it myself.

I've recently come across Ultimate++ which comes with a very nice looking IDE - and is completely free - with a new more thoroughly object orientated approach to windows C - can also be used to compile standard windows C / C++ programs - however I've not tested it much as of writing this.

The rest of this is a bit out of date. You may like to look at the Wikipedia article on IDEs. and the comparison of IDEs

If you want free tools, you can get a free programmer's text editor for c with syntax colouring on this page Freeware Home >> Programming >> Editors. I've had a look at UniRed and first impressions are that it is rather nice but I haven't tested any other tools apart from Visual C++ at all thoroughly.

Look for shareware ones in this Google directory listing.

If you go for free tools, you need a compiler as well of course. LCC is free, comes complete with IDE with syntax colouring, and can compile Windows programs. It's a compiler for C only, not yet for C++. (there's a paid version as well on CD, or with additional examples, or if one wants the compiler source code).

I've tested LCC a little, and it works fine, with a number of nice features. It can open and edit resource files too. If you call a function that isn't in your project or any of it's library modules, it will search through all the Windows libraries to see if it can find it, and list any that have it and offer to add it in - very nice!

One thing I notice in the documentation but haven't tried yet is that it has support for arbitrarily large numbers ("Big numbers"), which will be a nice feature for some microtonal lattice work - you can get pretty large numbers by taking repeated powers of 3/2 etc.

Bloodshed is another one that you can get for free, this time for C / C++. The compiler is called Dev-C++

If all you want to do is to compile console mode apps in plain c, GCC is fine, which you can get from the djgpp home page. Read the install instructions - you need to modify your autoexec.bat file and add a couple of lines to it - apart from that, it's just a matter of unzipping it - the install is easy). This would be fine to use e.g. to work through Kerningham and Richie

Djgpp can compile windows programs, but apparently you may need to get quite technical about it to do that. The FAQ for GCC itself recommends LCC as one of several for Windows C, and mentions particularly that it is easy to use.

Your programmer's editor may let you run a compiler directly from within the program. Or, you can run gcc from the command line using this type of syntax, which is fine for ones first few programs:.

gcc -o hello.exe "hello world.c"

then you'd type

hello

to run your program. For comand line work, it's useful to install Doskey so that you can go back to repeat a previous command using the up arrow. You do that by adding the line

doskey

to your autoexec.bat . You can edit this file most quickly in Windows from Start | Run | msconfig .

If you use UniRed, and gcc, you can add these lines to UniRed\compile\c.ini to help with compiling your first c programs.

[compile with gcc]
cmd=gcc -o "%name%.exe" "%file%"
show=1
pattern=^([^:]*):(\d+)
filepos=1
linepos=2

[run compiled program]
cmd="%name%.exe"
show=0
top - start of section

Selling your program

Finally, if you want to sell your programs - for advice, see the Association of Shareware Professionals - they also developed the pad file system which makes it far easier to submit your program to download sites. That site also has a useful list of over 300 shareware / freeware sites to submit your program too. Most of those will automatically list any program you provide, though some do review them first. Then with all those forms to submit your program, it's useful to get something like Roboform to fill them all in - this has a special App upload section. Or use one of the specialist submission programs for software authors. You will also want to make Pad files for your program for the sites that accept them - saves a lot of form filling - that is easy to do too, and explained on the ASP site.

I recommend my agents Reg Now for the order processing - many shareware authors use them and they are well established in the field. There are several other major resellers of software too, that's just the one I use. I recommend Armadillo for protecting your program from Crackers - don't think it won't be cracked just because it is a specialist program becuase there are many crackers who are keen to find the unlock key for any program that gets published, and not enough programs to go round apparently. Any newly posted program on the large download sites will attract their attention within a couple of days. They do it just for the fun and the challenge - but then publish their results for other crackers to see to prove they did it - and then these get widely distributed by others. Again there are many other such systems in use, but this is one I use and know it works well.

A few earn a reasonable amount from shareware, but many earn rather little - think how many programs one downloads and what percentage of them one buys - well many windows users anyway buy a rather small percentage of the ones they try. It would be no surprise if only one in 5000 or less of those who download your program ever register it, though with some particularly successful programs the figure there can be as high as 2 or 3 percent I've been told. So your site will need lots of visitors, or your program will need to be mentioned in many places!

For music programs, try submitting them to Harmony Central and Shareware Music Machine.

top - start of section