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
-
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
-
Problem with the binary design.....I im using th binary Base -2 column to represent the four toggles Im using to count... graph to illustrate. currently im using "combination that equals the decimal Base - 10 no. 1 or 2 for oct+ and oct - , on a chromatic keyboard. I then need to use "3" to trigger an LFO which is a combination, of the combination that make 1 & 2. however it means that when i want to get to the LFO trigger i jumps through the jobs of 1 & 2 change the octave im on when i need a bit of tremelo...
this area of the patch is receiving the 1 and 2 to change the octave
....
-
im using the binery counter to select different values on the ADSR but when i select 2 for some reason it doesnt change the values in the number box after 3?
-
You should use [sel 2 3] in place of [== 2] and [== 3] and replace the toggles with gui bangs to visualise the result.
Logic operators and gui objects like toggle will output bangs for both states.
And the order the wires were connected determines the order of operation.
Use [trigger] if the order is important [trigger] fires right to left eg. [t b f] if a float is sent to the inlet, that float is passed to the right outlet and then a bang is sent to the left outlet.