RTcmix

Research done by:

Judy Franklin & Veronica Morales

 

General

Our work

 

 


 

 

 

 

 

General

CMIX is a package of sound-processing, synthesizing, modification and mixing programs that can be used to manipulate pre-recorded sound or create any sound. RTcmix adds real-time capabilities to CMIX, in addition to the ability of reading sound data through TCP sockets as well as a scorefile. It is also written in C++ and takes advantage of the object-oriented paradigm. With RTcmix, output can be sent directly to speakers, unlike CMIX which needed the output saved to a sound file first (this is optional in RTcmix). It can do this because it incorparates a scheduler that dynamically calls the RTcmix instruments.

Installation is straight-foward with a thorough INSTALL file located in the root level folder. The most important item is to make sure that makefile.conf is pointing to the right directory. Also, some compiler errors may occur, depending on which compiler you are using. For our compiler, some C files needed the addition of stdlib.h for proper compilation. For more info on installation look here.

When downloading, be sure to grab the three available packages: insts.jg-3.0.5.tar.gz, insts.mch-3.0.5.tar.gz, and insts.std-3.0.5.tar.gz. Here you will find all the instruments. The RTcmix-3.0.5.tar.gz only comes with 3 basic instruments.

Lastly, most of the material on RTcmix refers the user to an instrument TEMPLATE, for those wanting to create their own instruments. This is found in the docs/sample_code/ folder.

For a complete write-up on RTcmix, visit:

Computer Music Center, Columbia University,

or, for information on CMIX

The CMIX home page

 

 


Our work

We touched on many aspects of RTcmix. For one, we wanted to install and use the package to experience music synthesis/effects processing on the Linux operating system. We also wanted to get to know RTcmix and use the real-time and sockets options in the creation of an instrument that could generate a bass line given chord information.

We began our work by exploring the interfaces (RTcmix2.0.interfaces.tar.gz package) written for RTcmix. The interfaces use network sockets to send commands to CMIX. They are written in C and use an RTcmix API to communicate with CMIX. Other information on interfaces include:

set_option("full_duplex_on")
rtsetparams(44100, 1)
load("AM")
rtinput("AUDIO")
makegen(1, 24, 1000, 0,0, 2,1, 5,1, 7,0)
makegen(2, 10, 1000, 1)
AM(0, 0, 30, 1, 14)
AM(8, 0, 30, 10, 187)
AM(16, 0, 30, 1, 280)

Satisfied that RTcmix worked well in our system, we proceeded with instrument creation. We decided that we wanted to use the STRUM instrument to generate the bass line sound. Here we learned how STRUM creates its sound. Among other functions, it uses a function called randfill.c that generates frequency numbers to reuse with the rest of the strum functions. This function is called everytime START ( a STRUM sub instrument) is called and uses a random number generator for the numbers. The result is that when you pass START a pitch to be played more that once, the pitches do not sound the same. For our purposes, we needed same pitches to have the same sound no matter how many times we called START. To fix this, we created filefill.c and modified randfill.c, START.C and START.h .

We gave START.C an optional argument. The flag tells START.C if it is the first time it is being called in this scorefile. If it is, then START.C calls randfill.c to generate the numbers and save them to a file. If it is not, then it calls filefill.c to read the numbers from the file (assumed local). This fix works well, making STRUM create the pitch equally each time it is called.

The scorefile, which reads chords from a file and plays them along with the bass line, can be seen here. It makes use of 3 Minc functions we created: getchordinfo.c, getdur.c, and getpitch.c which are responsible for retrieving the chords from the file and breaking them up for their information, i.e. duration, pitch. The chord information is stored in an array of struct chords declared in ugens.h, which can be accessed externally.

 
Play a sound file created with this instrument.


With this problem out of the way, our next task was to make STRUM an instrument that can take input from the microphone. The following constructs are general for all instruments that take input from MIC: