Urban75 Home About Offline BrixtonBuzz Contact

Today I have mostly been using ${insert development technology here}

Python. Today was Pandas Dataframes and manipulations

Finding everything quite a learning curve. I have been doing the courses on datacamp. I have to go through the courses more than once. The first time, I'm like 'wtf?'. Second time, I start picking it up. Third time I might actually really understand it
 
Is datacamp any good? I'm bored stiff at work at the moment and need to do something to try and keep my brain active.
 
Why? C#'s one of the better languages.
I've never liked it. It has an awkward Microsoft smell. It's also of no use to me outside of Unity.

UnityScript was never actually JavaScript and to do more than the simplest stuff you ended up having to use .NET classes anyway but it saved a lot of time not having to relearn basic shit.
 
I've never liked it. It has an awkward Microsoft smell. It's also of no use to me outside of Unity.

UnityScript was never actually JavaScript and to do more than the simplest stuff you ended up having to use .NET classes anyway but it saved a lot of time not having to relearn basic shit.
I'm no great fan of MS-centric development but C# is respectable. It's like Java but with many of the problems fixed, i.e. significantly less boilerplate code required.

The next generation of high level languages like Swift and Kotlin appear to go further (I write Kotlin now), although I'm not actually current on C# so there may be a fair degree of parity.

Any of these languages are largely interchangeable in terms of understanding their concepts (e.g. lambdas, approach to getters/setters) once you get over the annoying inconsistencies (e.g. cases in naming conventions) so I dunno, I think it well worth persisting with.
 
I'm no great fan of MS-centric development but C# is respectable. It's like Java but with many of the problems fixed, i.e. significantly less boilerplate code required.

The next generation of high level languages like Swift and Kotlin appear to go further (I write Kotlin now), although I'm not actually current on C# so there may be a fair degree of parity.

Any of these languages are largely interchangeable in terms of understanding their concepts (e.g. lambdas, approach to getters/setters) once you get over the annoying inconsistencies (e.g. cases in naming conventions) so I dunno, I think it well worth persisting with.
I'm sure I could learn it without much bother, as you say it's just another feckin language, and it's probably manageable in practice (I write PHP most of the time ffs) but it's another barrier in the way of doing something fun that will probably just stop me. I have less and less interest in spending time in front of a computer for fun at all these days tbh, and if I manage to do anything it's likely to be with various level toys like Pico-8 (which uses a Lua subset, I quite like Lua), Twine or even Bitsy.

Swift is nice btw, I did a course at work taught by the people who wrote the first book on it. Haven't kept it up at all mind. Practical applications are slightly limited as yet I believe.
 
I don't know much detail about iOS but I think Swift has mainstream relevance now. Our team is writing a household name app entirely in it. I've written some myself when mob programming and it's nice, much like Kotlin, even better in parts.

Although as IDEs go, XCode is incredibly shite - like ten years ago shite.
 
Is datacamp any good? I'm bored stiff at work at the moment and need to do something to try and keep my brain active.
I recommend it. It's no shortcut, and there may be faster ways, but I've found that if I spend long enough in front of it I do manage to assimilate the material. Some of the courses are free.
I'd do Kaggle as there's a pretty active community around it.
I just started my first kaggle entries in last couple of weeks :). But it still feels like the deep end to me, I'm not a natural programmer
 
I'd started to get back into Unity a bit but apparently they're now deprecating UnityScript (JS-based syntax) in favour of C#. And fuck C#.

I feel bad now because I celebrated the confirmation of its demise, not thinking many would care.

I like C# inside Unity a lot. I dont get the Microsoft stench off it much, though that does start to happen quite quickly if I use C# outside of Unity.

Although I have an interest in targeting iOS devices sometimes, I'm not sure I've got it in me to learn another language at this stage and when I was reading Swift docs/book in the early days, although I much preferred it to objective C, my brain didnt leap at the chance to bend to swifts syntax. It seems I like trying new libraries and systems far more than new languages.

Aside from Unity, C# and compute shaders, the most actual fun I've had programming in recent years has been using node.js on a raspberry pi. Unfortunately the mission became obsolete before I had finished all of the fun stuff. I was using a pi with no screen to drive the display of an ableton push 2 controller, and it could also send and receive midi & OSC messages from/to unity and the hardware knobs of the push 2 controller. But now I've switched to a hardware setup that takes less desk space and the push controller is out of use for now, which is a shame as I had it working nicely with Unity, very simple to setup banks of parameters in unity and have the push 2 control them with useful info showing up on its display about the state of the parameters. And I really enjoyed gluing all the parts together on the software side using node-js, sometimes I get quite excited about how easy it was to get so many different things talking to each other with an array of protocols.

Anyway I had so much fun with that project that I will attempt something of a rewrite for slightly different hardware - just got a 7" touchscreen for my raspberry pi 3 and will investigate writing stuff in both node.js and/or browser js, or a hybrid of the two (eg electron). Yay for web midi input/output. Will also investigate getting one high quality knob working with the pi for parameter control. Might investigate making a midi MPE loop sequencer for use with the roli seaboard block. Might look at browser-based synth stuff. And away from all these music/controller themed ideas, some wacky home automation stuff is on the slightly longer term agenda.
 
Python. Today was Pandas Dataframes and manipulations

Finding everything quite a learning curve. I have been doing the courses on datacamp. I have to go through the courses more than once. The first time, I'm like 'wtf?'. Second time, I start picking it up. Third time I might actually really understand it
Pandas is pretty clever, and once you get your head around how powerful it is, how few lines of code you need to accomplish tasks, incredibly useful (it’s a real time saver and avoids all sorts of problems, pitfalls that one runs into [mis-]using shitty spreadsheets - I’ve reduced activities that used to take days or weeks of hair pulling to a few tens of seconds of thumb twiddling and tea sipping). The McKinney/O’Reilly book (2nd edition in the works) provides a wide foundation covering all the core ideas in Pandas that you need to know, and the standard docs cover the latest features. Then (as ever) you can find lots of interesting and imaginative examples of usage on stackexchange.
 
Pandas is pretty clever, and once you get your head around how powerful it is, how few lines of code you need to accomplish tasks, incredibly useful (it’s a real time saver and avoids all sorts of problems, pitfalls that one runs into [mis-]using shitty spreadsheets - I’ve reduced activities that used to take days or weeks of hair pulling to a few tens of seconds of thumb twiddling and tea sipping). The McKinney/O’Reilly book (2nd edition in the works) provides a wide foundation covering all the core ideas in Pandas that you need to know, and the standard docs cover the latest features. Then (as ever) you can find lots of interesting and imaginative examples of usage on stackexchange.

Nice :)

thanks for the encouragement! I was previously told that once you get the hang of this stuff, you don't do spreadsheets anymore. My mouth had dropped.

onwards to data saintliness
 
thanks for the encouragement! I was previously told that once you get the hang of this stuff, you don't do spreadsheets anymore. My mouth had dropped.
Well, except when the people feeding you the data are still using fugly spreadsheets which you then have to wrangle and clean the data from as the first step in your workflow (and then sometimes you’ll need to construct one to hand it back to your ‘customer’). :p

I just had one such spreadsheet, which was clearly a cut’n’paste job of submissions of information from a large number of people (who weren’t too inclined to follow the instructions for responses in order to keep the initial data consistent). Fortunately Python’s l33t string handling skills are most useful for tackling such problems and beating the data into a usable form such that one can start crunching.
 
Anyway I had so much fun with that project that I will attempt something of a rewrite for slightly different hardware - just got a 7" touchscreen for my raspberry pi 3 and will investigate writing stuff in both node.js and/or browser js, or a hybrid of the two (eg electron). Yay for web midi input/output. Will also investigate getting one high quality knob working with the pi for parameter control. Might investigate making a midi MPE loop sequencer for use with the roli seaboard block. Might look at browser-based synth stuff. And away from all these music/controller themed ideas, some wacky home automation stuff is on the slightly longer term agenda.

Cut some corners so I can get on with writing the app this weekend:

Got a behringer x-touch mini midi controller to connect to the pi via usb because I cant be arsed to mess around with my own custom hardware & case at this stage.

Put BENJA OS on my raspberry pi (Bootable Electron Node Js Application). Extremely easy to setup - burnt image to sd card, booted, edited one file to rotate image on touchscreen 180 degrees, changed default user password, installed one package and edited one file to get wifi working, all sorted.
 
Just wanted to whine about the terrible, unmitigated shitshow that is the Javascript package management ecosystem. Had to install gulp, and npm on a new install, and it's running through throwing errors that the dependencies *it installed* are out of date. :facepalm::facepalm::facepalm::facepalm:
 
I've always been lucky with npm myself, including doing wacky things like rebuilding modules to work on the raspberry pi. Not entirely sure what I was doing though, think I just have a knack for stumbling through that sort of thing without getting stuck.
 
I got a guitar effects unit for Christmas. It has a USB port, but the manufacturer's documentation insists it's only for uploading new firmware via their bit of dedicated software.

But it turns out that it does more than that, and someone's written a Windows program to tweak the patches'n'stuff. But it's closed-source (apparently he doesn't want people to break their devices :hmm:), and I'm mostly a Linux shop, and really CBA to be firing up VirtualBox every time I want to fiddle around with it.

So I broke out a copy of Wireshark, installed his software on Windows, and made lots of lovely packet captures of it doing various things. Now I'm reverse-engineering everything into a nice tidy Python class to be able to do the same stuff, but programmatically.

I used to do quite a lot of this kind of thing back in the day. It's got much more complicated now, though: when I was doing this stuff before, it was all serial ports, ASCII, and timing. Now, it's USB device descriptors, Unicode, language support, and so on. But the detective work of figuring out what the protocol is doing is still much the same, although it's a steep learning curve - the docs for the Python USB libraries are a little sketchy, so I've got a window open with the library source in, and doing lots of grepping for function calls, etc.

I'm having fun :) Almost as much fun as actually using the effects unit.
 
That sounds awesome. Whats the pedal?

Are you going to open source your scripts? Also you obviously know your shit but I reckon it might be quite possible to brick a device like that
 
That sounds awesome. Whats the pedal?

Are you going to open source your scripts? Also you obviously know your shit but I reckon it might be quite possible to brick a device like that
It's a Zoom G1xon.

And yes, I think that fiddling around with firmware updates (or even changing them :hmm:) would probably be a good way of bricking it, but I'm only planning to use the lib to interrogate patches, rename them, move them around and suchlike. If that's sufficient to brick the pedal, it's going back under warranty!

And I shall open source the results, yes. At least half the reason for even trying this was a little bit of resentment at someone doing the old-school keep-it-all-to-myself-and-claim-the-glory approach the original developer used - that sticks in my throat. I'll probably just slap it up on GitHub to start with, and see if there are any other Zoom pedal owners who do Python who can enhance it.
 
OK, this is is running away with itself. Suddenly, I'm trying to reverse-engineer MIDI SYSEX packets being sent over USB. Whole new vistas of confusion are upon me... :D
 
I am moderately used to SYSEX but am used to having documentation for it rather than having to work out the structure of messages for myself.
 
I am moderately used to SYSEX but am used to having documentation for it rather than having to work out the structure of messages for myself.
I've got lots of Wireshark packet grabs to work from. Which might make it easy, or might make it...interesting. There's a python library that decodes/encodes MIDI messages, but since SYSEX stuff is invariably proprietary, that's going to be slightly more bare metal.

ETA: Ooh, or perhaps not zoom-ms-utility/midimessage.md at master · g200kg/zoom-ms-utility · GitHub
 
I've got lots of Wireshark packet grabs to work from. Which might make it easy, or might make it...interesting. There's a python library that decodes/encodes MIDI messages, but since SYSEX stuff is invariably proprietary, that's going to be slightly more bare metal.

ETA: Ooh, or perhaps not zoom-ms-utility/midimessage.md at master · g200kg/zoom-ms-utility · GitHub

Yay it always helps when other peoples findings are available!

Usually when I've been sniffing midi I've used midi-specific utilities for that rather than stuff like wireshark, but I'm out of date and mostly on macOS so I dont have anything too useful to say about that.
 
Yay it always helps when other peoples findings are available!

Usually when I've been sniffing midi I've used midi-specific utilities for that rather than stuff like wireshark, but I'm out of date and mostly on macOS so I dont have anything too useful to say about that.
Yeah, but I can't actually sniff MIDI - everything MIDI-related I've found needed a live MIDI connection - what's happening here is that we're faking MIDI over a USB interface. I am happy to be corrected on this, though!
 
Well I cant offer anything Zoom-specific. But I can say that there is an official, standard form of midi over usb that has been widespread for years. A lot of midi hardware doesnt even need its own custom drivers as a result of this.

This doesnt help you one bit if the zoom is doing it differently or masking its midi ports/not using actual midi ports via usb using the standard I described.
 
Well, if the zoom device you have works like the zoom device that github page is about, then its using standard midi usb. Because even some browsers support midi and thus usb midi these days, so the readme for that github gives a method for running their code in a browser!

  • Connect PC/Mac to MS-50G/70CDR via USB
  • Launch this page. You should use latest Chrome
  • Press accept if 'MIDI device' dialog is displayed
  • Select MidiPort to 'ZOOM MS Series'
 
Plus if it does work like that you can save yourself hassle with python usb libs and use python midi libraries instead. I'm not a python user so probably nothing left for me to say now, good luck in your ventures and sorry if my angle turns out to be a red herring.
 
The phrase I forgot to use when discussing standard usb midi that doesnt need drivers is 'class compliant'.
 
Back
Top Bottom