-
EVERYTHING must can-be repaired or exchanged by
the absolute end user.
1.1 so, NO SOLDERING if possible. Make the cable
connections with cable bricks to be used with a screwdriver.
1.2 Enduser should only BUY the parts, STICK them together like Lego,
make "some" cable connections (only power and some USB if possible)
and install the software, maybe including the OS, maybe not.
1.3 Enduser must can-do everything with the manuals lying by.
1.3.1 Each install step from the factory should be explained and such. -
NO PLASTIC if possible (mostly concerning the case.)
you can use: Wood like from tobacco cases, Metal, Fabric, Stone,
even Ropes :), but please stop making plastic cases. -
NO TOUCH SCREEN! Benis like haptic stuff, so buttons and switch-buttons are
favourised over touchscreens with laggy software made by not myself. :) -
Please let it look really nice, like a high class DIY stereo amplifier or something...
4.1 With metal buttons and potis and stuff, you know...
BENIplayer = Benobis Environment for No Internet: the player
a.k.a Beni Empfiehlt: No Internet: The Offline Player
An Offline MP3 Player, Music Player, Music Recorder, and maybe TV-Remote and other stuff.
See here: https://www.youtube.com/watch?v=fXjCIICesxU
Updates:
-> You can switch between INTERNAL DIRECTORY or (CF/SD) CARDS now. (in the globals.py file)
-> It will try to mount sdb1 to /media/sdcard1 and sdb2 to /media/sdcard2
-> you can change those values in the globals.py
-> Including DID.py update for showing CF-cards mounted or not, or ID for internal drive.
-> MP3 Player fully working.
Maybe almost, there may be some errors but I tried to eliminate all upcoming bugs like
"wrong file format, i will crash now" -> only loading mp3s, wavs, oggs, and flacs now.
No Buttons for Volume right now.
There will be a function menu on button 5 where you can set the volume and stuff "virtually",
so, no extra buttons needed.
-> Renames all (relevant) files and directories for convenience
(replaces spaces with _ in directories,
and much other characters like äàüè in the filenames.)
-> Display Library DID.py "for musicplayers", with special features, see below Appendix A.
-> SoundPlayer library and DFRobot-Displaydriver-Library used: All files put together here,
like in a trash can, no hassle with downloading the external stuff -
just get this one and dive into the directories. Remember their licences. I don't. :)
You need to:
sudo python BURP.py
(using sudo)
..so that the renaming works without hassle.
Working now with this display-button-HAT:
https://www.pi-shop.ch/iic-16x2-rgb-lcd-keypad-hat-v1-0
https://wiki.dfrobot.com/IIC_16X2_RGB_LCD_KeyPad_HAT_1.0)_SKU%3ADFR0514%2FDFR0603
see Appendix A
also see the installation guide below.
I miss the times when we put in a cassette, listen to the radio and when we liked a song, we just pressed on the record button and got it for ourselves. Then we used another tape in our 2-tape-deck and made a mixtape for our beloved girlfriends. You know what? I never had a girlfriend then but now - I cannot make a mixtape anymore. It's not the same if you say, "Hey girl, I bought you some music on spotify." or "Hey girl, here is my mix for you on this MP3-player but I want it back because it was expensive." or "Hey girl, I have some music on my server for you but you need to have a 500$ computer to copy it to your 20 bucks MP3-player." and on top of this, you need to say - everytime - "You need to listen the tracks in THAT order and no other." This sounds like a command, not like a proof of love, don't you think?
BURP shall guide us out of this digital mess.
That said, BURP should record not several files but at several positions in the same file. The recording is digital but it behaves like an analog recording.
Also, a BURP-Player should have at least one (normal) CF-card slot. NOT microSD and NOT SD but CF. You can put your microSD into an SD-converter and this one in a CF-converter but not vice-versa. And you cannot write that much with a pen on a microSD. Also, not on an SD but at least something like "MIX TPE", so I choose CF because it's broadly accepted in the Foto Industry, rewritable and stabil. I finally decided to use CF-cards as new "Cassettes".
A "good" BURP-player should have two CF-card slots so you can copy music and ET-files without the need of a computer. In this configuration, it also should be useable as card reader because computers normally have SD or microSD-card slots but not CFs. A standard Nikon camera has 2 SD-card-slots and no one gives a shit, but I think, there it is really not of use because you will edit your images on a computer anyway. But this does not count for music. You do not have to edit your music after you got it (as whole MP3-file, not as recording), like an image with Lightroom. So, two (CF-)cards on an MP3-player are way more logical than in a camera. But...tell that the industry.
The actual position in the file will be saved as tape position. On Play, the position will be advanced, the data will not be changed but output as sound. If you press the record button, it will overwrite the file at this position and the position itself changes, too, like in Play mode. If the recording is < EOF, the data from the new position until EOF remains the same. Rewind will subtract some time from the position and play the file backwards-fast if possible. Forward the same, but advancing the position. If you forward over EOF of this file, the missing time will be filled with ambient white noise. Stop will stop playing/recording and set the position to 0. (? Stop works not really like that on the original but more like Pause but what was Pause for then?
- i know, the mechanics - but now?)
Another button or (UI-)mechanic will switch to a normal MP3-Player. More on that if the above works.
The player actually uses the SoundPlayer-module found here:
http://www.python-exemplarisch.ch/raspi/de/sound.inc.php
It's a wrapper for the SoX sound API.
Use setup.sh for installing it.
Also it uses the lcd library, no idea how I installed it. It comes with the DFRobot stuff. Ah yes, you may just need to copy this lcd1602.py file out of their folders.
Download this repo onto your linux machine, into your home folder or somewhere you want: git clone https://github.com/ben0bi/BeRec.git
then open rc.local, cd to your BeRec folder (you need to be in this folder) and..
(
Open rc.local:
sudo nano /etc/rc.local
)
..write this into it (on a raspbian):
cd /home/pi/BeRec/
sudo ./burpscreen.sh
Ctrl-O, Ctrl-X, reboot - the player should now run.
If not, check directories and permissions.
Maybe you need to set the usb sound card. First disable the internal one:
cd /etc/modprobe.d sudo nano alsa_blacklist.conf
blacklist snd_bcm2835
[ctrl-o][ctrl-x]
..install alsa stuff
#nope sudo apt-get install libasound2-plugin-equal sudo apt-get install alsa-utils
dann: alsamixer -D hw:1
sudo reboot
As said above, BURP may need to run in rootlevel-mode because of file/directory permissions when renaming the files. This is way easier than checking all those permissions. :) Also, in a while, when the CF-card option will follow, the end user may have locked directories on the card which he doesn't even know about. (Mac to PC to Linux to Mac ;) ) So better start BURP in root mode.
You may need to change the directory to your sound files in the globals.py file.
If you want to edit something after autoboot, you can kill the BURP-screen before with the killscreen.sh-script.
First, check the name of the screen: sudo screen -ls
It's sudo because the screen is on the root level. You should see a number.BURP screen here.
Now just
sudo ./killscreen.sh XXX.BURP
where XXX is the number given above.
and then you can do your work. :)
Hope this helps on your way.
DID.py is the display driver used with the DFRobot 16x2 lcd display seen in the links above. It has some special features for music players:
The following icons are available: Play, Pause, Stop, Rec, Recpause, Smiley, Clock, Arrow in each direction.
The lower line can display a prebuilt player menu (icons in brackets) which looks like this below. This icons must be initialized first on positions 1 through 7. Position 0 is for the direct icon and the display seems to support only 8 icons at once. You can use the DIREF_ variables for the positions of the icon set or the DISYM_ arrays for direct icon.
Menu:
[ID] [RND]
or
[CF1][CF2] [RND]
where ID = INTERNAL DRIVE symbol, RND = RANDOM or STRAIGHT symbol, CF1, CF2 = CF_MOUNTED or CF_EMPTY symbols, in the number of CFcards defined in the globals.py.
In the upper left, a (direct, position 0) symbol will be displayed. Set it with: DID.symbol(symbol_array_name)
The upper line can have a scrolling text which will be updated with the DI_UPDATE-function. Call this function after some time, whereelse it would be to fast. It starts at position 1 so the symbol will not be interfered.
In the lower right there can be a time display. It looks like this:
[Clock]MM:SS
or
[Clock]H:MM:SS
If the track was playing longer than a hour (>60 minutes), the hours will be shown, too.
When the player is in play or pause mode, the track time will be shown.
In stop and welcome (after boot) mode, the player menu above will be shown.
It does NOT count the track time from the file, so you cannot reverse the time right now. Sorry for that. The player just counts the frametime and makes it's own "time-marks".
Last but not least, and this is the most useful function beneath the scrolltext: The display fades out all colours in a step of 3/frame after 5 seconds. When it is black, the flag DION will be set to 0. If you turn the display back on with DI_ON(), it will restart the counter. When the display is black, the scrolling will stop, too. Also, the time-UI will not be updated anymore until DION==1. Saves power and eye-attraction. :)