Im using a binary counter which prints results like so... The numbers occur from user input. I was planning on using objects like select or condition objects to specify a binary numberto assign it to a job... but they don't recognise values that the console shows? Is there any way around this?
Many thanks
-
Binary Counter
-
The message box is creating a symbol rather than a float. If you don't mind using externals, you could do this:
[symbol $1$2$3(
l
[symbol2list] (from zexy) -
you could prefix the binary symbol with an non-numeric symbol eg. bin$1$2$3$4(, then use [rout.e bin1100 bin1101 bin1110 bin1111].
I notice you are using [gate] as a [spigot] and you have four [sel] instead of [sel 12 13 14 15].
Is the binary representation the actual output? or does it need to converted to decimal
This may offer some help
4bit.pd -
@Fauveboy Hello....... Have you tried this.......modified.... better....logic age4.zip
You just put the [action xy] module in a job, and it gives the state, and bangs the job again for the previous button if you release the last....
David. -
Yes thank you very much, im still incorporating into the design i have to use it functionally...does it mean rather than sustaining a job when you release the last button then previous xy is retriggered ?
-
logic4 is more appropriate for the instrument control for the binary counter I was aiming for something more minimal...because Im pushing in these values by hand if I press 1111 in those moments that my fingers are out of time route reads this and might send 0001 0011 ect is there a way to press the values but avoid these nuances ?
-
the only button i intended to press here was 1111 but these are the print results
-
why would print show these results to the equal to condition? however banging a normal message it seems to return true for without a problem ?
-
@Fauveboy Post above........ No method, because in joining the floats in a message the result has become a symbol......... and logical operators don't know what to do with a symbol.
You need to add them up.........
(((It will be easier to use [expr].......!!!!)))..... to do the adding.Sorry to have butted in on this thread!!!
Post 2 before......
In versions 3 & 4 the last job that is still active (true) is re-triggered on a button release. That is what you were looking for a while ago (ageing), but it does not have to be so........Just delete the matrix of [xytog3]'s......... as that is the part re-sending the "last" value (held button).
Lots of other stuff becomes irrelevant as well......... logic6.zip
David. -
okay yes I see....and with the binary is there no way to maintain the combo of 0000 the benefit was going to be with just four buttons you can have 16 combinations and so more score to control other parameters with less?
-
@Fauveboy You can also keep it decimal, like this: expr-button-test.pd
-
On a more general note: With your button grid, i would take another approach:
- Each button would have a unique button id, derived from x and y.
- In a table, each button id is assigned to a section number and a section id. This can be done with [coll].
- If a button is pressed, the button id is calculated from x and y and is send to the [coll] to look up the section number and the section id.
- The section id and the button value (0 or 1) are routed to the section in the pd code where they should be processed
- Do stuff
This way you can make different layouts for the grid, send each button to the section where it should do anything and don`t have to worry about x and y or rows and columns in each section anymore.
-
This should already work for your grid (at least for the last 4 buttons): grid-layout-test.pd
-
Thank you this works really well....and regard the coll is it always written by had or can you process numbers into it? It would be cool to save a configuration to then up load...
-
@Fauveboy yes, you can write it by hand, with pd messages and save and load the contents to a textfile. So you can even make your layouts with a text editor or with libre office calc + text editor.
A little bit of work each time, but most flexible.
-
With this little trainer you can write the layout directly from the grid: grid-trainer.pd
-
I typed the numbers out in a text file and copy and pasted into the coll, it asks to save changes however when I click yes and open it back up again theres no data in there?
-
you need a message "write coll.txt" for saving. and "read coll.txt. when you open again. or you call the patch "coll coll.txt". instead of coll.txt you can use any name, you just need to save it as a txt file. or just use 1 as an argument then its saved in the patch.
-
so i have a textedit file in the same directory called untitled.rtf but im getting error messages from the console when I press the message read. And im not yet getting a result with the write message?
-
@Fauveboy maybe because rtf is not text. its rich text, which is bad.
-
brill! got it