631 Button Programming Not Working

rOAdeh

New member
Hi all,

I've been messing about with my 631 this evening trying to get some of the buttons programmed. I've followed the instructions listed in the Progamming the CFA-631/633/635 Buttons thread and used the numbers in the Foobar section of the CC2 Programming Guide to link the events to controlling Foobar from the LCD.

However, none of this has seemed to work so as a last resort I tried the basic scroll up/down screens commands and these again had no effect. I've pasted my cc2_service.ini file and the relevant part of my lcd_631.ini file:

lcd_631.ini

Code:
[module00]
id=3047433153
id_keypad=308990816
cc2_service.ini (this still has the test that I tried of getting screen scrolling to work with the upper left button)

Code:
[general]
windows_start=1
dim_idle_time=0
dim_to_pct=25

[m00]
id=459366133
module_name="Crystalfontz 631"
options=0
screen_sel=0
alt_enabled=1
brightness=100
contrast=36
dkc_disable=1
transition_random=1
transition_length=1500

[m00-event00]     ; 1st module, 1st event
if_type=1
if=308990816     ; Substitute your id_keypad number here.
cond=0
to=1.000000     ; This tells CC2 that you want to poll the UPPER LEFT key.
do_type=9       ; This tells CC2 that this is a screen change command.
do=1.000000     ; This tells CC2 to scroll up one screen.

[m00-event01]
if_type=1
if=308990816                             ; Substitute your id_keypad number here.
cond=0
to=2.000000                             ; This tells CC2 that you want to poll the UPPER RIGHT key.
do_type=2052897968                       ; This tells CC2 to play Foobar
do=1.000000

[m00-event02]
if_type=1
if=308990816                             ; Substitute your id_keypad number here.
cond=0
to=4.000000                             ; This tells CC2 that you want to poll the LOWER LEFT key.
do_type=696843854                       ; This tells CC2 to go to previous track in Foobar
do=1.000000

[m00-event03]
if_type=1
if=308990816                             ; Substitute your id_keypad number here.
cond=0
to=8.000000                             ; This tells CC2 that you want to poll the LOWER RIGHT key.
do_type=1126079664                       ; This tells CC2 to go to next track in Foobar
do=1.000000

[m00-s00]
screen_name="Foobar Artist"
options=0
alt_delay=3000

[m00-s00-r00]
options=0
scroll_speed=250

[m00-s00-r00-i00]
id=3196116684
options=10
length=20
scroll_speed=0

[m00-s00-r01]
options=0
scroll_speed=250

[m00-s00-r01-i00]
id=3639728805
options=0
length=0
scroll_speed=0

[m00-s01]
screen_name="Foobar Track"
options=0
alt_delay=3000

[m00-s01-r00]
options=0
scroll_speed=250

[m00-s01-r00-i00]
id=2101645810
options=10
length=20
scroll_speed=0

[m00-s01-r01]
options=0
scroll_speed=250

[m00-s01-r01-i00]
id=3639728805
options=0
length=0
scroll_speed=0
Has anyone got any ideas what might be wrong? The screens are displaying the artist or title of the track on the top line and the large spectrum analyser on the bottom.

Thanks,

Ben
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

reider

New member
Can`t recall which way it should be, but try changing this line.....

dkc_disable=1

to this

dkc_disable=0

You`ll laugh but dkc stands for Dickey Keypad Control, don`t laugh too much, there was a serious reason to use it at one time. Let us know how you get on.....

Reider
 

rOAdeh

New member
Reider, thanks for your reply - that seems to have made the scroll through screens code work now (weirdly on both the upper left and lower left buttons rather than just one!)

The foobar ones however don't work so I'm guessing either the IDs are perhaps incorrect or that there's another configuration that's overruling the configuration (and hence why 2 buttons are controlling screen selection)

I'll continue fiddling more tomorrow but it would be great if you could suggest any possible solutions!

Thanks,

Ben
 

reider

New member
Reider, thanks for your reply - that seems to have made the scroll through screens code work now (weirdly on both the upper left and lower left buttons rather than just one!)

The foobar ones however don't work so I'm guessing either the IDs are perhaps incorrect or that there's another configuration that's overruling the configuration (and hence why 2 buttons are controlling screen selection)

I'll continue fiddling more tomorrow but it would be great if you could suggest any possible solutions!

Thanks,

Ben
On the 631 the upper left and the lower left are the correct keys. (1) It depends on your current position and how long the list of screens are. If you`re near the top of the list and it scrolls the opposite way then you can change the direction (2) If any skip screens are set, such as only show this/these screen/s when Winzip is running, then its a useful feature to have the scroll up/down performed by individual buttons.

I don`t and never have used Foobar, but the most likely scenario is that the id numbers need changing to the ones you are using. There was at one point an update to be made available for the Foobar .dll which would affect the screen/s. I doubt this would affect the keypad but may affect the operation resulting from the keypad use. Please therefore cast around and ensure you have any Foobar updates that may have been made available from time to time.

I was the first beta tester to get the buttons programmed into a screen and working. So, I have rather fond memories of them. Though the time spent making them work initially isn`t such a fond memory. In those days we really, as a team, pressed for the inclusion of the keypad control in the public domain as early as possible.

Reider
 
Last edited:

rOAdeh

New member
Thanks again for your reply, your help is much appreciated.

On the 631 the upper left and the lower left are the correct keys. (1) It depends on your current position and how long the list of screens are. If you`re near the top of the list and it scrolls the opposite way then you can change the direction (2) If any skip screens are set, such as only show this/these screen/s when Winzip is running, then its a useful feature to have the scroll up/down performed by individual buttons.
Yes but in the cc2_service.ini code that I posted, I've only assigned the upper left button to change screens, the lower left one should still be (attempting to) control foobar. So I'm not sure why I can scroll up and down at the moment.

I'm also trying to keep the code as simple as possible - I have the two screens I listed just showing the track information as due to my setup at home, it would be useful to be able to control foobar from my LCD and from the keyboard separately (hence using the buttons for play/pause/next track/prev track). I don't need to make the buttons only work on specific screens.

I don`t and never have used Foobar, but the most likely scenario is that the id numbers need changing to the ones you are using. There was at one point an update to be made available for the Foobar .dll which would affect the screen/s. I doubt this would affect the keypad but may affect the operation resulting from the keypad use. Please therefore cast around and ensure you have any Foobar updates that may have been made available from time to time.
The ID numbers I got were listed in the CC2_Programming_Guide_2005_10_24.pdf to trigger the events but I've no idea if these are actually correct - is there a way to simulate whether these are being correctly passed? Or even if the right value is being sent? How are the event IDs determined, as they just seem to be a string of random numbers? Does the respective program need to be in focus on the desktop for them to work? I've tried it both ways regardless. I've also searched for the most recent foobar plugin dll and seem to be already using the most current version (hence the lcd correctly displaying data passed from foobar).

I was the first beta tester to get the buttons programmed into a screen and working. So, I have rather fond memories of them. Though the time spent making them work initially isn`t such a fond memory. In those days we really, as a team, pressed for the inclusion of the keypad control in the public domain as early as possible.

Reider
Is much work being continued on CC2 now then? There was a flurry of activity the best part of a year ago, when CC2 was pretty fresh but it's been fairly quiet now from the looks of things. It's a shame the button functionality hasn't been implemented into a GUI of some sort - I have no problem messing about with ini files personally, but I bet some people might be put off.
 

reider

New member
I`ll see what I can do asap, might be a while though. I have to first install the LCD modules in 32 bit Vista, after installing Office so I can look at the .doc file JC came up with to install it. Then download and install Foobar. Then work out how it does what it does, then get the screen and try it out. Then perhaps make a new one altogether, if not. Alternatively furnish the instructions to make it work.

Loosely, I can tell you this so far before I start. When programming a screen forget about the scroll up/down functions, they are a seperate part of the CC2 program and don`t need adding to the screen. Just use the screen for your own keypad functions. The keypad id has to be matched to your actual keypad for it to work, you can get this info from the files-not got mine loaded at the mo so I`m not going to guess which one, memory never being a forte. The other id numbers are specific numbers to carry out specific tasks from the Foobar plugin. There will be a sample folder with the Foobar settings (don`t copy and paste it), and this will tell you the id numbers and what they do.

Heres an idea <bulb lights up.....>, Find my original Winamp screen with keypad control, it will possibly need conversion to CC2. Copy and open any CC2 screen for that module to the desktop, paste my winzip stuff over the internal contents of that randomly chosen CC2 screen. Then change the ids for Winzip to the ones from the Foobar dummy file. Check the keypad id is the same as yours and you must be 90% there.......

Work is always ongoing with CC2, I am not in a position to give out details but loosely this is where we`re at.... Work on this website ongoing, immense work on Vista integration ongoing, looking at some great networking plugins. Now, thats all I can say without fear of being shot!!!

Reider
 

reider

New member
This should help you, I haven`t got my 631 connected so I can`t do a lot more than point you in the right direction, without testing it myself.

[pre]
rows=2
cols=20

[mod00]
name="id_keypad"
id=@32

[screen]
screen_name="Winamp Play-Pause"
options=0
alt_delay=10000

[event00]
if_type=1
if=@32
cond=0
to=2
do_type=684704995
do=1

[event01]
if_type=1
if=@32
cond=0
to=8
do_type=2487465467
do=-1

[event02]
if_type=1
if=1001136639
cond=0
to=0
do_type=9
do=-1

[r00]
options=10

[r00-i00]
string="Play/Pause Track"

[r01]
options=10

[r01-i00]
string="UR=Play LR=Pause"


Now, that may or may not work as it is on a 631 for winamp. 684704995 from event00 is probably play and 2487465467 from event01 is probably pause. Event02 should be included exactly `as is`, its a skip routine so that if Winamp isn`t running then that screen doesn`t show in the list.

Now (1) You go into the CC2/Documentation/plugin folder and have a look at the layout of Foobar plugin, and you find as follows.....

; CC2 Foobar2000 plugin
; By Mark Williams (Crystalfontz)
; crystalcontrol@crystalfontz.com

; Static Data IDs
; 1936232761 = File Name
; 3196116684 = Artist
; 3287473126 = Album
; 2101645810 = Track Title
; 1317310677 = Track Number
; 496315758 = Date
; 4249375701 = Disc
; 888309576 = Genre
; 3893453931 = Comment
; 3313039099 = Track Length
; 3371139308 = Play Time (no msec)
; 504726475 = Play Time (with msec)
; 2411081986 = Left Channel VU data
; 2614083132 = Righ Channel VU data

; Commands Event IDs
; 2052897968 = Play (Swap this with the number in event00)
; 1800212347 = Stop
; 3400811094 = Pause (Swap this with the number in event01)
; 696843854 = Prev Track
; 1126079664 = Next Track
; 4086938866 = Back (value = seconds)
; 86043193 = Forward (value = seconds)

[spec00]
;hight/width of graph
height=2
width=20
;show channel 0=left, 1=right, 3=rear-left, 4=rear-right, 5=center, 6=sub, 10=combined(mono)
channel=10
;needs one id per row (id0 being bottom row)
id3=2111638392
id2=2753801713
id1=3420112553
id0=1886011042

You can see that we need a substitution from the id number in the Winamp screen for this one from Foobar 2052897968 (event00) and that gives us `play` when that button is pressed. Then we substitute the Winamp id with the Foobar id for Pause, and that works when the button is pressed.... 3400811094 (event02). Then we save the screen changes, add it to the screens folder in CC2. Then check it does the stuff. If it does then we copy the contents and change 2 more sets of numbers as above for the Foobar ones to do what you wish. Save it with a new name, make sure you include the skip screen part under event02. Then when Foobar runs, the screens are in the scroll list, when it isn`t running they get skipped and don`t appear and clutter the list up.

Reider
 

jc634

Administrator
Just to add my 2 cents worth...

1. It would appear that the commands are correct. Of course, it would always be nice to verify function by plugging in the ini code, except for #2:

2. Vista users: CC2 cannot currently communicate with Foobar or Winamp, at least I have not been able to. Since I use Vista, I cannot test\verify at this time. Reider: if you can get CC2/foobar2000 working, let me know.

3. Open Windows Explorer. Goto C:\program files\foobar2000\components and look for a file foo_crystalcontrol2_09.dll (I assume you are using Foo 9.xx). If it is not there, CC2 cannot communicate with Foobar200. You will need to locate this file in the CC2 install directory and copy to the aforementioned directory.

Jim
 

reider

New member
I only mentioned Vista because thats the main machine I`m running from now-only installed 32 bit Vista yesterday. I think Ben is using XP, because he has part of it working, by the looks of his message. I can`t test a thing for a while yet in Vista because CC2 refuses to run at all. Had a look at all the stuff on the forum but too much on the go to spend a lot of time on it. I`ll get back to it when the pressure eases off at this end.

Reider
 

rOAdeh

New member
Hello,

Sorry for the slow replies guys but yes I am currently using XP and Foobar 0.9.4.3. I assume I have the latest DLL simply because I can display the track information from Foobar - the problem is just controlling it at the moment.

Thank you for both your input - particularly you Reider. Unfortunately, I'm a bit busy at the moment so I haven't had time to test your latest suggestion. Hopefully I can have a look over the weekend and will report back.

Cheers,

Ben
 

reider

New member
No problem, just been back through it again and the skip routine works off the status for Winamp, therefore you would have to change the id to that of the Foobar Plugin. However, there is no status id in there. So I suggest for now you delete the skip section from the screen unless a skip routine/status id is added in the future. All of the following in its entirety can and should be deleted.....

[event02]
if_type=1
if=1001136639
cond=0
to=0
do_type=9
do=-1

The final proposed screen being.....

[pre]
rows=2
cols=20

[mod00]
name="id_keypad"
id=@32

[screen]
screen_name="Winamp Play-Pause"
options=0
alt_delay=10000

[event00]
if_type=1
if=@32
cond=0
to=2
do_type=684704995
do=1

[event01]
if_type=1
if=@32
cond=0
to=8
do_type=2487465467
do=-1

[r00]
options=10

[r00-i00]
string="Play/Pause Track"

[r01]
options=10

[r01-i00]
string="UR=Play LR=Pause"


Reider
 
Top