Archive for October, 2011
Cet article a été publié dans Linux Magazine 130 (septembre 2010) et est disponible sous licence CC-BY-NC-ND. Depuis, la situation a évolué. Il existe un portage OpenWrt automatisant de nombreuses manipulations décrites dans l’article. Une partie du chargeur d’exécutable et de nombreux bugs Linux ont été corrigés. QEMU ne nécessite plus de patch et la version 0.15 supporte directement Milkymist. Enfin, les Milkymist One sont disponibles à la vente et viennent avec une version bien plus aboutie de Flickernoise ainsi que tout un “packaging”.
Le numéro 124 de février vous a donné une présentation générale et assez théorique du System-on-Chip (SoC) libre Milkymist. Maintenant, nous allons nous orienter vers la pratique en détaillant les différentes opérations nécessaires au développement de logiciels fonctionannt sur cette plate-forme: installation des outils de compilation, construction d’un noyau Linux compatible, compilation d’applications et utilisation de l’émulateur QEMU, pour finir avec la configuration d’une carte de développement FPGA permettant de prototyper le SoC et le déploiement du logiciel sur cette dernière.
You haven’t really seen what the Milkymist One (M1) really can do if you haven’t used it with some MIDI controls.
Here’s how it’s done:
- first, you need some MIDI controller. For now, it has to be one that has the old-style MIDI connectors, not USB-MIDI. I used a Korg Kaossilator Pro.
- next, you need to define which of the controller functions you want to map to variables for your patch. This is done in the M1’s control panel, Interfaces > MIDI > Controller mapping.
“midi1″ through “midi8″ are the variables you can set. The value on the right side is the controller number. E.g., for my Kaossilator, I assigned:
midi1 12 touch pad, X axis midi2 13 touch pad, Y axis midi3 91 gate arpeggiator slider midi4 94 program volume knob
This is for using the Kaossilator both as an instrument and as a MIDI controller. If I had switched it to be only a controller, I would have had more controls to play with and some of the numbers would have changed.
- you can now use Patches > Variable monitor to see how the controls affect the midi1 … midi4 variables. Each gets assigned a value between 0 to 1, corresponding to the setting of the control. (MIDI transmits values from 0 to 127.)
- finally, you need to modify a patch to use the MIDI variables. I took a simple one, “Geiss – Tornado”, and made the following tweaks:
and then changed all the wave_
settings to use “t” instead of “time”. This way, I can modulate the color by moving along the Y axis on the pad.
I put this after the last assignment to “rot”, effectively overriding it. Now rotation is entirely under my control, with no rotation when touching the pad on the left edge, and rapid spinning on the right edge.
This controls the distance of the point being drawn from the center. With rotation, this becomes the radius at which things appear. I assigned it to the slider.
This controls how quickly we “travel into” the image. I assigned it to the volume knob.
- these settings are lost when powering down or restarting the M1. To keep them, save with Performance > Save and, after booting, load with Performance > Load. Be careful to save under the directory /ssd/, not the root directory. The latter is also lost when booting.
I was curious to see how well the PWL triode performed. So I made a little test to measure cathode emission and amplification.
The first step was to build a variable high voltage power supply, since I’m under-equipped enough not to have one laying around. So I used a 20V power supply transformer connected to a 120V variable autotransformer scavenged from a 70’s American-built X-ray machine that happened to have a permanent tap within the first turns, allowing it to step-up the voltage to a nice 180V. For turning it into DC, I simply took the switching power supply PCB from a discarded fax machine, cut it right after the filtering capacitor, and hooked it to the variac. There are easier options, but I did with what I found in my pile of junk
The grid voltage is provided by a 9V battery and a potentiometer, and the filament voltage by my (single!) lab power supply. I then used cheap DMMs to measure anode voltage, anode current and grid voltage.
This resulted in this little kludge:
The first test was to see how many electrons the hot filament is capable of sending into the tube. I connected together the anode and the grid and brought them to a 176V potential, while I varied the filament voltage.
This led to this plot:
Clearly, the tungsten cathode only begins to work at very high temperatures! Wikipedia lists an efficiency of 5mA/W for a tungsten cathode (oxide-coated cathodes, used in commercial tubes, are 100 times better). At 4V, the filament current is 280mA, which represents a power of 1.1W. The emission, however, is only 2.2mA. Perhaps it works better with more filament voltage, but I did not dare cranking it up for fear of damaging the filament.
The second test was to see how much the anode potential influenced the anode current. I set the grid to the ground potential, and varied the anode voltage. The plot shows a quite linear dependence:
Now, let’s see how good this triode is at doing its job: amplifying signals! With the anode potential set to 176V and a filament voltage of 4V, I sweeped the grid voltage and plotted the anode current:
Clearly, the tube is working! It is not the best triode in the world, as the grid apparently struggles to stop all electrons (and because of the low emission efficiency of the tungsten cathode). But it definitely does some amplification and it certainly is a usable tube. Impressive work!