LOFI Blocks – Logic

Logic value – boolean

LOFI_Blocks_Logic (1)

Returns logic value – TRUE or FALSE.

Parameters:

  • Value – TRUE, FALSE.

If you put a logic value in the field that expects a number value, the logic value will be converted to number – TRUE – 1, FALSE – 0.

Logical (boolean) multiplication – AND

LOFI_Blocks_Logic (2)

Boolean multiplication returns TRUE only if left and right value is TRUE otherwise the operation returns FALSE.

Parameters:

  • Left side of the operation – boolean value – TRUE or FALSE.
  • Right side of the operation – boolean value – TRUE or FALSE.

We use boolean multiplication when we want to test if both conditions are TRUE.

Logical (boolean) alternative – OR

LOFI_Blocks_Logic (3)

Alternative returns TRUE if either left or right side of the operation is TRUE. Only if both sides of operation are FALSE the outcome is FALSE.

Parameters:

  • Left side of operation – boolean value – TRUE or FALSE.
  • Right side of operation – boolean value – TRUE or FALSE.

We use the logical sum if we want to check whether one of the two conditions is met.

Preparations – Computer Configuration, Arduino IDE

ARDUINO IDE is the main program accompanying the Arduino board. Its main function is an editor that allows you to write scripts and upload them to a plate. The ARDUINO IDE installation is necessary to install the Arduino board drivers on your computer. Remember not to connect your LOFI Brain before installing Arduino IDE. After installation, make sure you reboot your computer.

Continue reading Preparations – Computer Configuration, Arduino IDE

LOFI Blocks – Actions

When the key was pressed …

LOFI_Blocks_Actionspng (2)

A block that reproduces the instructions in its interior after pressing the indicated key.

Parameters:

  • The key – the keyboard key that calls the block execution.

The instruction sequence is executed only one, it is not looped.

Slider

slider

A block that returns a value from one of the sliders from the built-in gamepad.

Parameters:

  • Slider – number of the slider, 1 – upper slider, 2 – lower slider.

Button

LOFI_Blocks_Actionspng (3)

A block returning TRUE or FALSE. Depends on whether the indicated keyboard key is pressed.

Parameters:

  • Keyboard key – the keyboard key whose state we want to read.

Mouse

LOFI_Blocks_Actionspng (4)

Returns X and Y coordinate of mouse cursor OVER THE DRAWING BOARD.

Parameters:

  • Axis – X or Y.

Mouse button

LOFI_Blocks_Actionspng (5)

Returns TRUE or FALSE whether the left mouse button is pressed OVER THE DRAWING BOARD.

Pivot

Swing

A block returning the value read from a tablet or a smartphone accelerator. A value of 50 means the device is set horizontally.

Parameters:

  • Pivot axis – vertical or horizontal.

This block does not exist in the version for desktop computers.

LOFI Blocks – Variables

Variables blocks are the blocks that hold values and strings.

Create variable

setvariable

Allows you to create a variable and name it.

Set variable to

LOFI_Blocks_Variable

Sets the specified variable to the amount.

Parameters:

  • Variables created by the user. Allows you to select the specific variable from the list of variables created in the project.
  • Rename variable. Allows you to renam the selected variable.
  • Delete variable. Allows you to delete the selected variable.

Change variable to

LOFI_Blocks_Variable

Changes the specified variable by the amount.

Parameters:

  • Variables created by the user. Allows you to select the specific variable from the list of variables created in the project.
  • Rename variable. Allows you to renam the selected variable.
  • Delete variable. Allows you to delete the selected variable.

LOFI Blocks – Sound

PLAY loop

LOFI_Blocks_Sound (2)

The main loop in which we put instructions from the PLAY section. It differs from the loop REPEAT by the lack of additional delay at the end of the loop.

If the blocks from the PLAY section are placed on the main REPEAT loop, they will be executed as well as the robot control blocks placed in the PLAY loop.

LOFI Blocks is written in JavaScript language, its “weakness” is poor management of instruction execution time. This problem shows when a lot of delay operations defined by the WAIT block are performed simultaneously, which is especially noticeable when we are trying to play some sort of rhythmical sound sequence.

Piano

LOFI_Blocks_Sound (4)

The block controlling the main synthesizer.

Parameters:

  • Sound pitch – determined in the range from 0-100, covering 50 sounds from the C major scale, two units per sound.

PIANO synthesizer is the only instrument connected with NOISE or with ECHO.

Piano – ATTACK

LOFI_Blocks_Sound (5)

A block that controls the length of the sounds played by the PIANO synthesizer.

Parameters:

  • ATAK – the length of the sound volume increase. At the value of 0, the sound will start immediately, at 100 its volume will gradually increase for 1 second.
  • DURATION – duration of the whole sound. If it is shorter than the length of the ATTACK, it will not be fully reproduced.
  • RELEASE – sound fading time. At the value 0, the sound stops immediately, at 100 its volume will gradually decrease by 1 sec.

Piano – MODULATION

LOFI_Blocks_Sound (6)

Modulation of the PIANO synthesizer. With its help, you can change the synth tone from “soft” to “very strange”. Modulation allows you to generate various types of interesting sound effects.

Parameters:

  • MODULATION – the frequency of the modulation oscillator. At 0, 50 and 100 it is a multiple of the main frequency of the synthesizer, that sound will be natural. At 1-10, the modulation will have a low frequency allowing the effect of “police siren”. At 51-99 the modulation will be larger than the base oscillator this will disrupt the sound.
  • STRENGTH – strength of modulation.

Modulation applies only to the PIANO synthesizer.

Bass

LOFI_Blocks_Sound (3)

A block controlling a synthesizer responsible for playing bass lines.

Parameters:

  • Sound pitch – determined in the range from 0-100, covering 50 sounds from the C major scale, two units per sound.

The bass synthesizer is not connected with ECHO and REVERB, their use will not change the bass’ sound.

Key

LOFI_Blocks_Sound (7)

A block that returns the digital value of the key pressed on the on-screen keyboard embedded in LOFI Blocks or the corresponding keyboard keys (A, S, D, F, G, H, J, K, L,;, ‘, \). When no key is pressed, the block returns 0.

The keyboard values correspond to fifty sounds from the C major scale.

Rhythm

LOFI_Blocks_Sound (9)

A block that reproduces the sounds of the built-in drum machine.

Parameters:

  • The name of the sound being played.
  • Speed – the playback speed of the recording – 50 is the original speed, in the range 0-50 the recording is proportionally released, at the value of 100 the recording is played twice as fast.
  • Reverse – sample direction. For the value FALSE the sample is played normally, for the value TRUE the sample is played from the back.

Echo

LOFI_Blocks_Sound (10)

The block determining the parameters of the implemented echo effect (also called the delay effect).

Parameters:

  • Strength – the echo cancellation force, determined in the range of 0-100, at the value of 0, the echo will be suppressed after the first repetition, at the value of 100, the echo will not be suppressed at all, it will sound infinite.
  • Length – defines the delay time of the echo in milliseconds, the value of 100 corresponds to one second.

The built-in echo effect is connected only to the synthesizer controlled by the PIANO block. It will not affect the sounds generated by BASS and RHYTHM blocks.

Reverb

LOFI_Blocks_Sound (1)

A block that sets the parameters of the reverb effect.

Parameters:

  • Strength – the reverberation muting force, determined in the range of 0-100. With a small value, the reverb will sound like in a small room, at 100 it will sound without any muting.

Setting the reverb strength to 100 will cause subsequent sounds to be added to it without any muting, which can lead to overload (excessive loudness) of the sound.

Reverb is connected only to the PIANO synthesizer. It will not change the sounds generated by the BASS and RHYTHM blocks.