Tuesday, June 16, 2020

Novation Circuit's COMPANION || Ableton Live MIDI Controller || Can be used with Novation Launchpad X, Launchpad Pro etc.

Companion is a MIDI control surface that acts as a companion to your other controllers. Companion works with Ableton Live without any MIDI mapping as it also has Remote Script for Live. You just need to select the Remote Script in the Preferences window of Ableton Live. For other DAWs, you can of course use it by MIDI mapping the different controls. However, in Ableton Live the Remote Script does it all by default.

General Controls of the Companion



Companion in Mode-1

The picture below shows the functions of different controls of the Companion in Mode-1.


Joystick Functions:
1. The joystick can be used as a pitch bend wheel by moving it up/down.
2. Moving the joystick left/right selects the previous/next track, respectively.
3. The joystick is also clickable. Pressing the joystick down toggles between Mode-1 and Mode-2.

Volume: This knob controls the volume of the currently selected track in Ableton Live.

Arm: This button toggles arm on/off of the currently selected track.

Undo: This button triggers the undo function in Ableton Live.

Arrangement Record: This button toggles the main record button on/off in Ableton Live. This button is quite handy while punch recording.

Play/Stop: This button toggles between play and stop. It acts like the space bar on keyboard.

Session Record: This button triggers the overdub function in session mode of Ableton Live, also known as session record. This comes in quite handy as Ableton Live doesn't have any keyboard shortcut of this function.

Companion in Mode-2

The picture below shows the functions of different controls of the Companion in Mode-2.


Joystick Functions:
Functions of the joystick remains the same in Mode-2 as it was in Mode-1.

Modulation: This knob now controls the modulation of the currently playing note.

Launch Clip: This button launches the currently selected clip in session mode.

Solo: This button toggles solo on/off of the currently selected track.

Previous Scene: This button selects the previous scene in session mode of Ableton Live.

Mute: This button toggles mute on/off of the currently selected track.

Next Scene: This button selects to the next scene in session mode of Ableton Live.

Watch it in action on YouTube!



Friday, March 15, 2019

Insertion Sort


Insertion Sort is a simple sorting technique widely used in many situations. In this sorting algorithm we start by picking the second element as key, compare it with the first element and put it in the right position. After that, the 3rd element is selected as key and compared with the elements from 1st to 2nd position and placed in the correct position. We repeat the same till the last element. In this process we have a total of n-1 passes starting from the 2nd element to the last element. This technique is similar to how we sort playing cards in our hand. Watch the video below to understand how Insertion Sort works.



Code for Insertion Sort in Python:


Output:

Unsorted List: [16, 9, 12, 37, 5, 68, 3]
Sorted List: [3, 5, 9, 12, 16, 37, 68]

Bubble Sort


In bubble sort we compare two adjoining elements and exchange them if they are not in proper order. We repeat this process for next two adjacent elements. In the first pass the heaviest element gets settled to the bottom of the list. Similarly, in the second pass the second heaviest element settles on top of the first heaviest element, and so on we repeat the process for n-1 passes in total. To understand this, see the bubble sort animation in this video:


Here is the code for bubble sort:

The Guessing Game!

Here is a simple and fun, number guessing game. This game illustrates the use of the function randint() from the random library.

A little about the randint() funtion:
The randint() function takes 2 numbers as arguments and returns a random number between the 2 numbers (inclusive of the lower and upper limit numbers). The randint() function is used as shown below,

import random
c = random.randint(50,250)
print(c)

Here, a random number between 50 and 250 will be stored in c. Both 50 and 250 are also included in the range.

Code for the Guessing Game:

Bouncing Ball Example with PyGame

Here is simple code to get you started with bouncing a ball against the boundaries of the window. I have used two images, one for the icon of the application and one for the ball. The image files are given under the code for you to download and use with the code. Download the image files and put them in the same folder where you save the code.

Code:


Graphic for the icon:


Graphic for the ball:


Output: