• ### Creating a large number combining several numbers

Hi everyone! This is my first post here, be kind

I don't know if this is in front of me and I'm blind but I cant find a solution for this without using externals, and other stuff (even though). I've tried lists, pack, etc... and I prefer not to use any external, just core pd 0.51

Problem: I cant generate a number, let's say 101 from three separate numbers: 1 0 1.

Situation:
I need to take three numbers (boolean states from 3 toggles: 0 or 1) and create a "3 bit" number so a [select] object can decide accordingly: If number is 100 do X, if 101, do Y, if 110 do F, if 001 do K, and so on...

I, knowing a little bit of other programming languages, though it was as easy as "combine all integers from a list creating a string and then apply something like string.ToInteger"... but looks like is not that simple.

I appreciate any input!

• Posts 23 | Views 793
• @ingox on mac you can turn repeats off in system preferences

• Here is a nicer and cleaner approach that seems mostly stable: keyplay.pd

@Tilman You can adjust the delay so that it works with your keyboard.

50 milliseconds is enough on my keyboard.

I still have some weird effects that sometimes when i hit three keys at once, the release of a single key is not detected, but it mostly works.

• @ingox A little patch to solve the problem when repeats cannot be turned off (virtual keyboard midi chord debounce)..... chord_debounce.zip
I am pretty sure it has no ill effects....... you get the chord immediately.......
It doesn't use [delay].
You asked me once whether [clone] was necessary for this. Probably not as it can probably be done with lists but this is a simple solution (I am not the @list-master).
The number of clones could be reduced to 128 I think but this allows for clumsy fingers.
David.

• Wow that is an incredible help. Thank you all so much. What a joy.

I will need a bit more time to go though all different objects to have a max. learning input.

Very great:)

• @whale-av I can't get it to work...

If i do
[chord_debounce]
|
[print]
i still get key ups and downs for pressed keys.

How should it be implemented and what should it do?

• @ingox Yes...... but it suppresses all repeats generated by the OS from key presses held down........ your "aaaaaaaaaaaaaaaaaaa" problem...... while still outputting the intended events instantaneously.
You would need to compare it to the actual outputs of [key] and [keyup] to see it work.
I suppose that if repeats are turned off in system preferences you would see no difference.
I don't think there is such a setting for widows....... but I am often wrong...... and can be again.
You can adjust the repeat rate in windows but not turn the repeats off.
Anyway its a pita to have to change such settings for different uses.
David.

• @whale-av Hm, it doesn't work on linux. Repeats are not turned off.

debounce-test.zip

Or this, shows same behavior for [chord_debounce] and [key] and [keyup] combined: debounce-test.pd.

• @ingox In windows the bang directly after [key] (right hand side in debounce_test.pd) shows bangs all the time that a key is pressed and held down.
test.pd
Does [key] suppress repeats in the Linux Pd distro? maybe.........
David.

• @whale-av On linux it is identical on both sides...

Posts 23 | Views 793
Internal error.

Oops! Looks like something went wrong!