Skip to main content

Posts

Showing posts with the label Development

Pérégrinations avec CDK (Curses Development Kit) et C++

Mise à jour Ce projet est actuellement en réingénérie; l'idée est d'isoler l'interface graphique pour en faire une librairie. Des mises à jour seront donc à venir. Partie I - Le contexte Voici maintenant un an que je travaille sur un projet C++ utilisant la librairie CDK. Le but de ce projet est de créer un gestionnaire/éditeur universel fonctionnant avec l'interface "texte" sous Linux. Initialement, le programme a été conçu pour gérer les programmes et les performances de deux Yamaha TX816, chacun possédant 8 modules indépendants (les “TF1”). Pour rappel, chaque module est un synthétiseur à part entière, équivalent au célèbre Yamaha DX7, pouvant stocker 32 programmes (des voices dans le jargon Yamaha) et 32 performances . C'est ce qui distingue un module TF1 d'un DX7, ce dernier n'ayant qu'une seule performance . Avec deux TX816, l'ensemble équivaut à gérer 16 synthétiseurs similaires, 512 programmes et 512 performances. ...

Transformation de fichiers Quicken vers GNU Cash

le contexte J'utilise Quicken depuis 25 ans; d'abord la version 2001, puis la version 2006. Comme je suis sous Linux, Quicken tourne dans Wine. La seule chose qui ne fonctionnait pas sont les backups; la fonction "Backup" se plantait, mais je pouvais toujours copier le fichier courant, ainsi que l'exporter. Malheureusement, depuis une mise à jour de Wine, je constate des comportements bizarre; erreur au lancement (table de "Memorized transactions" tronquée), à l'affichage (transactions dupliquées), mais plus inquiétant, transactions manquantes. C'est le temps de passer à une solution plus moderne, et surtout, native sous Linux. Mon choix c'est porté sur GNU Cash, dont l'ergonomie est assez similaire à Quicken. Naturellement, je veux importer mon historique de transactions qui, je dois dire, est peut être plutôt complexe: 110 catégories distinctes et 45 comptes (bancaires, amortissement hypothécaire, comptes d'investisseme...

C++ : a nasty bug

It took me 2 days to figure out this bug in C++. The context I use ncurses and I want to manage several windows. I created a class (Window) with all the methods I need. class Window { private: WINDOW *win; ... public: ... } No issue here. To store my objects, I used a vector of pointers: std::vector<Window*> Windows; The bug I want to create 2 windows, so I did the following: Window *A = new Window(...); // Instantiate the class Window, implicitely calling the constructor Windows.push_back(*A); // Adding object A to the vectors Window *B = new Window(...); // New instantiation Windows.push_back(*B); // Adding object B to the vectors The bug was here: when I pushed back the second object (B), the memory manager decided to reallocate the vectors, because vectors must be contiguous. Doing so implicitely called the destructor of the first object; the window A disappeared. Possible solutions Reserve memory for the vectors Wind...

Behringer X32/Midas M32 config.bak

Warning The info in the blog are based on my own experience and for information only. If you f**k up your board by editing the file, it's your choice and your responsability. Introduction The X32/M32 core engine is a PC board running a customized Linux. What is cool with this is most configuration files are actually text files, that can be stored on an USB bey and edited. If you know a little bit of vi and awk , you can edit the files directly. console.bak This file contains a backup of the board configuration (all parameters). It's a text file, divided in multiple sections. Links How a channel (odd) is linked to the next one (even). There is one toggle ( ON or OFF ) for 2 channels. /config/chlink ON ON ON OFF ON ON OFF OFF ON ON ON ON ON OFF ON OFF /config/auxlink ON ON ON ON /config/fxlink ON ON ON ON /config/buslink ON ON ON ON ON ON OFF OFF /config/mtxlink ON OFF OFF For example, ON on the first position indicates Channel 1 and 2 are linked: /config/chlink ...

First step with Turbo C 2.0 on Atari ST

Yes I know, you may think I'm crazy: what the heck programming on the Atari ST? Why Turbo C? Context Atari STe and Soundpool SO4 I use my Atari STe since the 90s, almost exclusively to make music with Cubase. The Atari STe has 2 MIDI sockets (IN and OUT), which allows to drive 16 MIDI channels. But some of synths use all 16 channels (Roland SC55, Kurzweil 1000PX). To drive more synths, I purchased a MIDI extension, the Soundpool MO4 , providing 4 extra MIDI outs, for a total of 80 channels. The MO4 is connected on the parallel port (printer port), and comes with a driver for Cubase. This configuration worked for years. The problem Quite recently, my wife and I have decided to move closer to downtown Montreal. I packed all my studio, including the Atari, moved, and reinstalled my studio; this took, of course, almost a year before I unpacked and reinstalled my Atari. When I tried to use the Soundpool MO4, I had nothing on any MIDI out. However, the MO4 is still recognized by C...