Recording in Cubase 7.5 using the Tascam US-366

February 7th, 2015

I upgraded my audio recording setup to Win8.1 and Cubase 7.5 (64bit) and installed the Tascam US-366, a USB-soundcard.

At first, I had a hard time finding the correct settings for recording but after a bit of fiddling I am able to record a drum track (drum computer) and a guitar track at the same time.

If you’re still lost, read on. Please be warned that this post is very basic. I’ll explain how to record mono tracks and I still have some questions regarding my own setup. But I hope I’ll be able to put you on the right tracks *chuckle*

1) Install the US-Tascam 366 as explained in the the guide. Make it your default sound device in Windows. Set it to Multi Track (switch on the back)

2) Open a Cubase project, set the VST connections – Input as follows:

vst_input

That is, if you’re recording a mono track. Also, I’m not sure if these are the default settings for the TASCAM. These settings work for my setup, maybe you will have to change them.

3) Set the VST connections – Outputs as follows:

vst_output

* Note: You can test the output settings quite easily: Import an audio track into Cubase (menu File -> Import -> Import audio file…) and play around with the Outputs until you can hear the music playing. Make sure that the correct Audio Device is selected and that you can also play audio files in Windows e.g. using VLC

4) In a project, add an audio track. And here comes the tricky part: In the track inspector, the correct input and output must be set as well:

track_presetI used this track for the guitar. The second track for the drum machine has the input “Mono In 2”

Basically, that’s it! Hope this helps you some, be creative!

Bonus tip: If you want to record both tracks at the same time, open the mixer (F3) and select the tracks you want to record – provided you set them to separate inputs as explained above:

MixerOf course, naming the tracks helps the overview quite a lot…

 

Update:

I wrote I’m using Win 8.1 for recording. Please don’t get me wrong. Win 8.1 and its farked up mix of GUI paradigms is the worst version of Windows I’ve ever come across. Usually I prefer to work on Ubuntu but Cubase does not come with a Linux version. And Mac OS X is getting worse and worse. I know there are alternatives on Linux, thank you. But I’ve visited an expensive course for Cubase, so that’s that.
Anyway, the only good thing about Win 8.1 is its quick boot compared to Windows 7. And once you install Classic Shell you basically get a usable Windows version.

Connect to Printer fails with 0x00000057

October 20th, 2014

Maybe this helps someone…

Occasionally in our environment someone tries to install a shared printer from the printer server and fails. The error message is something like “Operation failed with error ox00000057” as seen in the image below:

01

Chances are that the printer in question is differently configured compared to other printers of the same type. Check the protocol settings in the port configuration on the printer server first!

Then, as the user who got this error message, remove all installed printers of the same manufacturer.

Next, stop the spool service (on the command line is fine, issue “net stop spool”)

Remove the printer drivers, on an x64 OS usually located under C:\Windows\System32\spool\drivers\x64\3

E.g. Xerox printers usually have a folder “Xerox” there, delete it. Also delete any files starting with x2… as they are Xerox files too. When in doubt, check the file details… for details! HP printers files, of course, have different names and there might not be folder called “HP”
Some files might be reported to be in use in Explorer. Simply restart, then try deleting these files again.

Next, start regedit and navigate to “HKLM\System\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version 3”. If there are keys/subkeys and other entries of the manufacturer whose drivers you have to get rid off, delete them.

Then, start an elevated cmd (“elevated” being the keyword here) and enter the following followed by enter:
pnputil -e > c:\drivers.txt
This will put a file called drivers.txt in C: listing all installed .inf files. The files is easier to search than the console output. Look for the manufacturer as listed by “Driver package provider”. Each entry lists the the name of the .inf file was used to install the drivers.
Deleting the drivers from the repository is simple: pnputil -f -d <name_of_the_inf_file>.inf which will remove the inf file from the repository and the associated drivers.

Reboot and delete any remaining drivers from the spool\drivers folder.

Then reinstall the printer.

威廉·泰尔(Willhelm Tell)

October 12th, 2014

威廉·泰尔(Willhelm Tell)
今天我给你介绍一位瑞士的历史上名人。他叫 威廉·泰尔。他的像被印铸在瑞士五法郎钱币上。
根据传说,泰尔生活在大概七白年前。在施維茨州(Schwyz)地方,他可能做了农人和猎人。那个时候还没有那个叫瑞士的国家。那地方本来是哈布斯堡君主国(Habsburg Monarchy)的一部分。当时是现在奥地利(Austria),匈牙利(Hungary)和捷克斯洛伐克(Czechoslovakia)。
在瑞士的历史课本里,泰尔被称英雄因为他反抗哈布斯堡君主国的压迫。那时候的压迫主要是高税金和不公平的判决。
有一日,泰尔通过施維茨城市的市场。国王的官吏把他的帽子放在市场的中心。大家通过时要问候那个帽子,不过泰尔拒绝问候帽子,说他不会接受外国的大王。官吏马上下令逮捕泰尔。国王的官吏答应让泰尔自由如果他能用弩弓和箭射他儿子头上的苹果。泰尔成功中苹果,但是仍被逮捕,然后他还是逃跑了。躲的时候,泰尔知道官吏通过的地方。泰尔决心暗杀官吏,然后他帮助建立瑞士。
在丹麦有相似的传说,比瑞士的更久远。丹麦的传说里,泰尔不用弩弓,而是用弓。但是,故事大部分大概相同。所以,丹麦的传说成为瑞士的起源。
几百年后德国诗人Schiller改写泰尔的传说,成为现在最有名的故事版本

Ubuntu -> Wine -> Steam -> Portal 2 sound issues

May 2nd, 2013

Umpf… looks like I missed April although I promised myself to add at least one post per month. But recently nothing really interesting happened so what can I do? :s

One thing that’s been on my mind for a while though is a sound issue I had in Portal 2: All dialogue files were usually played at twice the normal speed. I turned on captions so I didn’t miss out on the story but it’s not quite the same isn’t it.
The symptoms were mostly the same:
-During the startup video (the valve guy) sounds was really jittery
-Diagogue files were played faster than normal
-Constant white noise in the background

Occasionally, the following fixes worked:
-In the options, change the sound quality from its current to something else (high, medium, low)
-Switch the sound environment from headphones to 2 speakers (almost identical settings) or the other way around. The other sound settings didn’t work for me at all.

During increasing desperate tries I tried deleting all local Portal 2 sound files hoping that Steam would replace them. That didn’t help so I downloaded the whole package again (in Library, right-click Portal 2, go to Properties, switch to the tab “Local Content” and select download again. Uh… don’t quote me on this, I’m writing this from memory so some names and places might be wrong.

What fixed my problem in the end was an upgrade from Ubuntu 12.04 (Precise Pengolin) to Ubuntu 13.04 (Raring Ringtail) which updated (refreshed?) the Wine settings. Wine is the same version in 12.04 and 13.04 but when starting Steam the first time Wine was writing out some updated settings.

In the end, it could be that my Wine configuration was just marbled. I’ve been trying to get Simcity running (any version) but without success and maybe that messed up Wine. My suggestions, if you suffer from the the same issue, are therefore:
-Reconfigure Wine
-Check for newer version of Steam
-Download the local content again
-Play around with the Audio settings in Portal 2 (sound quality and speaker configuration)

HTH & cheers
M.

What’s going on with Ubuntu Certified Professional?

March 25th, 2013

Last week, I took the official Apple “Mac OS X 10.8 Essential Support Course” followed up by the official test. I passed so I’m a Apple Certified Technical Coordinator (ACTC) on top of all the other acronyms I hold.

Although I don’t work on Mac OS X every day, I have a good working knowledge of the general handling and the underlying OS. The course, which ran at quite a fast pace, summed up all the important points very nicely. The test featured the occasional tricky question and a score of 73% or higher was required to pass. And I passed.

We used the official Mac OS X 10.8 course book which contains precise information on Mountain Lion (although to be fair, the author probably only had to replace ‘Lion’ with ‘Mountain Lion’ to release a ‘new’ version or so). I actually understand now what happens after the kernel is loaded and what processes produce the login screen and what happens when a user logs in and so on.

On the other hand, the last official book on Ubuntu Certified Professional (UCP) was released in 2008 and was already out of date half a year later because of the energetic activism the good people at Canonical display all year round. No wonder that with all the changes that happened to Linux and all the changes that Ubuntu brought on itself, I still don’t feel secure about the internal workings on Ubuntu. Sure, there’s source code but I don’t think anyone actually reads that to get a general understanding of an OS. The man pages? Please! You mean those cryptic writings where the overview section is never really helpful because you need to have a PhD for reading man pages in order to understand them? Ah yes, the lack of useful examples is another gripe I have with man pages.

After passing LPIC 1, I was all fired up to become an UCP as well. But the lack of concise information put me off and the ever growing gap between the OS and the documentation put me off even more. Until today, no update to the Ubuntu Certified Professional book (available on amazon.com) has been released. I guess, even the author got fed up and felt he could use his time in better ways.  I sincerely doubt anything useful will be released in the future on that particular topic. And with Canonical pushing Ubuntu into a its own niche a bit more with every release, Ubuntu will have a hard time to become a viable candidate to compete against Windows in the enterprises – if that was ever their goal. Accordingly, the value of being a UCP shrinks and shrinks. Actually I’ve never really met anyone who was certified.

Maybe I should focus on LPIC 2 again, too…

wget, busybox, ipv6…

February 28th, 2013

In our work environment, we use pxe and preseed to roll out Ubuntu 12.04 installations. In the late command, we even splat puppet standalone and a subversion repository on it. Works nicely.

Last week however, this tested routine stopped working in a very early stage – when wget in busybox tries to figure out which release of Ubuntu to pull from the mirror server.

The actual code line was: wget -q ftp://somehost.domain.local/file -O – | grep -E ‘^(Suite|Codename):’
This line didn’t return anything, so the installation got stuck. On my pc, the same line returned something useful.

In the end, the problem was that ipv4 and ipv6 were configured automatically and wget in busybox prefers ipv6 over ipv4 but if wget fails, it does not try again with ipv4. And since it comes with busybox, you can’t force a protocol family (see ‘man wget’ for further infos).

The solution was to supply another kernel parament in the pxe configuration: ipv6.disable=1

There are some users who report that this line does not work for them. Maybe they got the spelling slightly wrong or they put it at the wrong place but with this additional parameter, our setup is working again.

The sad thing about this is that this problem was already bug-reported in 2007 but the status was put to ‘wontfix’ and closed. Way to go 🙁

And I only wasted about 6 hours of working hours for that crap.

 

Pictures to movie: A simple example of avconv

February 17th, 2013

In 2011, I travelled from 豊岡 (Toyooka) to 京都 (Kyoto) by train. Every couple of seconds I took a picture with my camera. Since then, I wanted to merge all these pictures into a movie, if possible with some music.

I tried the better known video editors such as OpenShot Video Editor, Pitivi Video Editor, Blender and such but never really got far. Either pictures couldn’t be mass imported or they couldn’t be distributed evenly etc. etc.

Finally, a friend mentioned ffmpeg last week so I tried it again. Unfortunately, ffmpeg seems to be deprecated but they recommend to use avconv instead which comes with “libav-tools”

Format converting is an art of its own, but if you just want the basics, all you need is the following command:

avconv -f image2 -r 3 -i ./%04d.JPG -i soundfile.wav -c copy -crf 20 output.avi

Run this from the folder where your *.JPG pictures are and you will get a movie “output.avi” including a soundtrack from soundfile.wav. “-r 3” means 3 frames per second, so play around with this value if you a ‘faster’ or ‘slower’ movie.
Something else to keep in mind: The pictures must be named in numerical order: 0001.JPG, 0002.JPG etc.
If you don’t have your pictures named like that, try this command (all on 1 line in the terminal):
i=0; for f in *.JPG; do ln -s $f $(printf “%04d.JPG” $i); i=$((i+1)); done
This will create symlinks for all .JPG in your folder in the order that `ln -s` would output them.

This is the result: The final video

As usual, a couple of simple examples in the man page would have been helpful.

Installing Galaxy on CentOS 6.3 with an mysql db and running it as a non-root user

February 8th, 2013

There’s a biomedical reaseach software called Galaxy. I didn’t know that either 😉
The installation is easy but it uses a sqlite ‘db’ and must be started by whoever wants to use it. In a production environment, this is not convenient and does not scale nicely. To be fair, the makers provide infos on how to run it in a production environment.

Here is one such installation in details. maybe this helps you.
-OS: CentOS 6.3
-DB: mysql
-Galaxy is run by a non-root user
-Galaxy starts at system boot

Lines starting with # must be run as root, some lines are comments so you can’t just paste line by line in your shell. Make sure you understand what you do (the line breaks make it a bit hard to read though, sorry)

After the installation, open firefox. To use galaxy, visit localhost:8080

**************************

===========================================================
= Installation of Galaxy with a local mysql DB on CentOS6 =
===========================================================

mysql
=====

# yum install mysql-server
# yum install mysql
# yum install mysql-devel

# service mysqld start

# /usr/bin/mysql_secure_installation

Set root password? [Y/n] Y
root pwd: <pwd>

Remove anonymous users? [Y/n] Y

Disallow root login remotely? [Y/n] Y

Remove test database and access to it? [Y/n] Y

Reload privilege tables now? [Y/n] Y

(http://wiki.galaxyproject.org/Admin/Get%20Galaxy)

(sets mysqld to start on reboot)
# chkconfig mysqld on

add another db user
——————-

/usr/bin/mysql -u root -p (enter pwd)

mysql> INSERT INTO mysql.user (User,Host,Password) VALUES(‘galaxy’,’localhost’,PASSWORD(‘<pwd>’));
mysql> FLUSH PRIVILEGES;

create a galaxy db
——————

mysql> CREATE DATABASE galadb;

grant user ‘galaxy’ all permissions on db ‘galadb’
————————————————–

mysql> GRANT ALL PRIVILEGES ON galadb.* to galaxy@localhost;
mysql> FLUSH PRIVILEGES;
mysql> quit

mercurial
=========

# yum install mercurial

galaxy installation
===================

# cd /usr/local
# mkdir galaxy
# cd galaxy/
# hg clone https://bitbucket.org/galaxy/galaxy-dist/

# sh galaxy-dist/run.sh

–> starts a local galaxy instance, can be opened in a browser with localhost:8080
^C –> quits

change settings for production server
=====================================

(http://wiki.galaxyproject.org/Admin/Config/Performance/ProductionServer)

disable developer settings
————————–

cd /usr/local/galaxy/galaxy-dist/
# cp universe_wsgi.ini universe_wsgi.ini.orig
# vim /usr/local/galaxy/galaxy-dist/universe_wsgi.ini
(line 370) debug = True –> debug = False
(line 383) use_interactive = True –>  use_interactive = False

use a local mysql db
——————–

set db connection in universe_wsgi.ini
(line 93) database_connection = mysql://galaxy:<pwd>@localhost/galadb?unix_socket=/var/lib/mysql/mysql.sock

securing the galaxy installation by running it as non-root
==========================================================

(create a local user “galaxy”)
# useradd -c “local user for galaxy installation” -d /home/galaxy -m -U galaxy
# passwd galaxy <pwd>

**********************
* running galaxy with the local user galaxy will throw an error
*
ssh galaxy@host
[galaxy@host ~]$ sh /usr/local/galaxy/galaxy-dist/run.sh
–>
OSError: [Errno 13] Permission denied: ‘./database/tmp/tmpeeJTbo’
*
* so we need to fix this by chowning the installation folder to galaxy
**********************

# cd /usr/local/galaxy/
# chown -R galaxy:galaxy galaxy-dist/

**********************
* now it should run
ssh galaxy@host
[galaxy@host ~]$ sh /usr/local/galaxy/galaxy-dist/run.sh
Starting server in PID <PID>.
serving on http://127.0.0.1:8080
* yes, it does
**********************

crontab fuer user galaxy:
SHELL=/bin/sh
@reboot $SHELL /usr/local/galaxy/galaxy-dist/run.sh >>/tmp/galaxy.log
**********************
* –> galaxy will run after the next reboot
* as the log file is in /tmp, it delete disappear after a reboot
* put it into /var/log and chown it to make it more persistent
**********************
* after reboot, you can check if galaxy was really run at system boot: * [user@host ~]$ ps -ef | grep gala
* galaxy    2864  2862  0 15:44 ?        00:00:00 /bin/sh -c $SHELL /usr/local/galaxy/galaxy-dist/run.sh >>/tmp/galaxy.log
* galaxy    2865  2864  0 15:44 ?        00:00:00 /bin/sh /usr/local/galaxy/galaxy-dist/run.sh
* galaxy    3148  2865  2 15:44 ?        00:00:07 python ./scripts/paster.py serve universe_wsgi.ini
* galaxy    3180  2862  0 15:44 ?        00:00:00 /usr/sbin/sendmail -FCronDaemon -i -odi -oem -oi -t -f root

=================================================

**************************

Using Powershell to keep your Windows server/ws from cluttering

February 8th, 2013

This blog entry and the script will give you an example of how to use Powershell to:

-specify a ‘model’ file
-specify a directory search and fill an array with filenames you filtered out
-work on each entry of the array and to something with it e.g. delete the file
-writing every into a log file

I use the script to delete huge dp dumps and delete them if they are the same size as the original db. Yes, the logic is flawed but for the moment, it does its job. The script is run by task scheduler on a daily basis.

Basically, the script does what it says above. All the required variable can be, no, must be set within the script. The script does not accept any parameters. For you convenience, you can also download it from here:
dbbakcleanup.ps1

here goes:
*************************************************************

# automated bkp cleanup:
# scans a directory, deletes files of the same size as a provided model size
# and writes a summary in a specified log file
#
# ideas for improvements:
# 1) –dry parameter to prevent any action
# 2) write log to event viewer
# 3) ?
#
###########################
#
# variables
#
###########################
#
# General error code, used to quit (exit) the script if not 0
$GenErrCode = 0

# array keeping all log entries which will be dumped into $logfile
$log_lines = @()
# `n <– inserts a newline in the logfile
$log_lines += “`n”
$log_lines += “**********************************”
$log_lines += “`nINFO: Date: ”
$log_lines += Get-Date
$log_lines += “`nInitializing…”

# where to look for files
$mydir = “%windir%:\path\to\my\dir”
if( Test-Path $mydir ) {
$log_lines += “`nINFO: Dir $mydir found, continuing”
} else {
$log_lines += “`nERR: Dir $mydir not found, stopping…”
$GenErrCode = 1
}

# reference file for size
$modelFile = Get-Item ‘%windir%:\path\to\my\file’
if( Test-Path $modelFile ) {
$log_lines += “`nINFO: File $modelFile found, continuing”
} else {
$log_lines += “`nERR: File $modelFile not found, stopping…”
$GenErrCode = 1
}

# filter the files by part of their file name when filling $my_array
# as an example, i specify the file extension. it could also be part of the file name.
# the filter gets applied in 52. if the filter is not a file extension, try setting the * before $pattern
$pattern = “.mdf”

# using $pattern to filter files for filling the array…
$my_array = @(Get-ChildItem -path $mydir\$pattern* | Sort-Object Name -Descending)
if ( $my_array.length -gt 0 ) {
$log_lines += “`nINFO: Array my_array not empty, continuing…”
} else {
# array empty, should not happen so just in case…
# in the line below, the name of the array is hardcoded (my_array), improved could use a variable instead
$log_lines += “`nERR: Array my_arry empty, stopping…”
$GenErrCode = 1
}

# array containing names of deleted files
#$del_files = New-Object System.Collection.ArrayList
$del_files = @()

# specify the name and location of the log file
# could be in a different directory than $mydir
$logfile = “$mydir\my_log.txt”
if( Test-Path $logfile ) {
$log_lines += “`nINFO: Logfile $logfile found…”
} else {
$log_lines += “`nINFO: Logfile $logfile not found, creating new logfile…”
}

# exiting script if an error occurred during initialization…
if ($GenErrCode -eq 1) {
$log_lines += “`nERR: GenErrCode not 0, writing logs and exiting…”
# redirect @log_lines to $logfile
Add-Content $logfile $log_lines
exit
}

#########################
#
# end of initialization
#
#########################
#
# functions
#
#########################

function fileProcess($filejob)
{
# during testing, use the whatif line, a dry-run function within powershell
#Remove-Item $filejob -whatif
Remove-Item $filejob -whatif
}

#########################
#
# end of functions
#
#########################
#
# script
#
#########################

$log_lines += “`nINFO: Starting mainloop…”

$filecount = 0
ForEach ($objElement in $my_array)
{
# compare file size, if equal, call fileProcess to delete file
if ( $objElement.Length -eq $modelFile.Length ) {
fileProcess $objElement
$del_files += $objElement.Name
}
$filecount += 1
}

$log_lines += “`nINFO: Counted ” + $filecount + ” instance(s) to process…”

# all the lines starting with Write-Host were used for troubleshooting
# feel free to uncomment them to get some additional information during runtime
#Write-Host “filecount is” $filecount
#Write-Host “del_files is” $del_files

if ( $del_files.length -lt 1) {
$log_lines += “`nINFO: No files deleted!”
} else {
if ( $del_files.length -eq 1 ) {
$log_lines += “`nINFO: Deleted this file: $del_files”
} else {
$log_lines += “`nINFO: Deleted these file: $del_files”
}
}

#Write-Host $del_files
#Write-Host $log_lines

#
$log_lines += “`nScript finished, writing logs…”
Add-Content $logfile $log_lines

#########################
#
# end of script
#
#########################

*************************************************************

I’m sure there are suboptimal things in the script. Please take it as it is, improve on it, use it as you like.
I wanted the function to do more than just deleting the file – I also wanted it to write to the log file but I couldn’t get that to work.