Pages

Monday, April 11, 2016

Matlab 2014 Simulink stupid connector errors

You start Matlab, start Simulink, and the moment you run any simulation you get a big pile of shit similar to this:

Error using connectorHandler>performAction (line 77)
Error starting MATLAB Connector. Please check that port 31515 is available.
 Error in connectorHandler (line 32)
   Error in connector (line 14)
    [isRunning, hostInfo] = connectorHandler(action, varargin{:});
 Error in connector.ensureServiceOn (line 22)
   Error in slmsgviewer (line 58)
   Error in slmsgviewer/PersistentInstance (line 304)
   Error in slmsgviewer.processRecord (line 404)
  
Error using connectorHandler>performAction (line 77)
Error starting MATLAB Connector. Please check that port 31515 is available.
 Error in connectorHandler (line 32)
   Error in connector (line 14)
    [isRunning, hostInfo] = connectorHandler(action, varargin{:});
 Error in connector.ensureServiceOn (line 22)
   Error in slmsgviewer (line 58)
   Error in slmsgviewer/PersistentInstance (line 304)
   Error in slmsgviewer.processRecord (line 407)
  
Error using connectorHandler>performAction (line 77)
Error starting MATLAB Connector. Please check that port 31515 is available.
 Error in connectorHandler (line 32)
   Error in connector (line 14)
    [isRunning, hostInfo] = connectorHandler(action, varargin{:});
 Error in connector.ensureServiceOn (line 22)
   Error in slmsgviewer (line 58)
   Error in slmsgviewer/PersistentInstance (line 304)
   Error in slmsgviewer.processRecord (line 404)


This happened to me running Matlab 2014a, but probably it's the same for older and newer versions. 

The people of the internet only spoke unhelpful bullshit about Java versions, so I had to take this seriously and work this out by myself.

If you have a firewall stopping Matlab's network connection (which I had, considering my copy is pirated) then that's your problem. Matlab needs the internet to work without complaining, for reasons no one here cares. So, create a rule or disable your firewall while using it and there you go. As far as I know, there's no mess with the activation.

Also, as far as I tested, I believe that Simulink works properly despite of the errors.

Monday, January 11, 2016

Hi-Fi Headphone Amp

Long after the Headphone Bass Booster I did another amp!



This time, the reason for this project was the stupid powerless soundcard built in laptops. You can fry your ears with treble but when it comes to bass it's worthless and annoying. I looked for some second hand headphone amps without luck and I disliked the price of brand new ones. There are lots of speaker amps second hand with headphone output, not very expensive, but I didn't have room for those big ones. Eventually, I decided to make one myself with reused parts, for free.

As usual, this isn't intended to be a tutorial, but I'll post some pictures to show you.



After the design and test stage it was time to put everything on a PCB.



The project is based on a Philips TDA1521 from an old TV. This IC is a Hi-Fi 12W amp with plenty of power for the purpose. I read good opinions about those TDAs, and they're easier and better than op amps. It was required a good power source however, which was the biggest problem to solve. Fortunately, a relative donated to me a laptop adapter (switching PSU, 19V, 4A), with more than enough power.



I knew I had room in the case, so I included a ferrite bead in the input to help with the high frequency noises that can come from bad filtered PSUs and reach the audio stage in laptops.



I'm no master at crafting I know, so the case parts fitted poorly (you'll see later). I didn't have many power tools either, so it was awful and tedious to fabricate. Actually, the aluminium cover (from an old VHS player) took 478965423667 hours to complete.



I added a big heat sink and some paste for the cooling system. I hope this not to warm up much when amplifying headphones, but as I included rear outputs for speakers, the heat sink may be necessary sometime.



The big white cord hides the shielding for the potentiometer wires, which was completely mandatory, to remove almost all the hum.



And this is the final product. Note the volume knob with rubber!





Some fancy LEDs with polarized paper makes it cool.




Saturday, November 14, 2015

What's exactly wrong with religions?

Now, I'll take advantage of this blog of mine, which becomes handy in situations like this one.

Astonish for the latest news from Paris, as an atheist, I've spent some time applying some logic to determine what factor is exactly what makes me refuse to believe. This' what I've found out:

A religion is a pile of stories, usually good to know and good to reflect on, because they contain good values. So, religions aren't bad. Believers are neither bad, I can't say they are bad because they aren't able to think 'clearly' and see further, they're victims.

People that misuse religions, like terrorists, are bad , but they aren't the key I look for. Other than that, they misuse the power of a religion, something that has been built previously. The religions have been given power, by some other people, and this is the key.

The people that provide power to religions are responsible. In other words, the key factors are the people that introduce the stories in the believer mind as if they were true facts. 

Who are these people? Are priests bad? 

If someone like a priest in Catholicism spread the stories as true ones because he really believes in them, then he's a victim too. However, the one that consciously transmit stories as facts (a liar), the one that wants the people to believe wrong facts, this is the bad one, the toxic one.

Tuesday, November 10, 2015

Sunday, September 20, 2015

How to fix Link2sd partition when SD gets damaged (Android)

Recently, I've faced the problem lots of Android users have found any time: SD card is damaged. Try reformatting. Android sucks.

As many users claim, my SD worked well in the PC. In my case, I use Link2sd to partially solve the problem those idiots who program Android cause, not allowing you to install apps in the SD card. (Go to check Link2sd in the market for more info). That makes me have my card divided in two partitions, the FAT32 one for my stuff and the other one formatted in a weird Linux system (ext2, 3 or 4) for the app to work.

After the first connection to my PC and a disk scan that found nothing wrong (that is: right click on the device-> Properties, Tools tab->Error Checking->Check), and a restart in the Android device, I got it to stop talking shit about damage, and I could access my data without problem.

I didn't care at all about the rubbish I had in the FAT32 partition that was working now and it seems nobody out there cover how to repair the rest of the card, which stored my precious Link2sd apps. So, let's see.

This is a snapshot of Mini-Tool Partition Wizard. We can see the FAT32 partition there and the other one which says "Other". The software didn't recognize the partition. In my Android, the Link2sd apps were disappeared and if I tried to open Link2sd, it kept asking me to select the file system of the partition like the first time I used it. Something was clearly not working right with that partition.

Let's attempt to fix this rubbish


You need a Linux OS (use a live-cd, live-usb, virtual machine... for convenience), I used Lubuntu.

Plug the card in the computer and find the path to where it was mounted. Call me idiot but I think the best way to do this for an untrained Linux user is through Gparted, so install it.

Select the correct drive in the top right corner, and check the path. In this case, the unknown 2 GB partition is in /dev/sdb5.

Now, open the terminal in your Linux and write fsck and the path, so:

fsck /dev/sdb5

Press enter and hopefully it will find errors and will ask you to press 'y' for fixing each one of them.

Unmount properly the card before extracting it and insert it in your Android. Maybe you'll need a restart, and if you're lucky the lost apps will come back and you won't have to throw out the window your Android, yet.

Sunday, June 28, 2015

Behringer UM2 OLD DRIVERS and differences with new ones.

For the ones that purchased a Behringer UM2 audio interface, you'll know it works without any drivers for basic recording. However, to make it fully operational (like enabling the second input), you need to install some software.

In the Behringer website, there used to be custom Behringer drivers for this particular device. Now the site just redirects to ASIO web, where you can download the standard ASIO drivers. As they're not custom, they don't work as good as the old drivers (keep reading).


Differences with new drivers

There is one major very important difference. 

With the new drivers the system install a generic USB audio driver and the PC sees the interface in Recording devices as a microphone input. When you try to record with a simple software like Audacity or simply you want the audio to sound through the Stereo Mix, you can only hear what is plug in the mic input of the interface. To use the second channel you have to use complex software like DAWs and mess with ASIO.

With the old drivers the system install a custom Behringer USB audio driver and the PC sees the interface in Recording devices as a line input. Now, all the inputs of the interface work without further trouble. You can capture the sound with the program you want and it will sound through the Stereo Mix as well. You don't need ASIO for anything.


It has been a hard job to find the old drivers in the internet for this model but here they are:

Behringer UM2 64-bits Windows 7/8 drivers, version 2.8.40.
(Sorry but I don't have any other version, OS, nor architecture).

Update (23/06/2020): Reader Ceiba Groove comments that got the drivers working in Windows 10 under compatibility mode.

https://mega.nz/#!fpF2RD6S!tdk6sCz1ePU77DMySDpJIsauvOCW-Zjxve_ixqq71UI

The 'Readme' file says they should work for
'UMA25S, UCA200*, UCA202, UCA222, UFO202, UCG102, iAXE393/624/629 and many more.

*bundled with UMX series, XENYX mixers, PODCASTUDIO USB


This driver does NOT support the following BEHRINGER hardware:
C-1U, BCD2000, BCD3000.
These models have separate dedicated drivers'

Enjoy, and if you need some help, let me know in the comments.

Update (17/09/2025):
If you find issues using the interface with newer software, set in Windows Sound (both under Playback and Recording devices) the format to 44100 Hz and uncheck 'Allow applications to take exclusive control of this device'.

Btw, no issues using the driver with W10. 

Saturday, June 27, 2015

What is direct monitoring in audio recording? Why is it so awesome?

Do you have and audio interface with direct monitoring capabilities and you don't have a clue what it is? Then you are an idiot, and I'll enlighten your life.

When you connect an audio interface to your computer, it becomes the default audio input and output device (if you don't change it on purpose). In the process of recording, you plug the audio source to the interface and run a program in the computer to capture the sound. Moreover, the sound that before went through your computer sound card output, now is sent to the interface output (headphones or studio speakers).

When recording, you always need a reference which most of the times is sent to the headphones of the player or singer. This reference can be a metronome or a track, for example. For easy, basic, quick recording, this is fair enough, however for going a bit more pro, it's a good idea to have the sound that you are actually recording, sent to the headphones as well.

Let's say, we're recording a microphone. The main tweak you might think to achieve this is by enabling the interface input to sound through your computer, in your computer OS, so you'll hear the mic through the headphones. In Windows, this is done in the mixer window, and it works like shit.

You'll get your sound, but the processing will introduce a delay in the captured signal (and not in the reference track), that will depend on how expensive your audio interface is, but will always screw your recording attempts.

Here comes super magic direct monitor.

Direct monitoring feature is usually implemented with a switch and a knob to adjust the amount.

It allows you to send the microphone signal, or whatever input signal you have, directly to the headphones jack (almost zero delay), and you will keep listening to the sounds in your computer at the same time. You don't have to master sound engineering to realize you must disable the mic to sound through your PC as we enabled before. (Because if not, you'll have the good signal and the laggy one together).

Now you can plug whatever you want to record to the correct input in your interface and have the reference track you want plus the actual sound you are recording without delay. Magic!