Posts Tagged ‘linux’

Installing node and npm on Ubutun 15+

Friday, December 18th, 2015

In case you would want to use one of my recent projects (e.g., ModernWebDevGenerator or ModernWebDevBuild) on Ubuntu (or any other OS btw), you’ll need nodejs and npm.

If you’re using ubuntu and go the usual way (i.e., sudo apt-get install…) then you’re in for a bad surprise; you’ll get node 0.1x.y and also a very old npm release.

Actually, the best way to get nodejs and npm on Ubuntu is to use the node version manager (nvm).

nvm can be used to install and keep multiple versions of node in parallel, which is very useful, especially when you have to test your node-based project on multiple versions.

The installation is very straightforward:

curl -o- | bash

After that, close and reopen your terminal. You now have ‘nvm’ at your disposal.

nvm install 4.0
nvm install 5.0
nvm use 5.0

Just with the above, you get two versions of node (along with npm) installed. As you can see, you can use ‘nvm use’ to change the active version easily.

That’s it!

Raspberry Pi project — Car Audio improvement #3

Tuesday, May 28th, 2013

Update 2013-05-31:
I’ve received the hardware, time to play around! ;-)
In the meantime, I’ve created a repository on GitHub for this project. I’ll upload all the setup instructions, code, etc in there:

AudioPi Hardware

AudioPi Hardware

Update 2013-05-28:
I’ve ordered the hardware I needed for the project:

Now I just hope that I’ll be able to plug them both in, given that both USB ports are pretty close and I guess that the sound card is a big large ;-)

After pulling my hair over the following schema for a few minutes:

Scary ;-)

I’ve read stuff about Linux’s audio landscape (graveyard?) for a few hours. It reminded me of things long forgotten and made me discover a lot I did not know about. Briefly said, I read about ALSA, PulseAudio, Jack, OSS, GStreamer (not enough yet), . This has been pretty instructive I must say ;-)

I now have a better view of what’s hot and what’s not and moreover, about the possibilities. My conclusions are that:

  • I want to output sound towards PulseAudio, which will then forward it towards ALSA & the sound hardware
  • I want to leverage PulseAudio’s RTP support so that I can use the system for multi-room audio

While doing my research, I’ve also read more about the Music Player Daemon project, and I think that it’s exactly what I need. Since it’s an headless music player with a client/server architecture, I can rely on it for the server side of things: actually playing the songs, maintaining the playlist, interacting with PulseAudio & ALSA, etc. I can also leverage the different plugins it provides, such as the output ones.

Another benefit of using MPD as backend is that it automatically broadens the usability of the solution since there are (LOTS) of MPD clients (e.g., CLI, desktop, web based, Android apps, etc), which is pretty awesome as it provides the means of controlling music playback from many different places.

On the other hand, I can implement the client API of MPD in my audio engine (A) in order to extend the possibilities, as explained in my previous post (e.g., A2DP support, LCD display, etc).

It’ll soon be time to create the project’s GitHub repo ^^
I’ll try to find some time to update the schema and the rest of the previous post.. ;-)

Related links: