有点儿意思,在此奉上“粉刷匠”:
- (defun c:fsj()
- (setq jp'(53 53 53 11 24 32 55 53 53 53 11 24 32 11 22 44 31 55 24 32 55 53 53 53 11 24 32 11))
- (setq keys(list (list 1 (* 262 2))(list 2 (* 294 2))(list 3 (* 330 2))(list 4 (* 349 2))(list 5 (* 392 2))(list 6 (* 440 2))(list 7 (* 494 2))))
- (setq play nil)
- (foreach x jp
- (setq strj(itoa x))
- (if (=(substr strj 1 1) (substr strj 2 1))
- (setq play (append play (list(list (cadr(assoc (atoi (substr strj 1 1)) keys)) 600))))
- (setq play (append play (list (list (cadr(assoc (atoi (substr strj 1 1)) keys)) 300)
- (list (cadr(assoc (atoi (substr strj 2 1)) keys)) 300))))
- )
- )
- (foreach x play
- (beep (car x )(cadr x))
- )
- )
|