This article will teach how to control sounds made through ChucK using sliders in the Max/MSP software as input values.
When using the three sliders from the Max/MSP program, the values will change when configured by the user. Those values will then be sent to the Wekinator application through OSC communication inputs.
The Wekinator will then analyze these inputs and send the output information to ChucK, where the sound pitch will be modified.
If unfamiliar with the Wekinator software platform, check out our introductory, How to Get Started with Wekinator article.
The sketch for sending the input to the Wekinator software is available on the official Wekinator website.
From the Wekinator website, download and run the 'simple on-screen sliders' file from under the Max/MSP (audio) category.
ChucK Program Instructions
ChucK is a programming language used for real-time sound synthesis and producing music.
It presents a unique, time-based programming model with dynamic control rates and the ability to easily add and modify code.
The sketch for the ChucK program titled, 'FM Synthesis' is also available on the Wekinator website, under the ChucK (audio) category.
Note: Make sure to download the file for your specific operating system.
Now, you'll want to launch the ChucK terminal, navigate to the directory where the ChucK file is located and input the following:
The ChucK program should monitor for the output information sent by the Wekinator program.
Once it receives the input, it will modify the sound pitch accordingly.
Launch the Wekinator software program and copy the setting shown below.
- Set the input values to 3.
- Set the output values to 5.
- Leave all other settings as default.
The Wekinator will send 5 different outputs to the ChucK program, which will respond by producing different sounds according to the Wekinator output.
Select the 'Next' button to display a window like the one shown below.
Note: Max/MSP won't continuously send input data to the Wekinator. It will only send output information when you move the sliders.
To start recording samples, click on the 'randomize' button in the Wekinator window to select a random sound.
Then select the 'start recording' button and drag the first slider in the Max/MSP program to the top.
Follow a similar step for the second slider. Click on the 'randomize' button again, then select 'start the recording' and drag the second slider in the Max/MSP window to the top.
The last step is to follow the instructions for the third slider to record the last, random, sound.
After recording the samples, go ahead and select the 'train' button to execute the Wekinator application according to the samples.
Now when you adjust the sliders in the Max/MSP program, ChucK will change the sound pitch according to the Wekinator output data.
For similar projects using Wekinator, take a look at the following articles:
- How to Create a Drumming Machine Using Wekinator and ChucK
- Machine Learning for Makers: How to Use Machine Learning to Recognize Gestures
- How to Use Machine Learning to Create Music Through Gestures
For a visual learner, see our video tutorial of this project below.