Tuesday, December 22, 2015

Monotribe - Removing clicking sounds




I really like the sound of my Monotribe and so far have not experienced the clicking sounds so many people complain about as really noticeable. This changed when I needed to run it through a reverb...

The clicks and pops are caused by the phase of the oscillator when a note is triggered (in the envelopes reverse saw and square setting). The following schematic visualises that:




When a note is triggered while, by chance, the VCO is at TO or T2 of its wave cycle (I know that the Monotribe has only square, saw and triangle wave shapes, but it really is the same as for the sine shown here), the resulting sound will smoothly "start". In contrast, at any other point in time, the generated sound will jump-start at the current point in the wave cycle, resulting in a noticeable click or pop sound. This can be avoided by either re-triggering the VCO with every note played (the Monotribe does not do that), or starting each note at a low volume and only turning it up after the pop has occurred (a.k.a. the attack phase of an envelope). Since the Monotribe's envelope, at least in its square and reverse saw setting, is really fast, it gives a very snappy tone - but with clicks and pops. A good electronic description on how and why this happens in the Monotribe is well described by Mark Madel in this YouTube video.

Based on Mark's and Snyder80's suggestions in the  30+ page Monotribe modification thread on Muff Wiggler, adding a 1 µF WIMA foil capacitor (any above 16V will be fine) to the base of Q24 and GND softens the envelope and gets completely rid of the clicking problem of the Monotribe.




As seen in the photos, I attached wires to the corresponding points on the pcb instead of directly soldering the capacitor. This not only enabled me to easily play around with different capacitor values (but Snyder80 was absolutely right by using a 1µF capacitor), but also allowed for putting a switch between the capacitor and the Q24 transfer, to turn the mod off when a most snappy envelope is desired.





As a side note: The above mentioned Monotribe modification thread on Muff Wiggler is a must read for anyone aiming to improve their Monotribe. While also being fun to read, the highly informative thread contains many good ideas and solutions to common Monotribe problems and often renders it unnecessary to reinvent the wheel.



Sunday, December 6, 2015

Pimp my Drum Machine

A very quick one for in-between: 30min to optically upgraded my Roland R8 with wooden sides.

The Roland R8 Human Rhythm Composer does not need any introduction. "One of the very best drum machines ever", was a game changer upon its release in 1988 and dominated the electronic music production in the 90ies. Almost 30 years later, mine was still in a pretty good condition, but was due for a little optical make over.

I got a wooden plank at the local hardware store and, after roughly cutting it into two similar sized parts, schematically indicated the R8's dimensions on it. A circular saw quickly manifested my drawings in shapes (upper part), a rasp gave them a smooth surface and edges, while sticking rubber feet to them completed the whole process.






Last but not least, the sides needed to be fixed to the devices body. Since the R8 has withstood the marks of time quite well, I did not want to apply permanent changes to its case and therefore did not see drilling holes into it as an option. so I decided for glueing. Among the available glues, I opted for hot-melt adhesives as they are pretty stable, but can also be removed without leaving residues. After a total of about 60min, my R8 was successfully pimped :)




Friday, November 13, 2015

Play the Kaossilator Pro with standard MIDI controllers (solder-free tweak)



I very much enjoy the intuitive play on the Korg Kaossilator Pro+. However, while I experience the touch pad to be great for implementing rhythms, drone sounds and simple patterns, I often don't hit the notes accurately enough during more complex loops, and often considerably disturb my harmonies. Consequently, every now and then, I would like to play individual parts with a standard USB MIDI controller or sequencer.

Since the Kaossilator is designed to be played via the touch pad, also the MIDI implementation is tailored around corresponding commands. In practice: my MIDI keyboard sends a note on command when I hit a key, while the Kaossilator expects a control change # 74 (to signal that the touch pad was pressed), and then control changes # 12 and # 13 (to define the X and Y coordinates on the pad) to play a sound. I experience this as quite annoying, but it is easy to fix without extensively trying to reconfigure the MIDI controller's behaviour:

In contrast of most of my other projects, this hack is optimised for easy and solder-free implementation. For this reason, together with its straight forward MIDI implementation, I again designed this project around the Teensy development board. While this could be implemented cheaper with a variety of other boards and some simple circuitry, the Teensy LC (which is available for around 12 USD/EUR) will only need a micro-usb to usb cable and my Kontroller firmware.

Since the hack is designed for stock boards, it is very suitable for the absolute DIY beginner and therefore I also guide through the installation steps of the software required to put the Kontroller (not overly creative, but quite a suitable name for this hack) firmware on the Teensy board.

Assuming you have a Mac (it is the very same on other systems, however, the software installation routines are slightly different and I cannot confirm the exact names of menu points etc.), and that this is your first contact with the Arduino world, download the Arduino software here.

After installing (by moving the Arduino icon into your application folder), download the Teensyduino extension and install it via its installer. During this process, you will have to indicate where you have just put the Arduino IDE (hint: it is in your application folder), as well as point out which Teensy libraries you want to have pre-installed (for this purpose, it is save to not install any. Particularly do not install the MIDI library, it is based on an old version. If you want the MIDI library, like for MIDI DINs etc, get it from here).

Now it is time to get the actual Kontroller firmware from my GitHub section. Download it, and open it in the Arduino IDE. You can change the setting to your liking as described in the beginning of the file. Just add or remove "#" characters at the beginning of each line to inactivate or activate the setting, respectively. Configureable options include:
  • enable/disable modulation of the X-axis (the note's pitch) by your keyboard's pitch wheel
  • enable/disable notes velocity to define the Y-axis (often a filter or delay)
  • enable/disable a control change # (which can be freely chosen) to define the Y-axis
  • enable/disable aftertouch to modify the Y-axis value
  • enable/disable indication of played notes on the built-in LED of the Teensy (Why not?)

Connect your Teensy board and, in the Tools menu, select Board: "Teensy LC" and USB type: "MIDI". Then press Upload in the Sketch menu.

And done! Kind of. The Kaossilator gives us two options to communicate with it via MIDI: USB and DIN. Since implementation of the latter requires construction of a (very basic) circuit, I neglected this route in order to provide an assembly-free solution. However, implementing MIDI DINs is really easy and straight forward, so feel free to contact me if you want instructions for that as well.

Focusing on USB, unfortunately this communication was designed for a USB master to interact with USB slaves. That is also why you typically cannot directly connect your USB MIDI keyboard to your instruments, but have to go through a master, i.e. your computer. Having said that, this means you will have all your devices (Kaossilator, Kontroller, Keyboard/Sequencer) connected to a computer for this to work. And you need to configure your computer to pass the information from your USB MIDI device through the Teensy Kontroller to your Kaossilator. On a mac, a free software to do so is MIDI patchbay



MIDI Patchbay: use the Teensy as a man-in-the-middle usb device

Despite being quite aged, it does the job well. Downlaod it from the provided link, move the app to the applications folder and start it. The first patch will manage the connection between your MIDI device and the Kontroller. MIDI input should reflect the name of your device, while MIDI output should say "Teensy MIDI". Apply your corresponding Channel settings and, under Note, allow all notes. Then click the "Add Patch" button to make the Kontroller to Kaossilator connection. Here, the MIDI input is "Teensy MIDI" while the output should be "KAOSSILATOR PRO+ SOUND", while and the MIDI Channels have to be configured to your Kaossilator's settings. 

And done! This time for real.



A quick note for fruitful experimentation: Kontroller translates notes into coordinates on the touch pad's XY-axis of your Kaossilator Pro (+). This means that the scale, set on the Kaossilator, is respected and therefore does not necessarily reflect the pressed key's pitch. Similarly, the octave range of the Kaossilator will further modulate the notes played. While this can be quite fun as well, a one-to-one mapping can be achieved by setting the octave range of you Kaossilator to full.

Friday, October 23, 2015

Alesis 3630 Compressor Mod

I have been a bit quiet lately due to travels and too many things going on. Being back home and having some projects in a publishable state, here is the next part of my 19" rack series...

While searching for an affordable all-purpose hardware compressor, I naturally came accross the Alesis 3630. Naturally, since, according to Alesis, this "has become the most popular dynamic processor ever made". Similarly, according to Daft Punk, this little box gave the signature sound to their Homework and Discovery albums. After continueing to read about it, it quickly became clear that, together with its price, these are almost the only positive things that can be found about this compressor. Most people seem to agree that it's best usage is as a doorstop, and even the one Daft Punk used repeatedly was not the original, but a modified version. So let's modify it...

The modifications implemented here summarise the ones suggested on Icarus' post on Sound on Sound and Smallbutfine on groupdiy, which seem to replicate the original Buta mods, but also include the opinions and suggestions of several other people. Thanks to all of you!


Location of all relevant components on a Rev. D board (Click to enlarge)


Opening the Alesis 3630 is straight forward, and although the potentiometer knobs sit tightly on their shafts, they can be removed with a bit of gently controlled pressure. After disassembling the unit, the two pcbs unfold and can be separate for easier handling. Since the component's labels are printed underneath them on the one-sided boards, I made a visual overview of all changes on my Rev. D board. If your board has a different revision number, just slightly bend the components and try too peak underneath to identify the labels. Good light helps a lot on this!

Among the first things suggested for upgrading, is beefing up the components of the power supply section to give the unit a bit more headroom power-whise. For this, we replace the four big capacitors with better components and swap the four diodes with fast switching alternatives:



- Power -


Quantity New component Position Old component
2 220µF/35V Electrolytic cap C2, C3 ?
2 2200µF/25V Electrolytic cap C4, C5 ?
2 10 µF Audio grade electrolytic cap C6, C7 10 µF
4 UF4001 Diode D1, D2, D3, D4 1N400x



Next, we turn our attention to the op-amps and VCAs (Voltage Controlled Amplifier) that are responsible for the compressor's gain and thus play an important role Alesis' sound character. Several OP-Amps work equally fine in technical terms, but make a significant difference from an audible point of view. Judging which one is best depends on personal taste and the purpose of your compressor and trying to solve that question by simply reading about the different sound characteristics gets you very quickly into highly subjective, sometimes esoteric, terrain. However, for my trials I got a pair of MC33079P, which are supposed to sound very surgically clean, as well as some LME49740, which have a more musical character. Other OP-Amps that work well, but I have not tried myself, include the LT1359 (not sure about the sound), TL074 or TL084 (supposed to be darker, grittier), OPA4227 (smooth and musical) and OPA404 (very clean and quiet).


- Input -


Quantity New component Position Old component
2 MC33079P DIP-14 Quad OP-Amp U2, U6 TL084 or LF347
2 100 kOhm metal film resistor R12, R54 100 kOhm
2 1.69 kOhm metal film resistor R14, R56 1 kOhm
2 2.2 kOhm metal film resistor R13, R55 2.2 kOhm
2 6.2 kOhm metal film resistor R15, R57 6.2 kOhm
2 150 pF silver mica C12, C30 150 pF



All changes to the VCA (voltage controlled amplifier), level and knee sections consist of replacing passive parts only, so here we go:


- VCA -


Quantity New component Position Old component
2 2180BL08-U VCA IC U3, U7 2150
2 2.2 kOhm metal film resistor R42, R72 2.2 kOhm
2 6.2 kOhm metal film resistor R41, R73 6.2 kOhm
4 240 kOhm metal film resistor R27, R69, R208, R211 150 kOhm
4 20 kOhm metal film resistor R22, R23, R64 ,R65 22 kOhm
2 470 Ohm metal film resistor R26, R68 470 Ohm
2 100 Ohm metal film resistor R29, R71 100 Ohm
4 33 Ohm metal film resistor R79, R102, R209, R212 33 Ohm
2 5.1 kOhm metal film resistor R25, R67 5.1 kOhm
2 10 µF audio grade elko C43, C55 10 µF
2 22 pF metal film capacitor C15, C32 50 pF
Remove - resistor R28, R70 ?


- Level -


Quantity New component Position Old component
2 2.2 mOhm metal film resistor R10, R52 1 mOhm
2 10 kOhm metal film resistor R8, R50 10 kOhm
2 22 µF audio grade elko C11, C29 22 µF
2 10 µF audio grade elko C16, C33 0.22 µF
Remove - capacitor C42, C56 ?


- Knee -


Quantity New component Position Old component
2 5.6 kOhm metal film resistor R83, R106 1 kOhm
2 6.8 kOhm metal film resistor R17, R59 3 kOhm


Many people complain about how the mere presents of the gate circuits negatively affect the 3630's sound. The easy solution is to disconnect the gate by cutting the bridges marked in the picture with yellow circles. However, in general, I am not a friend of ultimate loss-of-function approaches, so I decided to replace the bridges with switches. Since I the front plate of the compressor is rather populated, and its rear is little accessible in a rack, I opted to replace the threshold potentiometers with switchable ones. Measuring the original potentiometers, they are 10k with their taper range somewhere between a linear and a log scale. Seeing it as an advantage to have finer control on the lower end of the scale, I ended up opting for logarithmic potentiometers as replacements. The integrated switch makes their body larger and I had to desolder and bend two capacitors on the LED board (marked with a pink circle) to gain the necessary space in the re-assembled box. Also, the pins of my replacement ones did not fit into the pcb holes, so I had to used small wires as adapters.

As a last upgrade, it is suggested to connect all input/output grounds with heavy gauge copper wire. These (thick, brown), as well as some of the wires used to connect the switchable potentiometers (thinner, orange), are well visible on my finished unit:




So how does it sound now? While it would be nice to have an original model at hand to compare it to, the 3630 has a nice musical character now. My first impression is very good and the mods seem very worth doing...



PS:
Some people also suggest to replace the side chain op-amp. I did not implement this, since I am fine with the side chain as it is. However, if anybody has experience with this modification please say a few words in the comment section about your experience and which replacement op-amp you have used.


- Side chain -


QuantityNew componentPurposePosition
1?Quad OP-AmpSide chainUx





Tuesday, August 4, 2015

LackRack - A Cheap Living Room 19" Rack

I needed space so I decided to expand my desk. While I was entertaining several ideas about how to best do that, I also happened to measure some of my existing furniture. My first discovery was that some compartments in my old Ikea bookshelf have dimensions that are suitable (more or less) for 19" equipment. My second discovery was that the very same is true for the Ikea LACK tables. And my third, and quickest, discovery was to find out that I am not the first person to discover that: Like for most things on the internet, there already exists a community around the use of LACK tables as 19" racks, and the official name for this purpose is ( - wait for it - ) LackRack. Apparently first seen on an IT related event, LackRack quickly gathered a small fanbase in the DIY server/network and music scenes, due to is cheap price, availability and flexibility.

However, for my LackRack  I pictured several features that differed from the standard solutions yone finds on the net: a total height of about 90cm would very well fit to my desk space, wheels could add spontaneous flexibility in my gear arrangements, the 19" part also should be as flexible as possible, a part (besides the 19" section) dedicated for storing cables would be a nice bonus. On these grounds, I decided for a two story solution: The upper part would be comprised of the already mentioned LACK table (7,99 Eur), the base would be a LACK side table on castors which I found in mint condition for almost half the price (15,- Euro) on classifieds.






Slight inconvenience with the LACK tables, but I guess that with the cheap price, is that the legs are mainly built from cardboard and hence are hollow except the top and bottom 5 cm. Since I wanted to fill my rack top to bottom and therefore the screws will need to be able to support some weight, screwing the modules directly into the table's legs consequently was not an option. However, I did not like that idea in the first place, since it also decreases any later possibilities to rearrange modules (at least I assum that the screw holes wear off over time). Instead, I opted for continuous rack rails which can be fastened in the solid sections of the table's legs, and which allow me to freely manoeuvre my gear around at a later time. Adam Hall had some in his portfolio (10,- Eur), that perfectly matched my needs, are used with standard M6 screws, and were quickly sawn to an appropriate length of 38 cm:







For optical reasons, I painted the rail's inner sides black, and then put all parts together:





A very flexible, 90,5 cm high, two compartment 19" rack for 30,- Eur, that might not be suitable to be carried from live act to live act, but does not need to hide in the living room.


Continue reading on how a central power supply with lights complemented the new rack.


LackRack - Power and Lights with a modded T.Racks VM-100





This time it will be all about adding a power strip and lights to the LackRack.



A quick word in the beginning:
This blog post is not intended as a tutorial, I wrote it for pure documentation purposes only. 
Do not try this if you do not posses the required technical knowledge and skills. 
The voltages we are dealing with are life-threatening, and improper handling/assembly can further cause heavy damage to property including the risk of fire.



Having said that, I wanted the power supply for my rack to serve as a power strip and to provide a single on/off switch for all the gear. Rack-mountabilitiy would be considered a big plus, and optional light would just be the icing on the cake.


While there are several commercial products that satisfy these needs, constructing a rack out of cheap parts, and then spending a fortune on a reference power conditioner just felt wrong. Furthermore, electricity is absolutely stable where I live, so a simple 19" power distribution strip would do the job without the necessity of a true power conditioner.


Roaming on classifieds again, I found a T.Racks VM-100 that fulfilled my requirements and met the price range I had in mind. The T.Racks VM-100 is basically exactly what I have described above: it is a 19" power strip that bears eight IEC power connectors on its back, has two dimmable lights that can be extended/retracted, has a central power switch with a 10A fuse, plus it sports an additional fancy looking LED volt meter. While I can imagine that the voltmeter can be quite handy in on-the-road conditions, in my home it really just looks fancy. Unfortunately it looks fancy all the time, because it displays the available voltage even when the power switch is turned off. Again, this might be great for gigs, but turned out to be an annoyance in my living room.


Opening the VM-100 quickly revealed the reason for this behaviour:




T.Racks VM-100


As seen in the zoomed picture, the white and black cables (which are the ones that drive the voltmeter) are connected pre-switch:


Pre-switch voltmeter


However, a quick rewiring connected the voltmeter post-switch and post-fuse, and readily solved that issue: the device is now pitch-black when turned off, and only unfolds its full fanciness when being switched on.




Post-switch voltmeter


Not being sure if 10A will be enough to drive all equipment (at the time being they are sufficient), it would be great to transform the volt meter into an ampere-meter, but that is a mod for another time.

Anyway, since a lot of my stuff has wall adapters, I also changed a standard power strip to an IEC version and connected it to the T.Racks:



Schuko version
IEC version




And here is the LackRack in its full glory now:


Hint: a glimpse of one of my next projects is already seen underneath the VM-100 :)


Thursday, July 23, 2015

Rhythm Wolf - Individual Drums Outs


I got asked by a friend if I could help him modifying his Akai Rhythm Wolf for individual outputs. After opening the little box, it became quickly clear that Akai was nice enough to label five resistors with "Individual Outputs Available Here". Not knowing about the signal levels, etc, it seemed worth to just give it a try and to simply wire them to mini jacks.

For this, I solderd five (red) cables to the upper part of the resistors.




The respective resistors are located left of the TSR jacks, suggesting that the levels get mixed here afterwards.



Quickly measuring the voltages passing through those connections, it became clear that none of them is ground. However, ground can be picked up almost everywhere on the board, and I soldered it to the sleeves of a all (mono) mini jacks. Similarly, the red wires got soldered to the tips.
Initial trials indicated that the signal level was very much sufficient for my friends amplifier/mixer, and also that the corresponding sounds did not get ablated in the main mix. So after drilling small holes into the backside of the case and attaching the jacks there the mod was done :)


Wednesday, July 22, 2015

Home Automation - Farewell Old Friend

Everything has to end at some point. Here and now, my very first project ends.
The one that made me familiar with µcontrollers.
The one that brought me to electronics.
The one that initiated me as a tinkerer.


HardWareHub





Actually, that is not true - it is the other way around. I started the project because I wanted to do something with µcontrollers and wanted to dive into the world of electronics. What I was missing at that point was a project; a purpose for my tries. That was HardWareHub.

While it is not strictly about sound creation, it is connected with the purpose of this blog in the wider sense and deserves a comment here: HardWareHub was a home automation system. When I started playing music in iTunes, I wanted my amplifier to automatically turn on, switch to the correct input source and to turn the bass down if it is late at night. Similarly, if I received a phone call, the volume faded out and iTunes went on pause. If the TV got turned on, the same actions happened, in case music was playing, but the amplifier switched to the TV source.

It worked quite well for a couple of years, but like many projects without a defined goal, it happened to be in a constant state of changes. At one point I got distracted by other projects and it happened to be left with some functionality temporarily turned off. Consequently, I happened to use it less and less lately and I want to officially focus on more current projects now. When I decluttered some cables in my living room yesterday, I removed the Arduino, the heart of HardWareHub, to give it a new purpose.



Some details for those of you interested in similar projects. HardWareHub consisted of three parts:
  • an Arduino managing the hardware side and communicating with my living rooms appliances by mimicking the IR commands of their remotes
  • an applescript continuously running as a demon on my computer (which never gets turned off anyway) communicating with the Arduino and assessing states of iTunes, Plex, router (Fritzbox), browser (yes, it also worked with youtube), brightness of my computer screen, etc.
  • two javascript widgets to serve as GUIs
last but not least, however I would not consider this a real "part", there was a USB controlled power outlet (Gembird SIS-PM) to switch lights and some devices on/off.



Implemented features included:
  • full control over a stereo amplifier through IR commands
  • full control over a projected using similar commands
  • responsive to their native remotes
  • responsive to my own IR commands
  • control over room lights through USB controllable outlets
  • auto mount of my NAS on startup
  • iTunes control through applescript
  • PLEX control through HTML commands
  • "knowing" if youtube is playing by measuring the performance burden of the web browser
  • responding to phone calls (ingoing and outgoing) though an api of the router (Fritzbox)
  • evaluating the time of the day and adjusting volume and bass/treble settings
  • action based GUI (e.g.. Movie mode turns on the stereo and the projector, switches to the correct input sources, starts PLEX, turns off iTunes, turns the lights off, ...
  • device based GUI for individual access to all features
Widget to control the individual devices


Good bye, it was fun and I have learned a lot thanks to you - now it is time to move on...


Thursday, July 2, 2015

Celebration

I am very happy to announce that my code to receive and send MIDI Time Code messages and a yet unpublished function to send Real Time messages was just added to the official Teensy core libraries.


Celebrating:



Monday, June 22, 2015

Receiving MIDI Time Codes over USB with the Teensy

Due to a request of a reader of my blog, I elaborated on my extensions for the Teensy 3.x usb_midi library by adding support for callback functions to receive MIDI Time Code (MTC) messages. To fully understand the code, I recommend also reading my post for generating the MTC.

Briefly, the library files where we need to add the missing functions are located (on Mac OS X) in Contents/Java/hardware/teensy/avr/cores/teensy3/. This folder can be found by right-clicking on your Arduino application and then selecting Show Package Contents from the drop down menu.

You can either download the modified files from my GitHub repository and copy them to above folder, or you can modify the files yourself by following the following simple instructions:

Open usb_midi.h and search for "#ifdef __cplusplus". Add the following code one line above that:

Now search for "private:" and add this code right before it:

You are almost done. Save and close the file, and open usb_midi.c instead. Search for "// Maximum number of transmit packets to ..." and add this line above:

As a last step, search for "return 0; } #endif // F_CPU" (they might be distributed over multiple lines) and add these lines of code before the "return 0;"

And voilá, you can now receive MTC messages over USB and evaluate them with callback functions.
Your callback function will receive the MTC as a word parameter. An example sketch showing how to do the decoding is included in the repository...


Tuesday, June 16, 2015

Monotribe fun



Opinions about the Monotribe are quite controversial. While many like the sound this little device can produce, its lack of midi, 2nd oscillator, etc, are considered a huge draw back by others. Flanked by the Monotron series on the low budget end and with the Volca series having more functionality, the Monotribe appears obsolete and can be tough to integrate into your workflow. However, I got an offer for one that I could not decline - and I love the little thing. Its sound is (except being prone for clicks on note on and off events) raw analog and rich, while not missing a certain level of aggressiveness either.

Further, many of the points of criticism can be readily addressed by slight hardware modifications. These are largely facilitated by labelled soldering pads that Korg graciously put on the pcb. In addition, Midi functionality can be added without the necessity of physically changing the Monotribe, by using a serial connector present in the device and by using Midi commands and messages that are already integrated in all the official firmware releases. Consequently, several commercially available Midi kits from third-parties are at hand, however, these are often overpriced, considering only costs for materials, and many modifications can be implemented with only few and simple steps for a fraction of the price of a kit.

In this context, a modification scene has formed around the Monotribe with a plethora of mods being well described and published online. This information is often dispersed among several sources and I will summarise some of them here while implementing them in my own Monotribe,

Since I would like to have both, Midi DIN connections as well as over USB, I decided to use the Teensy microprocessor again to manage all communication and serve as a bridge between Monotribe, DIN and USB. This approach has also the advantage that there will be quite some processing power available for additional modifications of the synthesizer...





My first implementation is quite crude and demonstrates only basic capabilities: while the Teensy already takes care of the USB Midi communication I further added a small OLED display and a joystick. The display, so far, shows which note is currently played, either through Midi or on the Monotribe's ribbon keyboard, indicates the active drum sounds with icons (not shown in the picture), and visualises the position of the joystick - which in turn controlles LFO frequency and range.




Tuesday, May 19, 2015

Control Playback/Recording in Avid Pro Tools with an Arduino or Teensy

I would like my Ghz Warrior to be able to sync with Pro Tools. The way I envision this feature, is to be as little as possible in touch with the computer. So instead of using Pro Tools as a Master, and slave the sequencer to it, I would like the Ghz Warrior to be the Master clock and the computer coordinates with that. Since USB hubs are cheap while MIDI DIN hubs are expensive, this should be accomplished through MIDI over USB.

While Pro Tools can send MIDI Real Time Messages (MIDI Clock) and MIDI Time Code (MTC) messages, it can only receive the latter. A quick look at the MIDI reference sheets, and the wikipedia page for better readability, reveals that a full MTC consists of two so-called frames. The combination of both frames encodes the actual second, minute and hour of the song/video/you-name-it that is playing, as well as 2 bits to communicate how many frames will actually be sent per second (FPS). This information is split into eight quarter frames (how was ONE frame defined in the first place?), each consisting of the status byte 0xF1, a zero bit, and then 7 bits encoding the described information in the following way:


  #    Data Byte    Description
  0    0000 ffff    Frame number lsbits
  1    0001 000f    Frame number msbit
  2    0010 ssss    Second lsbits
  3    0011 00ss    Second msbits
  4    0100 mmmm    Minute lsbits
  5    0101 00mm    Minute msbits
  6    0110 hhhh    Hour lsbits
  7    0111 0rrh    Rate and hour msbit

The Digital Warrior, and therefore my Ghz Warrior, is built on the Teensy platform, and I am actually truly grateful to Paul Stofregen and Robin Coon for this great system. In particular MIDI functionalities are extremely easy to implement, and a library for MIDI over USB comes with the installer that well integrates the system into the Arduino IDE. Unfortunately, what is missing in that library are routines to send MTC messages (and Real Time Messages, but more about that in another post).

I quickly wrote two routines to implement sending MTC with the library. To use that functionality on your Teensy board, copy paste the following lines to the usb_midi.h file of the midi_usb library:

On Mac OSX and for the Teensy 3.x boards, you will find the usb_midi.h file by right-clicking on your Arduino application and then selecting Show Package Contents from the drop down menu. In the now opening folder structure, usb_midi.h is located in Contents/Java/hardware/teensy/avr/cores/teensy3/

For the Teensy 2.x platforms, the file is in Contents/Java/hardware/teensy/avr/cores/usb:midi/

Make sure to select the right folder according to the hardware you have (selected in the Arduino IDE).

A fully modified version of the file for the Teensy 3.x is also available on my GitHub page. Further, I have put there an example sketch that synchronises your board with Pro Tools (Arduino/Teensy = Master, Pro Tools = Slave) and have the play/record status of Pro Tools respond to button presses. As a bonus, the option to use a standard serial connection without the need to use above library tweaks are included. By that you can also sync out-of-the-box Arduinos with Pro Tools.

Presets in the examples are a button connected to pin 4, and MTCs with 25 FPS.
For this, in Pro Tools, go to Setup/Peripherals... and set the MTC Reader Port under Synchronization to any:





Then, open Setup/Session and select 25 as the Timecode Rate:




Finally, put Pro Tools online by activating the corresponding button in the Transport window:




When you compile the sketch for the Teensy, make sure to select USB Type: "MIDI" in the Tools menu of the IDE, and everything should work out of the box.



Note:

If you use an Arduino, or compile the Teensy with the USB Type: "Serial" option, you will need to use a serial to midi bridge. This converts the incoming serial commands to actual MIDI messages in your computer. I found the free Hairless quite useful for this.

In Hairless, select your Arduino/Teensy in the Serial Port section, and the IAC Driver as a MIDI Out. Activate the Bridge and you are also done on this route :)




Friday, May 1, 2015

Digital Warrior - SD Card Mod

The parts for my very own Digital Warriors have arrived - and they really look good.
However, as pointed out in my last post, there were a few things I was missing among the functionality:

The Digital Warriors are based on the Teensy microcontroller development system, and consequently, the original design makes use of the Teensy's internal 2kb EEPROM to store its data. Naturally this tremendously limits the amount of data that can be saved.

To be able to use the Digital Warrior most flexibly and efficiently as a stand-alone sequencer, I wanted to use an SD card instead of the EEPROM. This would allow me to implement longer

Unfortunately all through-hole pins on the Teensy are already used by the Digital Warrior's standard functions. To make things worse, we can not freely choose any pins for the SD card access. SD cards are typically connected through the SPI ports and these are on: pin 13 - SCK, pin 11 - MOSI, pin 12 - MISO. Alternatively also pins 14, 7 and 8 can be used respectively, but these are also occupied. The fourth SPI pin, SS, is less of a problem as it is freely assignable.

Looking at the Digital Warrior firmware, it it quickly became clear that the necessary pins are easily re-routable. Pin 11 is used by one of the encoder push buttons, pin 12 the sequencer button, and pin 13 the track button. Changing the pin assignments in the software is pretty easy, rerouting them in hardware is also not really a problem. I decided to use the pads, on the bottom of the Teensy, 31, 32 and 33 for the button pin reroutings and soldered small cables on them before attaching the Teensy to the PCB:



Then I removed the corresponding pins from the headers which I used to solder the Teensy to the pcb. And finally connected the cables to the corresponding spots on the board:





A quick test with my updated firmware confirmed that everything was working well.


Similarly, for the SD card, I decided to use pad 29 for the SS pin, and added a small cable here as well:



Afterwards I soldered the Teensy to the PCB and connect the remaining cables (the purple one was too much) to pins 11 (brown), 12 (red), 13 (grey) as well as GND (black) and 3.3V (white). The other side got soldered to the corresponding points on the micro SD adapter  as described here, and voilà - done:


The first version of the Ghz Warrior firmware to start using the SD card instead of the EEPROM can be found on my GitHub page.

Sunday, April 26, 2015

Ghz Warrior

Judging by YouTube videos and his homepage, I really liked the Digital Warrior of Tomash Ghz.
It seemed small, elegant, licensed under CC BY-SA 4.0 - and by that fully tweakable :)
I considered the last point to be particularly important, since I was missing some features for the purpose I had in mind: a fully autonomous sequencer for my synthesisers.

However, at one point when I was on Tomash' homepage to admire the smart device, I noticed that he was calling for preorders of the final batch. Confirming that this was my last chance to get one of little things, I did not hesitate to order the necessary parts for two of the standalone sequencer versions of the Digital Warrior.

Since then I am in very nice and fruitful contact with him, and since he wants to focus on other projects now, decided to also work a bit on the Digital Warrior as a standalone sequencer.
In honour for the great foundation I can built upon, I will call my modified firmware  Ghz Warrior...