Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


Donald J Trump: "Don't take vacations. What's the point?"

Posted by DeathMonkey on Friday August 04 2017, @07:08PM (#2543)
4 Comments
News

A variety of quotes from the Hypocrite-In-Chief:

        "Don't take vacations. What's the point? If you're not enjoying your work, you're in the wrong job." -- Think Like A Billionaire

        Pres. Obama is about to embark on a 17 day vacation in his ‘native’ Hawaii, putting Secret Service away from families on Christmas. Aloha!

        When will Obama next go on vacation if he wins the election? The day after.

        President Obama has a major meeting on the N.Y.C. Ebola outbreak, with people flying in from all over the country, but decided to play golf!

        Can you believe that,with all of the problems and difficulties facing the U.S., President Obama spent the day playing golf.Worse than Carter

        The Obama's Spain vacation cost taxpayers over $476K http://bit.ly/JtGxxy They love to spend money.

        We pay for Obama's travel so he can fundraise millions so Democrats can run on lies. Then we pay for his golf.

Well it's official! Trump's Taken More Vacation Days To Date Than Obama During Presidency

Budget Quadcopter (Or Octocopter?), Part 2

Posted by cafebabe on Thursday August 03 2017, @07:37PM (#2541)
0 Comments
Code

Motor control using audio amplifiers tenuously overlaps with speaker arrays. It uses some of the same amplifier chips and some of the same code to process WAV files. In particular:-

begin 644 audio-for-motor.c.gz
M'XL(`*-T@UD"`[57;4_;2!#^SJ]84D%MXR1KQZ1<P4B4HRU26ZI`#U5<%)ED
MDUC:[%KV&D(/_OO-OMBQ0Q*H3H>0UYZ9W7EF=M[2=M`/$=-8/*`KCCX11M)(
M$'22CV*.KJ,[\I&GLPS!$WWE`IZGG(F44^2TM]H.LDYM'WOOT-642$[&4Q'G
MLY;D2K;DX7<=#V4B2H79HX@'N+,@;KV)V9#F(X*.,I'&;-*:'M=H`.89B<:W
M2[2'K"T>$I(])X,F4:>.ATS0.BEG,1PK:4`<LQ$9HV\?/OS<>@-O,2/J`QUL
MO2%L%(^W2O+)U^]?SJ]^_'F&_*Z/<4F_!,:@=W)UAH(#7*%_.+D\&WR[`'JG
M0OU\_NFSIOH!D*6?HB1)^3R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I!89VF]+3[RLS7N5MLYKM:WJLJKX+E=O[8I5C3[/H@EYCW8R=-,4:)2G
M:JX%AP\R,N1LE/5KS7ZI[:NF[^OV(JOR"&;UB`V)5>T2?JU/4>Q0O$=]AU;V
MS:*8J3U1.AGJZ<V1[W>+!I+HP4;.."P*;OQ]7/8"\*U\-=U'_JJ`!ZZ0=,N#
M4EAV#QCN/!<:%^V8^4@J#L-RUC.>:DP)3;91_':&TIPQ^`V$QBF?P;B/3F;Q
M)$(Q^&@;/%0=@KSR;D!C2];>T(SK"0X]%=33&()#JFPF^#CT*P,U(![.$LF[
MNTEPWVTT1<.N`*L<&@D>%X)[7K\8MA&A&:E(RW!04KA?F\=A4^@72$%S@K=#
M":ETP;.=98/#,M/PT1_P6*29XGB2XTF.M^`8GB]YON3Y59[A=B2W([F=.E>!
ML^3V,+!W=Z4DO-B/CT##QYKDF15D:$>^E8$H4]=5&774M>WZN1`?YIYUOMB[
M3!:?G;A9_+=@J&BXE6@Q'BS^(/)"GL`O"+GQ8G#:.SNY>KP87/<NOGWYZ5X.
MSGL_+GN/L%Z;M?>I]UU]F[5W<?59?<.Z=#98#<<?X67,F\9UJ-C0;24B,ZJC
MMSO96S6OFXMT*Z8N*2QG^.ZRF4_+P&2.*9MW(='LYQ@WHAQQ&"PD3E"7B?\$
MU-L(M$AB,R+*[%5:6DK/^O.+$;A`HMK-(@;<73G9UK<,*<_4SZL:?0&G>'LJ
1$_"I*)_F)_F_*DC%@/,1````
`
end

(Usual instructions for uudecode process.)

To obtain pre-computed 60 second audio samples, type:-

shell> gunzip audio-for-motor.c.gz
shell> cc audio-for-motor.c -o audio-for-motor
shell> audio-for-motor -t 60

This will generate 113 audio files - a useful subset of 9^4 (6561) possible permutations. The format for the audio files is four digits where:-

  • 8 means full forward.
  • 7 means fast forward.
  • 6 means moderate forward.
  • 5 means slow forward.
  • 4 means neutral.
  • 3 means slow reverse.
  • 2 means moderate reverse.
  • 1 means fast reverse.
  • 0 means full reverse.

and:-

  • First digit is low frequency on left channel.
  • Second digit is low frequency on right channel.
  • Third digit is high frequency on left channel.
  • Fourth digit is high frequency on right channel.

So, 8-8-4-4.wav means full speed forward. 8-0-4-4.wav means left forward, right backward. (Turn clockwise on spot?) 8-8-3-3.wav means full speed with slight negative trim.

This works with a PAM8403 amplifier board and a compact cassette tape pinch motor powered at 3.3 Volts. It is quite fun to click on the icon of an audio file and then see a motor change speed and/or direction. However, the speeds are not monotonic and I suspect the effect may be influenced by vibration in the motor induced by the low frequency signal. Also, the efficiency is worse than expected - even after several modifications to the wave generation algorithm. As a fallback case, diodes may be used. This may improve efficiency. It also doubles the number of motors which can be controlled (at the expense of bi-directional motion).

Rectangular Tuit, Part 4

Posted by cafebabe on Thursday August 03 2017, @06:40PM (#2540)
0 Comments
Code

(This is the 36th of many promised articles which explain an idea in isolation. It is hoped that ideas may be adapted, linked together and implemented.)

I've been off-line doing various tasks. During this period, I've researched Arduino library code. One particularly dumbed-down snippet has appalled several members of my local makerspace. From /usr/share/arduino/libraries/Robot_Control/examples/learn/LineFollowWithPause/LineFollowWithPause.ino:-

Robot.setMode(MODE_LINE_FOLLOW);

Yep. The Arduino library has functionality to abstract away the feedback algorithm required to make a line-following robot. It also has:-

Robot.pauseMode(true);

presumably so a robot can dance, stab someone over the Internet and then continue following a line.

Something I find quite bizarre about the Arduino libraries is the mix of software licences. Are they even compatible? The bootloader is LGPL. Most of the libraries are GPL or MIT licence. Documentation is Creative Commons. I have no idea why documentation would be under a different licence to all of the code.

Most of my time has been spent writing software to process or generate audio signals. I started with a utility to upscale monophonic or stereophonic audio to Ambisonic WXYZ format. It occurs to me that I have to extend the functionality of the sound processor for the speaker array to handle A-Format and B-Format. This optionally requires a 4×4 matrix multiplication prior to the main signal processing. However, the contents of the matrix depends upon the orientation of the original recording. A-Format is typically four directional microphones in a tetrahedral arrangement. Most obviously, one would be "up" while three others would have 120° spacing and a downward incline. This can be converted into the directionally neutral B-Format which is more suitable for mixing and soundstage rotation. Or A-Format could be played directly. However, any use of A-Format assumes one orientation or that some meta-data is present which specifies a known orientation and/or arbitrary inclines.

Anyhow, converting monophonic or stereophonic audio incurs a pivot and one bit loss of audio quality described in Meridian Audio's documentation for Meridian Lossless Packing. Specifically, W=(L+R)/2 and X=(L-R)/2. It was this expected pivot operation which led me to consider A-Format to B-Format processing. Presumably, W=(P+Q+R+S)/4 and the remainder depend upon microphone orientation.

After writing a program to read a one or two channel WAV and write a four channel WAV, it was trivial to re-purpose this into a program which only writes a two channel WAV. This outputs variants of sine waves for line-following robots, quadcopters and suchlike. Code to follow.

Free Speech in the UK (Part II)

Posted by turgid on Sunday July 30 2017, @01:18PM (#2534)
11 Comments
Digital Liberty

A few weeks ago I received a mysterious letter in the snail mail purporting to be from a certain PC Plod of Her Majesty's Constabulary informing me in somewhat stilted and ungrammatical English (Mrs Turgid teaches English at a secondary school and was highly amused) that he would like to speak to me regarding a inappropriate comment made on a UK web forum from an IP address apparently registered in my name. The method of communication requested was quite strange. PC Plod wanted to know my phone number so that he could speak to me in person. PC Plod managed to find my snail mail address, so this was a bit fishy, to say the least.

Smelling a rat, I decided to proceed with caution and to entertain the possibility that this may have been some kind of hoax.

Being a bit of a commie I'm a member of a trade union and have access to free lawyers, so I contacted them. I was granted a telephone conversation with a lawyer who was both very helpful and knowledgeable. I am not a lawyer, and what follows in not legal advice. I am paraphrasing from a conversation that happened many weeks ago.

The lawyer agreed that the wording of the letter was very strange. I made the point that I was quite distressed by it since I am not in the habit of intentionally stirring up trouble, certainly not of a violent kind and certainly nothing that would attract the attention of the police. She conjectured that if it wasn't a hoax, perhaps the police had imagined that someone using my network may have said something contravening the Malicious Communications Act. We both discussed that fact that a lot of subjectivity is involved when trying to argue that something is in breach of the Act and that this has implications for Free Speech. To put it a bit more bluntly, just because PC Plod takes issue with something that doesn't mean that a Court of Law would. It would be expensive and time-consuming for them to prove so. And we are still innocent until proven guilty in England and Wales.

She discussed the circumstances under which a police officer may speak to a member of the public. If a police officer has reason to speak to you regarding a suspected crime or such, you should be interviewed under caution and have the right to legal representation. What you discuss will be written down and signed. If the police officer wishes to speak to you in connection with a civil matter, they have no business doing so. They should not be investigating. Lawyers deal directly with that sort of thing. Finally, apparently, a police officer may wish to speak to you unofficially to offer "a few friendly words of advice." Communicating with the police by phone is a bad idea since you have no idea who you are really speaking to at the other end. You also have no idea whether the call is being recorded, whether there are other people listening in, or whether it is being transcribed.

So a letter was written back to this mysterious PC Plod expressing surprise, concern and asking for more information.

Eventually came the reply. PC Plod glibly and arrogantly stated that a message posted from somewhere behind my router broke Section 1 of the Malicious Communications Act but that he had no idea who posted it. Upon looking at the pseudonym under which the message was posted, I suspected satire. The name suggested a certain amount of reactionary bad temper and perhaps a degree of non-conformity perhaps relating to ethnicity, the sort of thing that your typical alt-wrong snowflake would have difficulty with. Looking at the actual message and the discussion under which it was posted, it was patently obvious that it was satire, highly condensed, but in the spirit of Jonathan Swift's A Modest Proposal. The problem is, apart from the fact that PC Plod is poorly educated, not particularly familiar with the political culture of his own country, has no concept of context, but this particular forum has a major design flaw in that moderators may remove comments, thereby removing any context in which other comments may have been made.

PC Plod did indeed offer some friendly advice on Internet security and signed of with a thinly-veiled threat.

Let me just finish by pointing out that this "grossly offensive" comment was pretty tame compared with the stuff EthanolFueled and TheMightyBuzzard and even Runaway1956 post sometimes around here.

Grid Computing and Cracking Encryption

Posted by turgid on Tuesday July 25 2017, @06:21PM (#2528)
12 Comments
Digital Liberty

Here's one. Suppose you were a Three Letter Agency and you needed to break some strong encryption. Now say that the cost of the hardware to do that was prohibitive (it's not likely to be invented for several decades, for example) but you remembered that millions of people were running "grid computing" (remember that term) applications on their home computers with juicy GPUs (e.g. Folding@Home). Do you reckon you could get some secret code deployed by those projects to help you break that encryption in parallel right under the noses of J. Random Citizen?

Bit Matrix Transpose

Posted by cafebabe on Monday July 24 2017, @02:20AM (#2527)
3 Comments
Code

I require one common routine which:-

  • Following a principle of consistency to the point of over-use, may be used in conjunction with:-
  • Works on one or more micro-controllers. Ideally, works on broadest range from 8 bit CPU to 64 bit CPU. At minimum, must work on a 32 bit micro-controller and should work on a 16 bit micro-controller.
  • Performs an 8×8 bit matrix transpose operation as efficiently as possible. Efficient is minimum clock cycles and minimum processor registers. Where this differs from energy consumption, energy consumption takes precedence.
  • Works as a building block for larger transpose operations.
  • Works efficiently with 16×18 bit inputs or suchlike.

Implementation contains further documentation:-

begin 644 transpose.c.gz
M'XL(`/-D<ED"`^V::V_;-A2&O_M7$"@PV$[2B(SF&DM3H.F&!5BR`6DS8!CZ
M@99IBR@EJB(5-UCZWW>HBW67+"]I"BQN69GBX<MS>'DL'/5XBLZY1E=4A_P+
M^A!27P52,?1'P$*JN?05FAZ/CJ=H_&Y"+/P*?7`9>@>W9:AYY+TTK::9^YKY
M2[9$*QFB!=='"^JON;]&BFF%Y`HQOG8UU$).!5(Z9-13+U-M*I1$D6*K2,3]
M`T%]&B)'>D'(E`(OD&:.Z_//$5/;(8T[UBMR`FHTU*E4>M-&BMZRV/(%7X%C
M*_3[^?E?HQ?PC?LLKJ#YZ`7XS%=)`!IQA9A_R\UX$(AVJ49Z.R$;+@22CA.%
M$"L*0NF`9^`K#1V7@W<Z`E?!2KLH9&NN-`NW\<E`<X\K$.5>()C'?)W.+4P,
M%6L90C</I)@1ON4PCUE7]L41T=),I&9>($,:WJ%;"I.X$$P=HOET;F8;><GZ
MY>[";*J?CK+Q$<+3F1U;9LZ]S-O(](24VE2AT9[B66MC-GRM3;LPF?`W@)7A
M3B1H*.Y,\+!KJ*_1QF4A*[KW]OH*=E;D+;()4*#=X=7;/Z]S2SQK];$R/]7I
M7TDAY`91L]4\N5W6HF=5!84^1Q`4^+\TFU["!,'$"NE\*OJG-\4&L\R@H>(5
M5AL:!/D"@S&CCINIF@%4M#A:\G@;)$.0*:D/$?<**`^-NK$P/9NUM_T;U?$4
M]Z@;BXIZ<N:#2&_G"EV]/T=MGTO3EM@='!T==9;4[AZ]@C*#\B,4&\H)%`(%
M0[&@/.L]ZSV27LPP`U/X.?)B6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0?DF.?=-:X=/?B
MM.C]N-AT,[D?:PM&'QOQ`SR9VA-S"[]Y4[IUNH\[N-$=W.X.KKM#ZNZ0/=TA
MC>Z0=G=(W1U<=P?O[$[_ALDW1.HB#-2T+UXPH5@!_R>D&?]=X!S.]N&,'0[0
MX70<CK[A7!L.K2)LBARRRQSJIH\]A#ZDESXY<^QAS(G].$N^MF[F>67\[/"9
MH4ITRD_@0=(QM[@X+3H?GX-Q1>0B.X!)T)-)N4NNF/6LCG&9'>JR0'?PWP_A
M[.^+<'8WX4@CX>QD?4K/M)-QC7B=R,.S?N3U(ZX):4,1U@^@?N#T`Z9(#>7*
M,$<**2,E:6R'"AD"%;L7*O%P*5;(,*R0'"ND=0?9^V+%?G"LV#6LV/MCA3P(
M4W$O4W%_\+@<O#V8J;@<O+U;\-\/Q$@WQ.Q&B)'](=;&K79>M7.JG4\-7.KE
M42W3T,X1G&]@O#/_S5);[:?7VFXNTG1ZK7P#6SN>WHIBUK,ZQM#3B_=%E]5^
M>JT&K.#^X#M.KU5#5^,80T\OWA==);])2_`Y5DA_\*0<_+PQ^'DM^,(8Y>#G
<U?,:_Z_M\@6AD.DH]$]'7T>C?P&?0(9LUBX`````
`
end

Bit matrix transpose algorithm is its own inverse. So, test performs two transpose operations. Test input uses a marching bit test which is a more thorough version of a walking bit test:-

begin 644 transpose-test.c.gz
M'XL(`/QD<ED"`XV1P6[;,`R&[WX*SD$`Q342V6[1`G%V2"^[M+ODL&'+`-66
M$P*2;$C*L*'HNU>T/3?9>I@.$L6/XO^#6B6P10\/PEO\!3LKC.M:)^%S)ZWP
MV!K82>?AD[!&.@?)*EHEP.X7.<]N87>4<-\:UUJ/)[TD2AAUIZ26QCO0PE9'
M-`=X"B*>.C6M[2]Z4/238OM'<>I#&OPV+\!Y87V?G:&IU*F64#I?8[L\?KQ(
MV2!UD8NG_LLJIN>-J64#C]OMUV@6(C2RO\!=-).FQB:*T)`Y-(P"80]56AV%
MA20)\<\%/$<`)^/P8&0-/='7WZC%/M4W0[#^IT3Q5&6IRE-5K*-`M=1.>J:O
M4Y[2D\7Z+'GSE@S9,"^F\@U?J[S,PW9U-7@8248D*ZD^G&]PQ)PP'S$_QT"^
M5;;_L6%962K>6QB!U%7WFXP$@Y.]84WSO-/N*92<H5ZP(,%B%"PN!0&Z\$&^
M8?&<YU]BFI<J]F<=7J*_"[^;^/_$L6%D6W<TU."\M_UAP]_7;P0J$![8'-,Y
?+H)*_S_\'2_#2?L+?8>5_F0-H\IP?P5])VKL/@,`````
`
end

After more extensive testing, code requires something akin to:-

#ifdef __avr
#define REG16 1
#endif
#ifdef __arm
#define REG32 1
#endif

(Usual instructions for uudecode process.)

Rectangular Tuit, Part 3

Posted by cafebabe on Saturday July 22 2017, @10:30AM (#2523)
0 Comments
Software

(This is the 35th of many promised articles which explain an idea in isolation. It is hoped that ideas may be adapted, linked together and implemented.)

I'm working on a 3D surround sound speaker array as part of a larger project. I am also expecting a delivery of 13 Watt quadraphonic audio amplifiers for a tenuously related project. I have immediate tasks to complete:-

  1. Get the micro-controller equivalent of Hello World working. The purpose of Hello World is a tracer which demonstrates a working development environment. For a micro-controller, this is typically a blinking light. This task has eluded me for more than three years and has become increasingly annoying.
  2. Write software to process WAV files:-
  3. Write software to send Ambisonic WAV files to tuit with suitable formatting.
  4. Write software for tuit to drive speakers.

This is very likely to take more than three weeks. I may be off-line for the majority of this period.

Rectangular Tuit, Part 2

Posted by cafebabe on Saturday July 22 2017, @09:01AM (#2522)
0 Comments
Hardware

(This is the 34th of many promised articles which explain an idea in isolation. It is hoped that ideas may be adapted, linked together and implemented.)

In the book: Waldo by Robert Anson Heinlein, a 1950s style workshop (lathe, hammer, saw) is used to make a 1/4 scale matching pair of three finger mechanical hands. This requires the tedious work of drawing wire, winding motors, constructing capacitors and suchlike. A 1/4 scale set of tools is also constructed. Using the hands and the appropriate size tools, 1/16 scale hands can then be constructed. Likewise for 1/16 scale tools. Then, 1/64 scale hands and tools can be constructed. (Incidentally, this process requires very little material. For example, 1/64 scale hammer handle requires very little wood.)

A stable work environment for an Arduino is an analogous problem. While it is possible to install Arduino development software on any system, this is a haphazard approach which can fail at inopportune times. There are also the problems of security and reproducibility. My solution to this problem is pragmatic but far from ideal. Ultimately, chips used in all Arduino designs are proprietary. Deployment of code onto these chips uses avrdude for AVR architecture or bossac for ARM architecture. These handle architectual quirks, such as EEPROM partitioning, EEPROM privileges as seen from the running code and recovery from failed programming cycles. I also assume conversion of ELF blobs to raw binary occurs at this stage but I have seen no mention of this process. Regardless, all of this occurs over a virtual serial port over USB which itself is poorly defined. The implementation may involve an FTDI serial adapter or functional equialent and therefore safe and continued use is mutually exclusive with Microsoft Windows drivers.

For development of a speaker array, the solution to this mess is as follows:-

  • An arbitrary computer with wired Ethernet. I'm using a donated laptop without any storage except 4GB USB storage containing TailsOS. This computer is only used as a screen, keyboard and SSH client which is thankful because it has a dodgy power connector, systemd and a GUI which is worse than Ubuntu's hateful default.
  • A Raspberry Pi with 8GB MicroSD storage. Variant is unimportant. Primary instance was an old model donated by a children's coding academy. The hot spare belongs to an ex-colleague who is avoiding me. This runs the Jul 2017 release of Raspbian. For my sanity, systemd has been replaced with fully patched simple-init which runs unchanged on all versions of Raspbian released over the last three years. I also note that simple-init correctly handles CVE-2017-9445, unlike systemd.
  • A clone Arduino Due. Also known as a rectangular tuit due to its mind-focussing ability.
  • SPI DACs to arrive within two weeks. These are slightly more expensive than I2S DACs but do not require a continuous bit rate. Therefore, SPI DACs are more suitable for bit-banging techniques which match or exceed the 25Mb/s required for 32 channel audio. For testing, Microchip MCP4921 12 bit SPI DACs will be used with PAM8403 amplifiers. For deployment, Analog Devices AD1952 24 bit SPI DACs will be used with LM741 amplifiers.
  • For testing, cheap speakers will be purchased from retailers. These will be replaced with cube speakers despite their known limitations.

The advantages of this arrangement are numerous:-

  • System is portable and can be demonstrated at any location.
  • System is fairly well air-gapped and can be used off-line.
  • No software updates are required during the development cycle.
  • Can use any choice of text editor.
  • One step build with make.
  • Hedged against most hardware failures with the exception of the Arduino Due development board.
  • Backup of work requires an incremental tar. Total size of one backup will never exceed 8GB.
  • Deliverable is source code which runs on hardware available from multiple manufacturers and multiple vendors.

Rectangular Tuit, Part 1

Posted by cafebabe on Friday July 21 2017, @02:42AM (#2518)
2 Comments
Hardware

(This is the 33rd of many promised articles which explain an idea in isolation. It is hoped that ideas may be adapted, linked together and implemented.)

I'm working on a 3D surround sound speaker array. I received a clone Arduino Due about a week earlier than expected. This has put me in a moderate panic in which I have a depreciating asset which is not working. I've been jolted into resolving loose ends, such as Voltage levels, API and object code deployment. From personal experience and with sincerity, I recommended acquisition of a vintage round tuit. Well, I'm going to consider an Arduino Due as an even more effective Rectangular Tuit.

This tuit is about the size, power and price of a Nokia 3210. Unlike many credit card computers, it does not require a storage card during operation. Instead of screen, keys and radio, there are about 50 I/O lines. Operating system overhead is optional. Therefore, it is expected that timer interrupts at 48kHz will be the highest priority interrupt (or second highest if USB communication takes precedence.) 84MHz divided by 48kHz is exactly 1750 processor ticks per sound sample. Within this period, a processor must:-

  • Context switch.
  • Maintain a large circular buffer of sound samples received from host.
  • Maintain a small circular buffer of sound samples taken from the large buffer for the purpose of compensating for differing speaker distance.
  • For each speaker, obtain a historical sample from the small buffer where time delay compensates for speaker distance.
  • For each speaker, for each channel, multiply and add each historical sample against values which are pre-computed to cover speaker angle, speaker distance and master volume.
  • Bit-bang values to 12 bit, 16 bit, 18 bit or 24 bit DACs. It may be worthwhile to interleave multiplication and bit-banging so that signals appear on outputs for maximum duration.
  • Bit-banging of cell networking may also occur.

It may be useful to vary this process for 192kHz monophonic sound or suchlike. Regardless, with available processing power and I/O, it may be possible to drive 64 speakers and/or multiple sets of headphones. Each set of headphones may have accelerometers and/or Hall effect devices for the purpose of maintaining Ambisonic sound-stage position.

Unfortunately, timing is complicated by the Arduino API which only permits timers to be specified to the nearest microsecond (rather than nanosecond). Therefore, it may be easier to play sound in multiples of 50kHz. The alternative is patch the Arduino libraries or implement a system which plays samples slightly too fast. The pitch shift would be approximately 0.2% but I find it less tacky to omit or repeat 1:600 samples or so rather than endure a pitch shift.

There are further limitations. The tuit uses a different instruction set to other Arduino boards. Support is greatly restricted. The Jul 2017 release of Raspbian doesn't work with the tuit. Nor is it available from an Ubuntu Linux desktop which was configured to install everything. However, it appears that using a hateful IDE is definitely optional.

Typically, micro-controller development uses an IDE. This may be Eclipse, Atmel Studio, Arduino's IDE or something else. I vastly prefer to be unconstrained by text editor. This should be the norm when using serial line programming (or virtual serial port programming tunnelled over USB). However, it is now custommary to have configuration within an IDE to specify virtual serial port name and invoke an external chip programming utility from a menu item.

For Atmel AVR chips, avrdude appears to be the default choice. For Atmel ARM chips, bossac performs the same function - or not if distributions don't have the configuration. Either way, I'd prefer to perform these steps via a Makefile. In addition to simplifying deployment, it fixes problems with deployment speed.

The End Of "Piracy"

Posted by cafebabe on Thursday July 20 2017, @01:27PM (#2516)
10 Comments
Techonomics

(This is the 32nd of many promised articles which explain an idea in isolation. It is hoped that ideas may be adapted, linked together and implemented.)

I'm promoting a set of ideas which rely upon multi-media and gain maximum value from ease of access to third-party multi-media. I would like to see people fairly rewarded for producing high quality, factually accurate content. Unfortunately, by mentioning "fair", "quality" and "factual", I'm already in a quagmire. Without resolving these issues, I'll extrapolate content distribution which is likely to occur with or without the legal permission of content producers.

Although patents and copyright should be considered separately, I have one patent pending with a failing nation state. Also, I believe that it is pertinent to mention that my beliefs differ from law. I believe that privacy should have more emphasis than free speech. I believe that rights should be extended to animals. This includes privacy. I believe that copyright, work-for-hire and privacy can be aligned towards maximum collective benefit rather than historical levels of effort. I assume that I'm a pragmatist who can overcome some bias to understand people who don't follow law or social norms.

I hope that people understand the distinction between theft of physical property and the "theft" of information. The former may include physical violence or may otherwise incur permanent injury or risk to life. The latter leaves people (mostly) with the same bit patterns but may incur loss of privacy and/or loss of expected future revenue. Physical loss and data "loss" can both be devastating but people affected by "theft" are very likely to be content rich, physically secure and unaffected by an illusory social safety net.

It should be obvious that large-scale audio copying preceded video copying because audio generally requires less resources. However, a friend and I were quite curious about a potential rise in book copying. Historically, the easiest method to copy a book was photocopying and this was generally more expensive than buying another, legitimate copy of a book. Therefore, photocopying was generally restricted to sections of a book, rare books or matters of urgency. However, technology has changed and it is now possible to copy thousands of books per minute.

My friend, an author, was concerned that discs with 20000 books were openly advertised on EBay and elsewhere. I assumed it was only books that were freely available. My friend was less certain. I was asked to investigate. So, I sent about US$5 to a relatively reputable party and recieved a disc. Indeed, it had about 20000 books and, indeed, it was a smattering of text files with Gutenberg legal notices. However, some of it was certainly violating copyright. I gave the disc to my friend without taking a copy. (What am I going to do with 20000 fiction books? Read them all?)

My friend has now come to the conclusion that it is a sign of merit to be included in a general corpus of literature. Indeed:-

You do anything in the world to gain a reputation. As soon as you have one, you seem to want to throw it away. It is silly of you, for there is only one thing in the world worse than being talked about, and that is not being talked about. -- The Picture Of Dorian Gray by Oscar Wilde.

However, a major question remains. Why did book copying gain popularity after music and film copying? It is large *sets* of books and therefore the volume of data exceeds the average film. From minor extrapolation, there will be a subsequent round of music and film copying but each will be a set of media. So, expect stuff like 1960s-Motown.zip followed by French_Noir_(Subtitled).7z and finally Terran-Culture-(1650-2050).tar.xz

However, what happens when those fine pioneers of the digital frontier run out of third-party content? Will they live-stream themselves at increasingly detailed resolution? Or will they find other stuff to distribute? We've already seen US-Diplomatic-Cables-(1966-2010) (and the resulting chaos). Will we see US-Tax-Records-(2010-2022).zip? Maybe Medical-Records-UK-NHS-2035.zip? DNA-From-Iceland-2042.7z? What havoc will this cause? Will we see the Helvetican War where lawyers, bankers and sociopaths are hung from lamp-posts? Will this be followed by bio-engineered genocide? I don't know. However, I know that:-

  • Bad things happen when the bread and circuses stop.
  • Models are useless if they assume that everyone is rational.