|
Hi Luis,
In a note to R:Light sensor problems you wrote:
> P.S. In case anyone cares, the modifications to dsound.h will basically
> just be a little patch to allow you to use WHOLE, HALF, etc. to describe
> note lengths instead of multiples of 16ths. Just some #defines, but they
> make it much easier to transcribe "real" music into legOS-ese.
I wonder if it would be interesting to include a small utility I wrote
assisted by a friend of mine (Paolo Masetti) to convert MIDI files into
LegOs C code: since then all of our robots are equipped with a subroutine
generated by this utility!
It's standard C++ compiled for a win32 console application, but should
compile ok also in many other enviroments without changes.
We also did an attempt to a WAV to RCX conversion with poor results, but
during the development of the program we discovered that some of the note
constants in dsound.c aren't very accurate (usually off by 1), but for high
frequencies the wrong computation of these dividers leads to an error of
many Hertz!
BTW I'd like the size of this array of constants could be extended to 128,
in order to cover all possible midi notes.
You can find the two executables (Windows console only) at
www.aga.it/~guy/lego.htm but, if someone cares, I can provide the sources
too.
Ciao, Guido
|
|
Message is in Reply To:
| | Re: light sensor problem?
|
| (...) It doesn't surprise me that someone has already worked this out. (...) It really, really doesn't surprise me that Michael was the one who worked it out. If no one thinks it is too big an overhead, I can put it in in an hour or so when I do a (...) (24 years ago, 24-Jul-00, to lugnet.robotics.rcx.legos)
|
26 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|