音乐节拍识别器 Beat Detector 制作完成
PCB 项目文件和程序还需要修整一下,现在先放出原理图和 PCB 图的图片。等所有修整都结束后所有的源文件都会上传到 Google Code 上。

原理图 (共 3 张,点击查看大图)







PCB 图 (点击查看大图)



成品图





演示视频

Demo 1, 这组是节奏感很强的, 曲目: 《Let's Go》《No Limit》《Lambada》《Lift Me Up (Mylo Mix)》《Extreme Ways (DJ Tiestos Vocal Remix)》《漫步》, Keygen 音乐: 《untitled (tRUE)》《Complicaions》《Eliminator》《Meine auto》



Demo 2, 这组是节奏感稍弱些的, 曲目: 《失踪》《向太阳怒吼》《不想骗自己》《十二种颜色》《Sunshine Girl》《Starman》《Does Your Mother Know》《I'm Not Like Everybody Else》



Demo 3, 这组是漆黑环境中的效果, Keygen 音乐: 《untitled (tRUE)》《Eliminator》



PC 机程序

Beat Detector 是可以和电脑进行通讯的,报告当前音乐的节奏 (bpm),使用电池还是USB供电,使用麦克风信号还是线性输入信号。目前调试阶段直接看发送到电脑上的字符串,以后有时间会用 C# 写一个简单的界面。
Current language: Chinese (Simplified)
Book Recommendation: FPGA Prototyping By Verilog Examples by Pong P. Chu


Pong P. Chu - FPGA Prototyping By Verilog Examples
Current language: English · also available in: Chinese (Simplified)
AutoJewel 0.1.0 -- a program that plays Bejeweled 3 automatically
Today I spent all day modifying the program that can play Bejeweled 3 automatically, which is first mentioned in June. It was just a prototype written in one night at the beginning, but now it is not too bad to release. I have put the source code and binary files on Google Code.

Download source (AutoJewel-0.1.0-src.zip)
Download binaries (AutoJewel-0.1.0-bin.zip)



Instructions: Run Bejeweled and AutoJewel at the same time. After setting the parameters properly, enter the corresponding game mode in Bejeweled. And then press the default global hotkey Ctrl + F8 to make AutoJewel start running.

Something I want to say, is that currently this program does not have any intelligence. So do not compare it with the high-level players, and it cannot be normal any more that the scores it got are lower than many human players.

As I have said in the previous entry, this program is aimed at the visual effects of Bejeweled, rather than a high score. And it was coded to play mainly the Lightning mode. Other modes are just be supported passingly. For example it plays Ice Storm mode totally the same way as Lightning mode. As for the Classic mode, it only slows down the speed and gives the match on the top a higher priority.

Lightning mode (highest multiplier is 9, final score 4194k)



Ice Storm mode (highest multiplier is 8, final score 1517k)



Classic mode (achieved level 13, final score 743k)



Balance mode (purely for fun)

Current language: English · also available in: Chinese (Simplified)
Solve the problem that the monitor does not turn off for power saving under Windows XP/2003
Download source (SystemParamsMonitor.zip)

Current language: English · also available in: Chinese (Simplified)
TesseractDotnet Example
Download source (TesseractDotnetExample.zip)



The use of TesseractDotnet is quite simple, except for the lack of references (the Tesseract itself does as well). For example, to OCR an image which is treated as a single line text, the code below works well:

  1. using System;
  2. using System.Drawing;
  3. using tesseract;
  4.  
  5. // ...
  6.  
  7. TesseractProcessor processor = new TesseractProcessor();
  8.  
  9. bool succeed = processor.Init(@"..\tessdata\""eng", 3); // TesseractEngineMode: DEFAULT
  10. if (!succeed)
  11. {
  12.     // Deal with error
  13.     Application.Exit();
  14. }
  15.  
  16. processor.SetVariable("tessedit_pageseg_mode""3"); // TesseractPageSegMode: PSM_SINGLE_LINE
  17.  
  18. Image image = Image.FromFile("...");
  19.  
  20. processor.Clear();
  21. processor.ClearAdaptiveClassifier();
  22.  
  23. string result = processor.Apply(image);
  24.  
  25. // ...

But there is one point requiring particular attention. The first parameter of method TesseractProcessor.Init(), dataPath, must be ended with slash "/" or backslash "\", or the initialization will be failed. When it failed, the Init() method returns false. But if you did not deal with the returned value, then when the program runs to the line calling Apply(), an exception will be throwed:

AccessViolationException:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.


Current language: English · also available in: Chinese (Simplified)
More entries: [1] [2] [3] [4] [5] [6] ... [20]
« Previous page · Next page »