Tuesday, February 19, 2008

Adventures with the Tascam US-1641

SS gave us a Tascam US-1641 for use in the Mandir. Interfacing it with the Yamaha AW4416 using the midi interface for controlling the bundled Cubase LE4 was quite an adventure.

Getting the digital SPDIF input and other analogue inputs was no problem, though currently the analogue inputs from the Spirit Live 42 direct outs are too hot - they are going up to + 10 dB on the Spirit's sliders! Will need some sort of attenuator.

Midi: the AW4416 is supposed to have a MIDI Remote facility in firmware Ver2. There is a separate tab inside the MIDI screen for MIDI Remote functionality. Got the relevant manual from Yamaha, but somehow the way I did the MIDI Bulk dump was wrong. So, had to change the Hex values of the MIDI messages sent by the AW4416 manually. The readme says that bidirectional control is not implemented - so changing the controls on the computer are not going to move the motorized faders or anything like that.

Changes made: Loaded the AW4416 xml file from Yamaha in the Device Setup Dialog, found one of the faders was working, then made similar changes to midi messages sent by the other faders and switches to get them to work:
faders:
b0 00 fad end
b0 01 fad end
...
etc,
all midi channel 1

switches:
b0 20 sw end
b0 21 sw end
....
etc
works!

20 in hex = 32 = address in cubase. And so on. b0 seems to be some sort of preface. sw must be switch.

The "learn" button inside cubase was displaying the address, channel, etc for faders, did not show up initially for switches. Maybe because the initial setting for the switches was just to send
end
without address or prefix or anything like that.

Sunday, February 17, 2008

more domains - Media foundation

sssmf.com .net and .org registered with rediff, instead of making more virtual domains, for now hosted the dns with freedns.afraid.org and set up url forwarding. Will think of a more permanent solution, probably more virtual domains on fs1 or somewhere, once the SaiUniti servers confusion is sorted out.

Thursday, February 07, 2008

online text formatter, GutenMark and other stuff

Browsing the Mobileread forums again, found a tutorial and a wiki on BookDesigner, a link to a nice online text formatter and a link to GutenMark, which is supposed to make Gutenberg etexts prettier with formatting.

Also found a link to pielrf, for quick conversions! Kovid Goyal's libprs500 has also made tremendous strides - the screenshots look great.

Monday, January 28, 2008

domains from godaddy

V has sent us a dozen domains like sai-inspires.org which he has purchased from godaddy. Logged on to godaddy, used the invite he gave, under domains -> AccountExec domains, hitting the + icon shows up our folder with the 12 domains. Did domain forwarding for all of them to http://media.radiosai.org/journals . Added the subdomain www for all of them too, forwarding to the same url. Also, for the forwarding to work, had to change the nameservers to "Default parked nameservers".

Sunday, January 27, 2008

lots of action, very few posts!

Once again a long backlog of stuff I should have posted long back:

  1. Recording morning and evening bhajans, so lots of time goes in recording and editing. Editing too, since otherwise hard disk would run out, and also PB want more bhajans asap for BhajanStream!

  2. heart2heart.in domain - purchased through rediff, a virtual server is made on fs1 for hosting this, and it's forwarded to http://media.radiosai.org/journals

  3. PB completed php-based scheduler internal web-app, beta-testing on.

  4. BV completed audio search page, open to public. This is really useful for me, when people ask for specific requests!

  5. Contemplating a sort of corporate blog or official blog - SP wanted to host a video on need for documentation, I read Eric Sink's book based on his blog, "The Business of Software", etc. Using blogger it should be straightforward, I hope...

  6. Stupid mistake of trying to make a minor change in number of pixels in TFD page, but without updating my local copy! Outage for 15 hours or so while I tried to replicate PB's changes... Funny part is that commenting out
    if recordset.RecordCount > 0
    makes the page work!

  7. Following up on sssbpt.org migration to saiuniti servers - I'm not so good at HR! Too blunt!

  8. Installed Filezilla server, firewall yet to be opened.

  9. KR(M) is following up on the generator radiator issue, the generator batteries and the cooling tower fan-blades - as instructed by KVR.

  10. Doing saicast encodes on a borrowed HDD from PB, since my machine is FULL!

  11. Did some routine log analysis on fs1, transferring old log files to local for archiving.

Thursday, January 10, 2008

Virtualdubmod to directly convert mpeg2 to avi

In my earlier post, I'd described using autogk to convert mpeg2 to avi, then virtualdub to add the logo / watermark. Then an aha moment - autogk uses virtualdubmod, so why not use virtualdubmod directly do the watermarking etc? Used this method for Xmas 2007 videos.

Wednesday, January 09, 2008

BSNL name servers hate google

www.google.com has been unavailable from my location (AP) using BSNL's notorious name servers. So, using the post at Jason's blog, changed to the OpenDNS servers mentioned there, 208.67.222.222 and 208.67.220.220 - accessed it through gmail on krishna, vnc over ssh....

So now I can access blogger, youtube and gmail again!

Bonus - learnt about OpenDNS's adult filtering capabilities too.

Friday, January 04, 2008

schedule page and mysql too many connections

Found this morning that mysql daemon had died on our hosting provider for radiosai.org , nettigritty. Contacted them, they said too many connections from radiosai user. They said

> 1. Do not use persisternt connections (pconnect)
> 2. Ensure you are correctly closing connections after use.

We're not using pconnect. For non-persistent connects, they are supposed to
automatically disconnect after the script executes, but still we have added
<?php
mysql_close($dbcon);
?>
to the end of our scripts, just to be safe.

But two possible reasons could be

1. Too much traffic on our site

2. The times when our page fails to load properly giving the error
Maximum execution time of 30 seconds exceeded
( log file is at http://www.radiosai.org/program/inerror.log )
every time it fails, maybe the connection remains open.

Reason (1) - http://www.radiosai.org/plesk%2Dstat/webstat/ shows us that the
index.php gets 1000+ hits per day. That should be OK for mysql to handle, I suppose.

About Reason (2) - Another possibility I thought of was: the index.php also
has links to images and flash files, which also have to load before the 30
second timeout. If this can be delinked from the php part of the code - maybe
using div elements or something? - perhaps the timeout issue can be mitigated
to a large extent? For the time being, I've removed the links to the images and flash files and we'll see if this improves matters.

a typical day

Once again I've to find more time in the allocated 24 hours - where is all the time going? Let's see. From Dec 16, this has been my schedule:

Before 8.15 am - finish morning routines including washing, cycling and exercise if any, and breakfast too.
8.15 to 10.15 - Morning bhajan recording at Mandir.
10.15 to 12.45 - Fight fires if any, or process the recorded audio
12.45 Lunch
1.45 to 2.30 - Make playlist or continue processing audio or if any videos ready for saicast, process them...
2.30 to 6.30 - Tea, then goto Mandir for programme or Bhajan recording
6.30 to 7.30 - Complete playlist making
7.30 Dinner
8.30 to 10.30 - @ S3, R&R, which quite often means updating the "voluntary" webpages!

The 2.30 to 6.30 slot is one where some optimization can be done. Maybe I can think of going to Mandir a little later, saving half an hour or so. Need to find time to do things like data backup, clearing up space on hard disks and so on.

Thursday, December 27, 2007

Sunday, December 09, 2007

SHA1 sum check

Just like the MD5 checksum, SHA1 checksum can be done with
sha1sum filename
Used with Fedora iso downloads, for example.

Tuesday, December 04, 2007

combating spam from feedback forms

One more technique to supplement the one I've described earlier - check for the string http:// and don't email the form if present! In asp, that translates to
if Instr(strString,"http://") then
Response.Write " -- "
else
Mail.Send
end if

Sunday, November 25, 2007

firefox doesn't play nice with tunnels

Created a tunnel over ssh from my remote machine to use the studio server's internal webserver, similar to tunneling TightVNC. Got a firefox error when trying to access the tunnel using http://localhost:6000 -
This address is restricted: This address uses a network port which is normally used for purposes other than Web browsing. Firefox has canceled the request for your protection.
Found the solution at http://www.purple.dropbear.id.au/node/139 by googling.
  • Go to about:config in your Firefox browser.
  • Right click somewhere, and choose "New => String"
  • In the setting Name box type "network.security.ports.banned.override"
  • In the Setting Value box, type "1-65535" or whatever port-range you want to allow.
  • Click OK

Tuesday, November 20, 2007

phplist removal from blacklist, that is, re-subscribe

http://docs.phplist.com/UserInfo gives the info on how to remove a user from phplist's blacklist - usually when someone unsubscribes and now wants to re-subscribe - Go to that user's history and click on the link there.

Sunday, November 18, 2007

more SQL and web programming Gyaan

Don't create tables or records with names like From - SQL keywords - though postgres allows it, the names will cause error grief in SQL queries.

When trying to write to a text file, the most likely cause of errors is permissions, if the file exists. Check permissions of the parent directory and its parent and so on....

Examples for doing file writing in asp from
http://www.eggheadcafe.com/articles/20030627b.asp
http://www.brainjar.com/asp/fileops/default2.asp
got by googling
scripting.filesystemobject

Tuesday, November 13, 2007

Many different topics

Hopefully the search feature on blogger will help me find this post when I need it, because I'm going to post about many different items.

1. New schedule page in public beta - have added a link from the old schedule page on radiosai.org.

2. Asked for a firewall rule change on fs3 to allow only our machines to get shell access.

3. Weird error on a csv import, was due to a newline in a Description.

4. Google customized search being used for H2H, old links to krishna being removed using TexRep find/replace in files tool.

5. Subscription pages which send emails to us instead of directly accessing phplist - to avoid exposure. Also writing to file...

6. Removed asp page dl.asp for saicast downloads, using static addition of the content-disposition header "attachment" instead: In IIS manager, right-clicking on Saicast video downloads, as given in http://support.microsoft.com/kb/260519
"To apply the header statically, right-click the document in the Internet Service Manager, and then select *Properties*. Select the *HTTP Headers* tab and enter the content-disposition header there."
In our case, added it to the entire site.

7. Adobe had nice video workshops for their products.
http://www.adobe.com/designcenter/video_workshop/
But around 500 kbps is needed to see them properly.

8. Have subscribed to Secunia Weekly summary of vulnerabilities.

9. Lots of updates on the "voluntary" side of web work, keeping me busy outside "office hours".

Friday, November 09, 2007

sql snippets

Gave a link to the new php program schedule page from the schedule page 2 days back, so it is in some sort of public beta. Found some bugs, one of which was due to languageid being NULL in our local db. Solution was to make languageid 1 the default value for that field, so that future record inserts will automatically have it set (tested) and also ran
update file_information set languageid=1 where languageid is NULL
Struggled a bit to get the syntax right, with languageid ='', languageid = NULL , NOT (languageid>0 and languageid<9) and so on, till I googled the correct syntax for NULL.

One more snippet of SQL Gyaan is that to insert, update etc for fields with type interval / timestamp , the syntax is
UPDATE "file_information" SET "duration" = interval '00:01:09' where file_id = 2020
and so on. One has to do a sort of typecasting using the keyword interval. One can even say interval '1 hour' and so on. From http://www.linuxjournal.com/article/9618

Friday, November 02, 2007

dir listing taking too long

One of our machines was taking a looong time for ls -l listing. Turned out a mounted smb share had i/o errors - reported by df -h. Umounted it, then all is well....

session_start() caveats in php coding

The new schedule page admin interface had a bug of having to login twice - and momentarily some error messages would appear.
session_start(): Cannot send session cookie - headers already sent 
Reason was the session_start() function being called in the body of the page. It should appear before any output is sent to the browser, as mentioned below:

http://in.php.net/session_start

http://www.koderguru.com/tutorials/phptutorials/headertuto1.php

silent speakers!

DJ did a great job checking mandir speakers on NR's instructions - found 8 not working! Loose contacts and an amp being disconnected.... Fixed now, I believe.