Friday, August 26, 2016

Ardour4, JACK, ALSA... Rosegarden, qsynth etc...

When you install Ardour on a fresh Debian install you will probably find that the sound isn't working.

Here's what I did to get it going.

sudo aptitude install ardour

I also installed these.

sudo aptitude install Qtractor
sudo aptitude install audacity

I installed these 2 to convert mp3s to ogg so I could import them.
Qtractor lets you import mp3 but ardour doesn't

sudo aptitude install ffmpeg
sudo aptitude install dir2ogg


To control/configure jack....

sudo aptitude install jack-tools qjackctl

This lets JACK and Pulse talk to each other, otherwise they lock each other out.

sudo aptitude install pulseaudio-module-jack

I'm not sure if I needed this, but this was one step:

sudo aptitude install linux-image-4.6.0-1-rt-amd64

This was the key: https://ubuntuforums.org/archive/index.php/t-986080.html


I would bet you need to look at the Ardour mixer and route the Main Output channel to your soundcard outs.

In Ardour press Alt+M (to view the mixer) then at the bottom of the Main Output strip there should be a button labeled Output - click that, then add your soundcard outs to the appropriate channels in the dialog box that pops up.

There shouldn't be any issue with the format of your wav file as ardour will resample things for you (at a better quality rate than ProTools actually).

This issue could also stem from you not having JACK configured correctly. In Ardour's open dialog, if you haven't already started the JACK audio server, there will be a tab that says audio setup - this is Ardour's own JACK startup script. It should work fine by default, but you should probably read up on JACK and qJackCtl.

To get Rosegarden going I used this page: http://gauthampai.livejournal.com/62383.html
The key to that was installing the soundfont, and qsynth.

Once you've got it configured and working, you also need to start qsynth before Rosegarden and have it running the whole time Rosegarden is. If you restart qsynth you'll probably need to restart Rosegarden for it to reconnect.


Tuesday, February 02, 2016

Installing 7-Zip plugin in MobaXterm

I like MobaXterm http://mobaxterm.mobatek.net/

I like 7-Zip http://p7zip.sourceforge.net/
(In my previous version of this How-To I used 7-Zip for Windows from http://www.7-zip.org/ ) to open the downloaded archive, but now you can do it all from within mobaxterm.

To get 7-Zip working in MobaXterm I downloaded the 7-Zip package from a cygwin mirror... (find your closest one at https://cygwin.com/mirrors.html )

You can find the current version with this:
wget -qO- http://mirrors.kernel.org/sourceware/cygwin/x86/release/p7zip/ | sed -e 's/<[^>]*>//g'
Then download the version you want. e.g.:
wget -N http://mirrors.kernel.org/sourceware/cygwin/x86/release/p7zip/p7zip-15.14-2.tar.xz
You should now have this file in your current directory:
-rwxrwx---    1 Administ UsersGrp   1039440 Apr  5 05:12 p7zip-15.14-2.tar.xz
You can unpack the tar.xz with gnu tar:
tar xvf p7zip-15.14-2.tar.xz
You can then create the package using the p7zip from the unpacked tar file:
usr/lib/p7zip/7za.exe a p7zip.mxt3 -tZIP usr
Finally move the file you have created to C:\Program Files (x86)\Mobatek\MobaXterm Personal Edition
You will probably need to do that step from outside MobaXterm otherwise you won't have permission to write to the directory.

Then restart MobaXterm.

job done.

If you don't know where to find your home directory from Windows you can open it in Windows Explorer by doing:

$ open $PWD

from the command line in your home directory.


NB:
If you have trouble with the step creating the mxt3 file you can do it via Windows too:
Originally I opened the directory it created ( p7zip-15.09-1 ) in Windows Explorer and right clicked on the usr directory and chose 7-Zip -> Add to "usr.zip" (NB: Choose usr.zip, not usr.7z here)
This created a .zip file containing the usr directory.

I then renamed usr.zip to p7zip.mxt3

Wednesday, August 13, 2014

/etc/acct/holidays

In /var/adm/messages on Solaris:

Aug 13 02:30:16 hostname adm: [ID 702911 daemon.notice]
Aug 13 02:30:16 hostname last message repeated 4 times
Aug 13 02:30:16 hostname adm: [ID 702911 daemon.notice] **********  SYSTEM ACCOUNTING STARTED Wed Aug 13 02:30:16 BST 2014  **********
Aug 13 02:30:16 hostname adm: [ID 702911 daemon.notice]
Aug 13 02:30:16 hostname last message repeated 4 times
Aug 13 02:30:16 hostname adm: [ID 702911 daemon.error]
Aug 13 02:30:16 hostname last message repeated 1 time
Aug 13 02:30:16 hostname adm: [ID 702911 daemon.error] ************ ACCT ERRORS : see  /var/adm/acct/nite/log********
Aug 13 02:30:16 hostname adm: [ID 702911 daemon.error]
Aug 13 02:30:16 hostname last message repeated 1 time

In /var/adm/acct/nite/log

***UPDATE /etc/acct/holidays WITH NEW HOLIDAYS***

Update /etc/acct/holidays to have 2037 for the year.

$ cat /etc/acct/holidays
* @(#)holidays  January 1, 2010
*
* Prime/Nonprime Table for UNIX Accounting System
*
* Curr  Prime   Non-Prime
* Year  Start   Start
*
  2037  0800    1800
*
* only the first column (month/day) is significiant.
*
* month/day     Company
*               Holiday
*
1/1             New Years Day
12/25           Christmas

https://hg.openindiana.org/upstream/illumos/illumos-gate/raw-file/afe390b9f1e0/usr/src/cmd/acct/lib/pnpsplit.c

/*
 * inithol - read from an ascii file and initialize the "thisyear"
 * variable, the times that prime and non-prime start, and the
 * holidays array.
 */
int
inithol()
{
...
 /* validate year */
 if(thisyear < 1970 || thisyear > 2037) {
  fprintf(stderr, "pnpsplit: invalid year: %d\n",
   thisyear);
  errflag++;
  break;
 }
...
}

Thursday, July 17, 2014

To replace text in vim with line number

e.g.:
mv file_abc.jpg pic.XX.jpg
mv random.jpg   pic.XX.jpg
mv other.jpg    pic.XX.jpg
mv name.jpg     pic.XX.jpg
If you do this:
:%s/XX/\=line(".")/

Tuesday, July 01, 2014

Make SSH ignore SSH key

Make SSH ignore your SSH key, not prompt for a passphrase, only use password:

$ ssh -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no destination.host

Wednesday, May 28, 2014

find things...

Find files that are not world readable and make them readable:

sudo find . -type f \! -perm -4 -exec chmod o+r {} +

Find files that are not group readable

find . -type f \! -perm -40 -ls

Find files that are group writable

find . -type f -perm -20 -ls

Find files that are world writable

find . -type f -perm -2 -ls

Wednesday, May 14, 2014

To find if a Solaris host is running on an LDom

If the file /usr/sbin/virtinfo exists, run:

$ /usr/sbin/virtinfo -a

If you run it as root it will also tell you the hostname of the Control domain and the Chassis serial#.

Thursday, November 14, 2013

list to csv...

ls | paste -s -d'%' - | sed 's/\(^\|$\)/"/g;s/%/","/g'

Friday, October 11, 2013

web client in pure bash

( printf "GET /path/to/file HTTP/1.0\n\n" 1>&0 ; cat ) 0<> /dev/tcp/<HOSTNAME>/80
Thanks David!

Tuesday, August 13, 2013

Get Windows hostname from IP address via Samba

You can tell it's likely to be a Windows box by what ports it has open...

"The target host OS can often be guessed simply by looking at the ports which are open. Microsoft Windows machines often have TCP ports 135 and 139 open. Windows 2000 and newer also listen on port 445." ( from: http://nmap.org/book/osdetect-other-methods.html )

Once you've identified it's a Windows host, how can you tell which one?

Try this:

$ nmblookup -A 12.34.56.78
Looking up status of 12.34.56.78
        HOSTNAME        <00> -         M <ACTIVE>
        DOMAINNAME      <00> - <GROUP> M <ACTIVE>
        HOSTNAME        <1f> -         M <ACTIVE>
        HOSTNAME        <20> -         M <ACTIVE>
        DOMAINNAME      <1e> - <GROUP> M <ACTIVE>

        MAC Address = 00-11-22-33-44-55