narcode / codeklavier

Programming with the piano as interface
32 stars 6 forks source link

Use a dict instead of class for motifs #33

Closed borrob closed 6 years ago

borrob commented 6 years ago

Normally: no premature optimisation, but I couldn't let this one slide.

Although we don't have any performance issues yet, it also good to make sure we don't get any. Using dicts should be much better than uses classes with some singleton design. We might need to add a 'motif_handler' class at some point if we want to dynamically change motifs during the performance, but that is future work.

NOTE: I also fixed a small bug that popped up during testing. I got midi-messages that only had 1 item, and were not an item of 3.

narcode commented 6 years ago

the 254 midi msg is active sense. I thought that bug was solved I see it is because you saw it while loading a deprecated file...

wooloogooloo commented 6 years ago

What do you mean deprecated file????

On 3 Feb 2018, at 3:47 pm, narcode notifications@github.com wrote:

@narcode approved this pull request.

i will make a final clean up of the deprecated files before doing the release. Thanks for the contributions Rob

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/narcode/codeklavier-python/pull/33#pullrequestreview-93818487, or mute the thread https://github.com/notifications/unsubscribe-auth/AaOvwcTqhb5Xqbjt77htDIfpwUru1J4Tks5tRHGKgaJpZM4R4IAO.

narcode commented 6 years ago

not used any more

wooloogooloo commented 6 years ago

Is that computer terminology? i’m not sure it’s the normal use of the word.

On 3 Feb 2018, at 4:26 pm, narcode notifications@github.com wrote:

not used any more

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/narcode/codeklavier-python/pull/33#issuecomment-362821851, or mute the thread https://github.com/notifications/unsubscribe-auth/AaOvwcXwbxfTsj5KOqO8PrK-OFHOSZrFks5tRHqLgaJpZM4R4IAO.

narcode commented 6 years ago

yes. Discourage use of that file/code because its not supported anymore… something like that

On 3 Feb 2018, at 16:33, wooloogooloo notifications@github.com wrote:

Is that computer terminology? i’m not sure it’s the normal use of the word.

On 3 Feb 2018, at 4:26 pm, narcode notifications@github.com wrote:

not used any more

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/narcode/codeklavier-python/pull/33#issuecomment-362821851, or mute the thread https://github.com/notifications/unsubscribe-auth/AaOvwcXwbxfTsj5KOqO8PrK-OFHOSZrFks5tRHqLgaJpZM4R4IAO.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/narcode/codeklavier-python/pull/33#issuecomment-362822753, or mute the thread https://github.com/notifications/unsubscribe-auth/AO-KCeBRhT4e2deVhvstrkS0IJIAFrO4ks5tRHxkgaJpZM4R4IAO.

wooloogooloo commented 6 years ago

Ok thanks

On 3 Feb 2018, at 6:10 pm, narcode notifications@github.com wrote:

yes. Discourage use of that file/code because its not supported anymore… something like that

On 3 Feb 2018, at 16:33, wooloogooloo notifications@github.com wrote:

Is that computer terminology? i’m not sure it’s the normal use of the word.

On 3 Feb 2018, at 4:26 pm, narcode notifications@github.com wrote:

not used any more

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/narcode/codeklavier-python/pull/33#issuecomment-362821851, or mute the thread https://github.com/notifications/unsubscribe-auth/AaOvwcXwbxfTsj5KOqO8PrK-OFHOSZrFks5tRHqLgaJpZM4R4IAO.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/narcode/codeklavier-python/pull/33#issuecomment-362822753, or mute the thread https://github.com/notifications/unsubscribe-auth/AO-KCeBRhT4e2deVhvstrkS0IJIAFrO4ks5tRHxkgaJpZM4R4IAO.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/narcode/codeklavier-python/pull/33#issuecomment-362835314, or mute the thread https://github.com/notifications/unsubscribe-auth/AaOvwcWQq5rYQmz3IbWgsLz3N_LE09oLks5tRJMJgaJpZM4R4IAO.