Brick's Music Studio
Overview Guided Tour Menu Reference Thanks Updates

Overview

Brick's Music Studio is a simple tool that generates source code to play midi and wave files on your LEGO Mindstorms® RCX. You can simply select any MIDI or WAVE file and you'll be able to generate a program written in one of the following languages: NQC, C for legOS, or Java for lejOS.


Guided tour

Step 1: Opening the original music file

Of course the first step consists in the selection of the MIDI or WAV file you want to work with. To do this you should simply select the File menu and click Open or Open Wav. Alternatively you can click on the corresponding toolbar icon. Once you have selected the file you'll see a graphical representation of all the tracks of the song. MIDI files can have up to 16 tracks (aka channels), while WAV files usually can have one or two channels (mono or stereo).

Step 2: Selecting the tracks

You can select a track by clicking on the rectangle containing its graphical representation. When you have selected the track it should become red colored. At this point you can play this single track selecting the Emulate current track command or icon. If you click on the track number (on the left) you will enable or disable the track. When a track is disabled, it should appear gray. Normally you'll end up using single track midi files (downloaded by sites dealing with cellular phones), but if you open larger midi files you'll notice that the 10th track will be disabled by default. This is done because this track is normally reserved to drums, that won't be emulated well by the RCX. When you select more than one track the generated program will merge them in a single track, but the currently selected one (the red one) will be considered the main line, thus it will have an higher priority than others.

Step 3: Selecting the range

Maybe you want to select only a part of the whole song, mainly for limiting the generated program size. You can select the desired range by clicking and dragging the blue lines starting on the blue bar at the top of the working area.

Step 4: Generating the code

Once you are satisfied with your selection you can generate the corresponding program in the desired language by selecting the corresponding icon. At the end of the process you'll see the source file in Notepad .


Menu Reference

File View Play Help
Open... Options... Play the song Help
Open Wav... Toolbar Stop playing About...
Save NQC... Status bar Emulate RCX
Save legOS... Emulate current track
Save pbForth...
Save lejOS...
Save JAL...
Save WAV...
Exit

File

Open

This is the standard command that allows you to select the music file you want to work with. You can specify any MIDI (.mid o .rmi extension) or WAVE (.wav extension) file.

Open WAV

This is a shortcut for opening WAV files.

Save NQC

This command creates an NQC program that plays the current song. You can compile it as is with the NQC compiler and download it to yor RCX.

Save legOS

This command creates a C program for legOS that plays the current song. If you have succesfully installed legOS, you should't need any further hint.

Save pbForth

This command creates a Forth script for pbForth that plays the current song. For more info about music with pbForth please read the tutorial

Save lejOS

This command creates a Java program for lejOS that plays the current song. If you have succesfully installed lejOS, you should't need any further hint.

Save JAL

This command saves a JAL program for PIC devices. If you want to learn more about JAL please refer to Stef Mientki's site

Save WAV

This command saves a WAV file that tries to emulate the output of the RCX speaker. It's far from perfect by now.

Exit

Exits the program.

View

Options

Show the options dialog box, where you can set the following preferences:

  • Use PC speaker for playback
    If you select this option the program will use the PC speaker instead of the sound card for playing the selected tracks. PS speaker emulation is much faster than the default one, but alas ... it works only on Windows '95 and '98.
  • Copy output to the clipboard
    This option forces all the generated source code to be copied into the clipboard in order to be easily pasted in your editor.
  • Open output file with the editor
    This option pops up Notetap showing the generated source code.
  • Transpose
    This slider allows you to transpose up to two octaves the resulting notes. For example a middle C (C4) will be transformed in a C2 when the cursor is all on the left. On the other end, it will become a C6 when the cursor is all on the right. Of course the cursor in the central position won't affect the output.
  • Toolbar

    Hide/Display the tool bar

    Status bar

    Hide/Display the status bar

    Play

    Play song

    This command plays the original song (or sample) using your sound card.

    Stop playing

    This command stops any sound currently playing.

    Emulate RCX

    This command plays the current song as if it were played by the RCX. This is quite a time consuming process, so be prepared to wait a lot of seconds for longer songs. The quality of sound emulation is quite primitive, but it should give you a nice preview of the final result.

    Emulate current track

    This command plays the currently selected track (the red one) as if it were played by the RCX.

    Use PC Speaker for emulation

    If you select this option, the PC speaker will be used in order to emulate the RCX one.
    WARNING: At the moment this option doesn't work on Windows NT or 2000.

    Help

    Help

    Display this help page using your browser.

    About

    Display a small box containing some program info.


    Thanks

    This program has been developed also thanks to the support of the following people:
    Mario Ferrari, Stef Mientki and Brian Bagnall.


    Updates

    For updates to Brick's Music Studio check the Guy's Lego® page.
    If you have any comments or suggestions, feel free to contact me at the following address:

    guy@aga.it