Multiple Rhythm Rulers !!
Hi everyone !!
This time as I previously said I worked on the playback part and the undo part, beside that I added feature of save and compatibility for more than one rhythm ruler in the widget.
Playback :->
This is feature to play the sound of a drum, in a rhythm specified by the ruler we dissected.
For example : ->
If I start with the ruler like below( ruler dissected into 5 parts ) and then do a playback ( with the play button ) then it will sound like this – > click here for sound
Undo :->
it was basically feature which can revert back to the state before the dissection recursively.
For example :-> I have a ruler with no dissection and now dissected to 5 parts.
Before doing undo the state of the ruler ->
After doing one undo the state of the ruler is ->
Save :->
For this we have to export the current status of ruler in rhythm blocks.
For example – > In the figure below you can see that ruler is dissected into 6 parts. And the save exports a stack of rhythm blocks for every cell in the rule with note value of that cell.
More than one Ruler :->
All the thing I have done so far was for single Ruler, like the arrays for note values and dissection history ( for undo feature ), now I generalized them and keep track of how many rulers I have, and for each of them I stored note values and dissection history in their corresponding arrays.
After all this was done, I was able to have compatibility for simultaneous Rulers.
For example : -> As you can see in the figure, the number of ruler in the Ruler widget is 3 according to the number of “set drum” block in the “rhythm ruler” block.
All of the ruler can be dissected and undo can be done on all of them.
What next :->
I will add functionality for playback of all rulers simultaneously with their respective drum.
The save functionality will now give stack of rhythm blocks for each of the ruler in the widget which can be used in pitch time matrix.
And other improvements and bugs if there are any.