Friday, August 20, 2010

Korg NanoKontrol and Reaper

Got a Korg NanoKontrol courtesy A2, and using it with Reaper was a breeze. Connected it to USB, XP recognized it. Started Reaper, went to Options -> Preferences -> Audio -> Midi Devices and chose the "USB Audio Device" giving it an alias and making it control only. Then, in Actions -> Show Action list choosing actions like Set volume for track 28 etc and choosing the Add button, the appropriate MIDI channel etc automatically filled in if the fader is moved. Since the NanoKontrol has 9 faders, 9 knobs and 18 buttons, it can control volume and PFL for 18 tracks from the same "scene". Since it does not have motorized faders, changing scenes is not such a good idea. I had only 14 tracks to control, the US-1641's 14 analog inputs, so this was more than enough. The earphones are Ultimate Ears Metrofi 220.





Sunday, August 15, 2010

ftp users who cannot delete files

S asked for an ftp account where users cannot delete files once they upload, with only a super-ftp user being able to delete. This was something like our old chrooted ftp, I think. Anyway, with dreamhost, this forum post suggested one way, while the Dreamhost wiki showed all the pitfalls. So, decided against it.

download filenames with spaces

Based on a visitor email to webmaster, checked out a download problem. Found that there are many Radio Sai Bhajan Classrooms which have download-file-name with spaces on the database.

Did an update to the database. Basically just
Update `files_table` SET `downloadfileName` = REPLACE(downloadfilename, ' ' , '_' ) where `downloadfilename` like '%Clasr%'

But because our database has some strange requirements on the server, it actually had to be written as

Update `files_table` SET `downloadfileName` = REPLACE(downloadfilename, CONVERT(_utf8 ' ' USING latin1) , CONVERT(_utf8 '_' USING latin1) ) where `downloadfilename` like CONVERT(_utf8 '%Clasr%' USING latin1) COLLATE latin1_swedish_ci

It updated 40 odd entries. I also then replaced Clasroom with Classroom in download file names, and later renamed in these dl.radiosai.org using lots of
mv Source.mp3 Destination.mp3
statements in a text file.

Doing this for all entries, using
where `downloadfilename` like CONVERT(_utf8 '%' USING latin1) COLLATE latin1_swedish_ci
it said updated 4 more entries.

Then updated our local database also, and again replaced all download_File_names with spaces with underscores for all entries, and Clasroom with Classroom.

firewall configuration at studio

Setting up a backup stream for AsiaStar at the Studio, implemented by PB using ices and icecast. Configuring the firewall to point to the right server at the right port took a while, because we did not remember that two rules are required - one for "allow" to the port, and one to SAT to the appropriate server. Not only are two rules required, the order is also important. The Allow has to come below the SAT rule.

"Right-click for more options" is shown in the firewall's web control panel. This works with IE when the site is added to Trusted Sites. Doesn't seem to work with firefox on linux. One of the "more options" is 'move up' for moving the rule up in the list.

Indic on the Sony Reader

Quick update on the Sony Reader PRS-300. Tried out Sanskrit pdfs. Some of them have the verses as embedded images, which are displayed, of course. Even PDFs with embedded fonts, like this one or this one are rendering quite well on the reader if not reflowed. If reflow is attempted, the font becomes completely messed up.

Wednesday, August 04, 2010

update on file deleting and newer versions of files

Uploading newer versions of files causes problems, with the older version refusing to be over-written on colinux. This happens probably due to some ownership issues, with files being copied in multiple ways using colinux / Windows / cygwin. Maybe the IIS website running with that folder as web-root is also an issue. Anyway, this time, P first tried uploading directly - sftp complained
cannot write to filename.mp3.
Then he tried deleting the files using Windows Explorer. Worked in D:, not in E:. E: complained that the file is in use by some other program or user. Tried stopping IIS and deleting, did not work. Tried deleting in colinux as root, it complained
rm: cannot unlink `filename.mp3': Permission denied
Then he tried again from Windows Explorer, and this time it worked. Two possible reasons:
(a) Colinux might have relinquished hold on the file so that Windows could delete it
(b) stopping IIS needed some time and or a window refresh before the file could be deleted.

Update: Apparently, deleting in Linux and then (after it says permission denied) deleting on Windows seems to be a working option. IIS seems to be "not guilty".

change formatting to print to a smaller paper size

A follow-up to my earlier post about printing with dot-matrix printers. I needed to print multiple pages to a different paper size. On Windows,
type filename.bin > lpt1
works best, since it can be added to batch jobs.
copy filename.bin > lpt1
works only for a single invocation at a time. Adding it multiple times to a batch job does the "copy" only once, so only one page is printed.

Till now we used condensed mode extensively. Now, found 15 cpi mode is almost as dense, but much prettier. For setting the paper size, the commands I used were, in Hex,
1B32 - sets 1/6 inch line spacing
1B43420D0D - sets the page length to 66 lines. Since it is 1/6 inch line spacing, that makes it 11 inches. The 0Ds are just padding, I think, but I added them just to be safe. Viewed a page printed to file using the printer driver in a hex editor to be sure of the way to add the 66 lines part. The command for font cpi comes last
1B67 - sets 15 cpi