Gas station without pumps

2020 April 4

New, unique ringtone

Filed under: Uncategorized — gasstationwithoutpumps @ 23:00
Tags: , , , , , , , ,

Ever since I got my first cellphone in December, I’ve been thinking that I ought to put a custom ringtone on it.  This was reinforced a few weeks ago, when a student’s phone rang with the same standard ringtone that I had chosen (the “Sparse” ringtone on the Android phone).

I did not want to buy a ringtone (I’m cheap), nor steal one (I’m honest), nor even use an open-source ringtone.  I wanted a truly custom one that no one else in the world could have.

Many years ago, I composed some renaissance dance music and in 2007 I had put the scores into Finale Notepad on my Mac.  So my thought was that I could just take the music that I had composed, convert it to an audio format and store it as my ringtone.  Simple and unique!

Problem 1: The version I have of Finale Notepad does not run even on my old laptop, and Finale no longer makes a free tool for Macs.  I did have an old (but not quite as old) version of Finale Reader that would run on my old Mac, but it is an extremely crippled piece of software—it can play music out to the speakers and show the score on the screen, but that’s about it. I did confirm that I still had the music files, though and that some of them might make ok ringtones.  That old laptop is pretty broken (wifi broken, SD card reader broken, hinge for screen broken), but it is the most recent Mac I have that would still run Finale freeware—everything else has been upgraded too much.

Success! There is still a Finale Notepad for Windows, and I do actually have a Windows machine in the house—a magenta HP laptop that I paid $75 for in order to test PteroDAQ on a Windows machine.  My wife dubbed it the Barbie laptop, because of the color and the toy-like feel.  I mainly use this laptop now for running pronterface to control my 3D printer, but when I was finished printing my second nose clip for a face mask, the laptop was free for other uses.  I downloaded Finale Notepad to it and copied the score files (via flash drive) from the Mac to the Barbie laptop.

Success!  Not only could I play the music score files on the Barbie laptop, but I could convert them to less proprietary formats: musicxml and MIDI. But these are still not audio files.

Problem 2: I tried playing one of the MIDI files on the Barbie laptop, but the result was terrible—Windows Media Player was not able to handle it. So I used the flash drive again to transfer the midi files to my new (early 2014) MacBook Air.  Nothing on that machine plays MIDI files! I tried downloading some programs from the web, but they were either just ads asking for me to buy $100 software or non-functional.  I removed all of them (I hope), and started looking for online converters.  Based on what I had read—that Android phones handled all the standard music formats—I decided to look for converters from MIDI to M4A format.

Success! Zamzar.com provides such a converter.  I tried a couple of files and the results were rather quiet, but seemed usable.

Problem 3: Zamzar.com only lets you convert two files a day, unless you pay them big bucks. I looked some more for other converters.  I found one that crashed,

Success! I found one that worked: https://freeconvert.com/midi-to-m4a.  I converted the files (twice, because I found I needed to fade the music in and out, which had not been necessary with Finale Notepad).

Problem 4: getting the files to my phone. The files were in my Dropbox, but I did not want Dropbox on my phone.

Success! I finally decided to use Google Drive for the transfer, as I already had Drive on the phone, and transferring the file from my computer to Drive and from Drive to my phone was straightforward.

Problem 5: the instructions I saw on the web suggested moving files into the RIngtones folder from the Downloads folder.  This is harder than it might seem, because you have to go to the Downloads folder that is inside the internal storage in the Files app, not the crippled Downloads folder at the top that doesn’t let you move files.

Success! I got the m4a file into the Ringtones folder, and tapping it started the music playing!

Problem 6: The new ringtone did not appear as an option in my phone settings for ringtones.  Not even after rebooting the phone (which some of the advice on the web said was needed with some Android versions).

Problem 7: I saw that it was possible to add ringtones directly from Drive, so I deleted the m4a file and tried adding the ringtone directly from Drive.  Now the problem was that the file was greyed out—there were no selectable files.  I’d been lied to about Android accepting all the music formats—sure it could play m4a files, but it couldn’t use them as ringtones.

Success! https://freeconvert.com/midi-to-mp3 converted the MIDI file into an mp3 file, which I could add as a ringtone from Google Drive using the Sound Settings on the phone.

So I now have a 35-second galliard of my own composition as my ringtone—it is definitely a unique ringtone, and may even have been worth the trouble it took to get it onto the phone. (And, no, I’m not going to play it for you on the blog.)

I have not put on a new ringtone for text messages, though, as a text ringtone needs to be very short, and the shortest piece I have is an 18-second single repetition of a bransle. I’ll have to think about what I can do for a 1-second or 2-second text ringtone.

2020 January 11

First week of class W2020

Filed under: Circuits course — gasstationwithoutpumps @ 21:16
Tags: , , , , , ,

I’ve just finished the first week of class for BME 51A (Applied Electronics for Bioengineers), and it has been a rather hectic week.

First, I had about 5 people sign up for the class at the last minute (from 56 to 61), which drove the BELS staff to having to do a lot of expensive last-minute purchasing of additional items for the parts kits.  It also meant that when we handed out the parts kits on Tuesday, several of them were incomplete and so more items had to be handed out during the Thursday lab period.  Since getting their kits, 2 students have dropped taking us down to 59, and one other has told me that they might drop (assuming that they can get a coherent plan together for an independent study to replace the course).  This enrollment is less than last year’s 82 students, but still a fairly large number, given that the BELS labs can only accommodate about 24 students.  I’m using two lab rooms for the first section and one for the second section, and have hired 3 group tutors (one for each lab room and time) to work along with me in the labs.

The first week’s labs consist of soldering headers onto the Teensy LC boards and installing software: Python with SciPy (using the Anaconda install), gnuplot, Arduino+Teensyduino, PteroDAQ.  For the first time in years, everyone got their soldering done within the allotted lab times!  I don’t know what was different this year that made it work as it was supposed to.  One thing that helped a little was that when students soldered the male headers on the wrong side of the boards (which happens every year, despite all the written, pictorial, and verbal warnings I can give), I had them cut apart the male headers to unsolder, then gave them new male headers to solder on.

Software installation is always a problem, because students are attempting to install on a variety of platforms, and something is always incompatible. Here are some problems that came up this year:

  • Gnuplot on old Mac OS X systems would not install with homebrew, as qt could not be installed—it insisted that you needed the full Xcode (not just the command-line subset), but Apple will not provide the full Xcode for such old, unsupported systems.  There may be already compiled versions of gnuplot for these old systems, but I have not gone looking for them. I’m not sure what to recommend to these students, other than updating to a system that Apple still supports.  I can’t recommend updating to Catalina, as they will lose all 32-bit apps, some of which will never be ported to newer versions of macos (for example, I lost access to Finale Notepad, which is no longer available on Macs—probably because Apple makes it so very difficult for third-party software developers to maintain their code).
  • Gnuplot on new Mac OS X systems installs and runs, but produces bad PDF files.  The workaround for this was posted at https://stackoverflow.com/questions/57698204/gnuplot-pdf-terminal-exhibits-font-issues-on-mac. The answer to that stackoverflow question had two lines to fix the problem:
    brew uninstall --ignore-dependencies pango
    brew install iltommi/brews/pango
    

    The problem is that the default homebrew “bottle” for gnuplot points to a broken version of pango, and you have to remove that version and install an older version.  This one I knew about, because it had bitten me when I was trying to finish the book in December.

  • The standard Arduino+Teensyduino installation fails on macos Catalina (10.15). I knew about this one also, as I had tested the PteroDAQ install after I had “upgraded” to Catalina (which broke nearly everything).  The workaround is a beta release of Teensyduino (currently https://forum.pjrc.com/threads/59030-Teensyduino-1-49-Beta-5), which is pointed to from the Teensyduino installation page, but many of the students with macos Catalina did not notice the pointer.  One nice feature of the Teensyduino beta release is that it includes the Arduino IDE, so that you don’t need to install Arduino first.
  • The PteroDAQ GUI seems to be crashing on macos Mojave (10.14)—logging the user out when they try to run “python daq” as usual.  I think that this may be a weird filesystem thing, as it seemed to make a difference whether PteroDAQ had been cloned from GitHub or downloaded as a zip file, and whether the files were on the hard drive or on a Google Drive.  The only thing that seemed to work consistently was to clone the files from GitHub onto the hard drive of the laptop, then run the app that is in pterodaq/extras/maclauncher/ .  Why the launcher app works, when invoking “python daq” directly from a terminal results in logging the user out, is a mystery to me.
  • On macos Catalina, PteroDAQ can’t find the board if it is connected to the laptop through a USB2 hub connected to a USB3 port (I ran into this problem on my laptop before classes started also).  Apple has once again scrambled their USB stack, and USB Serial no longer seems to be visible through a USB2 hub (though the USB device is visible, the serial interface does not seem to be).  This hasn’t caused a problem for any students yet, as direct connection to a USB3 port works ok, and connection from hubs on USBC ports seems to be ok (probably because they are USB3 and not USB2).
  • One student had trouble getting PteroDAQ to run on his Windows 8 machine, with the python program crashing on trying to access the list of ports.  No one else with Windows 8 was having trouble, and his machine was running extremely slowly (slower even than the ancient “Barbie” laptop that I used for testing Windows implementations of PteroDAQ), so I suspect he was having hardware or malware problems on his machine.

I think that nearly all the students got their software installed—at any rate, people left the lab early on Thursday and were not queuing up for installation help, as they had in previous years.  Only one student asked for installation help during Friday office hours (the one with the probably bad hardware or malware), and there were no requests on Piazza for help.  If I’m right that everyone got things installed, then we are well ahead of previous years.

On Thursday, before lab, one of the group tutors ran a tutorial session on \LaTeX, which about half the class attended.  That should help somewhat in the prelabs to be turned in on Monday.

I’ve changed grading logistics this year.  Rather than hiring just 2 graders, I hired 6, and rather than having them work whenever they have time, I have scheduled grading sessions where we get together and grade in the same room.  On Thursday, we took just over 2 hours (with 5 graders, counting me) to grade homework 1, and today 6 of us got homework 2 graded in about an hour.  I graded the first quiz by myself Wednesday night.  So far, we have managed to keep the turn-around time to about a day, which is much better than last year, when the 2 graders were overloaded.

Monday’s assignments will be stressing our grading system a bit, as we have a lot coming in, but I couldn’t schedule a grading session until Wednesday at noon.  I’m hoping that we can get both homework 3 and the first prelab graded before Thursday’s lab.  If necessary, we can just give a turned-in/not-turned-in grade for the first prelab, as they are turning in a more complete draft of the same prelab on Friday, but I’d much rather give them feedback so that they can correct mistakes before the Friday draft.

So far, the quiz and homework scores look pretty good, so I’m hopeful that this will be a high-performing class this year.  It would be really nice to give out more B+ (and even A-) grades and fewer C grades.  I’m keeping my fingers crossed (even though that makes typing the blog post hard).

%d bloggers like this: