https://www.youtube.com/watch?v=lJ1kY-CSpBk
https://docs.google.com/presentation/d/14JkgPtgwjqX1zpPA87G6DlqBcF_aqKf6q2yE8kZ-c50/edit?usp=sharing
- Digital Audio
- Sampling
| import mosquitto as mqtt | |
| from piglow import PiGlow | |
| piglow = PiGlow() | |
| # The callback for when the client receives a CONNACK response from the server. | |
| def on_connect(client, userdata, rc): | |
| print("Connected with result code "+str(rc)) | |
| # Subscribing in on_connect() means that if we lose the connection and |
| Name: node-four | |
| Cartridge-Short-Name: NODE4 | |
| Display-Name: node v4 | |
| Description: "Node.js v4 cartridge" | |
| Version: '1.0.0' | |
| Source-Url: https://github.com/notthetup/openshift-node4.git | |
| License: "Apache v2" | |
| License-Url: https://github.com/connyay/openshift-node4/blob/master/LICENSE | |
| Cartridge-Version: 0.1 | |
| Compatible-Versions: ['0.1'] |
| _renderWaveform: function(buffer){ | |
| var samples = buffer.getChannelData(0); | |
| var container = this.$$('paper-item-body'); | |
| var canvas = this.$$('#waveform'); | |
| var width = container.offsetWidth; | |
| var height = Math.min(container.offsetHeight, 76); | |
| var ratio = this._getBackingScale(canvas); | |
| canvas.width = Math.floor(width * ratio); |
| [{ | |
| "name": "AES Journal Podcast", | |
| "feedURL": "http://www.aes.org/rss/podcasts.cfm/1", | |
| "podcastURL": "http://www.aes.org/podcasts/" | |
| }, | |
| { | |
| "name": "Android Developers Backstage", | |
| "feedURL": "http://feeds.feedburner.com/blogspot/AndroidDevelopersBackstage", | |
| "podcastURL": "http://androidbackstage.blogspot.com/" |
| var toLoad = 0; | |
| function loadManager(callback){ | |
| toLoad++; | |
| var onload = function(){ | |
| toLoad--; | |
| if (typeof callback === 'function'){ | |
| callback(); | |
| } | |
| if (toLoad === 0){ |
| var scopeNode = context.createScriptProcessor(); | |
| scopeNode.onaudioprocess= function (ev){ | |
| var ch1Data = ev.inputBuffer.getChannelData(0); | |
| var max = -2; | |
| for(i=0; i<1024; i++){ | |
| if (ch1Data[i] > max){ | |
| max = ch1Data[i]; | |
| } | |
| } | |
| console.log(max); |
| alias conjure="systemctl enable" | |
| alias summon="systemctl start" | |
| alias slay="systemctl stop" | |
| alias banish="systemctl disable" |