cppTK BASICS

cppTK  BASICS

cppTK is a small but very powerful program.

cppTK could be sitting anywhere on your system, I would advice to keep a copy in the folder or directory where your project is.

It is advisable to have a recent copy on your root level in a directory / folder named cppTK.

On my system it looks as in the next picture:             ----->


In the folder / directory cppTK should be two (text-only !) files named:  cppTK.s  and  script.s

cppTK.s is a configuration-file. cppTK will read it first when starting and use the values mentioned in that file.
Values for samplerate, resolution in bits, scratch-file etc. could be given 
Make sure this file is in text-only format ! (you could use TextEdit in Plain Text mode or a program like BBEdit.

An example for cppTK.s is:

scratch: /Volumes/_SCRATCH_/cppTK/
SR: 192000

script.s is the most important file. It should be in the folder cppTK on root level AND IT IS ALWAYS in text-only / Plain Text format.
It holds the script that will control cppTK and all the examples for cppTK commands and scripts will go in that file !

Please note: executing the file script.s will result in a copy of that file with the name of the outputfile with the extension .script.

To download a recent copy of cppTK   click here  -------------->
to get a zip with a copy of  cppTK.s   script.s   and cppTK.NRT 

To download example.01   click here  -------------->
EXAMPLE.01

This example script show just a bit of a simple mixing / montage script.

 { comments are between brackets }

SAMPLERATE(48000);  { this command sets the sample rate to 48000 }
DIRECTORY("/Volumes/PROJECTS/cppTK examples/example.01"); { this sets the directory for soundfiles and output }
FILENAME("example.01"); {the name of all generated / calculated output }
NCH = 2;{ the number of output channels, in this case the result is a stereo file }
{NCH is a variabel, in this line it is set to 2 }

f1 = SOUND("fles.puls.01.aif"); {open the soundfile "fles.puls.01.aif"}
f2 = SOUND("fles.puls.02.aif");
f3 = SOUND("puls.160116.a.aif");

AT(0); { go to time 0.0 }
PLAYSOUND(f1, 60, 120, NCH, 1, 2, -1); { play the soundfile f1 on pitch 60.000 (MIDI) with amplitude 120 dB }
{NCH has been set to 2 PLAYSOUND needs to know how many channels f1 has}
{it will play f1 on the positions 1 and 2, in this case a simple stereo position..}

AT(0.45); {go to time 0.45 sec}
PLAYSOUND(f2, 48, 120, NCH, 1, 2, -1);


AT(1.0);
PLAYSOUND(f3, 36, 120, NCH, 1, 2, -1);


renderall(1);
{ calculate and save all output plus an extra 1 sec to harddisk }
Share by: