Category Archives: programmation

Utiliser VMPK et Cardinal avec PIpeWire, Jack et les baies de brassage Helvum et Qpwgraph

Sommaire
VMPK, clavier de piano MIDI virtuel
Cardinal, fork de VCV Rack, synthétiseur modulaire Eurorack
PipeWire et les baies de brassage
Petit ensemble simple sous Cardinal

Arch Linux, ainsi que de nombreuses autres distributions Linux, ont définitivement basculé la pile audio sous PipeWire. Celui-ci à l’avantage de centraliser de façon simple Jack (temps réel pour l’audio de qualité studio, nécessite des réglages en fonction des besoins) et PulseAudio (plus simple, pour l’utilisation en informatique de bureau ou de jeu). PipeWire, permet aussi de synchroniser plusieurs sources et destinations video de différentes tailles et format, en même temps que le son. Les baies de brassage Helvum et Qpwgraph permettent d’établir simplement à la souris les connexions. QJackCtl ne semble plus fonctionner pour cette tâche. Continue reading

Some tries with LÖVE game engine in Lua

* Ce billet est également disponible en français.

Drawn with Pencil2D and MyPaint, animated using meshes in LÖVE (Lua language), I also made some tests in C with libSDL, but it is probably faster to prototype in Lua with LÖVE, and then add FFI libs for compute intensive part (in these cases light computations, GL is used for rendering), or port it to c+SDL at second time, when algorithms are validated. All used software are 100% FOSS used on a GNU/Linux system.

This one use simply a mesh on a picture, and deform them using circular motions, as I done in TIC-80 in July 2021. You can get all the sources and pictures and the whole LÖVE thing packaged: https://framagit.org/popolon/reforest

Continue reading

Playing with button and LEDs on RISC-V based ESP32-C3 NodeMCU board with ESP-IDF (FreeRTOS)

* Ce billet est également disponible en français.

Table of Content


* Introduction
* Hardware: The Circuit
** Components
** Breadboard
** Choose GPIO ports and their board pins
** LED part
** Resistors
** Switch button part
* The Software
** Initialisation
** Main loop
** ISR (Interrupt Service Routine)
** Debouncing
*** ESP timer

Introduction

Update: I wrote this article, following this other one that teach the usage of a potentiometer and an OLED screen..

After ArchLinux upgrade from python 3.9 to 3.10, tools need to be reinstalled by:

cd ~/esp/esp-idf
git pull
git submodule update --init --recursive
./install.sh esp32c3

If you never used ESP-IDF, you can read the previous introduction article to ESP-IDF on RISC-V based ESP32-C3, how to install it and start environment for compiling and flashing code. I also wrote article about using ESP32-C3 with Apache NuttX POSIX OS, but it will be useless here.

This article is about, on ESP32 (more specifically a less than 3.5€ ESP32-C3 based NodeMCU board, but it should work about the same way on other ESP based boards) :
* How to blink an external LED using GPIO, including how to know LED needed voltage (V), amperage (A), and compute needed resistor, by using several possible means.
* Explanations about resistors values colours bands and computation of parallel mounted resistors. I also give link to free and open source software I wrote to help to compute needed resistors (depending on LED type, and desired intensity).
* How to connect an external switch to GPIO, and which resistor is needed. How to receive and manage it’s state a good way. By debouncing physical human pressure on switch, and use software interruption (that’s more easy that it could sounds).
* How to blink included RGB LED and stop/start it by using switch, an asynchronous way.

Continue reading

Short and practical introduction to FPGA, Verilog and Verilator and few words about SystemVerilog

→ Version en français ici

Warning, I’m a less than one month beginner in Verilog, Verilator et FPGA, studied as a hobby, if there are some mistakes I will correct it. You can contact me on The Fediverse.

Table of Content


* Introduction
** Real world full process
** Things to know and understand
** How to code a FPGA
* Verilog
** Values
** Types
** Gates
** Modules
** Simple example, writing an “and” gate
** Initial and always blocks
* Simple example with Verilator
** Make the test with Verilator
** Tracing example and GTKWave
** About Verilator examples
** Basic practical example with Verilator
* Further reading

The text in strong are here to help diagonal reading.

Introduction

Still continue to go to lower layers with the world of FPGA (Field Processors Gateway Array). This is a reprogrammable development electronic tool used to build and test processor. After the processor is validated in FPGA, you can start to build ASIC (Application-specific integrated circuit), actual hardwired processors that we use every-days in our computing devices. FPGA are also used as is in several industrial appliance (avionics, audio or video processing, etc…) for their parallelism, so the fact they are faster than a general purpose ASIC and a piece of software in these cases, and the ability to update them easily in case of problem. This post is a little introduction about FPGA, the popular IEEE standard Verilog HDL (“Hardware description language”) language and how to test it with free and open source software (FOSS) Verilator simulator. If you want to use VHDL, GHDL is FOSS simulator for VHDL.

Continue reading

64x64x16colours (Sweetie16) PixelArt with Pixelorama “β-karoten – We know whom will be eat”

→ Version en français ici

β-karoten - We know whom will be eat

I participated to the LoveByte Battleground demoparty> that runned this week-end, by posting a drawing last week. Sadly/funnily , there was few mistake ^^:
* I made a 64×64 pixels picture instead of a 128×128 one. The palette for the competition was 16 colours Sweetie16 (the default one on FOSS, TIC-80 fantasy console (Source code)).
* My second mistake is I’ve uploaded a first version, and few hours later another one using (FOSS) source code) on Debian on (FOSH) RISC−V (Specifications, there are lot of free or not implementations) emulator of FOSS Qemu (Source code, Git instance), the first upload worked fine but the second one didn’t work (maybe because my installation of Netsurf doesn’t manage javascript)^^. I also performed in a livecoding match (256 bytes and 25 minutes limits). Result of my poor production, Commented Live coding session record.

This is made with FOSS Pixelorama (Source code), itself made on FOSS Godot game engine (Source code). I use FOSS Arch Linux OS. Also made a ArchLinux AUR package pixelorama-git after pixelorama package (for git version, I would like to use v0.9, still not out, only v0.8 was available). There are pixelorama package (last stable, compiling from source), and pixelorama-bin package (from developers binary tarball). Pixelorama is a Pixel art picture and animation editor. I believe I discovered Pixelorama thanks to blog Librearts.org.

The name is “β-karoten – We know whom will be eat”.

Pixelorama editor screenshot
Screenshot of Pixelorama