| << May >> | ||||||
| S | M | T | W | T | F | S |
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
LED Ring Working Prototype
2/3/2013
Here is my LED ring from the previous post working in real hardware:
Here is my LED ring from the previous post working in real hardware:
RGB LED ring PCB
24/1/2013
I've been working towards my own RGB LED ring PCB:
I've been working towards my own RGB LED ring PCB:
Intel HD4000 has no DVI output
14/1/2013
Symptoms: Windows 7 boots up, shows the splash and then the monitor goes to sleep.
Problem: The DVI display is not detected, however there is output available on the HDMI port.
Solution: Unplug and re-plug the DVI port.
(omg indeed)
Symptoms: Windows 7 boots up, shows the splash and then the monitor goes to sleep.
Problem: The DVI display is not detected, however there is output available on the HDMI port.
Solution: Unplug and re-plug the DVI port.
(omg indeed)
Python's .py Windows Association
11/10/2012
Posting for future reference:
Windows is not passing command line arguments to Python programs executed from the shell.
This solved my problem with passing arguments to python scripts without invoking the python binary first.
Posting for future reference:
Windows is not passing command line arguments to Python programs executed from the shell.
This solved my problem with passing arguments to python scripts without invoking the python binary first.
Tags: python | (0) Comments | Add Comment
Converting audio samples to dB and back
26/4/2012
I've been writing a tool to normalize lots of audio files at once, as well as convert between various loss-less formats (particularly FLAC and WAV). In doing that I needed a way of converting between the raw audio sample maximum and dB. So I present to you my C functions for doing so:
I've been writing a tool to normalize lots of audio files at once, as well as convert between various loss-less formats (particularly FLAC and WAV). In doing that I needed a way of converting between the raw audio sample maximum and dB. So I present to you my C functions for doing so:
double LinearToDb(int32 linear, int bitDepth)
{
uint32 MaxLinear = (1 << (bitDepth - 1)) - 1;
uint32 ab = linear >= 0 ? linear : -linear;
return log10((double)ab / MaxLinear) * 20.0;
}
int32 DbToLinear(double dB, int bitDepth)
{
uint32 MaxLinear = (1 << (bitDepth - 1)) - 1;
double d = pow(10, dB / 20);
return d * MaxLinear;
}
Another code snippit for Google to index.Tags: audio | (0) Comments | Add Comment
XCode: error from debugger: the program being debugged is not being run.
14/4/2012
If you are getting this in your XCode run log:
If you are getting this in your XCode run log:
Running... No executable file specified. Use the "file" or "exec-file" command. No executable file specified. Use the "file" or "exec-file" command. The program being debugged is not being run. The program being debugged is not being run.After copying a project and renaming everything... then you missed the "executable name" on the target. Click your Target, and "Get Info", then click the Properties tab, and rename the Executable to the same name as the Product Name in the Build settings.
DeleteFile failure on long paths.
8/3/2012
Symptom: DeleteFile fails with ERROR_PATH_NOT_FOUND (3) when passed a path with a length greater than 260 characters.
This manifested for me when I copied a Windows XP home folder to a backup drive. The "Temporary Internet File" folder contains a lot of files with very long names. When you put those in a sub-folder with a long name, the total path length of those files tips over the 260 character limit. At that point Windows Explorer just fails to do anything useful on those files. In my case I just want to delete them. So I was poking around with i.File in an attempt to work out why these files can't be deleted. Turns out DeleteFile simply fails with super long paths.
The way around this is to share the drive with the long paths on it. Then map a drive to a deep sub-folder to reduce the file's path length to under 260 characters. THEN delete it using traditional methods.
Symptom: DeleteFile fails with ERROR_PATH_NOT_FOUND (3) when passed a path with a length greater than 260 characters.
This manifested for me when I copied a Windows XP home folder to a backup drive. The "Temporary Internet File" folder contains a lot of files with very long names. When you put those in a sub-folder with a long name, the total path length of those files tips over the 260 character limit. At that point Windows Explorer just fails to do anything useful on those files. In my case I just want to delete them. So I was poking around with i.File in an attempt to work out why these files can't be deleted. Turns out DeleteFile simply fails with super long paths.
The way around this is to share the drive with the long paths on it. Then map a drive to a deep sub-folder to reduce the file's path length to under 260 characters. THEN delete it using traditional methods.
Tags: win32api | (0) Comments | Add Comment
Mac OS X Software Update fails to update installed application.
20/2/2012
I've just managed to "fix" an issue that I was seeing on 10.6 where Software Update would not update Logic Express. According to Software Update, Logic wasn't even installed, however the app was there in /Applications and would run fine.
It seems that getting Software Update to re-scan that app is as simple as renaming the app. I changed the name of Logic Express from "Logic Express 9.0.1" to just "Logic Express", ran Software Update again and the latest release for Logic magically appeared. Hmmm.
So the next time Software Update is ignoring your installed apps you know what to do!
I've just managed to "fix" an issue that I was seeing on 10.6 where Software Update would not update Logic Express. According to Software Update, Logic wasn't even installed, however the app was there in /Applications and would run fine.
It seems that getting Software Update to re-scan that app is as simple as renaming the app. I changed the name of Logic Express from "Logic Express 9.0.1" to just "Logic Express", ran Software Update again and the latest release for Logic magically appeared. Hmmm.
So the next time Software Update is ignoring your installed apps you know what to do!
Tags: macosx | (0) Comments | Add Comment
iconv v1.9.1 win32/win64
12/11/2011
I've posted a source and binaries zip of iconv for win32 and win64 on the Libraries page.
I've posted a source and binaries zip of iconv for win32 and win64 on the Libraries page.
Tags: iconv | (0) Comments | Add Comment
Axefx Foot Controller
21/6/2011
After some months of work I've finally got my Axefx foot controller kit up for sale. I've updated the index page to have both software and hardware sections... because apparently I do hardware too now :)
After some months of work I've finally got my Axefx foot controller kit up for sale. I've updated the index page to have both software and hardware sections... because apparently I do hardware too now :)
Tags: axefx | (0) Comments | Add Comment
Wrapping Up Controller Testing
20/6/2011
So in the last few days I've finished the controller test board, ironed out a few bugs in the firmware code, hooked up the midi ports and tested that they are sending and receiving the right data. The board looks like it's doing all the things it's meant too. Which means I can now start moving ahead on making the kit available. What's left to do is write up the documentation of how to build a kit from the parts and PCB and work out the business details, like shipping weights/costs and a purchase page.
Today I also printed out the new graphics that are laid out for the Hammond box and checked them for accuracy.
It's sitting next to the prototype box, which is a different aspect ratio. The plan is to get someone to print it out onto adhesive backed vinyl and then stick it straight onto the aluminium, cut the holes out with a hobby knife and then poke all the pots, switches and LED's through. There are some more knobs coming from the UK for both my own controller and the kits.
So in the last few days I've finished the controller test board, ironed out a few bugs in the firmware code, hooked up the midi ports and tested that they are sending and receiving the right data. The board looks like it's doing all the things it's meant too. Which means I can now start moving ahead on making the kit available. What's left to do is write up the documentation of how to build a kit from the parts and PCB and work out the business details, like shipping weights/costs and a purchase page.
Today I also printed out the new graphics that are laid out for the Hammond box and checked them for accuracy.
It's sitting next to the prototype box, which is a different aspect ratio. The plan is to get someone to print it out onto adhesive backed vinyl and then stick it straight onto the aluminium, cut the holes out with a hobby knife and then poke all the pots, switches and LED's through. There are some more knobs coming from the UK for both my own controller and the kits.
Tags: axefx | (0) Comments | Add Comment
Controller Update
16/6/2011
Last night I got some time to work on the MIDI controller testing. The problem I was left with is that the parameter knobs were not working, so I started with printing out the current value for param0 on the LCD and it was always 1023 (the maximum value) no matter what voltage was supplied on the input pin. So I teared down all the setup code and checked that I was doing everything right in the software... which after an hour or so of re-reading all the docs... yes; I'm doing everything right. Ok that leaves hardware. So I measured the voltage on the input pin again... yup that's right too. *sigh* Then I notice there is a "VREF" pot on the AVR stamp... wonder what that does? Tweak tweak... oooh look the value on the LCD is finally changing! Seems that VREF pot on the stamp is controlling something to do with the way the AVR reads values on it's analog in pins, so I'll have to write that into the documentation to set correctly when assembling the kit. So hurrah the parameters are all working pretty much correctly and I can test the new menu code on the hardware. I'm getting close to being done with the testing. All that remains is hooking up the MIDI sockets and checking the right messages get sent and received.
Last night I got some time to work on the MIDI controller testing. The problem I was left with is that the parameter knobs were not working, so I started with printing out the current value for param0 on the LCD and it was always 1023 (the maximum value) no matter what voltage was supplied on the input pin. So I teared down all the setup code and checked that I was doing everything right in the software... which after an hour or so of re-reading all the docs... yes; I'm doing everything right. Ok that leaves hardware. So I measured the voltage on the input pin again... yup that's right too. *sigh* Then I notice there is a "VREF" pot on the AVR stamp... wonder what that does? Tweak tweak... oooh look the value on the LCD is finally changing! Seems that VREF pot on the stamp is controlling something to do with the way the AVR reads values on it's analog in pins, so I'll have to write that into the documentation to set correctly when assembling the kit. So hurrah the parameters are all working pretty much correctly and I can test the new menu code on the hardware. I'm getting close to being done with the testing. All that remains is hooking up the MIDI sockets and checking the right messages get sent and received.
Tags: axefx | (0) Comments | Add Comment
