Scale object not initialising correctly - Help needed!


#1

Hey

I got this scale object I have been working on, using the bin12, so you can set the scales live. It works pretty decent but I have one issue I dont know how to fix:

Issue:
When I start the patch the value that is send to the scale, is not initialized correctly, so the output of the scale object sends out an incorrect value. I have to change the inpit value to a new value and then back to the original value for the scale object to be initialised correctly.

Explanation:
The values that are on for the scale, the black ones, sends out a a value between 0-11. Note 0 send out 0, note 1 send out 1 etc..

Together all 12 notes makes up for an octave. Only the black notes are included in the scale.

The white ones, the notes that ARE note part of the scale sends out a -1, whic triggers a sample and hold function.

Thats why the sample and hold function is offset to -1, so that value is hold at -1 instead of 0, I needed 0 for the scale.

So when the input actualle selects one of the white notes, it sends outs a -1 which activates the sample and hold function, that then holds THE LAST SELECTED BLACK NOTE.

BUT.....

The problem is that when the patch is initialized and the input has one of the WHITE notes selected, the output of the scale will be set to 0. I think it is because the sample and hold function has NOT yet been send a function to actually hold, so it just sends out a 0 instead.

  • I would love for the output of the scale to be initialised to the right value when the patch is load. I am overall pretty happy about the object, cause it uses very little cycles, so it seems to be effective. I just need to get this initialising issue fixed.

Any suggestions?

Thanks!

Here is the patch:
DrawScale2018 1.4 COMMUNITY.axp (5.3 KB)