Last Widget.. Pitch Slider !!

As part of Google Summer of code I were to implement four widget which are :

1. Rhythm Ruler

2. Pitch Staircase

3. Tempo

4. Pitch Slider

I have talked about first three of them in the previous blog posts and now in this blog post I will describe the last one which is Pitch Slider.

The basic idea of this widget is to enable user to create frequencies in a given continuous range. Here is the description :

The widget can be initialized using pitch slider block having sine block in its clamp blocks.

It look like below:

pitchsliderblog

But if clamp blocks changes it changes accordingly like this :

pitchsliderblog1

The slider in each column represent the current frequency it represent. Slider moves in two different ways :

1. It can move continuously from starting frequency to next octave frequency. This can be done using mouse, mouse position decide the position of slider.

2. Slider can move up or down by 1/12th of the starting frequency which can be done using either keyboard up or down arrows or by using the up and down buttons in the widget.

Here are some screenshots of widget after updating the slider position:

1. This describes slider moved using mouse so the frequency can be anything between 220 to 440 in first column and in second column it can be in 440 to 880. In this example the frequencies are 290.92 and 646.53.

pitchsliderblog2

2. This describes slider moved using keyboard or by using the up or down button. In this case the frequencies can only be such that its difference from the starting frequency is divisible by 1/12th the starting frequency. For example if starting frequency is 220 then using keyboard arrows or the buttons the possible frequency are only  be in the set {220, 238.33, 256.67, 275, 293.33, 311.67, 330, 348.33, 366.67, 385, 403.33, 421.67, 440}. For example :

pitchsliderblog3

Whenever change in frequency is detected either using mouse or keyboard or buttons a sound is played having frequency equal to the updated frequency to indicate the quantity of change.

Every frequency represented by each column can be exported in form of blocks using a click on the particular cell. For example above configuration exports like this :

pitchsliderblog8

User also can navigate from one cell to another to focus on the cell for keyboard input, keyboard up or down arrow is used to move up or down in frequency but for which column ?, this is decided which column is focused now, which can be controlled using mouse( mouse over the required column) or using left or right arrow. Like shown below :

6

          1.

5

            2.

7

           3.

From above three pictures left arrow takes from 2 to 1 and right arrow from 2 to 3.

I also did documentation for the widgets Pitch Staircase, Tempo and Pitch Slider. It involved creating svg files which was new and interesting thing to learn.

Thanks

Hemant Kasat