oneten.cxhttp://www.oneten.cx
Experiments in the digital worldMon, 21 Nov 2011 19:48:27 +0000enhourly1http://wordpress.org/?v=3.2.1Sending MIDI system exclusive messages from Scala consolehttp://www.oneten.cx/2011/11/21/sending-midi-system-exclusive-messages-from-scala-console/
http://www.oneten.cx/2011/11/21/sending-midi-system-exclusive-messages-from-scala-console/#commentsMon, 21 Nov 2011 19:44:09 +0000oneten.cxhttp://www.oneten.cx/?p=82Apple OS X gets updated once a while, and I hope the problem with sending system exclusive message will be fixed. In the previous article I’ve shown how to send a MIDI note using Scala console. Here I’ll show how to send system exclusive messages, to ensure the bug I’ve reported is still present.

It still can not send or receive messages. The driver project is open sourced (MIT license) and shared on the Github page. As this is the first project where I used Java Native Interface, Objective C or Apple Core Foundation classes, I’m more than happy to get any feedback and suggestions how to improve any part of the code.

]]>http://www.oneten.cx/2011/10/21/java-midi-driver-for-os-x/feed/0Mac OS X Lion MIDI sysex problems with Javahttp://www.oneten.cx/2011/09/09/mac-os-x-lion-midi-sysex-problems/
http://www.oneten.cx/2011/09/09/mac-os-x-lion-midi-sysex-problems/#commentsFri, 09 Sep 2011 13:23:31 +0000oneten.cxhttp://www.oneten.cx/?p=64Happiness of easy MIDI programming with Scala didn’t last too long. Almost everything is fine with my pair of DaScratch controllers. I can switch the led’s and read the touch interfaces easily, but there is one small thing. The mode of round touch interface is switched by using MIDI system exclusive or sysex command. This is easy with javax.sound.midi in theory, but in OS X the sysex command doesn’t get transmitted.

This can be worked around by using mmj drivers. With mmj sending sysex messages from Scala console is a bliss. However, if there’s a pair of identical controllers just like I have, I can not access the second controller because of a bug in mmj.

So, I filed two bugs:

to Apple about sysex commands. I’ve got problem ID 10016703, but no response.

to Humatic about accessing two similar devices with mmj. Nils from Humatic responded very fast, but he didn’t promise fix soon.

Well, seems that my first project creating router for a pair of DaScratches is spinning off another project creating Java MIDI drivers for OS X.

]]>http://www.oneten.cx/2011/09/09/mac-os-x-lion-midi-sysex-problems/feed/0Scala console MIDI hands-onhttp://www.oneten.cx/2011/09/04/scala-console-midi-hands-on/
http://www.oneten.cx/2011/09/04/scala-console-midi-hands-on/#commentsSun, 04 Sep 2011 18:14:02 +0000oneten.cxhttp://www.oneten.cx/?p=55As Scala console, Interactive Interpreter or REPL was one of my selling points for programming MIDI with Scala, I show what can be done with it. I do not show how to install Scala or how to access console.

That’s it. Using Scala REPL is very fast way to check how the MIDI works with JVM.

]]>http://www.oneten.cx/2011/09/04/scala-console-midi-hands-on/feed/0Programming MIDI with Scalahttp://www.oneten.cx/2011/08/24/programming-midi-with-scala/
http://www.oneten.cx/2011/08/24/programming-midi-with-scala/#commentsWed, 24 Aug 2011 11:41:40 +0000oneten.cxhttp://www.oneten.cx/?p=40I’ve got a pair of Stanton SCS.3d DaScratch controllers and a Native Instruments Traktor Pro DJ software. They are connected using DaRouter software which is based on Bome Midi Translator. It runs pretty well, but there’s one small issue. Traktor has four decks, and there is no way to control more than two decks using the two DaScratches with this setup. There is “deck” button on the controller, but it is only used to change between two decks if there’s only one DaScratch. The button has no effect with a pair of controllers. I believe Stanton SCS.3m mixer would solve this, but I don’t have one.

I could buy SCS.3m mixer, but it doesn’t offer a lot of value. To be honest, I’d rather use my iPad with TouchOSC for the controls outside the DaScratches. Not owning SCS.3m mixer I’m pretty much forced to use DaRouter. I could also buy a Bome Midi Translator and try to make a patch for four decks. As no-one has done it, I suppose it may be impossible to do with Bome. So, it is time to start a programming project. However, even if I develop software as my job, my MIDI programming skills are dated 10 years ago. Back then I used Windows low level MIDI API with Delphi.

For DJ’ing I use MacBook, so the first option came in to my mind was to use Xcode and Objective-C, but after looking examples, it really didn’t felt my thing. It is pretty verbose, and OOP paradigm is not too interesting for me. More interesting Haskell isn’t too mature to use with Xcode yet, and the learning curve is still pretty high. So, I turned to trusty Scala running on Java Virtual Machine. After my experience with Windows API and Delphi, I immediately noticed the following advantages:

Create connection to your mobile through System > Preferences > Bluetooth > Set up a new device wizard. Also create connection using NetworkManagers Edit connections > Mobile Broadband > Add wizard. This should be enough for PAN, but not for DUN connection used in Nokia devices.

For dial-up-networking, you need to install Blueman application, for example by using terminal.

]]>http://www.oneten.cx/2009/12/14/fedora-12-and-nokia-e55-bluetooth-dial-up-networking/feed/0Upgrading to Fedora 12http://www.oneten.cx/2009/12/14/upgrading-to-fedora-12/
http://www.oneten.cx/2009/12/14/upgrading-to-fedora-12/#commentsMon, 14 Dec 2009 20:25:36 +0000oneten.cxhttp://www.oneten.cx/?p=34This site seems to be about upgrading Fedora, so we’ll make no exception here. Fedora 12 is in our doorsteps. The following different upgrade options were used with mixed results:

preupgrade-command. Used three times, failed once because of too small /boot partition.

YUM upgrade has been the most successful method until Fedora 12, but now the recommended preupgrade route has been used. However, if you have systems to upgrade, you’ll probably have too small /boot partition. Well, I have not too good track record for other methods.

Again, if you have ATI, and you want to use catalyst (fglrx) driver, you can’t. X is in too new version for it.

]]>http://www.oneten.cx/2009/12/14/upgrading-to-fedora-12/feed/0Upgrading to Fedora 11http://www.oneten.cx/2009/06/12/upgrading-to-fedora-11/
http://www.oneten.cx/2009/06/12/upgrading-to-fedora-11/#commentsFri, 12 Jun 2009 14:28:36 +0000oneten.cxhttp://www.oneten.cx/?p=31Well, it’s again the time of the year, when we’ll all upgrade our Fedoras. Again, I’d recommend not to, unless you don’t have to worry about the following issues:

ATI Radeon drivers wouldn’t work. There’s no support yet for the kernel 2.6.29/2.6.30 used in Fedora 11.

To get the most of the new graphical bootup screen, add the vga-parameter in your boot config (/etc/grub.conf):

kernel /vmlinuz-2.6.27.[---8<---] rhgb quiet vga=0x31

The 0x31B is a Kernel VESA graphics mode in 1280×1024 resolution and in 16M colours. If it is not available in your case, check a VGA modes list. And don’t worry, you can change or remove the parameter from GRUB bootup screen.

]]>http://www.oneten.cx/2009/02/24/upgrading-to-fedora-10/feed/0Playing videos on Nokia S60http://www.oneten.cx/2008/12/03/playing-videos-on-nokia-s60/
http://www.oneten.cx/2008/12/03/playing-videos-on-nokia-s60/#commentsTue, 02 Dec 2008 22:27:43 +0000oneten.cxhttp://www.oneten.cx/?p=28It is hard to find a decent information which videos Nokia E51 RealPlayer can play. Even the articles on the dedicated sites can be misleading.

So, I tried a little while the article above as a starting point. I compared the video I’ve taken with the phone, and another recorded with MythTV. The clip I used was only couple of seconds long to make the trying as fast-paced as possible.

The first thing I noticed from the article above, the ffmpeg supplied with Fedora can’t regocnise aac audio, but there’s a libfaac codec instead. So, that must be replaced.

Also the RealPlayer was completely confused if the video size was anything else than 320×240 and if the aspect wasn’t set. That makes 16:9 videos a little bit funny looking, but you can clip them or make letterbox stripes if you want to.