New Widget Tempo !!
In the previous Blog post I was talking about the Pitch Staircase widget, I was implementing as part of the Google Summer of Code 2016. I am almost complete with Pitch Staircase widget and I have started a new widget which is called Tempo widget which is the third widget I am implementing.
About Pitch Staircase widget ->
Save Feature:-> This feature outputs the stairs we create as pitch block or sine block as shown in the figure below:
I also added play all (play button in the topmost left corner plays all the stairs simultaneously) feature.
I also changed the way the widget take music proportions to make new stairs with new frequency as input, now it is similar to the rhythm ruler widget input way. The proportion is represented by the two input boxes as shown in the above figure.
Also a feature is also added which plays the stair from bottom to top and then top to bottom, the button for this feature is another play button in top row next to save button.
Now coming to the tempo widget:->
This widget was initially implemented by a GCI student but it was not integrated to the current environment of the musicblocks. So my challenge was to integrate it into current musicblocks. Challenges I faced were->
1. It was implemented as a independent widget, means it’s implementation has nothing to do with musicblocks implementation. So challenge was to change the implementation a little if required to fit in the existing implementation.
2. Some canvas related functions were used to create this widget which I didn’t learn before so it took time to understand the code that was written already.
Now coming to widget ,After initializing the widget the widget looks like this->
Brief description of the Tempo widget->
The top row is for different types of buttons.
1st button is for to start and stop the ball going to and fro.
2nd button is for increasing the value of BPM.
3rd button is for decreasing the value of BPM.
4th is a input field for the value of BPM.
5th is for applying the BPM in the input field.
6th for closing the widget.
The ball in the figure goes to and fro horizontally at speed related to the BPM.
60 BPM should result in 1 second per bounce. At every collision with the wall of the widget a sound is played to indicate the end of a bounce.
The value for BPM when we start the widget is taken from the block “master beats per minute”. For example in the above figure the BPM value is 90 when initialized equal to the masterBPM block value.